* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  min-height: 100vh;
  color: #111;
}

header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}

header h1 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #111;
}

header .sub {
  font-size: 0.9rem;
  color: #e63946;
  font-weight: 500;
}

.tagline {
  color: #888;
  margin: 0.8rem 0 1.5rem;
  font-size: 0.85rem;
}

.search-box {
  max-width: 360px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  background: #fff;
  color: #111;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: #e63946;
}

.search-box input::placeholder {
  color: #aaa;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.cat-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cat-btn:hover {
  color: #111;
  border-color: #999;
}

.cat-btn.active {
  background: #e63946;
  border-color: #e63946;
  color: #fff;
}

main {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.section {
  margin-bottom: 1.5rem;
  border: 1px solid #eee;
  background: #fff;
}

.section-header {
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.section-header h2 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.situation-block {
  border-bottom: 1px solid #f0f0f0;
}

.situation-block:last-child {
  border-bottom: none;
}

.situation-title {
  padding: 0.8rem 1rem;
  background: #fff;
  color: #e63946;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #f5f5f5;
}

.phrase-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.phrase-item:last-child {
  border-bottom: none;
}

.phrase-item.q {
  background: #fff5f5;
  border-left: 3px solid #e63946;
}

.phrase-item.a {
  background: #f8f8f8;
  border-left: 3px solid #2a9d8f;
  padding-left: calc(1rem + 10px);
}

.phrase-item.tip {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding-left: calc(1rem + 10px);
}

.phrase-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  display: block;
}

.phrase-item.q .phrase-type { color: #e63946; }
.phrase-item.a .phrase-type { color: #2a9d8f; }
.phrase-item.tip .phrase-type { color: #f59e0b; }

.jp {
  font-size: 1.15rem;
  color: #111;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.pn {
  font-size: 0.95rem;
  color: #e63946;
  margin-bottom: 0.2rem;
}

.kr {
  font-size: 0.9rem;
  color: #666;
}

/* 숫자/돈/시간 그리드 */
.grid-section {
  padding: 1rem;
  border-top: 1px solid #f0f0f0;
}

.grid-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.number-item {
  background: #fafafa;
  padding: 0.6rem;
  text-align: center;
  border: 1px solid #eee;
}

.number-item .num {
  font-size: 1rem;
  font-weight: 600;
  color: #e63946;
}

.number-item .jp-num {
  font-size: 0.85rem;
  color: #111;
  margin: 0.2rem 0;
}

.number-item .pn-num {
  font-size: 0.75rem;
  color: #888;
}

.money-grid, .time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.money-item, .time-item {
  background: #fafafa;
  padding: 0.6rem 0.8rem;
  border: 1px solid #eee;
}

.money-item .price, .time-item .time-kr {
  font-size: 0.8rem;
  color: #e63946;
  font-weight: 600;
}

.money-item .jp-money, .time-item .jp-time {
  font-size: 0.95rem;
  color: #111;
  margin: 0.15rem 0;
}

.money-item .pn-money, .time-item .pn-time {
  font-size: 0.8rem;
  color: #888;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #aaa;
  font-size: 0.8rem;
  border-top: 1px solid #eee;
}

/* 검색 결과 없음 */
.no-result {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
}

/* 반응형 */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.6rem;
  }

  .cat-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
  }

  .jp {
    font-size: 1rem;
  }

  .pn {
    font-size: 0.85rem;
  }
}

/* 애니메이션 */
.section {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hidden {
  display: none;
}
