/* 앱 전체: 종이·옛 지도 색, 휴대폰 폭 틀, 세로 안내. 키트 토큰은 덮어써서 준다(키트 파일은 고치지 않는다). */
:root {
  --paper: #efe4cb;
  --paper-hi: #f8f1e1;
  --card: #fbf7ec;
  --ink: #2a2017;
  --ink-2: #463829;
  --ink-3: #5e4d3b;
  --rule: #d8c6a2;
  --brick: #8a3a1e;
  --sea: #2c5966;
  --frame: #2b2620;
  --serif: "Nanum Myeongjo", "AppleMyungjo", "Noto Serif KR", "Batang", serif;

  --ui-bg: var(--paper);
  --ui-surface: var(--card);
  --ui-surface-2: #f3ead6;
  --ui-surface-hover: #f3ead6;
  --ui-fill: #e9dcc0;
  --ui-fill-hover: #e2d3b3;
  --ui-fill-press: #dacaa6;
  --ui-line: var(--rule);
  --ui-line-strong: #b9a47c;
  --ui-t1: var(--ink);
  --ui-t2: var(--ink-2);
  --ui-t3: var(--ink-3);
  --ui-t4: #65543f;
  --ui-accent: var(--brick);
  --ui-accent-hover: #7a3219;
  --ui-accent-press: #6b2b15;
  --ui-accent-weak: #f1ddcf;
  --ui-accent-weak-hover: #ead0bf;
  --ui-accent-weak-press: #e2c3af;
  --ui-accent-weak-t: #7a3219;
  --ui-on-accent: #ffffff;
  --ui-focus: var(--sea);
}

html, body { margin: 0; height: 100%; }
body {
  background-color: var(--frame);
  background-image: radial-gradient(circle at 20% 10%, #3a332b 0, transparent 50%), radial-gradient(circle at 80% 90%, #3a332b 0, transparent 45%);
  overscroll-behavior: none;
}

/* 휴대폰 폭 틀: 480 을 넘으면 가운데에 */
#app {
  position: relative;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(transparent 0 calc(100% - 1px), rgb(122 90 54 / .07) 0),
    linear-gradient(90deg, transparent 0 calc(100% - 1px), rgb(122 90 54 / .07) 0),
    radial-gradient(circle at 30% 20%, rgb(255 255 255 / .35), transparent 60%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .2), 0 20px 60px rgb(0 0 0 / .45);
}
#screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { color: #fff; padding: var(--ui-space-24); }

/* 세로 안내: 휴대폰을 가로로 돌렸을 때 */
.rotate-guide { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .rotate-guide {
    position: fixed; inset: 0; z-index: 10000;
    display: grid; place-items: center;
    background-color: var(--frame); color: #f8f1e1;
    text-align: center; padding: var(--ui-space-24);
  }
  .rotate-guide p { margin: 0; font-size: var(--ui-fs-body); line-height: 1.6; }
  .rotate-guide b { display: block; font-family: var(--serif); font-size: var(--ui-fs-h2); margin-bottom: var(--ui-space-8); }
}

h1, h2, h3 { font-family: var(--serif); }
