/* Yume: a night issue of an An Thuong magazine. Washi paper, sumi ink, the vermilion of the lanterns, the indigo of the real wall.
   Editorial grid: numbered articles, thin rules, columns, no cards. */
:root {
  --paper: #f5f0e6;
  --tint: #ece4d4;
  --ink: #17140f;
  --muted: #5a5346;
  --rule: #17140f;
  --hair: #cbc1ad;
  --shu: #bf2c1a;
  --indigo: #1c3350;
  --hdr: 60px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; accent-color: var(--shu); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.05rem/1.6 var(--body); padding-bottom: 60px; overflow-x: clip; counter-reset: art; }
html:lang(ko) body { font-family: 'Noto Sans KR', var(--body); }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3, p, figure { margin-top: 0; }
figure { margin: 0; }
h2 { font: 900 clamp(2.4rem, 6.4vw, 4.6rem)/1.08 var(--display); letter-spacing: -.015em; margin-bottom: .4em; text-wrap: balance; }
html:lang(ko) h2 { font-family: 'Noto Serif KR', var(--display); font-weight: 600; }
h3 { font: 600 1.35rem/1.25 var(--display); margin-bottom: .3em; }
html:lang(ko) h3 { font-family: 'Noto Serif KR', var(--display); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.small { font-size: .96rem; color: var(--muted); }
.lead { font-size: 1.2rem; max-width: 56ch; color: var(--muted); }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.sprite { position: absolute; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--shu); outline-offset: 3px; }
.demo-bar { margin: 0; padding: 6px 16px; text-align: center; font-size: .85rem; font-weight: 600; background: var(--indigo); color: var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .6em 1.3em; border: 1.5px solid var(--ink); font: 600 1.05rem/1.2 var(--body); text-decoration: none; cursor: pointer; background: transparent; color: var(--ink); transition: background-color .15s, color .15s; }
.btn-primary { background: var(--shu); border-color: var(--shu); color: #fff; }
.btn-primary:hover { background: #a02313; border-color: #a02313; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-sm { min-height: 44px; padding: .4em 1em; font-size: 1rem; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.link { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; font-weight: 600; color: var(--shu); text-decoration: none; }
.link:hover { text-decoration: underline; }

.hdr { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hdr-in { display: flex; align-items: center; gap: 18px; min-height: var(--hdr); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 1.2rem/1 var(--display); text-decoration: none; margin: 0; }
.brand-mark { width: 30px; height: 30px; color: var(--shu); }
.nav { display: none; gap: 18px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--shu); }
.lang { position: relative; margin-left: auto; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--ink); font-weight: 600; cursor: pointer; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary .ic:first-child { width: 18px; height: 18px; }
.lang summary .ic:last-child { width: 14px; height: 14px; }
.lang[open] summary .ic:last-child { transform: rotate(180deg); }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 168px; margin: 0; padding: 4px; list-style: none; background: var(--paper); border: 1px solid var(--ink); }
.lang a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; text-decoration: none; }
.lang a:hover { background: var(--tint); }
.lang a[aria-current] { color: var(--shu); font-weight: 700; }
.lang a .ic { width: 16px; height: 16px; }
.hdr-cta { display: none; }

/* cover */
.cover { padding: 14px 0 44px; border-bottom: 1px solid var(--rule); overflow: hidden; }
.mast { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding-bottom: 8px; border-bottom: 3px double var(--rule); font-weight: 600; font-size: .98rem; }
.hero-status { display: inline-flex; align-items: center; gap: .45em; }
.st-lamp { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.is-open .st-lamp { background: var(--shu); }
.cover-grid { position: relative; display: grid; gap: 14px; margin-top: 8px; }
.title { margin: 0; font-family: var(--display); font-weight: 900; line-height: .9; letter-spacing: -.035em; }
.t-1 { display: block; font-size: clamp(5rem, 30vw, 19rem); }
.t-2 { display: block; font-size: clamp(2.2rem, 11vw, 5.4rem); font-weight: 600; letter-spacing: -.01em; color: var(--shu); margin-top: .08em; }
.vert { position: absolute; right: 0; top: 31vw; margin: 0; font: 700 clamp(1.2rem, 5vw, 2rem)/1.1 'Noto Serif JP', serif; letter-spacing: .12em; color: var(--ink); }
.cover-photo { position: relative; overflow: visible; }
.cover-photo picture { overflow: hidden; }
.cover-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.stamp { position: absolute; right: 12px; bottom: 12px; width: clamp(92px, 26vw, 140px); height: clamp(92px, 26vw, 140px); padding: 10px; border-radius: 50%; background: var(--paper); color: var(--shu); fill: var(--shu); }
.cover-side { padding-top: 22px; }
.lede { font: 600 clamp(1.3rem, 2.3vw, 1.65rem)/1.3 var(--display); max-width: 30ch; }
html:lang(ko) .lede { font-family: 'Noto Serif KR', var(--display); }
.rate { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; margin-top: 6px; text-decoration: none; font-weight: 600; }
.rate .ic { color: var(--shu); }
.toc { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
.toc h2 { font: 600 1rem/1.2 var(--body); letter-spacing: 0; margin-bottom: 4px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--hair); }
.toc a { display: flex; gap: 12px; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 600 .95rem var(--display); color: var(--shu); }
.toc a:hover { color: var(--shu); }

/* articles */
.sec { padding: clamp(52px, 8vw, 100px) 0; border-bottom: 1px solid var(--rule); }
.sec-tint { background: var(--tint); }
.sec-dark { background: var(--indigo); color: var(--paper); border-bottom: 0; }
.sec-dark .small, .sec-dark .lead { color: #d6dce4; }
.art { counter-increment: art; }
.art h2::before { content: counter(art, decimal-leading-zero); display: block; font: 600 1.05rem/1.4 var(--display); letter-spacing: 0; color: var(--shu); margin-bottom: .3em; padding-top: 8px; border-top: 3px solid var(--shu); width: 3.2em; }

/* menu: newspaper columns */
.mjump { display: flex; gap: 4px 18px; overflow-x: auto; margin-bottom: 18px; padding: 4px 0; position: sticky; top: var(--hdr); z-index: 5; background: var(--tint); border-block: 1px solid var(--rule); scrollbar-width: none; }
.mjump::-webkit-scrollbar { display: none; }
.mjump a { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; text-decoration: none; font-weight: 600; white-space: nowrap; }
.mjump a[aria-current] { color: var(--shu); text-decoration: underline; text-underline-offset: 4px; }
.mgroup { scroll-margin-top: 130px; margin-bottom: 26px; }
.mgroup h3 { font-weight: 900; font-size: 1.7rem; padding-bottom: 4px; border-bottom: 2px solid var(--rule); break-after: avoid; }
.mgroup h3 small { font: 400 .95rem var(--body); color: var(--muted); }
.mgroup ul { list-style: none; margin: 0; padding: 0; }
.mitem { padding: 8px 0; border-bottom: 1px solid var(--hair); break-inside: avoid; }
.mrow { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.mname { font-weight: 700; }
.mprice { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mdesc { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.35; }
.mfig { margin-bottom: 8px; }
.mfig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* story */
.story { display: grid; gap: 18px; }
.story-lead { color: var(--ink); }
.notes { margin: 18px 0 0; padding-left: 1.3em; }
.notes li { padding: 6px 0; }
.notes li::marker { color: var(--shu); font-family: var(--display); font-weight: 600; }
.story-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
figcaption { margin-top: 6px; font-size: .95rem; color: var(--muted); }

.svc-grid { display: grid; gap: 22px; }
.svc { padding-top: 12px; border-top: 2px solid var(--rule); }
.svc p { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: .8rem 0; }
.facts dt { font-size: .92rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }

.spread { display: grid; gap: 16px; }
.sp img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.visit-grid { display: grid; gap: 26px; }
.visit-grid h3 { margin-top: 1.2rem; }
.hours { width: 100%; max-width: 460px; border-collapse: collapse; }
.hours th, .hours td { padding: 8px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--hair); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hours .is-today th, .hours .is-today td { color: var(--shu); font-weight: 700; }
address { font-style: normal; font-size: 1.15rem; }
.map { min-height: 320px; border: 1px solid var(--rule); background: var(--tint); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

.book-grid { display: grid; gap: 20px; }
.sec-dark h2::before { color: var(--paper); border-color: var(--paper); }
.book-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: clamp(16px, 3vw, 28px); background: var(--paper); color: var(--ink); border-top: 6px solid var(--shu); }
.f { grid-column: 1 / -1; display: grid; gap: 4px; }
.f-half { grid-column: span 1; }
.f label { font-weight: 700; }
.f input, .f select, .f textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--ink); border-radius: 0; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 3px solid var(--shu); outline-offset: 1px; }
.f [aria-invalid="true"] { border-color: var(--shu); }
.f .err { color: var(--shu); font-size: .92rem; font-weight: 700; }
.f-msg { grid-column: 1 / -1; margin: 0; font-weight: 700; }
.f-msg:empty { display: none; }
.f-send { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.f-send .btn { flex: 1 1 170px; }

.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { position: relative; list-style: none; min-height: 48px; padding: 12px 34px 12px 0; font: 600 1.15rem/1.35 var(--display); cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 1.5rem; color: var(--shu); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

.ftr { padding: 40px 0 24px; background: var(--ink); color: #d9d2c4; }
.ftr-in { display: grid; gap: 20px; }
.ftr-mark { width: 54px; height: 54px; color: var(--paper); }
.ftr .brand { color: var(--paper); font-size: 1.5rem; }
.ftr a { display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); }
.ftr .small { color: #d9d2c4; }
.soc { display: flex; flex-wrap: wrap; gap: 8px; }
.soc span { padding: 2px 10px; border: 1px dashed currentColor; }
.copy { margin: 22px auto 0; font-size: .9rem; }

.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.mbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 2px; text-decoration: none; font-size: .8rem; font-weight: 700; text-align: center; }
.mbar .ic { width: 22px; height: 22px; }
.mbar .mbar-main { background: var(--shu); color: #fff; }

@media (max-width: 899px) {
  html { scroll-padding-bottom: 72px; }
  .book-direct { display: none; }
}
@media (max-width: 340px) { .f-half { grid-column: 1 / -1; } }
@media (min-width: 760px) {
  .ftr-in { grid-template-columns: repeat(3, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .mcols { columns: 2; column-gap: 44px; }
  .spread { grid-template-columns: repeat(6, 1fr); }
  .sp-0 { grid-column: span 4; }
  .sp-1, .sp-2 { grid-column: span 2; }
  .sp-1 img, .sp-2 img { aspect-ratio: 1; }
  .sp-3, .sp-4 { grid-column: span 3; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .mbar { display: none; }
  .nav { display: flex; }
  .lang { margin-left: 0; }
  .hdr-cta { display: inline-flex; }
  /* asymmetric cover: the title runs across, the photo sits under it, the side column holds the contents */
  .cover-grid { grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .title { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: .15em; }
  .vert { top: 10px; writing-mode: vertical-rl; }
  .t-1 { font-size: clamp(11rem, 21vw, 19rem); }
  .t-2 { font-size: clamp(2.6rem, 5vw, 4.6rem); margin: 0 0 .3em; }
  /* the photo fills the height of the side column, with no gap under it */
  .cover-photo { grid-column: 1 / 9; margin-top: 12px; min-height: 420px; }
  .cover-photo picture { position: absolute; inset: 0; }
  .cover-photo img { height: 100%; aspect-ratio: auto; }
  .cover-side { grid-column: 9 / -1; padding-top: 0; }
  .mcols { columns: 3; }
  /* two equal-height columns: the photo fills the height of the text */
  .story { grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: stretch; }
  .story-photo { display: flex; flex-direction: column; min-height: 100%; }
  .story-photo picture { position: relative; flex: 1; min-height: 360px; }
  .story-photo img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .visit-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; }
  .book-grid { grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .t-1 { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
  .js .t-2 { animation: rise .8s cubic-bezier(.2, .8, .2, 1) .1s both; }
  .js .cover-photo picture { animation: open .9s cubic-bezier(.7, 0, .2, 1) .15s both; }
  .js .stamp { animation: stamp .35s cubic-bezier(.3, 1.4, .5, 1) 1s both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
@keyframes rise { from { transform: translateY(14%); opacity: 0; } }
@keyframes open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes stamp { from { transform: scale(1.6) rotate(-8deg); opacity: 0; } }
