/* 글꼴 (모두 OFL, fonts/OFL-*.txt). 게임에 나오는 글자만 남긴 파일 — 글이 바뀌면 tools/subset_fonts.py로 다시 만든다.
   Box: Bagel Fat One — 통통하고 둥근 제목·단추·큰 숫자 (2026-11-24 사용자가 고름) / Body: Pretendard 두 굵기 — 읽는 글 전부.
   Magic은 예전 손글씨 자리의 이름이다. 지금은 본문 글꼴을 가리킨다 (결과 카드 그림이 이 이름을 쓴다). */
@font-face { font-family: "Box"; src: url("fonts/BagelFatOne-Regular.subset.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Body"; font-weight: 500; src: url("fonts/Pretendard-Medium.subset.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Body"; font-weight: 700; src: url("fonts/Pretendard-Bold.subset.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Magic"; font-weight: 500; src: url("fonts/Pretendard-Medium.subset.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Magic"; font-weight: 700; src: url("fonts/Pretendard-Bold.subset.woff2") format("woff2"); font-display: swap; }
:root {
  /* 귤 박스와 신문지: 골판지, 박스 초록 인쇄, 귤 주황, 매직 검정, 신문지 */
  --box: #c9a27c;
  --green: #2f6a3c;
  --news: #e8e3d6;
  --magic: #1f1b17;
  --bg: #1a120e;
  --cream: #fff3e0;
  --muted: #d8c2a8;
  --orange: #f08a1c;
  --font: "Body", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  color: var(--cream);
  background: #0f0a08;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* 두 번 눌러 확대 막기 */
  -webkit-user-select: none; user-select: none;
}
#app { max-width: 520px; height: 100vh; height: var(--app-h, 100dvh); margin: 0 auto; position: relative; overflow: hidden; background: var(--bg); }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.screen { position: absolute; inset: 0; display: none; flex-direction: column; padding: calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; }
.screen.active { display: flex; }
.screen button { pointer-events: auto; }

/* title */
#screen-title { justify-content: flex-end; text-align: center; }
.title { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -0.5px; color: var(--news); }
/* 밝은 신문지 위에서도 읽히게 진한 그림자 */
.title-bottom .title, .title-bottom .sub, .title-bottom .cure { }
.title-bottom .sub { color: #f1e9da; font-weight: 600; }
.cure {
  margin: 0; padding: 9px 16px; background: var(--cream); color: #2a1407; font-weight: 700; font-size: 16px;
  border-radius: 2px; box-shadow: none; transition: opacity .3s, transform .3s;
}
.sub { color: var(--muted); line-height: 1.7; margin: 0; }
.title-bottom { padding-bottom: 5vh; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.title-bottom .btn { margin-top: 6px; }

.settings-btn {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; pointer-events: auto;
  font: 600 14px var(--font); color: var(--cream); background: rgba(255,255,255,.12); border: 0; border-radius: 12px; padding: 9px 13px; cursor: pointer;
}
.settings-btn.in-bar { position: static; flex: none; }
.sound-btn {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; pointer-events: auto;
  font: 600 12px var(--font); color: var(--muted); background: rgba(255,255,255,.1); border: 0; border-radius: 12px; padding: 9px 11px; cursor: pointer;
}
.sound-btn.in-bar { position: static; flex: none; }
.music-btn {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 92px; pointer-events: auto;
  font: 600 12px var(--font); color: var(--muted); background: rgba(255,255,255,.1); border: 0; border-radius: 12px; padding: 9px 11px; cursor: pointer;
}
.music-btn.in-bar { position: static; flex: none; }
.music-btn[aria-pressed="false"], .sound-btn[aria-pressed="false"] { opacity: .6; }

/* buttons */
.btn {
  font: 600 16px var(--font); color: var(--cream);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; padding: 13px 18px; cursor: pointer; flex: 1;
}
.btn:active { transform: translateY(1px); }
/* 키보드로 옮겨 다닐 때 어디에 있는지 보이게 */
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #ffd08a; outline-offset: 2px; }
@media (hover: hover) {
  .btn:hover, .stage:hover, .free-card:hover, .daily-card:hover { filter: brightness(1.08); }
  .link-btn:hover, .sound-btn:hover, .icon-btn:hover { filter: brightness(1.25); }
}
.btn.primary { background: var(--orange); border-color: var(--orange); color: #2a1407; }
.btn.ghost { background: transparent; font-size: 14px; padding: 11px 14px; }
.btn.big { padding: 16px 40px; font-size: 20px; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(22,14,9,.78); color: var(--cream); font-size: 28px; line-height: 1; cursor: pointer; }

/* header bar */
.bar { display: flex; align-items: center; gap: 12px; }
.bar h2 { flex: 1; text-align: center; font-size: 20px; margin: 0; }
.bar-space { width: 40px; }
.lives { display: flex; gap: 4px; width: 40px; justify-content: flex-end; }
.lives i { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 6px rgba(255,138,31,.6); }
.lives i.lost { background: rgba(255,255,255,.18); box-shadow: none; }

/* stage select */
#screen-select { background: rgba(26,18,14,.94); pointer-events: auto; overflow-y: auto; overscroll-behavior: contain; }
.box-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 18px; }
.box-count { margin: 0; font-size: 14px; color: var(--muted); }
.box-line .link-btn { font-size: 12px; padding: 4px 0; flex: none; }
.stage .stamp-mini { display: inline-block; margin-top: 4px; padding: 1px 6px; border: 2px solid #6fae7d; border-radius: 2px; color: #8fcf9d; font-size: 12px; font-weight: 800; }
.easy-offer { display: block; width: 100%; margin: 0 0 10px; padding: 10px; border: 1px dashed rgba(255,243,224,.4); border-radius: 12px; background: rgba(255,243,224,.06); color: var(--cream); font: 500 14px var(--font); cursor: pointer; }
.easy-offer b { color: var(--orange); }
.easy-offer[hidden] { display: none; }
.box-count b { color: var(--orange); margin-right: 4px; }
.stage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
.stage {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  padding: 12px 10px 14px; color: var(--cream); font: inherit; cursor: pointer; text-align: center;
}
.stage canvas { width: 110px; height: 110px; display: block; margin: 0 auto 6px; }
.stage b { display: block; font-size: 16px; }
.stage small { color: var(--muted); font-size: 12px; }
.stage .best { color: var(--orange); }

/* 오늘의 귤: 달력 한 장처럼 */
.daily-card {
  position: relative; width: 100%; margin-top: 18px; padding: 12px 16px; text-align: left; cursor: pointer; font: inherit;
  color: var(--magic); background: var(--news); border: 0; border-radius: 2px; border-left: 6px solid var(--green);
}
.daily-card small { display: block; font-size: 14px; color: #7a5a40; }
.daily-card b { display: block; font-size: 20px; margin-top: 2px; }
.daily-done { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: 2px solid var(--green); color: var(--green); border-radius: 12px; padding: 2px 8px; font-weight: 800; font-size: 14px; mix-blend-mode: multiply; }
.daily-done[hidden] { display: none; }
.cure[hidden] { display: none; }
.free-card {
  width: 100%; margin-top: 12px; padding: 14px 16px; text-align: left; cursor: pointer; font: inherit; color: #2a1407;
  background: var(--orange); border: 0; border-radius: 12px;
}
.free-card b { display: block; font-size: 20px; }
.free-card small { font-size: 14px; opacity: .85; }
.zoo { margin-top: 16px; }
.zoo-title { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.zoo-title span { color: var(--orange); margin-left: 4px; }
.zoo-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.zoo-row figure { margin: 0; flex: none; width: 84px; text-align: center; background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 4px 6px; }
.zoo-row img { width: 64px; height: 64px; display: block; margin: 0 auto 4px; }
.zoo-row figcaption { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* play */
#screen-play { justify-content: flex-start; }
/* 자르는 동안 엄지에 가리지 않게 반응 글은 위쪽에 */
.play-info { padding-top: 10px; }
.play-info { display: flex; flex-direction: column; align-items: center; }
.play-info .progress { width: 100%; }
.play-info .hint { margin: 10px 0 0; padding: 7px 14px; border-radius: 12px; background: rgba(26,18,14,.78); min-height: 0; max-width: 100%; }
.play-info .hint:empty { visibility: hidden; }
.progress { height: 6px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
#progress-fill { height: 100%; width: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left center; transition: transform .1s; }
.hint { text-align: center; color: var(--cream); min-height: 1.5em; margin: 0 0 12px; font-size: 14px; }

#btn-unfold { display: none; width: 100%; flex: none; margin-top: auto; }
#screen-play.free #btn-unfold { display: block; }
#screen-play.free .progress, #screen-play.free .lives i { display: none; }

/* 아슬아슬 표시와 완성 순간의 번쩍 */
.strain { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: inset 0 0 70px 18px rgba(255,70,40,.75); z-index: 5; }
/* 네 귀퉁이를 남색으로 가라앉혀 가운데 귤로 눈이 가게 (WebGL 패스 없이 CSS 한 겹) */
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 60% at 50% 46%, rgba(16,18,32,0) 60%, rgba(16,18,32,.3) 100%); }
.flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: #fff3e0; z-index: 6; }
.flash.go { animation: flash .35s ease-out; }
/* 가로로 돌렸을 때 */
.rotate-note { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .rotate-note { display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; background: #1a120e; color: var(--cream); font-weight: 700; font-size: 20px; }
}
@keyframes flash { from { opacity: .3; } to { opacity: 0; } }

/* 등급 도장 */
.stamp {
  position: absolute; right: 16px; top: -22px; padding: 6px 12px; border: 3px solid #ff5a36; border-radius: 12px;
  color: #ff5a36; font-weight: 800; font-size: 20px; letter-spacing: 1px; background: rgba(43,31,26,.9);
  transform: rotate(-9deg); opacity: 0; pointer-events: none;
}
.stamp.go { opacity: 1; animation: stamp .4s .35s cubic-bezier(.2,1.6,.4,1) backwards; }
@keyframes stamp { from { transform: rotate(-9deg) scale(2.6); opacity: 0; } }
.overlay.free .stamp { display: none; }

/* 껍질의 한마디 */
.bubble {
  position: absolute; left: 50%; top: 74px; transform: translateX(-50%); z-index: 9; max-width: 86%;
  background: var(--cream); color: #2a1407; font-weight: 700; font-size: 16px; padding: 10px 16px; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; pointer-events: none; animation: pop .35s cubic-bezier(.3,1.5,.5,1);
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.bubble.hidden { display: none; }
@keyframes pop { from { transform: translateX(-50%) scale(.4); opacity: 0; } }

/* result sheet */
.overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; z-index: 10; pointer-events: none; }
.overlay.hidden { display: none; }
.sheet {
  position: relative;
  pointer-events: auto; width: 100%;
  background: rgba(43,31,26,.96); border-top: 1px solid rgba(255,255,255,.1); border-radius: 2px 2px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); text-align: center;
  box-shadow: 0 -10px 40px rgba(0,0,0,.4); animation: up .35s ease-out;
}
@keyframes up { from { transform: translateY(100%); } }
.result-kicker { margin: 0; color: var(--orange); font-weight: 700; font-size: 14px; }
.sheet h3 { margin: 4px 0 2px; font-size: 24px; }
.grade { margin: 0 0 12px; color: var(--muted); }
.stats { display: flex; margin: 0 0 14px; }
.stats div { flex: 1; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.btn-row { display: flex; gap: 8px; margin-top: 8px; }
/* 결과에서 가장 큰 단추는 자랑하기 하나 */
.btn.share { display: block; width: 100%; flex: none; padding: 16px; font-size: 20px; font-weight: 800; }
.link-row { display: flex; justify-content: center; gap: 18px; margin-top: 6px; }
.link-btn { background: none; border: 0; padding: 8px 4px; color: var(--muted); font: 500 14px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn[hidden] { display: none; }
.mute-note { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.title-bottom .open-out { pointer-events: auto; font-size: 14px; color: #2a1407; background: var(--cream); border-radius: 12px; padding: 7px 14px; text-decoration: none; }
.title-bottom .open-out[hidden] { display: none; }
/* 앱 안 브라우저에서 저장할 때: 그림을 크게 띄운다 */
.save-view { position: absolute; inset: 0; z-index: 40; background: rgba(10,6,4,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.save-view[hidden] { display: none; }
.save-view p { margin: 0; font-weight: 700; }
.save-view img { max-width: 100%; max-height: 70vh; border-radius: 12px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.save-view .btn { flex: none; padding: 12px 40px; }
.keep-row { display: none; gap: 8px; margin: 0 0 4px; }
.overlay.free .keep-row { display: flex; }
.overlay.free .stats { display: none; }
#name-input {
  flex: 1; min-width: 0; font: 600 16px var(--font); color: var(--cream); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 12px 14px; -webkit-user-select: text; user-select: text;
}
#name-input::placeholder { color: rgba(216,194,168,.7); }
#btn-keep { flex: none; }
.overlay.free:has(#btn-keep:disabled) #name-input { display: none; }
#btn-keep:disabled { flex: 1; opacity: .8; }

.haptic-test { position: absolute; left: 8px; top: 190px; z-index: 30; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font: 12px var(--font); background: rgba(0,0,0,.6); padding: 8px; border-radius: 12px; }
.haptic-test button { pointer-events: auto; font: 600 14px var(--font); padding: 8px 12px; border-radius: 12px; border: 0; background: var(--orange); color: #2a1407; }
.haptic-test label { display: flex; align-items: center; gap: 6px; }
.haptic-test small { color: #9f9; }
.fps { position: absolute; left: 8px; top: 120px; z-index: 30; white-space: pre; font: 12px/1.45 ui-monospace, monospace; background: rgba(0,0,0,.6); color: #9f9; padding: 5px 7px; border-radius: 12px; pointer-events: none; }

.oops { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; padding: 24px; background: rgba(23,26,38,.92); color: var(--cream); text-align: center; font-size: 20px; }
.oops[hidden] { display: none; }
.oops p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .sheet, .bubble, .stamp.go, .flash.go { animation: none; } }

/* ---------- 결과 시트를 공방 쪽지(종이)처럼 (P1-9) ---------- */
.sheet {
  --ink: #3a2212; --ink-soft: #7a5a40;
  color: var(--ink);
  background-color: var(--news);
  border-top: 0;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 -12px 36px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.5);
}

.sheet .result-kicker { color: var(--green); font-weight: 700; font-size: 14px; margin: 2px 0 0; min-height: 0; }
.sheet .result-kicker:empty { display: none; }
.sheet .grade, .sheet .stats dt { color: var(--ink-soft); }
.sheet .stats dd { color: var(--ink); }
.sheet .btn:not(.primary) { color: var(--ink); background: rgba(58,34,18,.06); border-color: rgba(58,34,18,.28); }
.sheet .link-btn { color: var(--ink-soft); }
.sheet .easy-offer { color: var(--ink); border-color: rgba(58,34,18,.35); background: rgba(58,34,18,.05); }
.sheet .easy-offer b { color: #c2410c; }
.sheet #name-input { color: var(--ink); background: rgba(255,255,255,.55); border-color: rgba(58,34,18,.3); }
.sheet #name-input::placeholder { color: rgba(122,90,64,.8); }
.sheet .stamp { top: 12px; right: 12px; background: transparent; color: var(--green); border-color: var(--green); }
.sheet h3 { letter-spacing: -0.3px; }

/* ---------- 설정 쪽지 ---------- */
#settings { z-index: 20; background: rgba(10,6,4,.45); pointer-events: auto; }
.settings-sheet { text-align: left; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; }
.settings-sheet h3 { text-align: center; margin: 2px 0 12px; }
.set-row { padding: 11px 2px; }
.set-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.set-main small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.set-row input[type="range"] { width: 100%; margin: 8px 0 0; accent-color: #e8761a; }
.set-row input[type="range"]:disabled { opacity: .35; }
.set-main input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 12px; margin: 0;
  background: rgba(58,34,18,.25); position: relative; cursor: pointer; transition: background-color .2s;
}
.set-main input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s;
}
.set-main input[type="checkbox"]:checked { background: #e8761a; }
.set-main input[type="checkbox"]:checked::after { transform: translateX(18px); }
.set-main input[type="checkbox"]:disabled { opacity: .4; }
.settings-sheet .link-btn.danger { display: block; margin: 14px auto 10px; color: #b3341e; }
@media (prefers-reduced-motion: reduce) { .set-main input[type="checkbox"], .set-main input[type="checkbox"]::after { transition: none; } }
/* 깐 귤 개수 */
.result-count { margin: -4px 0 12px; font-size: 14px; color: var(--ink-soft); }
.result-count.milestone { font-size: 14px; color: var(--ink); }
.result-count b { color: var(--green); }
.overlay.free .result-count { margin-top: 8px; }

/* ---------- 2단계: 귤 박스 (목록) ---------- */
#screen-select { background: #16100c; }
.box {
  margin-top: 12px; padding: 10px; border-radius: 2px; color: var(--magic);
  background-color: var(--box);
  background-image: repeating-linear-gradient(90deg, rgba(90,60,30,.06) 0 2px, transparent 2px 8px); /* 골판지 결 */
  box-shadow: inset 0 0 0 3px #a8835d, 0 12px 26px rgba(0,0,0,.5);
}
.box-lid { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px 9px; }
.daily-memo { background: none; border: 0; padding: 4px 0; font: 600 14px var(--font); color: var(--magic); cursor: pointer; text-align: left; }
.daily-memo b { color: var(--green); font-size: 16px; }
.daily-memo span[hidden] { display: none; }
.box-lid .box-count { margin: 0; font-size: 14px; color: #4a3826; white-space: nowrap; }
.box-lid .box-count b { color: var(--green); font-size: 16px; margin: 0; }
.stage-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 0; padding: 5px; background: #8a6440; border-radius: 2px; }
.stage {
  position: relative; background: #dcbb96; border: 0; border-radius: 2px; color: var(--magic);
  box-shadow: inset 0 3px 7px rgba(80,50,20,.35); padding: 8px 2px 7px;
}
.stage canvas { width: 70px; height: 70px; margin: 0 auto 3px; }
.stage b { font-size: 14px; }
.stage .stamp-mini { margin-top: 3px; border-color: var(--green); color: var(--green); font-size: 12px; padding: 0 5px; }
.stage.today::after { /* 매직으로 그린 동그라미 */
  content: ""; position: absolute; inset: 3px 6px 20px; border: 2px solid var(--magic); border-radius: 50%; opacity: .75; pointer-events: none;
}
.free-card {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px;
  background: transparent; border: 2px dashed rgba(232,227,214,.3); color: var(--news);
}
.free-card .loose { flex: none; width: 38px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffc45e, #f08a1c 60%, #c85f0c); }
.free-card .loose::after { content: ""; display: block; width: 8px; height: 5px; margin: -2px auto 0; background: #6d9a2c; border-radius: 50%; }
.free-card b { font-size: 16px; }
.free-card small { opacity: .75; }
.box-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.zoo-title span { color: var(--news); }

/* ---------- 2단계: 결과 쪽지를 골판지로 ---------- */
.sheet:not(.settings-sheet) {
  --ink: var(--magic); --ink-soft: #5a4430;
  background-color: var(--box);
  background-image: repeating-linear-gradient(90deg, rgba(90,60,30,.06) 0 2px, transparent 2px 8px);
  box-shadow: inset 0 3px 0 #a8835d, 0 -12px 36px rgba(0,0,0,.45);
}
.sheet h3 { color: var(--magic); }
.r-line { margin: 2px 0 12px; font-size: 14px; font-weight: 600; color: var(--magic); }
.overlay.free .r-line { display: none; }
.sheet .btn:not(.primary) { color: var(--green); background: transparent; border: 2px solid var(--green); }
.sheet .link-btn { color: #4a3826; }
.sheet .stamp { color: var(--green); border-color: var(--green); background: rgba(220,187,150,.6); }

/* ---------- 2단계: 설정은 체크 칸 ---------- */
.set-main input[type="checkbox"] {
  width: 26px; height: 26px; border-radius: 2px; background: transparent; border: 2px solid var(--magic);
}
.set-main input[type="checkbox"]::after {
  top: 2px; left: 7px; width: 7px; height: 13px; border-radius: 2px; background: transparent; box-shadow: none;
  border: solid var(--green); border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); transition: transform .12s;
}
.set-main input[type="checkbox"]:checked { background: transparent; }
.set-main input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.set-row input[type="range"] { accent-color: var(--green); }

/* ---------- 글꼴 입히기 ---------- */
:root { --font-box: "Box", var(--font); --font-magic: "Magic", var(--font); }
/* 박스 인쇄체: 제목·단추·도안 이름·도장 (도현은 굵기가 하나뿐이라 400으로 둔다) */
.title, .bar h2, .stage b, .sheet h3, .stamp, .stage .stamp-mini, .btn, .free-card b, .daily-memo b, .settings-btn, .set-main > span {
  font-family: var(--font-box); font-weight: 400; letter-spacing: 0;
}
.title { font-size: 44px; }
.bar h2 { font-size: 24px; }
.sheet h3 { font-size: 28px; }
.stage b { font-size: 16px; }
.btn { font-size: 20px; }
.btn.share { font-size: 20px; }
.set-main > span { font-size: 20px; }
.set-main small { font-family: var(--font); }
/* 매직 손글씨: 안내 글·메모·숫자·말풍선. 글씨가 작아 보여서 크게 쓴다 */
.hint, .daily-memo, .box-lid .box-count, .r-line, .sheet .result-kicker, .result-count, .title-bottom .sub, .cure, .bubble, .sheet .grade {
  font-family: var(--font-magic); font-weight: 400;
}
.hint { font-size: 20px; line-height: 1.15; }
.daily-memo { font-size: 24px; line-height: 1; }
.daily-memo b { font-size: 24px; }
.box-lid .box-count { font-size: 24px; }
.box-lid .box-count b { font-family: var(--font-magic); font-size: 24px; }
.r-line { font-size: 24px; }
.sheet .result-kicker { font-size: 20px; font-weight: 400; }
.result-count { font-size: 20px; color: #4a3826; }
.title-bottom .sub { font-size: 24px; }
.bubble { font-size: 24px; padding: 7px 16px; }
.sheet .grade { font-size: 24px; color: #4a3826; }
/* 기본 모드: 위에 매직으로 쓴 오늘 개수와 봉지(10개) 칸, 아래에 단추 */
#screen-basic { justify-content: flex-start; }
.basic-count { flex: 1; text-align: center; font-family: var(--font-magic); }
.basic-count p { margin: 0; }
.basic-today { font-size: 28px; line-height: 1; }
.basic-today b { font-family: var(--font-box); font-weight: 400; font-size: 44px; color: #ffd08a; display: inline-block; margin: 0 2px; }
.basic-today b.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
.basic-bag { font-size: 20px; color: var(--muted); margin-top: 4px !important; display: flex; justify-content: center; align-items: center; gap: 8px; }
.basic-bag #basic-bag { display: inline-flex; gap: 3px; }
.basic-bag i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(255,243,224,.55); }
.basic-bag i.on { background: var(--orange); border-color: var(--orange); }
/* 과일 고르기: 귤·한라봉·자몽 점 세 개 (안 풀린 것은 빈 점선 동그라미) */
.fruit-picks { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 8px; }
.fruit-name { font-family: var(--font-magic); font-size: 24px; line-height: 1; color: #fff3e0; min-width: 3em; text-align: left; }
.fruit-picks button { position: relative; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid rgba(255,243,224,.45); background: var(--c); pointer-events: auto; cursor: pointer; box-shadow: 0 1px 6px rgba(20,12,6,.7); }
.fruit-picks button::after { content: ''; position: absolute; inset: -12px -8px; }
.fruit-picks button.on { border-color: #fff3e0; transform: scale(1.25); }
.fruit-picks button.locked { background: rgba(20,12,6,.35); border-style: dashed; }
.fruit-picks button:focus-visible { outline: 2px solid #fff3e0; outline-offset: 3px; }
.basic-hint { margin-top: 12px; }
.basic-hint:empty { visibility: hidden; }
.basic-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.basic-foot .btn { flex: none; min-width: 180px; }
.basic-foot .btn[hidden] { display: none; }
#btn-make { background: rgba(22,14,9,.6); }
#btn-make.nudge { border-color: #ffd08a; color: #ffd08a; animation: nudge 1.6s ease-in-out 3; }
@keyframes nudge { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .basic-today b.bump, #btn-make.nudge { animation: none; } }
/* 입체로 까기 입구: 꽃잎처럼 벌어진 귤 */
.free-card + .free-card { margin-top: 8px; }
.free-card .loose.bloom { background: radial-gradient(circle at 50% 45%, #ffcf7a 0 30%, #f08a1c 31% 48%, transparent 49%), conic-gradient(from 0deg, #fff1d6 0 10%, transparent 10% 16.6%, #fff1d6 16.6% 26.6%, transparent 26.6% 33.3%, #fff1d6 33.3% 43.3%, transparent 43.3% 50%, #fff1d6 50% 60%, transparent 60% 66.6%, #fff1d6 66.6% 76.6%, transparent 76.6% 83.3%, #fff1d6 83.3% 93.3%, transparent 93.3%); border-radius: 50%; }
.free-card .loose.bloom::after { display: none; }
.art-card { align-items: flex-start; }
/* 한 장으로 까기 입구: 길게 이어진 껍질 띠 */
.free-card .loose.long { background: radial-gradient(circle at 50% 50%, transparent 0 34%, #f08a1c 35% 52%, transparent 53%), radial-gradient(circle at 35% 30%, #ffc45e, #f08a1c 60%, #c85f0c); border-radius: 50%; }
.free-card .loose.long::after { display: none; }
.art-card .loose { margin-top: 2px; }
.art-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.art-picks { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.art-pick {
  font: 16px/1 "Box", sans-serif; padding: 8px 12px; min-height: 36px; border-radius: 12px;
  background: var(--news); color: var(--magic); border: 2px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.art-pick i { font: 14px/1 "Box", sans-serif; font-style: normal; color: var(--green); border: 1.5px solid var(--green); padding: 2px 4px; border-radius: 2px; }
.art-pick.done { border-color: var(--green); }
.art-pick svg { width: 26px; height: 26px; flex: none; fill: var(--orange); stroke: #b85f0c; stroke-width: 4; margin-left: -4px; }
@media (hover: hover) { .art-pick:hover { border-color: var(--orange); } }

/* ---------- 작은 단추의 누르는 범위를 44px쯤으로 넓힌다 (보이는 크기는 그대로) ---------- */
.settings-btn.in-bar, .art-pick, .daily-memo, #btn-easy-toggle { position: relative; }
.settings-btn::after, .daily-memo::after, #btn-easy-toggle::after { content: ''; position: absolute; inset: -6px -4px; }
.art-pick::after { content: ''; position: absolute; inset: -3px; }

/* ================= 시작화면: 귤 박스 딱지 (2026-11-22, 시안 C를 골라 다듬음) =================
   글은 딱지와 단추 두 덩이. 제목은 종이 딱지에 초록 인쇄라 외곽선·그림자 없이도 읽힌다. */
.title-bottom { gap: 8px; padding-bottom: calc(13vh + env(safe-area-inset-bottom, 0px)); }
.title-bottom .sub { font-size: 20px; order: 3; margin: 2px 0 0; opacity: .92; }
.title-bottom .sub[hidden] { display: none; }
.title-bottom .btn.big { width: 68%; min-height: 60px; font-size: 20px; padding: 14px 10px; order: 2; }
.title-bottom .title { position: absolute; top: clamp(34px, 7.5vh, 70px); left: 50%; transform: translateX(-50%) rotate(-2deg); white-space: nowrap;
  font-size: clamp(36px, 6vh, 50px); line-height: 1.04; color: var(--green); background: var(--news);
  background-image: repeating-linear-gradient(0deg, rgba(90,70,40,.035) 0 1px, transparent 1px 4px); /* 종이 결 */
  padding: .34em .56em .26em; border-radius: 2px;
  box-shadow: inset 0 0 0 3px var(--news), inset 0 0 0 6px var(--green), 0 10px 22px rgba(0,0,0,.45);
  animation: label-stick .42s cubic-bezier(.2,.9,.3,1.2) both; }
.title span { display: block; }
.title::after { content: "귤을 까면 동물이 나와요"; display: block; margin-top: .16em; padding-top: .16em; border-top: 2px solid var(--green);
  font: 400 .4em/1.15 var(--font-magic); color: var(--magic); letter-spacing: 0; }
/* 딱지 귀퉁이에 찍힌 등급 도장 (게임 안의 특품·상품 도장과 같은 말) */
.title::before { content: "특품"; position: absolute; right: -14px; bottom: -12px; width: 2.5em; height: 2.5em; display: grid; place-items: center;
  font: 400 .34em/1 var(--font-box); color: var(--green); border: 2px solid var(--green); border-radius: 50%;
  background: rgba(232,227,214,.82); transform: rotate(11deg); box-shadow: inset 0 0 0 2px rgba(232,227,214,.82), inset 0 0 0 3px var(--green); }
@keyframes label-stick { from { opacity: 0; transform: translateX(-50%) rotate(-6deg) scale(1.08); } to { opacity: 1; transform: translateX(-50%) rotate(-2deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .title { animation: none; } }

/* ================= 목록 화면 시안 (?list=a 접기 / ?list=b 2열). 고른 뒤 나머지는 지운다 ================= */
/* 공통: 박스를 낮춰 첫 화면에 다른 구역 머리줄이 보이게, 다음에 깔 칸 강조, 구역 숫자, 넉넉하게 까기는 설정에만 */
.lv-a .stage, .lv-b .stage { padding: 6px 2px 5px; }
.lv-a .stage canvas, .lv-b .stage canvas { width: 52px; height: 52px; margin-bottom: 1px; }
.lv-a .stage .stamp-mini, .lv-b .stage .stamp-mini { position: absolute; top: 4px; right: 4px; margin: 0; background: rgba(220,187,150,.85); }
.lv-a .box-foot, .lv-b .box-foot { display: none; }
.next-up { outline: 3px solid var(--green); outline-offset: -3px; }
.next-up::before { content: "다음"; position: absolute; top: 0; left: 0; z-index: 1; font: 14px/1 var(--font-box); color: var(--news); background: var(--green); padding: 4px 6px 3px; }
.sec-count { font: 400 20px/1 var(--font-magic); font-style: normal; color: #a9d4b0; margin-left: 6px; }
.lv-a .free-card, .lv-b .free-card { margin-top: 10px; }
/* A. 접기: 한 장·입체는 머리줄만(그림 몇 개 + 숫자 + ▾), 누르면 펼쳐진다 */
.lv-a .art-card { cursor: pointer; position: relative; padding-right: 40px; }
.lv-a .art-card::after { content: "▾"; position: absolute; right: 14px; top: 14px; font-size: 20px; color: var(--news); transition: transform .15s; }
.lv-a .art-card.folded::after { transform: rotate(-90deg); }
.lv-a .art-card.folded small, .lv-a .art-card.folded .art-picks { display: none; }
.lv-a .art-card:not(.folded) .peek { display: none; }
.peek { display: flex; align-items: center; gap: 4px; margin-top: 6px; opacity: .9; }
.peek svg { width: 30px; height: 30px; fill: var(--orange); stroke: #b85f0c; stroke-width: 4; }
.peek i { font: 14px/1 var(--font-box); font-style: normal; color: var(--news); border: 1.5px solid rgba(232,227,214,.4); border-radius: 2px; padding: 4px 6px; }
/* B. 펼친 채 2열: 단추를 고른 칸으로(48px), 설명 글은 뺀다 */
.lv-b .art-card small { display: none; }
.lv-b .art-card .art-body { flex: 1; }
.lv-b .art-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lv-b .art-pick { min-height: 48px; width: 100%; justify-content: flex-start; }
.lv-b .art-pick i { margin-left: auto; }
.lv-b .art-card .loose { display: none; }

/* 결과의 "다음: ○○" 단추: 한 줄로, 이름이 길면 글씨를 줄인다 */
#btn-next { white-space: nowrap; }
#btn-next.long { font-size: 14px; padding-left: 6px; padding-right: 6px; }

/* 배경음 출처 (CC BY 조건) */
.credit { margin: 6px 0 10px; font: 12px/1.4 system-ui, sans-serif; color: inherit; opacity: 0.7; text-align: center; overflow-wrap: anywhere; }
.credit a { color: inherit; text-decoration: underline; }

/* ================= 2026-11-24 한 가지 말투로 (reports/그래픽 글꼴 실행 계획.md) =================
   규칙: 화면의 모든 것은 골판지·초록 인쇄·매직 메모·도장·흰 종이 딱지 가운데 하나다. 비치는 판과 글자 그림자는 쓰지 않는다.
   글자 크기 12·14·16·20·24·28·44, 모서리 2px(종이)·6px(단추)·동그라미. */
:root { --paper: #f4f0e6; --ink-soft: #5a4430; }

/* 글꼴: 읽는 글은 본문 글꼴, 손글씨는 메모 세 곳(뚜껑 메모·말풍선·딱지 한 줄)에만 */
.hint, .r-line, .sheet .result-kicker, .result-count, .title-bottom .sub, .cure, .sheet .grade, .box-lid .box-count, .box-lid .box-count b, .sec-count {
  font-family: var(--font); font-weight: 600; letter-spacing: 0;
}
.hint { font-size: 14px; line-height: 1.35; }
.r-line, .sheet .grade { font-size: 16px; }
.sheet .result-kicker, .result-count, .box-lid .box-count, .box-lid .box-count b, .sec-count { font-size: 14px; }
.title-bottom .sub { font-size: 14px; }
.sec-count { color: var(--green); }

/* 3D 위의 글은 종이 딱지 위에 */
.hint, .play-info .hint { align-self: center; max-width: 100%; margin: 10px 0 0; padding: 6px 12px; min-height: 0; background: var(--paper); color: var(--magic); border-radius: 12px; }
.hint:empty { visibility: hidden; }
.title-bottom .sub { align-self: center; padding: 5px 10px; background: var(--paper); color: var(--magic); border-radius: 12px; opacity: 1; }

/* 단추: 흰 딱지 + 초록 테두리(기본), 초록으로 꽉 찬 인쇄 면(가장 중요한 하나) */
.btn, .btn.ghost { color: var(--green); background: var(--paper); border: 2px solid var(--green); }
.btn.primary { color: var(--paper); background: var(--green); border-color: var(--green); }
#btn-make { background: var(--paper); }
#btn-make.nudge { border-color: var(--orange); color: var(--green); }
.settings-btn, .icon-btn { color: var(--magic); background: var(--paper); border-radius: 12px; }
.lives i { box-shadow: none; }
.lives i.lost { background: rgba(244,240,230,.35); }
.bubble { box-shadow: 0 2px 0 rgba(0,0,0,.3); }

/* 타이틀 딱지: 똑바로, 종이는 번지는 그림자 없이 */
.title-bottom .title { transform: translateX(-50%); box-shadow: inset 0 0 0 3px var(--news), inset 0 0 0 6px var(--green), 0 2px 0 rgba(0,0,0,.35); }
.title::before { background: var(--news); box-shadow: inset 0 0 0 2px var(--news), inset 0 0 0 3px var(--green); }
@keyframes label-stick { from { transform: translateX(-50%) scale(1.06); } to { transform: translateX(-50%) scale(1); } } /* 투명에서 시작하지 않는다: 움직임이 멈춘 화면에서도 딱지가 비치지 않게 */

/* 기본 모드 위쪽: 딱지 하나에 "오늘 n개"와 과일 점 셋. 지금 과일 점의 둘레가 봉지 10개 중 깐 만큼 찬다 */
.basic-count { flex: none; margin: 0 auto; padding: 6px 16px 9px; background: var(--paper); color: var(--magic); border-radius: 12px; font-family: var(--font-box); }
.basic-today { font-size: 20px; line-height: 1.1; }
.basic-today b { font-size: 28px; color: var(--green); margin: 0 3px; }
.basic-bag { display: none !important; }
.fruit-name { display: none; }
.fruit-picks { margin-top: 7px; gap: 16px; }
.fruit-picks button { width: 16px; height: 16px; border: 0; box-shadow: none; background: var(--c); }
.fruit-picks button.on { transform: none; }
.fruit-picks button.on::before { content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p, 0) * 360deg), rgba(31,27,23,.16) 0);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 60%); mask: radial-gradient(circle, transparent 57%, #000 60%); }
.fruit-picks button.locked { background: transparent; border: 2px dashed rgba(31,27,23,.4); }
.fruit-picks button:focus-visible { outline: 2px solid var(--green); outline-offset: 6px; }

/* 목록 아래 구역: 어두운 점선 카드 → 종이 쪽지 */
#screen-select .free-card { background: var(--paper); border: 0; color: var(--magic); border-radius: 12px; }
.free-card small { opacity: 1; color: var(--ink-soft); }
.art-pick { background: #fff; border-color: rgba(47,106,60,.3); }
.art-pick.done { border-color: var(--green); }
.easy-offer { border: 2px solid var(--green); }
.lv-a .art-card::after { color: var(--magic); }
.peek i { color: var(--magic); border-color: rgba(31,27,23,.35); }

/* ================= 2026-11-24 Bagel Fat One에 맞춘 크기와 모양 =================
   통통하고 둥근 글꼴이라 각진 종이 대신 둥근 스티커. 모서리: 골판지·칸 2px, 스티커·단추 12px, 판 윗모서리 18px, 동그라미.
   Bagel은 16px 아래에서 뭉개지므로 작은 글(도장·칩 딱지·설정 단추)은 본문 굵은 글씨로. */
.sheet, .sheet:not(.settings-sheet) { border-radius: 18px 18px 0 0; }
.title-bottom .title { border-radius: 14px; font-size: clamp(38px, 6.4vh, 54px); line-height: 1.02; padding: .3em .5em .26em;
  box-shadow: inset 0 0 0 3px var(--news), inset 0 0 0 6px var(--green), 0 3px 0 rgba(0,0,0,.3); }
.title::after { font: 700 .28em/1.3 var(--font); margin-top: .22em; padding-top: .3em; }
.title::before { font: 400 .3em/1 var(--font-box); width: 2.7em; height: 2.7em; }
.btn { font-size: 20px; padding: 12px 16px; border-width: 2.5px; }
.btn.ghost { font-size: 16px; padding: 10px 14px; }
.title-bottom .btn.big { font-size: 24px; min-height: 62px; }
.btn.share { font-size: 24px; }
#btn-next.long { font-size: 16px; }
.bar h2 { font-size: 24px; }
.sheet h3 { font-size: 28px; }
.stage b { font-size: 16px; }
.set-main > span { font-size: 20px; }
.free-card b { font-size: 20px; }
.settings-btn, .stage .stamp-mini, .art-pick i, .peek i, .next-up::before { font-family: var(--font); font-weight: 700; }
.settings-btn { font-size: 14px; padding: 9px 13px; }
.art-pick { font: 16px/1 var(--font-box); border-radius: 12px; }
.stamp { border-radius: 12px; font-size: 20px; }
.daily-memo { font: 600 14px/1.3 var(--font); }
.daily-memo b { font-size: 16px; }
.bubble { font: 700 16px/1.3 var(--font); padding: 9px 16px; border-radius: 18px; }
.basic-count { padding: 7px 18px 10px; border-radius: 16px; }
.basic-today { font-size: 20px; }
.basic-today b { font-size: 28px; }
.hint, .play-info .hint, .title-bottom .sub { border-radius: 999px; padding: 7px 14px; font-weight: 700; }
.icon-btn { border-radius: 50%; font-size: 24px; }

/* ================= 떠 있는 글자 판은 젖빛 유리 (2026-11-24 사용자가 고름) =================
   3D 장면 위에 떠 있는 것만: 오늘 개수, 안내 글, 타이틀 글귀, 설정·뒤로 단추, 작품 만들기.
   글을 읽는 판(목록·결과·설정)과 타이틀 딱지, 가장 중요한 초록 단추는 불투명 그대로.
   느린 기기(품질 1단계 이상, html.no-glass)와 backdrop-filter가 없는 브라우저에서는 흐림 없이 어두운 판으로 바뀐다. */
.basic-count, .hint, .play-info .hint, .title-bottom .sub, .settings-btn, .icon-btn, #btn-make {
  color: #fff; background: rgba(40,32,28,.36);
  -webkit-backdrop-filter: blur(14px) saturate(1.7); backdrop-filter: blur(14px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.22);
}
#btn-make.nudge { color: #ffd08a; border-color: #ffd08a; }
.basic-today b { color: #ffd08a; }
.fruit-picks button.on::before { background: conic-gradient(#fff calc(var(--p, 0) * 360deg), rgba(255,255,255,.25) 0); }
.fruit-picks button.locked { border-color: rgba(255,255,255,.55); }
.fruit-picks button:focus-visible { outline-color: #fff; }
/* 목록·설정 화면처럼 어두운 바탕 위의 설정·뒤로 단추는 장면이 뒤에 없으니 종이 단추로 */
#screen-select .settings-btn, #screen-select .icon-btn { color: var(--magic); background: var(--paper); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.no-glass .basic-count, html.no-glass .hint, html.no-glass .title-bottom .sub, html.no-glass .settings-btn, html.no-glass .icon-btn, html.no-glass #btn-make {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(34,27,24,.82);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .basic-count, .hint, .title-bottom .sub, .settings-btn, .icon-btn, #btn-make { background: rgba(34,27,24,.82); }
}

/* ================= 2026-11-24 중독성 보완 (reports/중독성 보완 계획.md) ================= */
/* 과일 점 둘레가 차오르는 움직임 */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.fruit-picks button { transition: --p .6s cubic-bezier(.3, 1.4, .5, 1); }
.fruit-picks { gap: 13px; }
/* 바로 앞의 목표 한 줄 */
.basic-goal { margin: 7px 0 0 !important; font: 700 12px/1.2 var(--font); color: rgba(255,255,255,.86); letter-spacing: 0; }
.basic-goal[hidden] { display: none; }
/* 아래 단추 두 개를 한 줄로 */
.basic-row { display: flex; gap: 8px; justify-content: center; }
.basic-row .btn { min-width: 0; }
#btn-brag[hidden] { display: none; }
#btn-brag { color: #fff; background: rgba(40,32,28,.34); -webkit-backdrop-filter: blur(14px) saturate(1.7); backdrop-filter: blur(14px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.22); }
html.no-glass #btn-brag { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(34,27,24,.82); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { #btn-brag { background: rgba(34,27,24,.82); } }
/* 타이틀의 오늘의 귤 한 줄은 누를 수 있다 */
button.cure { border: 0; font-family: var(--font); cursor: pointer; pointer-events: auto; border-radius: 999px; }
button.cure[data-go="daily"]::after { content: ' ›'; }
button.cure:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* 설정: 이번 주 도장판 */
.week-dots { display: inline-flex; gap: 5px; }
.week-dots i { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed rgba(31,27,23,.35); font: 700 12px/21px var(--font); text-align: center; color: var(--ink-soft, #6b5d4f); font-style: normal; }
.week-dots i.on { border: 2px solid var(--green); color: var(--green); background: rgba(47,106,60,.1); }
.week-dots i.today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--orange); }
@media (prefers-reduced-motion: reduce) { .fruit-picks button { transition: none; } }

/* ================= 2026-11-24 공모전 틀 맞추기 (reports/하입바이브 공모전 분석과 패치 계획.md) ================= */
/* 다른 사이트의 칸(iframe) 안에서는 "휴대폰을 세워 주세요" 막을 띄우지 않는다 (칸이 가로로 길고 낮으면 게임을 통째로 가렸다) */
html.embed .rotate-note { display: none !important; }
/* PC처럼 넓은 창: 가운데 기둥 양옆을 골판지 박스로 채운다 (자동으로 찍히는 썸네일이 휑하지 않게) */
@media (min-width: 560px) {
  body { background: #c9a27c repeating-linear-gradient(90deg, rgba(90,60,30,.07) 0 3px, transparent 3px 9px); }
  #app { box-shadow: 0 0 0 6px #a8835d, 0 0 60px rgba(40,24,10,.45); }
}
/* 처음 온 사람의 첫 귤 뒤: 큰 단추는 "껍질로 별 만들기", 다음 귤은 작게 */
#btn-next-gyul.second { font-size: 16px; padding: 10px 14px; min-width: 0; color: #fff; background: rgba(34,27,24,.82); border-color: rgba(255,255,255,.34); box-shadow: none; }
#vote-link[hidden] { display: none; }
/* 칸이 너무 낮으면 게임을 할 수 없다: 새 탭으로 여는 단추 하나만 */
.embed-out { display: none; }
@media (max-height: 420px) {
  html.embed .embed-out { display: flex; position: absolute; inset: 0; z-index: 60; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: rgba(23,26,38,.72); color: #fff; text-decoration: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  html.embed .embed-out b { font: 28px/1 var(--font-box); color: #ffd08a; font-weight: 400; }
  html.embed .embed-out span { font: 20px/1 var(--font-box); background: var(--green); padding: 14px 22px; border-radius: 12px; }
}

/* ================= 2026-11-24 아이디어 패치 ================= */
/* 타이틀 귀퉁이 도장 글은 data-stamp에서 (다섯 번 누르면 "못난이"로 바뀐다) */
.title::before { content: attr(data-stamp); }
.title[data-stamp="못난이"]::before { font-size: .24em; }
.title-bottom .title { pointer-events: auto; -webkit-tap-highlight-color: transparent; }
/* 딱지 줄에 버릇 이름이 들어가면 길어진다: 좁은 화면(320)에서 딱지가 옆 단추를 밀지 않게 두 줄로 접는다 */
.basic-goal { max-width: 190px; margin-inline: auto !important; text-wrap: balance; }

/* ================= 2026-11-24 배경: 필름 알갱이 (main.js가 --grain에 잡음 그림을 넣는다) ================= */
html.grain .vignette::after { content: ''; position: absolute; inset: 0; background-image: var(--grain); background-size: 160px 160px; opacity: .7; pointer-events: none; }
html.grain.no-glass .vignette::after { display: none; } /* 느린 기기에서는 끈다 */

/* ================= 필름 룩 시안 (?look=film, reports/필름 룩 업데이트 계획.md) =================
   게임 화면 위에 뜨는 글만 바꾼다 (타이틀·기본 모드·자르는 화면). 목록·결과 쪽지·설정 같은 읽는 판은 그대로.
   규칙: 크기는 셋(큰 글 / 15px / 11~12px), 색은 흰색과 귤색, 읽히게 하는 법은 번지는 그림자 하나, 판·유리·튕김 없음. */
html.look-film { --film-orange: #f5a623; --film-shadow: 0 0 3px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.75), 0 1px 2px rgba(0,0,0,.8); } /* 흰 속껍질 위에서도 읽히게 그림자를 두 겹으로 */
html.look-film .vignette::after { opacity: .5; }

/* 판 없애기 */
html.look-film :is(#screen-title, #screen-basic, #screen-play) :is(.basic-count, .hint, .sub, .settings-btn, .icon-btn, #btn-make, #btn-brag, .cure) {
  background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0;
  color: #fff; text-shadow: var(--film-shadow);
}
html.look-film :is(#screen-title, #screen-basic, #screen-play) .settings-btn { font: 500 12px var(--font); letter-spacing: .06em; padding: 12px 6px; }
html.look-film :is(#screen-basic, #screen-play) .icon-btn { font-size: 24px; }

/* 타이틀: 큰 것 하나와 작은 것 하나 */
html.look-film .title-bottom .title {
  top: clamp(40px, 8.5vh, 84px); left: 8%; transform: none; text-align: left; white-space: nowrap;
  font-size: clamp(72px, 26vw, 108px); line-height: .95; letter-spacing: -.01em; color: var(--film-orange);
  background: none; padding: 0; border-radius: 0; box-shadow: none; text-shadow: 0 0 18px rgba(245,166,35,.35);
  animation: film-in .18s 1s both; /* 들어오면 1초쯤 과일만 보이고, 그다음 제목이 뚝 */
}
html.look-film .title::before { display: none; }
html.look-film .title::after {
  content: attr(data-ep) "  귤을 까면 동물이 나와요"; margin-top: 12px; padding: 0; border: 0;
  font: 500 11px/1.4 var(--font); letter-spacing: .08em; color: rgba(255,255,255,.82); text-shadow: var(--film-shadow);
}
html.look-film .title[data-stamp="못난이"]::after { content: attr(data-ep) "  못난이도 맛은 똑같아요"; }
@keyframes film-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.look-film .title-bottom .title { animation: none; } }
html.look-film .title-bottom { gap: 6px; padding-bottom: calc(9vh + env(safe-area-inset-bottom, 0px)); }
html.look-film .title-bottom .btn.big {
  width: auto; min-height: 54px; padding: 0 34px; font: 700 15px var(--font); letter-spacing: .1em;
  color: #fff; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.9); border-radius: 2px; text-shadow: var(--film-shadow); order: 1;
}
html.look-film .title-bottom .cure { order: 2; font: 500 12px/1.3 var(--font); letter-spacing: .05em; padding: 10px 12px 4px; color: rgba(255,255,255,.88); }
html.look-film .title-bottom .sub { order: 3; font: 500 11px/1.3 var(--font); letter-spacing: .05em; padding: 0; color: rgba(255,255,255,.6); }
html.look-film .title-bottom .mute-note { order: 4; font: 500 11px/1.3 var(--font); color: rgba(255,255,255,.5); margin: 2px 0 0; text-shadow: var(--film-shadow); }

/* 기본 모드 위쪽: 오늘 n개 + 과일 점 */
html.look-film .basic-count { padding: 4px 0 0; }
html.look-film .basic-today { font: 500 15px/1.2 var(--font); letter-spacing: .06em; }
html.look-film .basic-today b { font: 800 15px var(--font); color: var(--film-orange); margin: 0 2px; }
html.look-film .basic-goal { font: 500 11px/1.3 var(--font); letter-spacing: .04em; color: rgba(255,255,255,.62); }
html.look-film .fruit-name { color: rgba(255,255,255,.7); }

/* 안내 글: 판 없는 작은 흰 글 한 줄, 화면 아래쪽 (단추 바로 위) */
html.look-film .hint { font: 500 15px/1.45 var(--font); letter-spacing: .06em; word-spacing: .18em; padding: 0; max-width: 100%; text-wrap: balance; }
html.look-film #screen-basic .basic-hint { order: 2; margin: auto 0 14px; align-self: center; }
html.look-film #screen-basic .basic-foot { order: 3; margin-top: 0; }
html.look-film #screen-play .play-info .hint { margin-top: 12px; }

/* 단추: 중요한 것은 가는 흰 테두리, 나머지는 글자만 */
html.look-film #screen-basic .btn.primary, html.look-film #screen-play > .btn.primary {
  font: 700 15px var(--font); letter-spacing: .1em; color: #fff; background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.9); border-radius: 2px;
  min-height: 48px; padding: 0 28px; text-shadow: var(--film-shadow);
}
html.look-film #screen-basic .btn.primary.second { border-color: rgba(255,255,255,.45); font-weight: 500; }
html.look-film #btn-make, html.look-film #btn-brag { font: 500 12px var(--font); letter-spacing: .08em; padding: 14px 12px; color: rgba(255,255,255,.82); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.4); }
html.look-film #btn-make.nudge { color: var(--film-orange); animation: none; }

/* 일이 일어난 자리 옆에 뜨는 한마디 */
.film-say { display: none; }
html.look-film .film-say { display: block; position: absolute; margin: 0; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  font: 700 15px var(--font); letter-spacing: .08em; color: #fff; text-shadow: var(--film-shadow); opacity: 0; }
html.look-film .film-say.on { animation: film-say 1.2s both; }
@keyframes film-say { 0% { opacity: 0; } 8% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* 튕김 끄기 */
html.look-film .basic-today b.bump { animation: none; }
html.look-film .fruit-picks button { transition: none; }
/* 과일이 바뀔 때 이름을 크게 한 번 */
.film-big { display: none; }
html.look-film .film-big { display: block; position: absolute; left: 8%; top: 17%; margin: 0; pointer-events: none; white-space: nowrap;
  font: 400 clamp(64px, 22vw, 96px)/.95 var(--font-box); color: var(--film-orange); text-shadow: 0 0 18px rgba(245,166,35,.35); opacity: 0; }
html.look-film .film-big.on { animation: film-say 1.8s both; }

/* ================= 설정: 유리 판 (2026-11-25 사용자 "애플의 리퀴드 글래스처럼") =================
   뒤가 비쳐 보이는 떠 있는 둥근 유리 카드. 웹에서는 진짜 굴절은 못 하고(아이폰 사파리 미지원) 흐림 + 밝은 테두리 빛 + 안쪽 반사로 흉내 낸다.
   느린 기기(html.no-glass)와 backdrop-filter가 없는 브라우저에서는 흐림 없이 어두운 판. 기본 화면·필름 룩 모두에 적용. */
#settings { background: rgba(0,0,0,.22); align-items: flex-end; padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
#settings .settings-sheet {
  position: relative; width: 100%; max-height: 90%; padding: 18px 14px 14px; color: #fff;
  border-radius: 34px; border: 0; background: rgba(255,255,255,.13);
  background-image: linear-gradient(160deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.04) 38%, rgba(255,255,255,.02) 62%, rgba(255,255,255,.12) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(1.9) brightness(1.06); backdrop-filter: blur(26px) saturate(1.9) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 1px 0 0 rgba(255,255,255,.22), inset -1px 0 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(255,255,255,.2),
    inset 0 0 22px rgba(255,255,255,.07), 0 18px 44px rgba(0,0,0,.38);
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
}
#settings .settings-sheet::before { display: none; }
#settings .settings-sheet h3 { font: 700 17px/1.2 var(--font); letter-spacing: 0; color: #fff; margin: 2px 0 14px; }
/* 줄마다 한 겹 더 밝은 유리 알약 */
#settings .set-row { padding: 12px 16px; margin: 0 0 8px; border-radius: 22px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.06); }
#settings .set-main { color: #fff; font-weight: 600; }
#settings .set-main > span { font: 600 16px/1.25 var(--font); }
#settings .set-main small { font: 500 12px/1.35 var(--font); color: rgba(255,255,255,.66); }
/* 스위치: 알약 위에 유리 손잡이 */
#settings .set-main input[type="checkbox"] {
  width: 52px; height: 31px; border-radius: 999px; border: 0; background: rgba(120,120,128,.42);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.28), inset 0 -1px 0 rgba(255,255,255,.18); transition: background-color .22s;
}
#settings .set-main input[type="checkbox"]::after {
  top: 2px; left: 2px; width: 27px; height: 27px; border: 0; border-radius: 50%; transform: none;
  background: linear-gradient(180deg, #fff, #e9e9ee); box-shadow: 0 2px 6px rgba(0,0,0,.32), inset 0 1px 0 #fff; transition: transform .22s cubic-bezier(.3,1.3,.5,1);
}
#settings .set-main input[type="checkbox"]:checked { background: #f5a623; }
#settings .set-main input[type="checkbox"]:checked::after { transform: translateX(21px); }
#settings .set-main input[type="checkbox"]:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* 크기 막대: 가는 유리 홈 + 둥근 손잡이 */
#settings .set-row input[type="range"] { -webkit-appearance: none; appearance: none; height: 28px; margin: 6px 0 0; background: transparent; accent-color: #f5a623; }
#settings .set-row input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.3); box-shadow: inset 0 1px 1px rgba(0,0,0,.25); }
#settings .set-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: linear-gradient(180deg, #fff, #e9e9ee); box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 1px 0 #fff; }
#settings .set-row input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.3); }
#settings .set-row input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
#settings .set-row input[type="range"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 999px; }
/* 이번 주 도장 */
#settings .week-dots i { border: 1.5px solid rgba(255,255,255,.38); color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); line-height: 21px; }
#settings .week-dots i.on { border: 0; color: #2a1407; background: #f5a623; line-height: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
#settings .week-dots i.today { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
#settings .link-btn.danger { color: #ff8a7a; text-decoration-color: rgba(255,138,122,.5); margin: 12px auto 6px; }
#settings .credit { color: #fff; opacity: .6; text-shadow: none; }
/* 닫기: 유리 알약 단추 */
#settings #set-close { font: 600 16px var(--font); color: #fff; padding: 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.12), 0 4px 14px rgba(0,0,0,.2); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
#settings #set-close:active { background: rgba(255,255,255,.3); }
/* 흐림을 못 쓰는 곳: 어두운 판으로 */
html.no-glass #settings .settings-sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: rgba(44,40,38,.95); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { #settings .settings-sheet { background-color: rgba(44,40,38,.95); } }
@media (prefers-reduced-motion: reduce) { #settings .set-main input[type="checkbox"], #settings .set-main input[type="checkbox"]::after { transition: none; } }
#settings { background: rgba(0,0,0,.14); }
#settings .week-row .set-main { flex-wrap: wrap; row-gap: 8px; cursor: default; }
#settings .week-row .set-main > span:first-child { white-space: nowrap; }

/* ================= 필름 룩의 작품 고르기 (목록 화면 없이 귤 위에서 넘긴다) ================= */
.pick { display: none; }
html.look-film .pick:not([hidden]) { display: block; position: absolute; inset: 0; pointer-events: none; color: #fff; text-shadow: var(--film-shadow); }
html.look-film .pick > * { pointer-events: auto; }
/* 고르는 동안: 제목 줄과 진행 막대, 위쪽 안내 글은 숨긴다 (큰 이름이 대신한다) */
html.look-film #screen-play.picking #play-title, html.look-film #screen-play.picking .play-info, html.look-film #screen-play.picking .lives { visibility: hidden; }
html.look-film .pick-big { position: absolute; left: 8%; top: clamp(58px, 9vh, 88px); margin: 0; pointer-events: none; white-space: nowrap;
  font: 400 clamp(60px, 22vw, 92px)/.95 var(--font-box); color: var(--film-orange); text-shadow: 0 0 18px rgba(245,166,35,.35); }
html.look-film .pick-big.long { font-size: clamp(44px, 15vw, 64px); }
html.look-film .pick-sub { position: absolute; left: 8%; top: calc(clamp(58px, 9vh, 88px) + clamp(60px, 22vw, 92px) + 8px); margin: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; font: 500 11px/1.3 var(--font); letter-spacing: .08em; color: rgba(255,255,255,.85); white-space: pre; }
html.look-film .pick-sub svg { width: 26px; height: 26px; flex: none; }
html.look-film .pick-sub path { fill: none; stroke: #fff; stroke-width: 9; }
html.look-film .pick-nav { position: absolute; top: 47%; width: 48px; height: 72px; border: 0; background: none; color: #fff; font: 500 34px/1 var(--font); cursor: pointer; text-shadow: var(--film-shadow); }
html.look-film .pick-nav.prev { left: 2px; } html.look-film .pick-nav.next { right: 2px; }
html.look-film .pick-nav:focus-visible, html.look-film .pick-strip button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html.look-film .pick-tip { position: absolute; left: 0; right: 0; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; pointer-events: none;
  font: 500 15px/1.4 var(--font); letter-spacing: .06em; word-spacing: .18em; }
html.look-film .pick-strip { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 6px; padding: 4px 16px;
  overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; scroll-behavior: smooth; }
html.look-film .pick-strip::-webkit-scrollbar { display: none; }
html.look-film .pick-strip button { flex: none; height: 46px; min-width: 46px; padding: 7px; display: flex; align-items: center; gap: 6px; cursor: pointer;
  color: rgba(255,255,255,.8); background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.24); border-radius: 2px; font: 500 11px var(--font); letter-spacing: .04em; }
html.look-film .pick-strip svg { width: 30px; height: 30px; flex: none; }
html.look-film .pick-strip path { fill: none; stroke: rgba(255,255,255,.6); stroke-width: 9; }
html.look-film .pick-strip .done path { fill: #f39a2b; stroke: none; }
html.look-film .pick-strip .word.done path { fill: none; stroke: #f39a2b; }
html.look-film .pick-strip .word { padding-right: 10px; }
html.look-film .pick-strip .on { border-color: var(--film-orange); background: rgba(0,0,0,.55); color: #fff; }
@media (prefers-reduced-motion: reduce) { html.look-film .pick-strip { scroll-behavior: auto; } }
html.look-film #screen-play.picking #btn-unfold { visibility: hidden; } /* 자유 모드의 펼치기 단추가 아래 줄과 겹치지 않게 */

/* 오늘 개수 옆에 지금까지 모두 깐 개수 (2026-11-25 사용자) */
.basic-all:empty { display: none; }
.basic-all { margin-left: 10px; font: 500 14px var(--font); opacity: .75; }
html.look-film .basic-all { font: 500 12px var(--font); letter-spacing: .05em; color: rgba(255,255,255,.72); opacity: 1; }
html.look-film .basic-all::before { content: '· '; }
/* 작품 고르기: 마음대로 까기는 따로 있는 단추로 잘 보이게 (2026-11-25 사용자) */
html.look-film .pick-free { position: absolute; right: 14px; top: calc(12px + env(safe-area-inset-top, 0px)); min-height: 44px; padding: 0 16px; cursor: pointer;
  font: 700 13px var(--font); letter-spacing: .08em; color: var(--film-orange); background: rgba(0,0,0,.4); border: 1.5px solid var(--film-orange); border-radius: 2px; text-shadow: none; }
html.look-film .pick-free.on { color: #1a1310; background: var(--film-orange); }
html.look-film .pick-free:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ================= 필름 룩 화면 점검에서 고친 것 (reports/필름 룩 화면 점검.md의 A) ================= */
/* A2: 한국어 글이 낱말 중간에서 접히지 않게 (자유 모드 안내 "반짝이 / 는", 설정 "줄지 않아 / 요") */
body { word-break: keep-all; overflow-wrap: break-word; }
/* A4: 기본 모드 위쪽 줄 — 가운데 덩이의 높이가 바뀌어도 양옆의 ‹ 와 설정은 위에 붙어 같은 높이 */
html.look-film #screen-basic .bar { align-items: flex-start; }
html.look-film #screen-basic .bar .icon-btn, html.look-film #screen-basic .bar .settings-btn { height: 40px; padding-top: 0; padding-bottom: 0; display: grid; place-items: center; margin-top: -4px; }
html.look-film #screen-basic .bar .icon-btn { margin-top: 5px; } /* ‹ 글자가 칸 안에서 위로 붙어 있어 설정과 눈높이를 맞춘다 */
/* A5: 잠긴 과일은 바로 다음 하나만 작은 흐린 점으로 (점선 동그라미 넷이 불러오는 중 표시처럼 보였다) */
html.look-film .fruit-picks button.locked { border: 0; background: rgba(255,255,255,.3); transform: scale(.55); }
html.look-film .fruit-picks button.locked ~ button.locked { display: none; }

/* ================= 필름 룩 화면 점검의 B: 자르는 화면·마음대로 까기를 기본 모드와 같은 꼴로 ================= */
/* 제목은 작은 흰 글, 기회 점은 흰 점, 진행 막대는 가는 흰 선 (주황은 과일과 큰 글에만) */
html.look-film #screen-play .bar h2 { font: 600 13px/1.2 var(--font); letter-spacing: .08em; color: #fff; text-shadow: var(--film-shadow); }
html.look-film #screen-play .lives i { width: 7px; height: 7px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.6); }
html.look-film #screen-play .lives i.lost { background: rgba(255,255,255,.25); }
html.look-film #screen-play .progress { height: 2px; border-radius: 0; background: rgba(255,255,255,.22); margin-top: 2px; }
html.look-film #screen-play #progress-fill { background: #fff; }
/* 안내 글은 기본 모드처럼 화면 아래쪽 (펼치기 단추가 있으면 그 위) */
html.look-film #screen-play .play-info .hint { position: absolute; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; }
html.look-film #screen-play > .btn.primary { align-self: center; width: auto; }
/* 펼친 결과가 올라오면 위쪽 줄은 치운다 */
html.look-film #app:has(#result:not(.hidden)) #screen-play .bar, html.look-film #app:has(#result:not(.hidden)) #screen-play .play-info { visibility: hidden; }
html.look-film #screen-play.revealing .bar h2, html.look-film #screen-play.revealing .lives, html.look-film #screen-play.revealing .play-info { visibility: hidden; }

/* ================= 필름 룩의 결과 화면 (2026-11-25 사용자 "작품 만들기 끝나고 UIUX를 개선") =================
   밝은 골판지 판이 화면의 절반을 덮던 것을 없앤다. 주인공은 신문지 위의 동물.
   위 왼쪽에 큰 귤색 이름과 작은 두 줄, 동물 아래에 한마디(자막처럼), 맨 아래에 기록 한 줄과 단추.
   판 대신 아래쪽에만 어두운 그늘을 깔아 글이 읽히게 한다. 동물을 눌러 볼 수 있게 빈 곳은 손짓을 통과시킨다. */
html.look-film #result { --ts: clamp(60px, 22vw, 92px); pointer-events: none; }
html.look-film #result[data-len="m"] { --ts: clamp(44px, 15vw, 64px); }
html.look-film #result[data-len="l"] { --ts: 34px; }
html.look-film #result .sheet {
  position: static; display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; align-items: center;
  padding: 70px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 0; box-shadow: none;
  color: #fff; text-shadow: var(--film-shadow); pointer-events: none;
  background: linear-gradient(to top, rgba(8,7,6,.86) 0%, rgba(8,7,6,.6) 55%, rgba(8,7,6,0) 100%);
  animation: film-in .35s both;
}
html.look-film #result .sheet > *, html.look-film #result .btn-row > * { pointer-events: auto; }
html.look-film #result .sheet > * { grid-column: 1 / -1; }
/* 위 왼쪽: 이름 + 작은 두 줄 */
html.look-film #result-title { position: absolute; left: 8%; top: clamp(52px, 8vh, 80px); margin: 0; white-space: nowrap; pointer-events: none;
  font: 400 var(--ts)/.95 var(--font-box); letter-spacing: -.01em; color: var(--film-orange); text-shadow: 0 0 18px rgba(245,166,35,.35); }
html.look-film #result .result-kicker { position: absolute; left: 8%; top: calc(clamp(52px, 8vh, 80px) + var(--ts) + 6px); margin: 0; pointer-events: none;
  font: 700 12px/1.3 var(--font); letter-spacing: .08em; color: #fff; }
html.look-film #result .grade { position: absolute; left: 8%; top: calc(clamp(52px, 8vh, 80px) + var(--ts) + 26px); margin: 0; pointer-events: none;
  font: 500 12px/1.3 var(--font); letter-spacing: .06em; color: rgba(255,255,255,.8); }
html.look-film #result .result-kicker:empty + .grade { top: calc(clamp(52px, 8vh, 80px) + var(--ts) + 6px); }
/* 도장: 동물 옆 신문지에 찍힌 흰 테두리 도장 하나 */
html.look-film #result .stamp { right: 7%; top: 47%; padding: 0; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  font: 700 15px/1 var(--font); letter-spacing: .04em; color: #fff; background: rgba(0,0,0,.18); border: 1.5px solid #fff;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,0), inset 0 0 0 4px rgba(255,255,255,.55); transform: rotate(-11deg); text-shadow: var(--film-shadow); }
@keyframes film-stamp { from { transform: rotate(-11deg) scale(1.9); opacity: 0; } }
html.look-film #result .stamp.go { animation: film-stamp .28s .4s cubic-bezier(.2,1.4,.4,1) backwards; }
/* 아래: 기록 한 줄, 오늘 몇 개째 */
html.look-film #result .r-line { margin: 0; font: 600 14px/1.4 var(--font); letter-spacing: .06em; color: #fff; text-align: center; }
html.look-film #result .result-count { margin: 2px 0 14px; font: 500 11px/1.4 var(--font); letter-spacing: .06em; color: rgba(255,255,255,.66); text-align: center; }
html.look-film #result .result-count b { color: var(--film-orange); font-weight: 700; }
/* 단추: 자랑하기와 다음 도안을 나란히. 다음이 흰 면(가장 중요), 자랑하기는 흰 테두리 */
html.look-film #result .btn-row { display: contents; }
html.look-film #result #btn-share, html.look-film #result #btn-next {
  grid-column: auto; width: 100%; min-height: 50px; margin: 0; padding: 0 8px; border-radius: 2px; white-space: nowrap;
  font: 700 15px var(--font); letter-spacing: .08em; text-shadow: none; }
html.look-film #result #btn-share { order: 1; color: #fff; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.9); text-shadow: var(--film-shadow); }
html.look-film #result #btn-next { order: 2; color: #171412; background: #fff; border: 1px solid #fff; }
html.look-film #result #btn-next.long { font-size: 13px; letter-spacing: .02em; }
html.look-film #result #btn-retry, html.look-film #result .link-row { order: 3; grid-column: auto; margin-top: 6px; }
html.look-film #result #btn-retry { justify-self: end; width: auto; min-height: 40px; padding: 0 6px; background: none; border: 0;
  font: 500 12px var(--font); letter-spacing: .06em; color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.4); text-shadow: var(--film-shadow); }
html.look-film #result .link-row { justify-content: flex-start; gap: 14px; flex-wrap: wrap; }
html.look-film #result .link-btn { min-height: 40px; padding: 0 6px; display: inline-flex; align-items: center; font: 500 12px var(--font); letter-spacing: .06em; color: rgba(255,255,255,.85); text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.4); text-shadow: var(--film-shadow); }
/* 넉넉하게 까기 권유 */
html.look-film #result .easy-offer { margin: 0 0 12px; padding: 10px; border: 1px solid rgba(255,255,255,.5); border-radius: 2px; background: rgba(0,0,0,.25); color: #fff; font: 500 13px var(--font); text-shadow: var(--film-shadow); }
html.look-film #result .easy-offer b { color: var(--film-orange); }
/* 마음대로 까기의 이름 붙이기 */
html.look-film #result .keep-row { margin: 0 0 12px; }
html.look-film #result #name-input { color: #fff; background: rgba(0,0,0,.3); border: 0; border-bottom: 1px solid rgba(255,255,255,.8); border-radius: 0; font: 500 15px var(--font); text-shadow: none; }
html.look-film #result #name-input::placeholder { color: rgba(255,255,255,.55); }
html.look-film #result #btn-keep { flex: none; min-height: 44px; padding: 0 14px; border-radius: 2px; font: 700 13px var(--font); letter-spacing: .06em; color: #171412; background: #fff; border: 1px solid #fff; text-shadow: none; }
html.look-film #result #btn-keep:disabled { color: #fff; background: none; border-color: rgba(255,255,255,.4); }
/* 껍질의 한마디: 말풍선 대신 동물 아래의 자막 한 줄 */
html.look-film .bubble { top: 55%; max-width: 88%; padding: 0; background: none; box-shadow: none; border-radius: 0; white-space: normal; text-align: center;
  font: 500 15px/1.45 var(--font); letter-spacing: .06em; word-spacing: .18em; color: #fff; text-shadow: var(--film-shadow); animation: film-in .4s .2s both; }
html.look-film .bubble::after { display: none; }
html.look-film .bubble::before { content: '“'; margin-right: 2px; opacity: .7; }
@media (prefers-reduced-motion: reduce) { html.look-film #result .sheet, html.look-film .bubble, html.look-film #result .stamp.go { animation: none; } }
html.look-film #result .link-btn[hidden], html.look-film #result .easy-offer[hidden] { display: none; }
html.look-film #result #btn-retry, html.look-film #result .link-row { align-self: start; }
html.look-film #result .link-row { margin-top: 6px; }

/* ================= 필름 룩: 단추를 둥근 유리 알약으로 (2026-11-25 사용자 "작품 만들기·설정 같은 것을 리퀴드 글래스의 둥근 단추로") =================
   설정 판과 같은 유리: 뒤가 흐리게 비치고, 위쪽에 밝은 빛 테두리. 글(안내·개수·이름)은 그대로 판 없이 둔다.
   느린 기기(html.no-glass)와 흐림을 못 쓰는 브라우저에서는 어두운 알약. */
html.look-film {
  --glass-bg: rgba(255,255,255,.13);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.14), inset 0 0 12px rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.28);
  --glass-blur: blur(16px) saturate(1.8) brightness(1.05);
}
/* 작은 단추: 설정, 작품 만들기, 자랑하기(기본 모드), 다시 까기·그림으로 저장(결과) */
html.look-film #app :is(#screen-title, #screen-basic, #screen-play) .settings-btn,
html.look-film #app #btn-make, html.look-film #app #btn-brag,
html.look-film #result #btn-retry, html.look-film #result .link-btn { /* #app을 붙여 앞의 '판 없애기' 규칙보다 세게 */
  min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: var(--glass-bg); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  font: 600 13px var(--font); letter-spacing: .04em; color: #fff; text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
html.look-film #app #screen-basic .bar .settings-btn { height: 40px; margin-top: -4px; padding: 0 16px; }
html.look-film #app #btn-make.nudge { color: #fff; background: rgba(245,166,35,.42); }
/* 뒤로 단추: 둥근 유리 */
html.look-film #app :is(#screen-basic, #screen-play) .icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--glass-bg); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  display: grid; place-items: center; padding: 0 2px 3px 0; margin-top: -4px;
}
/* 큰 단추: 귤 까러 가기, 다음 귤, 펼치기, 껍질로 별 만들기, 자랑하기(결과) */
html.look-film .title-bottom .btn.big,
html.look-film #screen-basic .btn.primary, html.look-film #screen-play > .btn.primary,
html.look-film #result #btn-share, html.look-film #result .easy-offer {
  border: 0; border-radius: 999px; background: rgba(255,255,255,.17); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
html.look-film #screen-basic .btn.primary.second { background: rgba(255,255,255,.09); }
/* 가장 중요한 한 걸음(결과의 "다음: ○○", 이름 붙여 넣기)은 흰 알약 그대로 */
html.look-film #result #btn-next, html.look-film #result #btn-keep { border-radius: 999px; }
/* 작품 고르기: 마음대로 까기, 양옆 화살표, 아래 작은 칸 */
html.look-film .pick-free { border: 0; border-radius: 999px; background: rgba(245,166,35,.3); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
html.look-film .pick-free.on { color: #1a1310; background: var(--film-orange); text-shadow: none; }
html.look-film .pick-nav { width: 44px; height: 44px; border-radius: 50%; background: var(--glass-bg); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); font-size: 26px; display: grid; place-items: center; padding: 0 0 4px; margin-top: 14px; }
html.look-film .pick-nav.prev { left: 8px; } html.look-film .pick-nav.next { right: 8px; }
html.look-film .pick-strip button { border: 0; border-radius: 14px; background: var(--glass-bg); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px) saturate(1.6); backdrop-filter: blur(10px) saturate(1.6); }
html.look-film .pick-strip .on { background: rgba(245,166,35,.34); box-shadow: var(--glass-shadow), 0 0 0 1.5px var(--film-orange); }
/* 눌렀을 때: 살짝 밝아지고 눌린다 */
html.look-film :is(.settings-btn, #btn-make, #btn-brag, .icon-btn, .btn, .pick-free, .pick-nav, .pick-strip button, .link-btn, #btn-retry):active { filter: brightness(1.25); transform: scale(.97); }
html.look-film .pick-nav:active { transform: scale(.94); }
/* 흐림을 못 쓰는 곳 */
html.look-film.no-glass :is(.settings-btn, #btn-make, #btn-brag, .icon-btn, .btn.big, .btn.primary, .pick-free, .pick-nav, .pick-strip button, .link-btn, #btn-retry, #btn-share, .easy-offer) {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background-color: rgba(52,48,45,.86) !important; } /* 앞의 규칙들이 세서 !important로 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html.look-film :is(.settings-btn, #btn-make, #btn-brag, .icon-btn, .btn.big, .btn.primary, .pick-free, .pick-nav, .pick-strip button, .link-btn, #btn-retry, #btn-share, .easy-offer) { background-color: rgba(52,48,45,.86); }
}
html.look-film.no-glass .pick-free.on { background-color: var(--film-orange) !important; }

/* ================= 필름 룩: 뒤로·설정 단추를 모든 화면에서 같은 자리에 (2026-11-25 사용자 "각 페이지마다 위치가 살짝 다르다") =================
   예전엔 타이틀의 설정은 화면에 바로 붙고(위 12px, 오른쪽 16px), 기본 모드의 설정은 위쪽 줄 안에 있어(위 20px, 오른쪽 32px) 8~16px씩 어긋났다.
   이제 둘 다 줄에서 빼서 화면 기준으로 고정: 위 12px(+안전 영역), 왼쪽·오른쪽 16px, 높이 40px. 작품 고르기의 "마음대로 까기"도 같은 줄에. */
html.look-film #app :is(#screen-title, #screen-basic, #screen-play) :is(.icon-btn, .settings-btn) {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); margin: 0; height: 40px; z-index: 3;
}
html.look-film #app :is(#screen-basic, #screen-play) .icon-btn { left: 16px; width: 40px; }
html.look-film #app :is(#screen-title, #screen-basic) .settings-btn { right: 16px; }
html.look-film .pick-free { top: calc(12px + env(safe-area-inset-top, 0px)); right: 16px; height: 40px; min-height: 40px; }
/* 단추가 빠진 줄: 가운데 글이 그대로 가운데에 있게 */
html.look-film #screen-basic .bar { min-height: 40px; justify-content: center; }
html.look-film #screen-play .bar { min-height: 40px; padding-left: 52px; align-items: center; }
html.look-film #app #screen-basic .bar :is(.settings-btn, .icon-btn) { margin-top: 0; } /* 앞에 남아 있던 margin-top: -4px를 지운다 */

/* 과일 이름 큰 글: 과일마다 색 (main.js의 WORD_COLOR가 --word에 넣는다) */
html.look-film .film-big { color: var(--word, var(--film-orange)); text-shadow: 0 0 18px color-mix(in srgb, var(--word, #f5a623) 40%, transparent), 0 2px 4px rgba(0,0,0,.5); }

/* 과즙 튀기: 작은 방울(i)과 화면에 맺히는 큰 방울(b) */
.juice { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.juice i { position: absolute; border-radius: 50%; box-shadow: inset 1px 1px 0 rgba(255,255,255,.55), inset -1px -1px 1px rgba(0,0,0,.18), 0 0 6px rgba(255,190,110,.45); }
.juice b { position: absolute; border-radius: 50% 50% 48% 52% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.85) 0 12%, transparent 22%), radial-gradient(circle at 50% 60%, var(--c) 0 55%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  opacity: .9; box-shadow: 0 2px 6px rgba(0,0,0,.25), inset 0 -2px 3px rgba(0,0,0,.18); mix-blend-mode: normal; }
