* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

:root {
  --font-heavy: "AppleSDGothicNeo-Heavy", "AppleSDGothicNeo-ExtraBold", "Apple SD Gothic Neo", "PingFang SC", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

html, body {
  margin: 0; height: 100%; background: #1d2b22; color: #2b1a10;
  font-family: var(--font-heavy); font-weight: 800;
  overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; overflow: hidden;
}

#app {
  --u: calc(min(100vw, 440px) / 1290);
  position: relative; width: 100%; max-width: 440px; height: 100vh; height: 100dvh; margin: 0 auto;
  display: flex; flex-direction: column; background: #2f4b3c; overflow: hidden;
}
#app.booting #topbar, #app.booting #stage, #app.booting #bottom-wrap {
  opacity: 0;
}

/* ── 상단 어닝 (frame.jpg 0..177 구간, 가로 비례 고정·비왜곡) ── */
#awning {
  flex: 0 0 auto;
  height: max(env(safe-area-inset-top), calc(177 * var(--u)));
  background: #b84b39 url("assets/frame.jpg") no-repeat 0 bottom;
  background-size: calc(1290 * var(--u)) calc(2796 * var(--u));
  background-position: 0 calc(max(env(safe-area-inset-top), calc(177 * var(--u))) - calc(177 * var(--u)));
}

/* ── 상단 줄: 양쪽 안전 여백(13px >= 12pt), 한 줄 플렉스 배치 ── */
#topbar {
  position: relative;
  flex: 0 0 58px;
  height: 58px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, #395025 0%, #587439 16%, #4e6933 84%, #334920 100%);
  box-shadow:
    inset 0 2.5px 0 #c2a058,
    inset 0 4.5px 0 #2e421c,
    inset 0 -2.5px 0 #c2a058,
    inset 0 -4.5px 0 #2b3e1a;
  z-index: 4;
}

#t-name, #t-goal {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f7e8c6 0%, #e6cea0 100%);
  border: 2.5px solid #8a6b35;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.9), 0 1.5px 2.5px rgba(18, 28, 10, 0.38);
  font-family: var(--font-heavy);
  font-weight: 900;
  color: #1f4331;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

#t-name {
  flex: 0 0 auto;
  min-width: 82px;
  max-width: clamp(126px, 32vw, 140px);
  padding: 0 8px;
  font-size: 16.5px;
  line-height: 1.05;
}

#t-goal {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 8px;
  font-size: 19.5px;
  line-height: 1.05;
}
#t-goal:empty {
  visibility: hidden;
}

/* 미션 진행 중에는 목표 칸이 자연스럽게 줄어들어 [이름][목표][다시][메뉴]가 한 줄에 들어간다 */
#topbar.in-mission #t-name {
  min-width: 74px;
  max-width: clamp(108px, 28vw, 122px);
  padding: 0 6px;
  font-size: 15.5px;
}
#topbar.in-mission #t-goal {
  padding: 0 6px;
  font-size: 19px;
}

#t-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
  filter: drop-shadow(0 2px 3px rgba(24, 14, 6, 0.34));
}

#t-settings {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  border: 3px solid #4e2d15;
  border-radius: 50%;
  background: #cfa75c;
  font-family: var(--font-heavy);
  font-size: 18px;
  font-weight: 900;
  color: #3a1f10;
  cursor: pointer;
}
#app.on-menu #topbar {
  display: none;
}

#app.art-knob #t-settings {
  border: 0; border-radius: 0;
  background: transparent url("assets/parts/settings-knob.webp") no-repeat center / contain;
  filter: drop-shadow(0 2px 3px rgba(24, 14, 6, 0.32));
}
#t-settings:active { transform: scale(0.95); }

/* ── 놀이판 (#stage: 남은 세로 전부, 높이가 늘고 줄어도 비율 유지) ── */
#stage {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden;
  background: #b8c9a1;
}
#cv {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none;
}

/* ── 하단 완충띠 + 광고 자리 + 홈 안전영역 (하단 버튼 절대 없음) ──
   광고가 없을 때는 frame.jpg에 구워진 빈 크림색 판 대신 아래쪽 나무 판 무늬(ny=2695.5..2796)만
   이음새 없이 이어 보이게 하고, 광고 자리(#ad) 크기·위치·안전구역은 그대로 비워 둔다. */
#bottom-wrap {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center;
  background: #6c3618 url("assets/frame.jpg") no-repeat;
  background-size: calc(1290 * var(--u)) calc(2796 * var(--u));
  background-position: 0 calc(-2484 * var(--u));
}
#bottom-wrap::before,
#bottom-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
  background: url("assets/frame.jpg") no-repeat;
  background-size: calc(1290 * var(--u)) calc(2796 * var(--u));
}
#bottom-wrap::before {
  top: calc(112 * var(--u));
  height: calc(100.5 * var(--u));
  background-position: 0 calc(-2695.5 * var(--u));
  transform: scaleY(-1);
}
#bottom-wrap::after {
  top: calc(59 * var(--u));
  height: calc(53.5 * var(--u));
  background-position: 0 calc(-2742.5 * var(--u));
}
#gap {
  position: relative; z-index: 1;
  width: 100%;
  flex: 0 0 calc(60 * var(--u));
  height: calc(60 * var(--u));
  pointer-events: none;
}
#ad {
  position: relative; z-index: 1;
  flex: 0 0 calc(150 * var(--u));
  width: calc(960 * var(--u));
  height: calc(150 * var(--u));
  max-width: 96%;
  display: flex; align-items: center; justify-content: center;
  padding: calc(16 * var(--u)) calc(42 * var(--u));
  pointer-events: none;
}
#ad-label {
  display: none;
}
#home-safe {
  position: relative; z-index: 1;
  width: 100%;
  flex: 0 0 auto;
  height: max(env(safe-area-inset-bottom), calc(102 * var(--u)));
  pointer-events: none;
}
#home-safe::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(101.5 * var(--u));
  height: calc(100.5 * var(--u));
  pointer-events: none;
  background: url("assets/frame.jpg") no-repeat 0 calc(-2695.5 * var(--u));
  background-size: calc(1290 * var(--u)) calc(2796 * var(--u));
  transform: scaleY(-1);
}

/* ── 공통 그림 버튼 (모든 단추 >= 44x44pt, 글자 >= 17pt) ── */
.img-btn {
  appearance: none;
  border: 3px solid #5f3119;
  border-radius: 24px;
  background: #f0dcb3;
  color: #3a1f10;
  font-family: var(--font-heavy); font-weight: 900; font-size: 19px; line-height: 1;
  padding: 0 22px;
  height: 52px; min-height: 48px; min-width: 128px;
  display: inline-flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 0 rgba(255, 250, 235, 0.75);
  cursor: pointer; white-space: nowrap;
}
#app.art-btn .img-btn {
  border: 0; border-radius: 0;
  background: transparent url("assets/parts/button-wide.webp") no-repeat center / 100% 100%;
}
.img-btn:active { transform: translateY(2px) scale(0.98); }

.img-btn.top-btn {
  height: 45px;
  min-height: 44px;
  min-width: 58px;
  padding: 0 9px;
  font-size: 17px;
  color: #3a1f10;
}

/* ── 제목 화면 (title-03 시안: 위 언어별 로고, 가운데 큰 주름 컵, 그 아래 시작 버튼) ── */
#title-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
}
#title-logo-wrap {
  position: absolute; left: 50%; top: 2.0%; transform: translateX(-50%);
  width: 88%; max-width: 350px;
  display: flex; flex-direction: column; align-items: center;
}
#title-logo {
  display: block; max-width: 78%; max-height: 150px; width: auto; height: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(22, 15, 8, 0.34));
}
#title-logo-fallback {
  font-size: 40px; font-weight: 900; color: #5b2613;
  background: #f4e4bf; border: 4px solid #5b2613; border-radius: 18px;
  padding: 10px 24px;
}
#title-sub {
  margin-top: 2px; padding: 2px 10px;
  border-radius: 10px;
  background: rgba(42, 68, 50, 0.82);
  color: #f8edd2; font-size: 13px; font-weight: 800; letter-spacing: 0.03em;
  white-space: nowrap;
}
#title-sub:empty { display: none; }

#btn-title-start {
  pointer-events: auto;
  position: absolute; left: 50%; top: 78.2%; transform: translateX(-50%);
  width: 228px; height: 60px; min-height: 48px;
  font-size: 24px; color: #224836;
}
#btn-title-start:active {
  transform: translateX(-50%) translateY(2px) scale(0.98);
}

/* ── 패널: 메뉴판 / 안내 / 결과 / 끝 ── */
#panel {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
  width: min(90%, 368px);
  padding: 22px 18px 20px;
  text-align: center;
  background: #f4e5c3;
  border: 5px solid #5c351d;
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(24, 16, 8, 0.34), inset 0 0 0 3px #3b7259;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  z-index: 5;
}

#p-banner {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
#p-title {
  font-weight: 900; font-size: 26px; color: #4d2414; line-height: 1.15;
}
#p-text {
  font-size: 17px; font-weight: 800; line-height: 1.5; color: #3a2416; white-space: pre-line;
}
#p-scores {
  font-size: 15.5px; font-weight: 800; line-height: 1.42; color: #2f4636; white-space: pre-line;
  background: rgba(245, 231, 196, 0.95);
  border: 2.5px solid #7d5634; border-radius: 12px;
  padding: 6px 14px;
}
#p-stars { display: flex; gap: 8px; align-items: center; justify-content: center; }
#p-stars:empty, #p-text:empty, #p-scores:empty { display: none; }

#p-btns {
  display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; justify-content: center;
}

/* 메뉴판 화면: menu-board.png 위에 여섯 줄 (모든 줄 >= 45px 높이, 18px 글자) */
#panel.mode-menu {
  top: 48%;
  width: min(93%, 396px);
  height: min(87%, 516px);
  padding: 128px 24px 44px;
  background: #5c351d;
  border: 4px solid #4c2a15;
  border-radius: 22px;
  box-shadow: 0 10px 22px rgba(20, 14, 8, 0.34);
  justify-content: center;
  gap: 0;
}
#app.art-menu #panel.mode-menu {
  background: transparent url("assets/menu-board.png") no-repeat center / 100% 100%;
  border: 0; border-radius: 0; box-shadow: none;
}
#panel.mode-menu #p-banner { display: none; }
#panel.mode-menu #p-btns { display: none; }

#p-menu { display: none; width: 100%; height: 100%; flex-direction: column; justify-content: space-between; gap: 5px; }
#p-menu.on { display: flex; }

.mrow {
  appearance: none;
  width: 100%; flex: 1 1 0; min-height: 45px; max-height: 56px;
  padding: 0 16px;
  border: 2px solid #63341b; border-radius: 14px;
  background: #f0dcb3;
  display: flex; align-items: center; gap: 8px;
  text-align: left; cursor: pointer;
  font-family: var(--font-heavy); font-weight: 900; font-size: 18px; line-height: 1;
  color: #3f2010;
}
#app.art-btn .mrow {
  border: 0; border-radius: 0;
  background: transparent url("assets/parts/button-wide.webp") no-repeat center / 100% 100%;
  padding: 0 26px 0 28px;
}
.mrow.sel {
  filter: brightness(1.07) drop-shadow(0 0 4px rgba(255, 214, 92, 0.85));
}
.mrow:active { transform: translateY(1.5px) scale(0.99); }
.mrow .no { flex: 0 0 20px; color: #7b4422; font-size: 17px; }
.mrow .nm { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .st { flex: 0 0 auto; display: flex; gap: 3px; align-items: center; }

/* 결과 화면 (완성된 컵 위에 명패 + 별 셋, 가운데 다음·다시·메뉴판) */
#panel.mode-result {
  inset: 0; left: 0; top: 0; transform: none;
  width: 100%; height: 100%; max-width: none;
  padding: 12px 16px 96px;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  justify-content: flex-start;
  pointer-events: none;
  gap: 6px;
}
#panel.mode-result #p-banner {
  width: min(86%, 326px); height: 60px;
  background: #f0dcb3; border: 3px solid #5f3119; border-radius: 24px;
}
#app.art-btn #panel.mode-result #p-banner {
  border: 0; border-radius: 0;
  background: transparent url("assets/parts/button-wide.webp") no-repeat center / 100% 100%;
}
#panel.mode-result #p-title {
  font-size: 27px; color: #6c2d1a; white-space: nowrap;
}
#panel.mode-result #p-stars {
  margin-top: 2px; gap: 10px;
}
#panel.mode-result #p-scores {
  margin-top: auto;
}
#panel.mode-result #p-btns {
  pointer-events: auto;
  margin-top: 6px;
  margin-bottom: 22%;
  max-width: 320px;
  gap: 8px 10px;
}
#panel.mode-result .img-btn {
  min-width: 132px; height: 50px; min-height: 48px; font-size: 18.5px;
}

/* ── 첫 실행 안전 안내 (제목 화면 위 작은 판, 한 번만, 2초 뒤 닫기 활성화) ── */
#safety-pop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 18, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  z-index: 10;
}
#safety-card {
  width: min(88%, 340px);
  max-height: 100%;
  padding: 20px 20px 18px;
  background: #f4e5c3;
  border: 5px solid #5c351d;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(18, 12, 6, 0.42), inset 0 0 0 3px #3b7259;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
#safety-text {
  font-size: 18.5px;
  font-weight: 800;
  line-height: 1.48;
  color: #3a2416;
  word-break: keep-all;
}
#safety-ok {
  min-width: 148px;
  height: 48px;
  min-height: 46px;
  font-size: 18.5px;
}
#safety-ok.is-wait {
  opacity: 0.48;
  cursor: default;
}
#safety-ok.is-wait:active {
  transform: none;
}

/* ── 설정 창 (#stage 내부 배치로 하단 광고 자리를 절대 가리지 않음, 단추 >= 44pt, 글자 >= 17pt) ── */
#settings-pop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 18, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  overflow: hidden;
  z-index: 12;
}
#settings-card {
  width: min(92%, 360px);
  max-height: 100%;
  padding: 14px 16px 14px;
  background: #f4e5c3;
  border: 5px solid #5c351d;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(18, 12, 6, 0.44), inset 0 0 0 3px #3b7259;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#set-title {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
  color: #4d2414;
}
.set-rows {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.img-btn.set-btn {
  width: 100%;
  flex: 0 0 auto;
  height: 46px;
  min-height: 45px;
  padding: 0 22px;
  font-size: 17.5px;
  justify-content: space-between;
}
.img-btn.set-btn.is-off {
  opacity: 0.78;
  color: #6b5240;
}
.img-btn.set-btn .set-ext {
  font-size: 17.5px;
  opacity: 0.82;
}
#set-close {
  flex: 0 0 auto;
  min-width: 148px;
  height: 46px;
  min-height: 45px;
  font-size: 18px;
}

/* 별 아이콘 (star-on.png / star-off.png + 도형 대체) */
.star {
  width: 56px; height: 52px;
  background: #ffc928;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star.off { background: #7f8c7a; }
#app.art-star .star {
  clip-path: none;
  background: transparent url("assets/parts/star-on.webp") no-repeat center / contain;
  filter: drop-shadow(0 3px 4px rgba(30, 18, 8, 0.28));
}
#app.art-star .star.off {
  background-image: url("assets/parts/star-off.webp");
  filter: none;
}
.star.mini { width: 22px; height: 21px; filter: none !important; }

/* 책 위 리본은 어닝 다음의 독립된 줄에 놓는다. */
#journey-nav {
  flex: 0 0 64px; width: 100%; padding: 6px 12px; z-index: 6;
  display: flex; align-items: stretch; gap: 4px;
  background: #37513b; box-shadow: inset 0 -2px #b99254;
}
.act-ribbon {
  appearance: none; flex: 1 1 0; min-width: 0; padding: 4px 1px;
  border: 2px solid #684124; border-radius: 5px 5px 12px 12px;
  background: linear-gradient(#fff0ce, #dfc18d); color: #3f2919;
  font-family: var(--font-heavy); font-weight: 900; font-size: 12px;
  box-shadow: inset 0 1px #fff9e8, 0 2px 2px #182c2866; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  white-space: nowrap;
}
.act-ribbon.is-locked { background: linear-gradient(#e3d3b4, #c8b28b); }
.act-ribbon small { font-size: 11px; display: flex; align-items: center; gap: 3px; height: 15px; }
.lock-icon { width: 11px; height: 13px; color: #644329; flex: 0 0 auto; }
.ribbon-thread { width: 30px; border-top: 2px solid #aa8247; opacity: .5; }
#journey-nav .room-button { flex: 0 0 84px; min-width: 0; min-height: 44px; height: 50px; padding: 0 6px; font-size: 14px; }
#journey-hud { position: absolute; z-index: 3; top: 10%; left: 5%; width: 90%; padding: 8px; border-radius: 12px; background: #f4e5c3ee; text-align: center; white-space: pre-line; font-size: 17px; pointer-events: none; }
#panel { max-height: 94%; overflow-y: auto; touch-action: pan-y; }
#panel.mode-hub, #panel.mode-collection {
  top: 50%; max-height: 94%; overflow: hidden; padding: 18px 14px 16px; gap: 10px;
}
#panel.mode-hub #p-banner, #panel.mode-collection #p-banner,
#panel.mode-collection #p-text, #panel.mode-hub #p-btns, #panel.mode-collection #p-btns { flex: 0 0 auto; }
#panel.mode-collection #p-title { font-size: 23px; }
#panel.mode-collection #p-text { color: #365439; font-size: 16px; }
#p-menu.journey-list, #p-menu.collection-grid {
  flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto;
  touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 2px 3px 6px;
}
#p-menu.journey-list { display: flex; gap: 8px; }
.journey-btn { width: 100%; flex-shrink: 0; white-space: normal; line-height: 1.15; }
button:disabled { opacity: .65; color: #69543a; cursor: default; filter: saturate(.5); }
button:disabled:active { transform: none; }
#p-menu.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.collection-cell {
  height: 184px; background: #eddbb6; border: 2px solid #b59159; border-radius: 14px;
  padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.collection-art { width: 100%; height: 94px; flex: 0 0 94px; }
.collection-art svg { width: 100%; height: 100%; }
.collection-cell strong { font-size: 14px; line-height: 1.2; min-height: 34px; display: flex; align-items: center; justify-content: center; }
.collection-cell > span { font-size: 11.5px; line-height: 1.35; color: #654a2e; }
.collection-cell.unowned { background: #dfcfb0; border-color: #b09a75; }
#panel.mode-collection #p-btns { margin-top: 0; padding-top: 6px; width: 100%; border-top: 2px solid #c6aa76; }
#panel.mode-intro { gap: 12px; padding: 20px 16px; top: 50%; }
#panel.mode-intro #p-title { font-size: 20px; }
#panel.mode-intro #p-text { font-size: 16px; }
#tilt-guide { width: 190px; height: 114px; flex: 0 0 auto; }
#tilt-guide svg { width: 100%; height: 100%; overflow: visible; }
.tilt-phone, .tilt-water { transform-origin: 110px 66px; animation: phone-tilt 4s ease-in-out infinite; }
.tilt-water { animation-name: water-level; }
@keyframes phone-tilt { 0%, 100% { transform: rotate(-15deg); } 50% { transform: rotate(15deg); } }
@keyframes water-level { 0%, 100% { transform: rotate(15deg); } 50% { transform: rotate(-15deg); } }
@media (prefers-reduced-motion: reduce) { .tilt-phone, .tilt-water { animation: none; } }
#panel.mode-result { padding-bottom: 10px; }
#panel.mode-result #p-btns { margin-bottom: 2%; flex-shrink: 0; }
#panel.mode-result #p-scores { margin-top: auto; }
#panel.mode-result .journey-btn { width: auto; }

/* 단골 장부: 무대 안에서 목록만 스크롤하고 복귀 버튼은 고정한다. */
#panel.mode-regulars { top: 50%; max-height: 94%; overflow: hidden; padding: 16px 12px; gap: 10px; }
#panel.mode-regulars #p-banner, #panel.mode-regulars #p-text, #panel.mode-regulars #p-btns { flex: 0 0 auto; }
#panel.mode-regulars #p-title { font-size: 22px; overflow-wrap: anywhere; }
#panel.mode-regulars #p-text { font-size: 14px; }
#p-menu.regular-list { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto; padding: 3px; touch-action: pan-y; overscroll-behavior: contain; }
#p-menu .regular-card { display: flex; align-items: center; gap: 9px; padding: 18px 30px 18px 22px; min-height: 124px; height: auto; text-align: left; }
#p-menu .regular-card > span { gap: 3px; }
#p-menu .regular-card small { line-height: 1.3; }
.regular-card > span { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.regular-card strong { font-size: 16px; }
.regular-card small { font-size: 12px; }
.regular-portrait { position: relative; width: 72px; height: 72px; flex: 0 0 72px; border: 3px solid #997342; border-radius: 50%; overflow: hidden; background: #f8ebcc; color: #69482f; display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto; }
.regular-portrait img { width: 100%; height: 100%; object-fit: cover; }
.regular-portrait.is-locked { filter: grayscale(1); opacity: .65; }
.regular-list > .journey-btn { min-height: 88px; height: auto; padding: 12px; white-space: pre-line; line-height: 1.4; font-size: 15px; overflow-wrap: anywhere; }
.regular-list > p { font-size: 14px; line-height: 1.4; text-align: center; margin: 2px 0; }
.collection-art .regular-portrait { width: 88px; height: 88px; }
#p-menu.regular-talk-art { display: block; height: auto; flex: 0 0 auto; }
#panel.mode-regular-talk { gap: 12px; padding: 20px 16px; }
#panel.mode-regular-talk #p-title { font-size: 19px; }
#panel.mode-regular-talk #p-text, #panel.mode-result #p-text { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
#panel.mode-result #p-title { overflow-wrap: anywhere; }
#panel.mode-result.regular-result #p-banner { height: auto; min-height: 56px; padding: 10px; flex: 0 0 auto; }
#panel.mode-result.regular-result #p-title { font-size: 18px; white-space: normal; line-height: 1.3; }
#panel.mode-result.regular-result #p-text { flex: 0 0 auto; margin: 0; padding: 8px 10px; border-radius: 10px; background: #f7e8ccf2; color: #4e321e; }
#panel.mode-result.regular-result #p-scores { flex: 0 0 auto; }

/* 375pt에서도 네 리본은 한 줄, 책 넘김과 다방은 두 번째 줄이다. */
#journey-nav { flex-basis: 112px; flex-wrap: wrap; padding: 5px 10px; gap: 4px; }
#journey-nav .act-ribbon { flex: 1 1 calc(25% - 4px); height: 48px; font-size: 11px; }
#journey-nav .act-ribbon small { font-size: 10px; }
#journey-nav .act-ribbon.act-four { flex-grow: 1.6; flex-basis: calc(32% - 4px); }
#journey-nav .act-ribbon.act-four small { font-size: 9px; gap: 2px; letter-spacing: -0.25px; }
#journey-nav .act-ribbon:not(.act-four) { flex-basis: calc(22% - 4px); }
#journey-nav .page-button, #journey-nav .room-button { flex: 1 1 40%; height: 44px; min-height: 44px; font-size: 14px; }
.collection-specimen { display: grid; place-items: center; }
.collection-specimen > img { grid-area: 1 / 1; width: 100%; height: 94px; object-fit: contain; }
.collection-cell.unowned .collection-art > img { filter: brightness(.25); opacity: .7; }
