/* 코모다치 F2 시제품 — 화면 위 표시(HUD)·카드·메뉴 */
:root {
  --ink: #1f2a33;
  --ink-2: #4a5761;
  --cream: #fbf7f0;
  --paper: #ffffff;
  --line: #e4ddd0;
  --green: #2f5d50;
  --ad: #e0a526;          /* 광고 자리 노란 테두리 */
  --sale: #d8433b;        /* 세일 빨강 */
  --cat: #2f6fb0;         /* 카테고리 파랑 */
  --shadow: 0 6px 18px rgba(31, 42, 51, .18);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --foot-h: 18px;          /* 사이트 하단 상시 고지 한 줄(C9) — 아래쪽 버튼은 모두 이만큼 위로 */
  --safe-b: calc(env(safe-area-inset-bottom, 0px) + var(--foot-h));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bcd9ec; }
body {
  font-family: var(--font); color: var(--ink);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button { font-family: inherit; color: inherit; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }

/* 한국어 보조 표시 (회장님 검토용, 서비스 문구는 일본어) */
.ko { display: none; font-size: .78em; color: var(--ink-2); font-weight: 500; }
body.show-ko .ko { display: block; }

/* ---------- 머리 위 이름표·말풍선 ---------- */
#overhead-layer, #fx-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.oh {
  position: absolute; left: 0; top: 0; will-change: transform;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transform-origin: 50% 100%;
}
.oh-tag {
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  background: rgba(255, 255, 255, .94); border: 2px solid #d8d2c6; border-radius: 999px;
  padding: 3px 10px; font-size: 13px; font-weight: 700; line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12); transition: font-size .25s, padding .25s;
}
.oh.me .oh-tag { border-color: var(--vest, #888); }
.oh-tag .oh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vest, #888); flex: none; }
.oh-heart, .oh-star { font-size: 11px; color: #c2415a; }
.oh-star { color: #c99512; }
/* 말풍선이 뜨면 이름표 60% 크기·70% 불투명(spec 3절), 15m 밖은 이름표만 */
.oh-tag { transform-origin: 50% 0; transition: transform .25s, opacity .25s; }
.oh.has-bubble .oh-tag { transform: scale(.6); opacity: .7; margin-top: -2px; margin-bottom: -6px; }
.oh.far .oh-bubble, .oh.far .oh-halo, .oh.far .oh-heart { display: none !important; }
.oh.targeted .oh-tag { border-color: var(--ad); box-shadow: 0 0 0 3px rgba(224, 165, 38, .45), 0 2px 6px rgba(0, 0, 0, .12); }

/* ---------- 손 근처 안내 ---------- */
.prompt {
  position: fixed; left: 0; top: 0; z-index: 5; pointer-events: auto; cursor: pointer;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 12px;
  font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px; transform-origin: 50% 100%;
}
.prompt .key { background: #fff; color: var(--ink); border-radius: 6px; padding: 0 6px; font-size: 12px; }
body.touch .prompt .key { display: none; }

/* ---------- 위쪽 HUD ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 4; pointer-events: none;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0;
}
.hud-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand {
  font-weight: 900; font-size: 18px; letter-spacing: .04em; color: var(--paper);
  background: var(--green); border-radius: 10px; padding: 4px 10px; width: max-content; box-shadow: var(--shadow);
}
.brand-sub { font-size: 11px; font-weight: 700; opacity: .8; margin-left: 2px; }
.hud-notice {
  font-size: 11px; color: var(--ink); background: rgba(255, 255, 255, .82); border-radius: 8px;
  padding: 3px 8px; max-width: min(62vw, 420px); line-height: 1.35;
}
.hud-right { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  pointer-events: auto; background: rgba(255, 255, 255, .94); border: 0; border-radius: 999px;
  padding: 6px 11px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow); white-space: nowrap;
}
.chip.btn { cursor: pointer; min-width: 36px; }
.chip.btn.on { background: var(--ink); color: #fff; }
.chip.bump { animation: bump .5s ease; }
@keyframes bump { 30% { transform: scale(1.25); } }

/* ---------- 아래 행동 버튼 ---------- */
.actionbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); z-index: 4;
  display: flex; gap: 6px; padding: 6px; border-radius: 20px;
  background: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.act {
  width: 66px; min-height: 62px; border: 0; border-radius: 16px; cursor: pointer;
  background: rgba(255, 255, 255, .96); box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 4px 2px; transition: transform .08s, background .2s, opacity .2s; touch-action: manipulation;
}
.act:active { transform: scale(.94); }
.act .em { font-size: 22px; line-height: 1.1; }
.act .ja { font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.act .ko { font-size: 9px; line-height: 1.1; }
.act.ready { background: #fff3cf; box-shadow: 0 0 0 3px var(--ad), 0 2px 8px rgba(0, 0, 0, .14); }
.act.dim { opacity: .55; }
.act.locked { opacity: .45; filter: grayscale(1); cursor: not-allowed; }
.act .cd { font-size: 10px; font-weight: 800; color: var(--sale); }
.act-mood { background: #fff8ec; }

/* ---------- 조이스틱 ---------- */
.joystick {
  position: fixed; left: 22px; bottom: calc(108px + var(--safe-b)); z-index: 4;
  width: 124px; height: 124px; border-radius: 50%;
  background: rgba(255, 255, 255, .28); border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .12); touch-action: none;
}
.joystick .knob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow);
}

/* ---------- 알림 ---------- */
.toast {
  position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 9;
  background: rgba(31, 42, 51, .92); color: #fff; border-radius: 12px; padding: 8px 14px;
  font-size: 14px; font-weight: 700; text-align: center; max-width: 88vw; box-shadow: var(--shadow);
  pointer-events: none;
}
.toast .ko { color: #cdd6dc; }

/* ---------- 겹창 공통 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 28, 34, .38); padding: 16px;
}
.sheet {
  position: relative; background: var(--paper); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  max-height: calc(100vh - 32px); overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  -webkit-user-select: text; user-select: text;
}
.small-sheet { width: min(460px, 100%); padding: 20px 22px; }
.small-sheet h3 { margin: 0 0 10px; }
.close {
  position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: #f1ede6; font-size: 22px; line-height: 1; cursor: pointer; z-index: 2;
}

/* ---------- 첫 화면 ---------- */
.start { background: linear-gradient(180deg, rgba(20, 40, 52, .25), rgba(20, 28, 34, .55)); }
.start-card {
  width: min(460px, 100%); background: var(--cream); border-radius: 22px; padding: 22px 22px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3); text-align: center;
  max-height: calc(100vh - 32px); overflow: auto; touch-action: pan-y;
}
.start-logo { font-size: 34px; font-weight: 900; letter-spacing: .08em; color: var(--green); }
.start-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.notice {
  margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; text-align: left;
}
.notice .ko { margin-top: 4px; }
.me { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.me-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; }
.me-label { font-size: 12px; color: var(--ink-2); }
.me-row b { font-size: 16px; }
.vest-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.vest-chip i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12); }
.palette { display: flex; gap: 6px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.palette i {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .1);
}
.palette i.mine { box-shadow: 0 0 0 3px var(--ink); }
.palette i.locked { opacity: .9; }
.palette-note { font-size: 11px; color: var(--ink-2); text-align: center; margin-top: 4px; }
.btn-primary {
  margin-top: 14px; width: 100%; border: 0; border-radius: 14px; padding: 12px; cursor: pointer;
  background: var(--green); color: #fff; font-size: 18px; font-weight: 800; box-shadow: var(--shadow);
}
.btn-primary .ko { color: #d5e6df; }
.howto { margin-top: 12px; font-size: 12px; color: var(--ink-2); line-height: 1.6; text-align: left; }
.howto b { color: var(--ink); }

/* ---------- 상품 카드 ---------- */
.card-sheet { width: min(760px, 100%); padding: 18px; }
.card-grid { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.card-img { position: relative; }
.card-img img { width: 100%; height: auto; border-radius: 12px; display: block; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.card-img .noimg {
  aspect-ratio: 520 / 900; border-radius: 12px; background: #d9d9d9; color: #555; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 16px; font-weight: 700;
}
.card-img .placeholder {
  aspect-ratio: 520 / 900; border-radius: 12px; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; text-align: center; padding: 16px; font-weight: 700;
  background: #e3edf7; color: var(--cat); border: 2px dashed #9dbbd9;
}
.card-img .placeholder .big { font-size: 46px; }
.tagrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 40px 6px 0; }
.tag { font-size: 12px; font-weight: 800; border-radius: 6px; padding: 2px 8px; }
.tag.sale { background: var(--sale); color: #fff; }
.tag.cat { background: var(--cat); color: #fff; }
.tag.pr { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.tag-sub { font-size: 11px; color: var(--ink-2); }
.card-name { font-size: 20px; font-weight: 800; line-height: 1.35; margin: 2px 0 10px; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price .now { font-size: 32px; font-weight: 900; color: var(--sale); }
.price .was { font-size: 16px; color: #7a838a; text-decoration: line-through; }
.price .off { font-size: 13px; font-weight: 800; color: var(--sale); background: #fde8e6; border-radius: 6px; padding: 2px 6px; }
.row-label { font-size: 12px; color: var(--ink-2); margin-top: 12px; font-weight: 700; }
.period { font-size: 15px; font-weight: 700; margin-top: 2px; }
.period .inferred { font-size: 11px; font-weight: 600; color: #8a5f12; background: #fbeed3; border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.history { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 6px; }
.history .cell { height: 18px; border-radius: 4px; background: #ebe7df; }
.history .cell.on { background: var(--sale); }
.history .cell.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.history .m { font-size: 10px; text-align: center; color: var(--ink-2); }
.history-note { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.card-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cbtn {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-direction: column;
  border-radius: 12px; padding: 11px 12px; font-size: 15px; font-weight: 800; cursor: pointer;
  text-decoration: none; border: 2px solid transparent; text-align: center;
}
.cbtn .ko { font-size: 11px; }
.cbtn.video { background: #fff; border-color: var(--ink); color: var(--ink); }
.cbtn.add { background: var(--green); color: #fff; }
.cbtn.add .ko { color: #d5e6df; }
.cbtn.aff { background: #fff; border-color: #c9c1b2; color: var(--ink); }
.cbtn.disabled { opacity: .7; }
.cbtn .soon { font-size: 10px; font-weight: 700; color: #8a5f12; }
.card-foot { font-size: 11px; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }

/* ---------- 기분 둥근 메뉴 ---------- */
.mood-menu { position: fixed; inset: 0; z-index: 8; background: rgba(20, 28, 34, .18); }
.mood-ring {
  position: absolute; left: 50%; bottom: calc(250px + var(--safe-b)); width: 0; height: 0;
}
.mood-item {
  position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 0;
  background: #fff; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 24px; line-height: 1; padding: 0;
  animation: pop .22s ease both;
}
.mood-item .lbl { font-size: 10px; font-weight: 700; margin-top: 2px; }
.mood-item .lbl .ko { font-size: 9px; }
.mood-item.off { background: #d9d6d0; color: #777; filter: grayscale(1); cursor: not-allowed; }
.mood-item.cool { opacity: .5; }
.mood-center { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: var(--ink); color: #fff; font-size: 22px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

/* ---------- 2D 파티클 ---------- */
.fx { position: absolute; left: 0; top: 0; font-size: 26px; will-change: transform, opacity; }

/* ---------- 휴대폰 ---------- */
@media (max-width: 640px) {
  .card-sheet { padding: 14px; align-self: flex-end; width: 100%; max-height: 90vh; border-radius: 18px 18px 12px 12px; }
  #card.overlay { align-items: flex-end; padding: 8px; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .card-img { display: flex; justify-content: center; }
  .card-img img, .card-img .noimg, .card-img .placeholder { max-height: 30vh; width: auto; max-width: 100%; }
  .card-img .noimg, .card-img .placeholder { height: 30vh; }
  .card-name { font-size: 17px; }
  .price .now { font-size: 26px; }
  .act { width: 52px; min-height: 58px; border-radius: 14px; }
  .act .ja { font-size: 9.5px; }
  .act .ko { font-size: 8.5px; }
  .act .em { font-size: 20px; }
  .actionbar { gap: 5px; padding: 5px; bottom: calc(8px + var(--safe-b)); }
  .hud-notice { font-size: 10px; }
  .brand { font-size: 15px; }
  .chip { padding: 5px 9px; font-size: 13px; }
}
body.show-ko .vest-chip .ko { display: inline; margin-left: 4px; }
.tm-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; cursor: pointer; }
.tm-row input { width: 18px; height: 18px; margin-top: 1px; }

/* ---------- 2차: 말풍선·후광·한마디·코모·퇴장 ---------- */
.oh-bubble {
  position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 14px;
  padding: 5px 12px; font-size: 15px; font-weight: 800; white-space: nowrap; box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
  animation: bubbleIn .25s ease;
}
.oh-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
@keyframes bubbleIn { from { transform: translateY(6px) scale(.8); opacity: 0; } }
.oh-halo { font-size: 18px; line-height: 1; filter: drop-shadow(0 0 6px rgba(255, 210, 77, .9)); animation: haloBob 2s ease-in-out infinite; }
@keyframes haloBob { 50% { transform: translateY(-3px); } }
.say-btn {
  position: fixed; right: 14px; bottom: calc(96px + var(--safe-b)); z-index: 4;
  width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; touch-action: manipulation;
}
.say-btn .lbl { font-size: 10px; font-weight: 800; margin-top: 2px; }
.say-btn .lbl .ko { font-size: 9px; }
.say-btn.locked { background: #d9d6d0; cursor: not-allowed; }
.say-btn.locked .em, .say-btn.locked .lbl { filter: grayscale(1); opacity: .6; }
.say-btn .cd { position: absolute; top: -6px; right: -6px; background: var(--sale); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 900; padding: 2px 6px; }
.say-sheet { width: min(520px, 100%); padding: 20px 18px 18px; }
.say-sheet h3 { margin: 0 0 4px; }
.say-note { font-size: 12px; color: var(--ink-2); margin-bottom: 10px; }
.say-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.say-grid button {
  border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 4px; cursor: pointer;
  font-size: 15px; font-weight: 800; touch-action: manipulation;
}
.say-grid button:active { transform: scale(.96); }
.say-grid .ko { font-size: 10px; }
.komo-reveal {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: #fff7dc; border: 2px solid var(--ad); font-weight: 800; animation: pop .35s ease both;
}
.komo-reveal.old { background: #f4f1ea; border-color: var(--line); color: var(--ink-2); font-weight: 700; }
.komo-reveal svg { flex: none; animation: komoHop .9s ease 2; }
@keyframes komoHop { 40% { transform: translateY(-8px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
.act.confirm { background: #fde8e6; box-shadow: 0 0 0 3px var(--sale), 0 2px 8px rgba(0, 0, 0, .14); }
.bye-card { width: min(420px, 100%); background: var(--cream); border-radius: 22px; padding: 26px 22px 20px; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); }
.bye-msg { font-size: 20px; font-weight: 900; color: var(--green); line-height: 1.5; }
.bye-sum { margin-top: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
@media (max-width: 640px) {
  .say-btn { width: 56px; height: 56px; right: 10px; bottom: calc(90px + var(--safe-b)); font-size: 21px; }
  .say-grid button { font-size: 13px; padding: 9px 2px; }
}

/* ---------- 2차(spec 맞춤): 쉬는 중·찰칵·쿨타임 게이지·코모 빼꼼·준비 중 분류 ---------- */
.float-btn {
  position: fixed; right: 14px; z-index: 4; border: 0; cursor: pointer; border-radius: 16px;
  background: #fff; box-shadow: var(--shadow); padding: 6px 10px; font-size: 20px; line-height: 1.1;
  display: flex; flex-direction: column; align-items: center; touch-action: manipulation;
}
.float-btn .lbl { font-size: 11px; font-weight: 800; }
.float-btn .lbl .ko { font-size: 9px; }
.rest-btn { bottom: calc(172px + var(--safe-b)); background: #fff8ec; }
.snap-btn { bottom: calc(240px + var(--safe-b)); background: #fff3cf; box-shadow: 0 0 0 3px var(--ad), var(--shadow); animation: pop .3s ease both; }
.act-mood { position: relative; }
.act-mood.cool { filter: grayscale(1); opacity: .75; }
.act-mood.cool::after {
  content: ""; position: absolute; inset: 4px; border-radius: 12px; pointer-events: none;
  background: conic-gradient(rgba(31, 42, 51, .28) var(--cool, 0deg), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%); mask: radial-gradient(circle, transparent 52%, #000 54%);
}
.komo-peek { position: absolute; right: -14px; top: 38%; z-index: 2; transform-origin: 20% 90%; }
.komo-peek.new { animation: komoPeek 1.1s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes komoPeek { 0% { transform: translateX(-46px) rotate(-12deg); opacity: 0; } 35% { opacity: 1; } 70% { transform: translateX(4px) rotate(8deg); } 100% { transform: translateX(0) rotate(0); } }
.placeholder.off { background: #eceff2; color: #6b7a87; border-color: #c4ccd4; }
.tag.off { background: #8a99a6; color: #fff; }
.say-grid .emo-btn { padding: 6px 2px; }
.say-grid .emo { font-size: 22px; }
@media (max-width: 640px) {
  .float-btn { right: 10px; }
  .rest-btn { bottom: calc(156px + var(--safe-b)); }
  .snap-btn { bottom: calc(222px + var(--safe-b)); }
  .komo-peek { right: 6px; }
}
/* 말풍선 고르기: 문구는 한 줄 3개, 이모지는 한 줄 4개 */
.say-grid { grid-template-columns: repeat(12, 1fr); }
.say-grid button { grid-column: span 4; }
.say-grid .emo-btn { grid-column: span 3; }

/* 전설 코트 세트: 이름표 금테 */
.oh.legend .oh-tag { border-color: #e0b23a; background: linear-gradient(180deg, #fffaf0, #fff1c9); box-shadow: 0 0 0 2px rgba(224, 178, 58, .35), 0 2px 6px rgba(0, 0, 0, .12); }
.oh.legend .oh-dot { background: linear-gradient(135deg, #ffe08a, #c9971d); }

/* 첫 화면 조작 안내 접기(휴대폰에서 입장 버튼이 스크롤 없이 보이게) */
.howto-fold summary { cursor: pointer; font-weight: 800; color: var(--ink); list-style: none; text-align: center; padding: 4px 0; }
.howto-fold summary::-webkit-details-marker { display: none; }
.howto-fold summary::before { content: '▸ '; }
.howto-fold[open] summary::before { content: '▾ '; }
.howto-fold summary .ko { display: none; }
body.show-ko .howto-fold summary .ko { display: inline; margin-left: 4px; }

/* ---------- 공개판 전환(C4·C5·C9·C10·C11) — 보안 규칙(CSP)으로 HTML 안 style 속성 대신 여기 ---------- */
.howto-gap { margin-top: 6px; }
.card-img .placeholder .ph-note { font-size: 12px; font-weight: 600; }
.card-img .placeholder .ph-note.strong { font-weight: 700; }
/* 카테고리 카드: 그림 칸 맨 위 PR 라벨(클릭·스크롤 전 시야, 배경과 대비) */
.card-img .pr-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1; padding: 3px 9px; border-radius: 6px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 900; letter-spacing: .04em;
}
.site-foot {
  position: fixed; left: 0; right: 0; bottom: env(safe-area-inset-bottom, 0px); height: var(--foot-h); z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; overflow: hidden; white-space: nowrap;
  font-size: 10px; line-height: var(--foot-h); color: #33414b; background: rgba(251, 247, 240, .86);
}
.site-foot a { color: var(--cat); font-weight: 700; }
.site-foot .sep { opacity: .5; }
.site-foot .pr-mini { background: var(--ink); color: #fff; border-radius: 3px; padding: 0 4px; font-weight: 800; }
@media (max-width: 420px) { .site-foot { font-size: 9px; gap: 2px; } }
.start-foot { margin-top: 12px; font-size: 10.5px; color: var(--ink-2); line-height: 1.6; text-align: left; }
.start-foot a, .help-foot a { color: var(--cat); font-weight: 700; }
.help-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
.help-foot .reset-note { margin-top: 6px; color: var(--ink-2); font-size: 11.5px; }
.mini-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 9px; cursor: pointer;
  font-size: 12px; font-weight: 800; color: var(--ink); white-space: nowrap;
}
.me-row .mini-btn { margin-left: auto; }
.rename { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.rename-note { font-size: 11px; color: var(--ink-2); }
.rename-row { display: flex; gap: 6px; margin-top: 6px; }
.rename-row select { flex: 1; min-width: 0; font-size: 14px; padding: 4px; border-radius: 8px; border: 1px solid var(--line); }
.rename-row input { width: 92px; font-size: 14px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); }
.report-btn { bottom: calc(308px + var(--safe-b)); background: #fff; box-shadow: 0 0 0 2px #c9d1d8, var(--shadow); }
@media (max-width: 640px) { .report-btn { bottom: calc(288px + var(--safe-b)); } }
.report-who { font-weight: 800; margin: 2px 0 4px; }
.report-reasons { display: grid; gap: 6px; margin-top: 10px; }
.report-reasons label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 700; }
.report-warn { margin-top: 10px; font-size: 11.5px; color: var(--ink-2); line-height: 1.6; }
.report-btns { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 12px; }
.btn-primary.small { width: auto; margin-top: 0; padding: 8px 18px; font-size: 15px; }
.btn-primary:disabled { opacity: .45; cursor: default; }

