/* image.png 디자인 시안 기반: 원색 팔레트 + 컨덴스드 볼드 제목 + 줄무늬 배너 + 도형 내비게이션 */
:root {
  --black: #000000;
  --green: #029902;
  --yellow: #fcbe1d;
  --blue: #1c40cf;
  --red: #f83c00;
  --brown: #7f4d1f;
  --dark-brown: #422307;
  --cream: #fbf9ea;
  --sky: #dae8ff;
  --white: #ffffff;
  --gray: #ebebeb;
  --muted: #5c5c5c;

  --display: "Archivo", "Black Han Sans", "Noto Sans KR", sans-serif;
  --display-ko: "Black Han Sans", "Noto Sans KR", sans-serif;
  --sans: "Archivo", "Noto Sans KR", system-ui, sans-serif;
  --serif: "Gowun Batang", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; }
button { font: inherit; cursor: pointer; }

.label {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.serif { font-family: var(--serif); }

/* ---------- 상단 내비게이션 ---------- */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
}

.logo {
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.shape-nav { display: flex; align-items: center; }

.shape {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s;
}
.shape:hover { transform: translateY(-3px) rotate(-4deg); }
.shape.blob { background: var(--yellow); border-radius: 42% 58% 46% 54% / 50% 44% 56% 50%; }
.shape.square { background: var(--blue); color: var(--white); }
.shape.circle { background: var(--red); color: var(--white); border-radius: 50%; }

/* ---------- 히어로 ---------- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

h1, h2, .panel-title, .verdict-title {
  font-family: var(--display-ko);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

h1 {
  margin: 0;
  font-size: clamp(4.5rem, 17vw, 11rem);
}

.lead {
  margin: 28px 0 0;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  line-height: 1.5;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 72px;
}

/* ---------- 줄무늬 배너 (Let's work together) ---------- */
.stripes {
  --stripe: var(--green);
  --fill: var(--sky);
  padding: 56px 0 56px 72px;
  background:
    repeating-linear-gradient(90deg, var(--stripe) 0 22px, var(--fill) 22px 44px);
}
.stripes.yellow { --stripe: var(--yellow); --fill: var(--cream); }

.panel {
  background: var(--fill);
  padding: 32px clamp(20px, 4vw, 48px) 36px;
}

.panel-title {
  display: block;
  margin-bottom: 20px;
  color: var(--blue);
  font-size: clamp(2rem, 5vw, 3.2rem);
}
.stripes.yellow .panel-title { color: var(--red); }

textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 16px 18px;
  font: inherit;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 1.05rem;
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 0;
  outline: none;
}
textarea:focus { border-color: var(--blue); box-shadow: 4px 4px 0 var(--blue); }

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 24px;
}
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.count { font-size: 0.8rem; color: var(--muted); white-space: nowrap; padding-top: 6px; }

/* ---------- 큰 버튼 (View all projects) ---------- */
.big-button {
  width: 100%;
  padding: 26px 24px;
  border: none;
  border-radius: 36px;
  background: var(--blue);
  color: var(--sky);
  font-family: var(--display-ko);
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  box-shadow: -10px 0 0 var(--yellow);
  transition: background 0.2s, color 0.2s;
}
.big-button span {
  text-decoration: underline dotted var(--green);
  text-decoration-thickness: 4px;
  text-underline-offset: 12px;
}
.big-button:hover { background: var(--red); color: var(--white); }
.big-button:hover span { text-decoration-color: var(--yellow); }
.big-button:disabled { opacity: 0.7; cursor: wait; }

/* ---------- 칩 / 텍스트 링크 ---------- */
.chip {
  padding: 6px 14px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.chip:hover { background: var(--yellow); }
.chip[aria-selected="true"] { background: var(--black); color: var(--white); }

.text-link {
  border: none;
  background: none;
  padding: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue);
}
.text-link.red { color: var(--red); }
.text-link:hover { text-decoration: underline dotted; text-underline-offset: 4px; }

/* ---------- 결과 ---------- */
.result { animation: rise 0.5s ease; scroll-margin-top: 20px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.verdict {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--black);
}

.score {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 900;
  font-size: 4rem;
  line-height: 1;
}
.score.good { background: var(--green); color: var(--white); border-radius: 50%; }
.score.neutral { background: var(--yellow); border-radius: 42% 58% 46% 54% / 50% 44% 56% 50%; }
.score.bad { background: var(--red); color: var(--white); }

.verdict-title {
  margin: 0 0 10px;
  font-size: clamp(3rem, 9vw, 5.5rem);
}
.verdict-title.good { color: var(--green); }
.verdict-title.neutral { color: var(--brown); }
.verdict-title.bad { color: var(--red); }

.verdict-summary { margin: 0; font-size: 1.15rem; }

.symbols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 24px;
  margin-top: 32px;
}

.symbol {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray);
}

.symbol-art {
  height: 120px;
  display: grid;
  place-items: center;
  font-family: var(--display-ko);
  font-size: 3rem;
  background: repeating-linear-gradient(90deg, var(--stripe) 0 16px, var(--fill) 16px 32px);
}
.symbol.good { --stripe: var(--green); --fill: var(--sky); }
.symbol.neutral { --stripe: var(--yellow); --fill: var(--cream); }
.symbol.bad { --stripe: var(--red); --fill: var(--cream); }

.symbol-art span {
  background: var(--fill);
  padding: 4px 22px;
  color: var(--blue);
}
.symbol.bad .symbol-art span { color: var(--red); }
.symbol.neutral .symbol-art span { color: var(--dark-brown); }

.symbol-body { padding: 18px 20px 22px; }

.symbol-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.symbol-meta .label { margin: 0; }
.symbol-meta h3 { margin: 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }

.symbol p { margin: 0; }
.symbol .tip { margin-top: 12px; font-family: var(--serif); color: var(--muted); }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.badge.good { color: var(--green); }
.badge.bad { color: var(--red); }
.badge.neutral { color: var(--brown); }

/* 행운: 블롭 · 사각 · 원 */
.lucky {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.lucky div {
  aspect-ratio: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px;
}
.lucky div:nth-child(1) { background: var(--yellow); border-radius: 46% 54% 42% 58% / 56% 48% 52% 44%; }
.lucky div:nth-child(2) { background: var(--blue); color: var(--white); }
.lucky div:nth-child(3) { background: var(--red); color: var(--white); border-radius: 999px; }
.lucky small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; }
.lucky strong { font-family: var(--display-ko); font-weight: 400; font-size: clamp(1.4rem, 4vw, 2.2rem); line-height: 1.2; }

.empty-result { padding: 40px 0; border-top: 2px solid var(--black); border-bottom: 2px solid var(--black); }
.empty-result .verdict-title { color: var(--blue); font-size: clamp(2rem, 6vw, 3.4rem); }
.empty-result p { margin: 8px 0; }

/* ---------- 상세 종합 해설 ---------- */
.reading {
  margin-top: 32px;
  padding: 28px clamp(20px, 4vw, 40px) 30px;
  background: var(--white);
  border: 3px solid var(--black);
  box-shadow: 8px 8px 0 var(--black);
}
.reading-head { margin-bottom: 16px; }
.reading-head h3 {
  margin: 0;
  font-family: var(--display-ko);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1;
  color: var(--blue);
}
.reading-lead { margin: 0 0 16px; font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; }
.reading-part {
  margin: 0;
  padding: 14px 0;
  border-top: 2px dotted var(--black);
  line-height: 1.75;
}
.reading-part strong {
  display: inline-block;
  margin-right: 10px;
  padding: 0 10px;
  font-family: var(--display-ko);
  font-weight: 400;
  background: var(--yellow);
  color: var(--black);
}
.reading-part strong.good { background: var(--green); color: var(--white); }
.reading-part strong.bad { background: var(--red); color: var(--white); }
.reading-part strong.neutral { background: var(--yellow); }
.reading-part:last-child strong { background: var(--blue); color: var(--white); }

.scene {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--cream);
  border-left: 4px solid var(--blue);
}
.scene .label { margin-bottom: 6px; color: var(--blue); }
.scene ul { margin: 0; padding-left: 18px; }
.scene li { margin: 4px 0; font-size: 0.95rem; }

/* ---------- 꿈 콜라주 공유 카드 ---------- */
.collage {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 2px solid var(--black);
}

.collage-frame {
  aspect-ratio: 4 / 5;
  background: var(--gray);
  box-shadow: 8px 8px 0 var(--black);
}
.collage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.3s; }
.collage.ready canvas { opacity: 1; }

.collage-title {
  margin: 0 0 12px;
  font-family: var(--display-ko);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  color: var(--blue);
}
.collage-side .serif { margin: 0 0 24px; font-size: 1.05rem; }

.collage-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.pill-button {
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  color: var(--white);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pill-button.blue { background: var(--blue); }
.pill-button.red { background: var(--red); }
.pill-button:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--black); }

.collage-status { min-height: 1.6em; margin: 12px 0 0; font-size: 0.88rem; font-weight: 600; color: var(--green); }

/* ---------- 섹션 공통 ---------- */
.block { padding-top: 28px; border-top: 1px solid var(--gray); scroll-margin-top: 20px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.section-head h2 { margin: 0; font-size: clamp(2.4rem, 7vw, 4rem); }

input[type="search"] {
  flex: 1 1 220px;
  max-width: 300px;
  padding: 10px 16px;
  font: inherit;
  font-family: "Noto Sans KR", sans-serif;
  border: 2px solid var(--black);
  border-radius: 999px;
  outline: none;
  background: var(--white);
}
input[type="search"]:focus { box-shadow: 3px 3px 0 var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

/* 사전: Inspo loop 느낌의 크림 배경, 촘촘한 카드 */
.chip small { font-size: 0.72rem; opacity: 0.6; }

.dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 14px;
  background: var(--cream);
}

.dict-item {
  min-width: 0;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-left: 4px solid var(--yellow);
  background: var(--white);
  color: var(--black);
  transition: transform 0.15s, box-shadow 0.15s;
}
.dict-item.good { border-left-color: var(--green); }
.dict-item.bad { border-left-color: var(--red); }
.dict-item:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--brown); }

.dict-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.dict-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 1.02rem;
}
.dict-item .badge { flex: none; }
.dict-item.open { grid-column: 1 / -1; cursor: default; box-shadow: 3px 3px 0 var(--brown); transform: none; padding: 14px 16px; }
.dict-item.open strong { font-size: 1.2rem; }
.dict-item .detail { margin: 8px 0 0; max-width: 62ch; }
.dict-item .detail.tip { font-family: var(--serif); color: var(--muted); }
.dict-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); }

.dict-more { display: flex; justify-content: center; margin-top: 14px; }
.dict-more .text-link { font-size: 0.95rem; }

/* ---------- 기록 ---------- */
.history { list-style: none; margin: 0; padding: 0; }
.history li { border-bottom: 2px dotted var(--black); }
.history li button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border: none;
  background: none;
  text-align: left;
  color: var(--black);
}
.history li button:hover .text { color: var(--blue); }
.history .text { font-family: var(--serif); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.history .date { flex: none; font-size: 0.78rem; font-weight: 600; color: var(--muted); }

/* ---------- 꿈 달력 ---------- */
.history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.calendar { padding: 20px; background: var(--cream); }

.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cal-title {
  margin: 0;
  font-family: var(--display-ko);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1;
}
.cal-nav {
  width: 44px;
  height: 44px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: var(--white);
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.cal-nav:hover { background: var(--black); color: var(--white); }

.cal-summary { margin: 10px 0 16px; font-size: 0.85rem; font-weight: 600; color: var(--muted); text-align: center; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-weekday {
  padding-bottom: 4px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.cal-weekday.sun, .cal-cell.sun .num { color: var(--red); }
.cal-weekday.sat, .cal-cell.sat .num { color: var(--blue); }

.cal-cell {
  aspect-ratio: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px;
  border: 2px solid transparent;
  background: var(--white);
  color: var(--black);
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cal-cell.empty { background: transparent; }
button.cal-cell:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--brown); }
.cal-cell .num { font-weight: 700; font-size: 0.9rem; line-height: 1; }
.cal-cell.today { border-color: var(--black); }
.cal-cell.selected { background: var(--yellow); box-shadow: 3px 3px 0 var(--black); }
.cal-cell.selected .num { color: var(--black); }

.marks { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.marks em { font-style: normal; font-size: 0.65rem; font-weight: 700; }

/* 길몽 = 초록 원, 평몽 = 노랑 블롭, 흉몽 = 빨강 사각 */
.mark { display: inline-block; width: 10px; height: 10px; flex: none; }
.mark.good { background: var(--green); border-radius: 50%; }
.mark.neutral { background: var(--yellow); border-radius: 42% 58% 46% 54% / 50% 44% 56% 50%; outline: 1px solid var(--dark-brown); outline-offset: -1px; }
.mark.bad { background: var(--red); }

.cal-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 0.78rem;
  font-weight: 600;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

.day-detail .label { padding-bottom: 10px; border-bottom: 2px solid var(--black); margin-bottom: 0; }
.day-detail .history li button { flex-direction: column; align-items: flex-start; gap: 4px; }
.day-detail .history .text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day-detail .history .date { display: inline-flex; align-items: center; gap: 6px; }
.history-empty { padding: 20px 0; color: var(--muted); font-family: var(--serif); border-bottom: none !important; }

/* ---------- 푸터 (반원 도형) ---------- */
footer {
  max-width: 1100px;
  margin: 120px auto 0;
  padding: 0 24px;
  overflow: hidden;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 600;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--blue); }
.disclaimer { margin: 12px 0 20px; font-size: 0.8rem; color: var(--muted); }

.footer-shapes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  height: 90px;
}
.footer-shapes span { display: block; height: 100%; }
.f-yellow { background: var(--yellow); border-radius: 90px 90px 0 0; }
.f-blue { background: var(--blue); }
.f-red { background: var(--red); border-radius: 50% 50% 0 0 / 100% 100% 0 0; margin: 0 10%; }

/* ---------- 모바일 ---------- */
/* 꿈 달력 연속 기록 */
.cal-streak {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 16px;
}
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 2px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
}
.streak-pill.pending { background: var(--white); color: var(--red); }
.streak-pill.off { background: var(--white); border: 2px dashed #bdbdbd; color: var(--muted); }
.streak-shape { width: 12px; height: 12px; background: currentColor; border-radius: 50% 50% 0 0 / 70% 70% 0 0; }
.streak-best { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.cal-cell.streak { box-shadow: inset 0 -6px 0 var(--red); padding-bottom: 12px; }
.cal-cell.streak.selected { box-shadow: inset 0 -6px 0 var(--red), 3px 3px 0 var(--black); }

@media (max-width: 640px) {
  .collage { grid-template-columns: 1fr; gap: 24px; }
  .collage-actions > * { flex: 1 1 auto; }
  .history-layout { grid-template-columns: 1fr; gap: 24px; }
  .calendar { padding: 12px; }
  .cal-grid { gap: 4px; }
  .cal-cell { padding: 4px; }
  .cal-cell .num { font-size: 0.78rem; }
  .mark { width: 7px; height: 7px; }
  .topnav { padding: 16px; }
  .shape { width: 52px; height: 52px; font-size: 0.75rem; }
  .hero { padding: 32px 16px 48px; }
  main { padding: 0 16px; gap: 56px; }
  .stripes { padding: 28px 0 28px 28px; }
  .panel { padding: 24px 18px 26px; }
  .input-footer { flex-direction: column; }
  .big-button { border-radius: 24px; }
  .verdict { grid-template-columns: 1fr; gap: 20px; }
  .score { width: 110px; height: 110px; font-size: 3rem; }
  .symbols { grid-template-columns: 1fr; }
  .lucky { gap: 8px; }
  .lucky div { aspect-ratio: 1; }
  .dict-grid { padding: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  input[type="search"] { max-width: none; }
  footer { padding: 0 16px; margin-top: 80px; }
  .footer-shapes { height: 56px; }
}
