  /* 한 화면 3D 골목 + 종이 카드 창. 비 오는 저녁이라는 단일 분위기로 고정 */
  :root {
    --paper: #f1ebdf;
    --paper-deep: #e4dccb;
    --ink: #3b332c;
    --ink-soft: #7a6e62;
    --stamp: #b5483b;
    --kraft: #c9b393;
    --scene: #8f969a;
    --font-body: "Gowun Dodum", "Klee One", system-ui, sans-serif;
    --font-jp: "Klee One", "Gowun Dodum", system-ui, sans-serif;   /* 일본어: 클레 원 600 (고운돋움과 같은 손글씨 계열) */
  }
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html, body { height: 100%; }
  html[lang="ko"] body { word-break: keep-all; }
  html[lang="ja"] body { font-family: var(--font-jp); font-weight: 600; }
  :lang(ja), .jp, .logo-sub, .chip small { font-weight: 600; }
  /* 일본어 화면: 모든 글자를 클레 원 600 하나로. 위계는 굵기 대신 크기와 색으로 (한국어와 같은 방식) */
  html[lang="ja"] :is(h1, h2, h3, h4, strong, b, button, input, select, textarea, .it, .title, .new) { font-family: var(--font-jp); font-weight: 600; }
  body { background: var(--scene); color: var(--ink); font-family: var(--font-body); overflow: hidden; }
  #stage { position: fixed; inset: 0; }
  #stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }

  .hud { position: fixed; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
    pointer-events: none; }
  .hud.top { top: 0; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .hud.bottom { bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .credit { text-align: center; white-space: nowrap; font-size: 8.5px; line-height: 1; margin-top: 0; letter-spacing: .06em; color: color-mix(in srgb, var(--ink) 55%, transparent); pointer-events: none; }
  .hud .group { display: flex; gap: 6px; }
  .chip { background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--ink); border-radius: 999px;
    padding: 7px 12px; font-size: 13px; line-height: 1.2; pointer-events: auto; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
  .chip small { color: var(--ink-soft); font-family: var(--font-jp); margin-left: 4px; }
  .chip.count { font-variant-numeric: tabular-nums; }
  button.chip { border: 0; font: inherit; font-size: 13px; cursor: pointer; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

  .label { position: fixed; transform: translate(-50%, -100%); pointer-events: none; font-size: 12px; white-space: nowrap;
    background: var(--paper); color: var(--ink); padding: 3px 8px; border-radius: 6px; opacity: .92; }
  .label.best { color: var(--stamp); border: 1px solid var(--stamp); }
  .label.obj { width: 9px; height: 9px; padding: 0; border-radius: 50%; font-size: 0; opacity: .7; background: var(--paper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--paper) 35%, transparent); }
  .label.obj.near { width: auto; height: auto; padding: 3px 8px; border-radius: 6px; font-size: 12px; opacity: 1; box-shadow: 0 0 0 1px var(--kraft); }
  .label.zzz { background: transparent; color: var(--ink-soft); font-size: 14px; font-weight: 700; letter-spacing: 2px; padding: 0; opacity: 1; }
  .label.zzz span { display: inline-block; animation: zz 2.4s ease-in-out infinite; opacity: 0; }
  .label.zzz span:nth-child(2) { animation-delay: .4s; font-size: 11px; }
  .label.zzz span:nth-child(3) { animation-delay: .8s; font-size: 9px; }
  @keyframes zz { 0% { opacity: 0; transform: translateY(4px); } 30% { opacity: .95; } 100% { opacity: 0; transform: translateY(-10px); } }
  .label.bubble { transition: opacity .3s; text-align: center; white-space: normal; max-width: 220px; }
  .label.bubble small { display: block; font-family: var(--font-jp); color: var(--ink-soft); font-size: 11px; }

  .veil { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(40, 38, 36, .35);
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-block: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); }
  .card { background: var(--paper); color: var(--ink); width: 100%; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
  .intro-card { max-width: 340px; padding: 26px 22px 20px; display: grid; gap: 12px; }
  .pick-card { padding: 30px 24px 26px; gap: 6px; }
  .logo { font-size: 30px; font-weight: 400; line-height: 1.2; color: var(--ink); }   /* 손글씨 로고 파일이 오면 교체 */
  .logo-sub { font-family: var(--font-jp); font-size: 12px; letter-spacing: .14em; color: var(--ink-soft); margin-bottom: 14px; }
  .pick-card .langs { margin: 0; }
  .back { justify-self: start; border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 12px; padding: 2px 0; cursor: pointer; }
  .back::before { content: "← "; }
  .card h1, .card h2 { margin: 0; font-weight: 400; text-wrap: balance; }
  .card h1 { font-size: 24px; }
  .card .jp { font-family: var(--font-jp); color: var(--ink-soft); font-size: 13px; letter-spacing: .08em; }
  .card p { margin: 0; font-size: 14px; line-height: 1.7; }
  .card .note { font-size: 12px; color: var(--ink-soft); }
  .btn { border: 0; border-radius: 3px; padding: 11px 14px; font: inherit; font-size: 15px; cursor: pointer; background: var(--ink); color: var(--paper); }
  .btn.ghost { background: transparent; color: var(--ink-soft); }
  .btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--kraft); }
  .btn[disabled] { opacity: .5; cursor: default; }
  .actions { display: grid; gap: 8px; margin-top: 4px; }

  /* 메뉴 창: 종이 카드 */
  .sheet { max-width: 560px; max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
  .sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; border-bottom: 1px dashed var(--kraft); }
  .sheet header .eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--ink-soft); margin-bottom: 4px; }
  .sheet header h2 { font-size: 21px; }
  .sheet .close { flex: none; border: 0; background: var(--paper-deep); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; }
  .sheet .body { padding: 16px 20px 22px; overflow-y: auto; display: grid; gap: 16px; min-width: 0; }
  .sheet h3 { margin: 0; font-size: 14px; font-weight: 400; color: var(--ink-soft); letter-spacing: .06em; }
  .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
  .tabs button { border: 0; font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--paper-deep); color: var(--ink); cursor: pointer; }
  .tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .tile { display: grid; gap: 6px; font-size: 12px; color: var(--ink-soft); }
  .tile .img { aspect-ratio: 4 / 5; max-width: 100%; background: var(--paper-deep); border: 1px solid var(--kraft); display: grid; place-items: center; color: var(--ink-soft); font-size: 11px; }
  ul.rows { list-style: none; margin: 0; padding: 0; display: grid; }
  ul.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--paper-deep); font-size: 14px; }
  ul.rows li > span:first-child { min-width: 0; }
  .tag { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); white-space: nowrap; }
  .rows .date { color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: 6px; }
  .rows .date.block { display: block; margin: 0 0 2px; font-size: 12.5px; }   /* 행사: 날짜 한 줄, 그 아래 행사 이름 */
  .rows .kind { font-size: 11px; color: var(--ink-soft); border: 1px solid var(--paper-deep); border-radius: 4px; padding: 0 5px; margin-right: 6px; }
  .rows .new { font-size: 10px; font-weight: 700; color: var(--stamp); letter-spacing: .04em; }
  .rows li.post { display: block; }
  .rows li.post summary { cursor: pointer; list-style: none; }
  .rows li.post summary::-webkit-details-marker { display: none; }
  .rows li.post summary::after { content: '＋'; float: right; color: var(--ink-soft); font-size: 12px; }
  .rows li.post details[open] summary::after { content: '－'; }
  .post-body { padding: 8px 0 2px; font-size: 13.5px; line-height: 1.7; }
  .post-body p { margin: 0 0 6px; }
  .post-img img { width: 100%; border-radius: 6px; display: block; margin-bottom: 8px; }
  h4.year { margin: 14px 0 0; font-size: 12px; color: var(--ink-soft); font-weight: 600; letter-spacing: .06em; }
  .tag.on { background: transparent; color: var(--stamp); box-shadow: inset 0 0 0 1px var(--stamp); }
  .quote { font-size: 14px; line-height: 1.8; padding-left: 12px; border-left: 2px solid var(--kraft); }
  .quote.jp { font-family: var(--font-jp); font-size: 13px; }
  .signature { padding: 14px; background: var(--paper-deep); display: grid; gap: 6px; }
  .menu-list { display: grid; gap: 6px; }
  .menu-list button { display: flex; justify-content: space-between; gap: 12px; text-align: left; border: 0; background: var(--paper-deep); color: var(--ink); padding: 12px 14px; font: inherit; font-size: 15px; border-radius: 3px; cursor: pointer; }
  .menu-list button small { color: var(--ink-soft); font-size: 12px; }
  form { display: grid; gap: 10px; }
  label.f { display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); }
  input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); background: #fbf8f2; border: 1px solid var(--kraft); border-radius: 3px; padding: 9px 10px; width: 100%; }
  .ex { font-size: 11px; color: var(--stamp); letter-spacing: .04em; }

  #toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%);
    background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 4px; font-size: 13px; opacity: 0; transition: opacity .4s; pointer-events: none; z-index: 5; }
  #toast.show { opacity: 1; }
  #fade { position: fixed; inset: 0; background: #2b2724; opacity: 0; pointer-events: none; transition: opacity .45s; z-index: 4; }
  #fade.on { opacity: 1; }
  #err { position: fixed; inset: auto 16px 80px; background: var(--paper); color: var(--stamp); padding: 10px; font-size: 13px; }
  .pomo { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(62px + env(safe-area-inset-bottom, 0px)); display: flex; z-index: 2; }
  .pomo > span { display: flex; gap: 6px; }
  .chip.soft { background: color-mix(in srgb, var(--paper) 60%, transparent); color: var(--ink-soft); }
  .hud .chip { white-space: nowrap; }
  .langwrap { position: relative; display: inline-flex; }
  .langmenu { position: absolute; top: calc(100% + 6px); right: 0; display: grid; gap: 2px; padding: 4px; background: var(--paper); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.15); pointer-events: auto; z-index: 6; }
  .langmenu button { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 7px; text-align: left; white-space: nowrap; cursor: pointer; }
  .langmenu button[aria-pressed="true"] { background: var(--paper-deep); }
  .langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--paper-deep); justify-self: start; margin-bottom: 4px; }
  .langs button { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
  .langs button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
  .hud.bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; }
  .hud.bottom > :first-child { justify-self: start; }
  .hud.bottom > .sns { display: flex; flex-direction: column; align-items: center; }
  .hud.bottom > .sns .row { display: flex; gap: 4px; }
  .hud.bottom > .count { justify-self: end; }
  .maplink { font-size: 12px; color: var(--stamp); text-decoration: none; white-space: nowrap; border-bottom: 1px solid currentColor; margin-left: 4px; }
  .chip.icon { display: grid; place-items: center; width: 21px; height: 20px; padding: 0; color: var(--ink); background: transparent; box-shadow: none; }
  .chip.icon svg { width: 15px; height: 15px; }
  .short { display: none; }
  @media (max-width: 560px) {
    /* 휴대폰에서도 장소 이름(처마 밑 등)은 보여요 */
    .hud.top { justify-content: space-between; }
    .long { display: none; }
    .short { display: inline; }
    .chip { padding: 6px 10px; font-size: 12px; }
    button.chip { font-size: 12px; }
  }
  @media (prefers-reduced-motion: reduce) { .label, #toast { transition: none; } .label.zzz span { animation: none; opacity: .9; } }

  /* 작업물 칸: 그림이 들어가면 버튼처럼 눌러서 크게 보기 */
  button.tile { border: 0; background: transparent; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--ink-soft); }
  .tile .img { overflow: hidden; }
  .tile .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .tile.big .img { aspect-ratio: auto; min-height: 240px; }
  .tile.big .img img { object-fit: contain; height: auto; }
  .entries li { display: block; line-height: 1.6; }
  .mailbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--paper-deep); border-radius: 3px; }
  .mailbox .addr { font-size: 15px; word-break: break-all; min-width: 0; }
  .mailbox .btn { flex: none; padding: 7px 12px; font-size: 13px; }

  /* 오늘의 발견 카드: 엽서처럼 */
  .findcard { background: #fbf8f2; border: 1px solid var(--kraft); padding: 18px 18px 16px; display: grid; gap: 14px; box-shadow: 3px 3px 0 var(--paper-deep); }
  .findcard .fc-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .12em; color: var(--stamp); }
  .findcard .fc-text { font-size: 22px; line-height: 1.45; text-wrap: balance; }
  .findcard .fc-tek { font-size: 14px; color: var(--ink-soft); display: grid; gap: 2px; }
  .findcard .fc-tek small { font-size: 11px; }

  /* 가챠 크게 보기: 틀 없이 골목 위에 크게 */
  .gview { position: fixed; inset: 0; z-index: 6; background: rgba(40, 38, 36, .35); }
  .gview canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
  .gview canvas:active { cursor: grabbing; }
  .gview .gfoot { position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 6px; pointer-events: none;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .gview .gfoot p { margin: 0; font-size: 14px; text-align: center; }
  .gview .gfoot button { pointer-events: auto; }
  .gview .gclose { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); border: 0; background: var(--paper); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; }
  body.gacha-open .hud { visibility: hidden; }   /* 가챠를 볼 때는 위아래 버튼 줄을 숨김 */

  /* 작업물 칸: 제목 한 줄 + 장소·날짜 */
  .tile .tt { color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tile .tm { font-size: 11.5px; margin-top: -4px; }
  /* 작업물 크게 보기 */
  .viewer { position: fixed; inset: 0; z-index: 40; background: rgba(32, 28, 25, .9); display: grid; place-items: center; padding: 56px 16px 24px; }
  .viewer figure { margin: 0; display: grid; justify-items: center; gap: 14px; max-width: min(960px, 100%); }
  .viewer .vimg { touch-action: pan-y; }
  .viewer .vimg img { display: block; max-width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 230px); object-fit: contain; border-radius: 4px; box-shadow: 0 6px 30px rgba(0, 0, 0, .35); user-select: none; -webkit-user-drag: none; }
  .viewer figcaption { color: var(--paper); text-align: center; max-width: 640px; }
  .viewer .vt { font-size: 17px; }
  .viewer .vm { font-size: 12.5px; opacity: .7; margin-top: 2px; }
  .viewer .vn { margin-left: 10px; }
  .viewer figcaption p { font-size: 14px; line-height: 1.7; margin: 8px 0 0; opacity: .9; }
  .viewer .maplink { color: var(--paper); }
  .vbtn { position: fixed; border: 0; background: rgba(241, 235, 223, .14); color: var(--paper); width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
  .vbtn:hover { background: rgba(241, 235, 223, .26); }
  .vclose { top: calc(12px + env(safe-area-inset-top, 0px)); right: 16px; font-size: 22px; }
  .vprev { left: 12px; top: 50%; transform: translateY(-50%); }
  .vnext { right: 12px; top: 50%; transform: translateY(-50%); }
  @media (max-width: 640px) { .vprev, .vnext { top: auto; bottom: 18px; transform: none; } .viewer { padding-bottom: 76px; } }
  body.viewer-open .hud { visibility: hidden; }
  /* 화면 아래 For Business: 크레딧 옆 작은 글자 링크 */
  .credit .biz { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 4px 2px; margin: -4px 0; cursor: pointer; pointer-events: auto; text-decoration: underline; text-underline-offset: 2px; }
  .credit .biz:hover { color: var(--ink); }
  /* 우체통 창 */
  .lead-gap { margin-top: 18px; }
  .history { margin-top: 18px; text-align: right; }
  .linkbtn { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--stamp); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  /* 글씨 위계: 구역 이름(작고 옅게) > 항목 이름(또렷하게) > 설명(작고 옅게) */
  .sheet h3 { font-size: 12px; letter-spacing: .1em; margin-top: 6px; }
  .rows .it { display: block; font-size: 15px; color: var(--ink); }
  .rows .sub { display: block; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); margin-top: 3px; }
  .lead-gap { font-size: 13.5px; color: var(--ink-soft); }
  /* 우체통: 메일 관련은 밝은 종이 블럭 하나로 */
  .mailblock { background: #faf6ee; border: 1px solid var(--paper-deep); border-radius: 10px; padding: 14px 16px 12px; }
  .mailblock h3 { margin-top: 12px; }
  .mailblock .pending { margin: 0; font-size: 13px; color: var(--ink-soft); }
  .mailblock ul.rows li:last-child { border-bottom: 0; }
  .mb-lead { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--kraft); font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
  /* 우체통 문의 양식: 칸마다 또렷한 테두리, 필수는 * */
  .mform { display: grid; gap: 12px; }
  .mf { position: relative; display: grid; grid-template-columns: 1fr; align-items: start; }   /* 칸은 창 폭에 꽉, * 는 칸 안 오른쪽 위 모서리 */
  .mf .req { position: absolute; top: 5px; right: 9px; z-index: 1; color: var(--stamp); font-weight: 400; font-size: 13px; line-height: 1; pointer-events: none; }
  .mf .opt { font-style: normal; font-size: 10px; color: var(--ink-soft); line-height: 44px; text-align: center; writing-mode: horizontal-tb; }
  .mf-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mf input[type=text], .mf input[type=email], .mf input[type=tel], .mf select, .mf textarea {
    grid-column: 1; grid-row: 1; width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: #fffdf8; border: 1.5px solid var(--ink); border-radius: 4px; padding: 10px 12px; min-height: 44px; }
  .mf select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
  .mf select:invalid { color: var(--ink-soft); }
  .mf textarea { resize: vertical; min-height: 150px; line-height: 1.7; }
  .mf ::placeholder { color: color-mix(in srgb, var(--ink-soft) 75%, transparent); }
  .mf :is(input, select, textarea):focus { outline: 2px solid color-mix(in srgb, var(--kraft) 70%, transparent); outline-offset: 1px; }
  .mf.bad :is(input, select, textarea), .mf-agree.bad .agree { border-color: var(--stamp); box-shadow: 0 0 0 1px var(--stamp); }
  .mf-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
  .mf-file .filebtn { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 24px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 4px; background: #f5eacd; cursor: pointer; font-size: 14px; max-width: 100%; }
  .mf-file .filebtn .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .mf-file .filebtn svg { width: 18px; height: 18px; flex: none; }
  .mf-file input:focus-visible + .filebtn { outline: 2px solid var(--kraft); outline-offset: 2px; }
  .mf-file small { grid-column: 1; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
  .mf-agree { grid-template-columns: 1fr; }
  .mf-agree .agree { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 4px; background: #f5eacd; font-size: 14px; cursor: pointer; }
  .mf-agree .agree input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
  .mf-agree details { grid-column: 1; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
  .mf-agree details summary { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; width: max-content; }
  .mf-agree details p { margin: 6px 0 0; line-height: 1.6; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
  .mf-msg { margin: 0; min-height: 1em; font-size: 13px; color: var(--stamp); text-align: center; }
  .mf-send { display: flex; justify-content: center; }
  .mf-send .btn.send { min-width: 180px; padding: 11px 28px; border-radius: 999px; font-size: 15px; background: #fffdf8; color: var(--ink); border: 1.5px solid var(--ink); }
  .mf-send .btn.send:hover { background: var(--ink); color: var(--paper); }
  .mf-send .btn.send:disabled { opacity: .6; }
  .mf-done { text-align: center; padding: 30px 0 10px; display: grid; gap: 14px; justify-items: center; }
  .direct { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--kraft); font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
  .direct .addr { color: var(--ink); user-select: all; }
  .direct .linkbtn { font-size: 12px; color: var(--ink-soft); }
  .cheer { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); text-align: center; }
  .sheet[data-panel="contact"] { max-width: 440px; }   /* 우체통은 좁게 */
  .mf-file .fileline { grid-column: 1; grid-row: 1; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; min-width: 0; }   /* 버튼 오른쪽, 아래 줄 맞춤 */
  .mf-file .fileline small { margin: 0 0 3px; white-space: pre-line; line-height: 1.45; }   /* 안내 두 줄 (\n 에서 줄바꿈) */
  /* 테구테구 종이 양식: 잉크 선은 조금 부드럽게, 종이색(#F5EACD)은 버튼·동의 칸에만 작게 */
  .mf :is(input[type=text], input[type=email], input[type=tel], select, textarea), .mf-file .filebtn, .mf-agree .agree, .mf-send .btn.send { border-color: color-mix(in srgb, var(--ink) 85%, transparent); }
  .mf textarea { padding-right: 22px; }
  .mf select { background-position: calc(100% - 24px) 19px, calc(100% - 19px) 19px; padding-right: 40px; }
  /* 게시판 한 줄 공통: 메타(작게·옅게) → 제목 → 링크 */
  .rows .meta { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
  .rows .links { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; }
  .rows .links .maplink { font-size: 12px; }
  .rows .it.off { color: var(--ink-soft); }
  .rows li.post summary { display: flex; justify-content: space-between; gap: 12px; }
  .rows li.post summary::after { float: none; align-self: center; }
  /* 창 폭: 목록형은 좁게, 읽는 창은 중간, 포트폴리오는 넓게 */
  .sheet[data-panel="news"], .sheet[data-panel="store"], .sheet[data-panel="goods"], .sheet[data-panel="sns"], .sheet[data-panel="list"] { max-width: 460px; }
  .sheet[data-panel="book"], .sheet[data-panel="about"], .sheet[data-panel="finds"] { max-width: 520px; }
  .sheet[data-panel="works"] { max-width: 680px; }
  .sheet[data-panel="works"] .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }   /* 데스크톱 4칸, 휴대폰 2칸 */
  /* 행사 이름 옆 (행사장) */
  .rows .place { color: var(--ink-soft); font-size: 13px; }
  /* 굿즈: 상점 칸 */
  .ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px 12px; margin-top: 14px; }
  .gitem { display: grid; gap: 8px; align-content: start; min-width: 0; }
  .gimg { position: relative; aspect-ratio: 1; background: var(--paper-deep); border-radius: 4px; overflow: hidden; }
  .gimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .gimg .tag { position: absolute; top: 8px; left: 8px; background: var(--paper); }
  .gname { font-size: 13px; line-height: 1.5; color: var(--ink); }
  .gitem.off .gname { color: var(--ink-soft); }
  .gitem.off .gimg img { filter: grayscale(.6); opacity: .7; }
  /* 발자취: 가운데 세로선 타임라인 (위가 최신) */
  .timeline { list-style: none; margin: 10px 0 0; padding: 0; position: relative; }
  .timeline::before { content: ""; position: absolute; left: 64px; top: 6px; bottom: 6px; width: 1px; background: var(--kraft); }
  .timeline li { display: grid; grid-template-columns: 52px 1fr; gap: 0 25px; padding: 7px 0; position: relative; align-items: baseline; }
  .timeline li::before { content: ""; position: absolute; left: 61px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1.5px var(--ink-soft); }
  .timeline li:first-child::before { background: var(--stamp); box-shadow: 0 0 0 1.5px var(--stamp); }
  .timeline .ty { font-size: 12px; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
  .timeline .tx { font-size: 14.5px; }
  /* 포트폴리오: 비핸스처럼 큰 가로 칸 */
  .sheet[data-panel="works"] { max-width: 920px; }
  .wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 16px; margin-top: 14px; }
  .wcard { display: grid; gap: 8px; border: 0; background: none; padding: 0; font: inherit; text-align: left; color: inherit; cursor: pointer; min-width: 0; }
  div.wcard { cursor: default; }
  .wimg { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--paper-deep); }
  .wimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
  .wcard:hover .wimg img { transform: scale(1.03); }
  .wimg.ph { display: grid; place-items: center; font-size: 12px; color: var(--ink-soft); }
  .wcap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
  .wt { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  div.wcard .wt { color: var(--ink-soft); }
  .wm { font-size: 12px; color: var(--ink-soft); flex: none; }
  /* 이름표 작은 설명 */
  .label.obj .lsub { display: none; }
  .label.obj.near .lsub { display: block; font-size: 10.5px; color: var(--ink-soft); margin-top: 1px; text-align: center; }
  @media (prefers-reduced-motion: reduce) { .wimg img { transition: none; } }
  /* 칸 줄 맞추기: 열 수 고정, 긴 이름은 두 줄까지 (칸 폭이 이름 때문에 늘어나지 않게) */
  .ggrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  @media (max-width: 640px) { .ggrid, .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }
  .gname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 3em; }
  .wt { overflow-wrap: anywhere; }
  /* 발자취: 제목과 세로선 사이 여백 줄이기 */
  .timeline { margin-top: 0; }
  .timeline li:first-child { padding-top: 2px; }
  .timeline::before { top: 8px; }
  .timeline li:first-child::before { top: 9px; }
  .wt { font-size: 13px; }   /* 작품 제목: 그림이 주인공이라 작게 */
  .wm { font-size: 11.5px; }
  /* 가까이 가서 펼쳐진 이름표는 눌러도 열려요 */
  .label.obj.near { pointer-events: auto; }   /* 눌러도 열리지만 따로 표시는 안 해요 (3D 물건을 누르는 게 기본) */
  /* 굿즈 이름: 윗줄 이름(한 줄, 넘치면 …) + 아랫줄 n종 (작게). 단종도 글씨는 같게, 표시는 사진 위 도장만 */
  .gname { display: block; -webkit-line-clamp: unset; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
  .gcount { font-size: 12px; color: var(--ink-soft); min-height: 1.4em; margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gitem.off .gname { color: var(--ink); }
  .gimg .tag { font-size: 11px; font-weight: inherit; }
  /* 포트폴리오: 인스타그램 피드 비율 4:5 (1080×1350) */
  .wimg { aspect-ratio: 4 / 5; }
  /* 오른쪽 아래: 소리 켜기/끄기 위, 풍경 시계 아래 (소리끼리 한곳에) */
  .hud.bottom > .soundcol { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
  /* 소리 버튼: 둥근 아이콘 */
  #mute { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
  #mute svg { display: block; }
  /* 장소 이름·안내·풍경 시계·소리 아이콘: 블럭 없이 흰 글씨 + 외곽선 (언어·목록 버튼만 블럭) */
  .chip.bare { background: none; box-shadow: none; color: #fffdf8; padding-left: 2px; padding-right: 2px;
    text-shadow: 0 0 1px rgba(59, 51, 44, .9), 1px 1px 0 rgba(59, 51, 44, .55), -1px -1px 0 rgba(59, 51, 44, .55), 1px -1px 0 rgba(59, 51, 44, .55), -1px 1px 0 rgba(59, 51, 44, .55), 0 1px 3px rgba(0, 0, 0, .35); }
  #mute.bare { color: #fffdf8; filter: drop-shadow(0 0 1px rgba(59, 51, 44, .9)) drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
  #mute.bare svg { width: 20px; height: 20px; }
  .chip.bare { font-size: 14px; --o: rgba(59, 51, 44, .85);
    text-shadow: 1.5px 0 0 var(--o), -1.5px 0 0 var(--o), 0 1.5px 0 var(--o), 0 -1.5px 0 var(--o), 1px 1px 0 var(--o), -1px -1px 0 var(--o), 1px -1px 0 var(--o), -1px 1px 0 var(--o), 0 2px 4px rgba(0, 0, 0, .3); }
  #mute.bare { filter: drop-shadow(1px 0 0 rgba(59, 51, 44, .85)) drop-shadow(-1px 0 0 rgba(59, 51, 44, .85)) drop-shadow(0 1px 0 rgba(59, 51, 44, .85)) drop-shadow(0 -1px 0 rgba(59, 51, 44, .85)); }
  @media (max-width: 560px) { .chip.bare { font-size: 13px; } }
  /* 블럭 없는 글씨: 글자색 = 버튼 블럭 종이색, 외곽선은 검정 대신 따뜻한 갈색 */
  .chip.bare { color: var(--paper); --o: rgba(110, 96, 82, .8); }
  #mute.bare { color: var(--paper); filter: drop-shadow(1px 0 0 rgba(110, 96, 82, .8)) drop-shadow(-1px 0 0 rgba(110, 96, 82, .8)) drop-shadow(0 1px 0 rgba(110, 96, 82, .8)) drop-shadow(0 -1px 0 rgba(110, 96, 82, .8)); }
  /* 글씨 뒤 옅은 그림자 번짐: 블럭 테두리 없이 글씨 주변만 살짝 어둡게 */
  .chip.bare { text-shadow: 1px 0 0 var(--o), -1px 0 0 var(--o), 0 1px 0 var(--o), 0 -1px 0 var(--o), 0 0 6px rgba(45, 38, 32, .5), 0 0 14px rgba(45, 38, 32, .35); }
  #mute.bare { filter: drop-shadow(0 0 1px rgba(110, 96, 82, .9)) drop-shadow(0 0 5px rgba(45, 38, 32, .5)) drop-shadow(0 0 10px rgba(45, 38, 32, .3)); }
  /* 블럭 없는 글씨는 블럭 버튼보다 작아 보여서 한 단계 크게. 소리 아이콘과 풍경 시계는 붙여서 */
  .chip.bare { font-size: 16px; }
  @media (max-width: 560px) { .chip.bare { font-size: 15px; } }
  .hud.bottom > .soundcol { gap: 0; }
  #mute.bare { width: 28px; height: 24px; margin-right: 2px; }
  /* 게시판 한 줄: 왼쪽 날짜·제목 2줄, 오른쪽 상태 위·지도 아래 */
  .rows .bright { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: center; }
  .rows .bright .links { margin-top: 0; justify-content: flex-end; }
  #panelEyebrow:empty { display: none; }   /* 장소가 없는 창(소식, SNS)은 위 작은 줄 없이 */

/* 날씨 바꾸기: 제목 옆에 같은 글씨 처리로, 더 작고 옅게 */
.titlerow { display: flex; align-items: baseline; gap: 10px; }
.chip.bare.lookchip { font: inherit; font-size: 12px; border: 0; cursor: default; opacity: .85; pointer-events: none; }
@media (max-width: 560px) { .chip.bare.lookchip { font-size: 11px; } }

/* 직접 만든 페이지 (content/pages.js) */
.page-body p { margin: 0 0 12px; }
.page-body h3 { margin: 20px 0 8px; }
.page-body .pg-img { margin: 14px 0; }
.page-body .pg-img img { display: block; width: 100%; height: auto; border-radius: 6px; }
.page-body .pg-img figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-soft); text-align: center; }
.page-body .pg-list { margin: 0 0 12px; padding-left: 18px; }
.page-body a { color: var(--stamp); }

/* 3D 가 안 되는 기기: 목록 화면 */
body.flat { overflow: auto; height: auto; background: var(--paper); }
#flat { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; color: var(--ink); }
#flat .flat-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 8px 0 16px; border-bottom: 1px dashed var(--kraft); }
#flat .flat-title { font-size: 24px; }
#flat .flat-sub { font-size: 12px; color: var(--ink-soft); letter-spacing: .08em; }
#flat .flat-langs { display: flex; gap: 4px; }
#flat .flat-langs button { font: inherit; font-size: 13px; border: 0; border-radius: 999px; padding: 5px 12px; background: transparent; color: var(--ink-soft); cursor: pointer; box-shadow: inset 0 0 0 1px var(--kraft); }
#flat .flat-langs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
#flat .flat-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 0 6px; font-size: 14px; }
#flat .flat-nav a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--kraft); }
#flat .flat-sec { padding: 28px 0 8px; border-bottom: 1px dashed var(--kraft); }
#flat .flat-sec h2 { margin: 2px 0 12px; font-weight: 400; font-size: 20px; }
#flat .eyebrow { font-size: 12px; color: var(--ink-soft); }
#flat .flat-note { margin-top: 24px; font-size: 12px; color: var(--ink-soft); text-align: center; }

/* 로딩: 모델이 다 뜰 때까지 종이색 화면 (첫 인사 카드는 그 위에) */
#loading { position: fixed; inset: 0; background: var(--paper); display: grid; place-items: center; transition: opacity .8s; z-index: 3; }
#loading.done { opacity: 0; pointer-events: none; }
#loading .ld-inner { text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: 46vh; }
body:has(#intro:not([hidden])) #loading .ld-inner { visibility: hidden; }   /* 첫 인사 카드가 떠 있는 동안은 글자 숨김 */
#loading .ld-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
#loading .ld-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--kraft); animation: ld 1.2s ease-in-out infinite; }
#loading .ld-dots i:nth-child(2) { animation-delay: .2s; } #loading .ld-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes ld { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { #loading .ld-dots i { animation: none; } }
body.loading-on #intro { background: transparent; }
body.flat #loading { display: none; }
#intro { z-index: 4; }   /* 첫 인사 카드는 로딩 화면 위에 */

/* 새 소식: 들어온 뒤 뜨는 작은 창 (위 가운데), 목록 버튼·목록 안 빨간 점 */
.newscard { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 3; width: min(340px, calc(100% - 32px)); background: var(--paper); border-radius: 12px; box-shadow: 0 6px 24px rgba(40, 34, 28, .18); padding: 10px 14px 12px; animation: ncin .4s ease-out; }
.newscard .nc-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.newscard .tag { color: var(--stamp); font-size: 11px; letter-spacing: .04em; }
.newscard .close { margin-left: auto; flex: none; border: 0; background: var(--paper-deep); color: var(--ink); width: 24px; height: 24px; border-radius: 50%; font-size: 15px; line-height: 1; cursor: pointer; }
.newscard .nc-title { display: block; width: 100%; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.newscard .nc-title::after { content: ' ›'; color: var(--ink-soft); }
@keyframes ncin { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .newscard { animation: none; } }
#listBtn.hasnew { position: relative; }
#listBtn.hasnew::after { content: ''; position: absolute; top: 4px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--stamp); }
.menu-list .newdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--stamp); vertical-align: middle; margin-left: 4px; }

/* 트럭 창의 지난 행사 (접어 두기) */
details.past { margin-top: 18px; }
details.past > summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }

.mf-why { color: var(--ink-soft); font-size: 11px; word-break: break-all; }
  .mf-file.bad .filebtn { border-color: var(--stamp); box-shadow: 0 0 0 1px var(--stamp); }   /* 첨부가 맞지 않을 때 */
