:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #17202e;
  --muted: #5d6676;
  --line: #e6e1d8;
  --brand: #0f6e6a;
  --accent: #0f6e6a;
  --accent2: #e2725b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 32, 46, .06), 0 8px 24px rgba(23, 32, 46, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-bottom: 16px; }
main { max-width: 1280px; margin: 0 auto; padding: 0 16px 48px; }
section { margin-top: 44px; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 62ch; margin: 12px 0 0; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100vw - 1248px) / 2));
  background: rgba(250, 248, 244, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.site-header nav { display: flex; align-items: center; gap: 6px; }
.nav-link, .menu summary {
  padding: 7px 12px; border-radius: 999px; text-decoration: none; font-size: .93rem; cursor: pointer; list-style: none;
}
.nav-link:hover, .menu summary:hover { background: #efeae0; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: "▾"; margin-left: 5px; font-size: .75em; color: var(--muted); }
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px;
}
.menu-list a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: .93rem; white-space: nowrap; }
.menu-list a:hover { background: #f3efe7; }
.menu-list a[aria-current] { font-weight: 700; color: var(--brand); }

/* home hero */
.hero { margin-top: 36px; }
.hero-card {
  display: flex; align-items: center; gap: 18px; margin-top: 24px; padding: 22px 24px;
  border-radius: 22px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
}
.hero-emoji { font-size: 3.2rem; line-height: 1; }
.hero-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hero-text small { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; opacity: .92; }
.hero-text strong { font-size: clamp(1.3rem, 3.4vw, 1.9rem); line-height: 1.2; }
.hero-text > span { opacity: .95; font-size: .95rem; }
.hero-cta { background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .93rem; white-space: nowrap; }

/* home page top: short, so photos show without scrolling */
.home-top { margin-top: 14px; }
.home-top h1 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin-bottom: 10px; }
.home-top .chips, .home-top .size-bar { margin-bottom: 10px; }
.fest-chip .countdown { margin-left: 4px; font-size: .78rem; font-weight: 700; color: var(--accent); }
.fest-chip.is-on .countdown { color: #fff; opacity: .85; }
.fest-chip .countdown:empty { display: none; }

/* festival cards */
.fest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fest-card {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent);
  text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.fest-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.fest-emoji { font-size: 2rem; line-height: 1.2; }
.fest-name { font-weight: 700; font-size: 1.05rem; }
.fest-meta { color: var(--muted); font-size: .9rem; }
.fest-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.fest-foot .countdown { color: var(--accent); font-weight: 700; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  font: inherit; font-size: .9rem; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.size-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.size-label { font-size: .88rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.size-chip.is-on { background: var(--accent); border-color: var(--accent); }

/* prompt cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; scroll-margin-top: 80px;
}
.ph { aspect-ratio: 4 / 5; background: #eee; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-empty {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(160deg, var(--accent), var(--accent2)); color: #fff; text-align: center; padding: 12px;
}
.ph-empty span { font-size: 3.4rem; line-height: 1; }
.ph-empty small { font-size: .78rem; opacity: .9; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: #f1ede4; color: var(--muted); }
.card h3 { font-size: 1rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.prompt-text {
  margin: 0; padding: 12px; border-radius: 10px; background: #f6f3ec; border: 1px dashed var(--line);
  font-size: .88rem; line-height: 1.55; color: #2c3644;
}
.copy {
  margin-top: auto; font: inherit; font-weight: 600; font-size: .92rem; padding: 10px 14px; border: 0; border-radius: 10px;
  cursor: pointer; color: #fff; background: var(--accent);
}
.copy:hover { filter: brightness(1.08); }
.copy.is-done { background: #1f8a4c; }

/* festival + country page */
.crumbs { margin-top: 22px; font-size: .88rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.fest-hero { margin-top: 18px; padding: 28px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); }
.fest-hero-emoji { font-size: 2.8rem; line-height: 1; display: block; margin-bottom: 8px; }
.fest-when { margin: 10px 0 0; font-weight: 600; }
.pill { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .82rem; }
.pill:empty { display: none; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 30px; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 6px; }

/* history */
.history-card { max-width: 760px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.history-card small { color: var(--brand); font-weight: 700; }
.history-card p { margin: 0; }

/* countries */
.country-list { display: flex; flex-wrap: wrap; gap: 12px; }
.country-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600;
}
.country-card:hover { box-shadow: var(--shadow); }
.country-card .flag { font-size: 1.5rem; }
.country-card small { background: #f1ede4; color: var(--muted); border-radius: 999px; padding: 1px 8px; font-weight: 600; }

.ad-slot { margin: 44px auto 0; text-align: center; min-height: 90px; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 16px 36px; text-align: center; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 4px 0; }

@media (max-width: 640px) {
  .site-header { padding-top: 8px; padding-bottom: 8px; }
  /* one swipeable line each, instead of wrapping onto several rows */
  .home-top .chips, .size-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .home-top .chips::-webkit-scrollbar, .size-bar::-webkit-scrollbar { display: none; }
  .home-top .chip, .size-bar .chip, .size-label { flex: none; white-space: nowrap; }
  .hero-card { flex-wrap: wrap; padding: 18px; }
  .hero-cta { width: 100%; text-align: center; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-wide { grid-template-columns: 1fr; }
  .nav-link { display: none; }
  .card-body { padding: 10px; }
}

/* blog */
.post { max-width: 820px; margin: 22px auto 0; }
.post-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.post-meta { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.post .lead { margin-bottom: 22px; }
.post h2 { margin-top: 34px; }
.post p, .post li { font-size: 1.04rem; }
.post-idea { margin-top: 30px; }
.post-idea h3 { font-size: 1.2rem; margin-bottom: 6px; }
.post-idea-card { grid-template-columns: minmax(0, 420px); }
.post-cta { margin: 26px 0; }
.post-cta .copy { display: inline-block; text-decoration: none; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; }
.post-card:hover { box-shadow: var(--shadow); }
.post-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 30%; display: block; }
.post-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.post-card-body small { color: var(--muted); font-size: .88rem; line-height: 1.5; }
@media (max-width: 640px) { .nav-blog { display: inline-block; } .post-idea-card { grid-template-columns: 1fr; } }
.occ-sub { font-size: 1.15rem; margin: 26px 0 4px; }
.occ-sub-text { color: var(--muted); margin: 0 0 12px; max-width: 70ch; }

/* compact top on festival and occasion pages: photos start right away */
.crumbs { margin-top: 12px; }
.page-top { margin-top: 8px; }
.page-top h1 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.3; }
.page-emoji { font-size: 1.1em; }
.page-top .fest-when { margin: 4px 0 0; font-size: .92rem; }
.page-top .size-bar { margin: 10px 0; }
.page-top .occ-sub:first-of-type { margin-top: 6px; }
.prose .lead { margin: 0 0 6px; }
@media (max-width: 640px) {
  .crumbs { margin-top: 8px; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* header menus on phones: tighter so four items fit on one line */
@media (max-width: 640px) {
  .site-header nav { gap: 0; }
  .site-header .nav-link, .site-header .menu summary { padding: 6px 7px; font-size: .86rem; }
  .menu summary::after { margin-left: 3px; }
  .logo { font-size: 1.1rem; }
}

/* skills */
.skill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; scroll-margin-top: 80px; display: flex; flex-direction: column; }
.skill-card h2 { font-size: 1.15rem; margin: 0 0 8px; }
.skill-card p { margin: 0 0 10px; }
.skill-try { font-size: .9rem; color: var(--muted); background: #f6f3ec; border-radius: 10px; padding: 10px; }
.skill-actions { margin-top: auto !important; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.skill-actions .copy { display: inline-block; text-decoration: none; margin: 0; }
.skill-view { font-size: .9rem; }
.skill-mini-list { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-mini { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.skill-mini span { font-size: 1.4rem; }
.skill-mini:hover { box-shadow: var(--shadow); }

/* prompt of the day strip on the home page */
.potd-strip { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 8px 12px 8px 8px; border-radius: 14px;
  background: linear-gradient(110deg, #f3ecfb, #fdf0eb); border: 1px solid #e6dcf3; text-decoration: none; max-width: 640px; }
.potd-strip img { width: 52px; height: 65px; object-fit: cover; border-radius: 8px; flex: none; }
.potd-strip-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.potd-strip-text small { color: var(--accent); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.potd-strip-text strong { font-size: .98rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.potd-strip-cta { flex: none; font-size: .86rem; font-weight: 600; color: #fff; background: var(--accent); padding: 7px 12px; border-radius: 999px; }
@media (max-width: 640px) { .potd-strip-cta { display: none; } }
