/* AIERA 코딩 갤러리 — 게임 고르기 화면 스타일 */
/* 제목 글꼴(Black Han Sans)은 css/fonts.css 에서 세 조각으로 불러요(scripts/font-subset.py) */

:root {
  --ink: #111;
  --sky-1: #2b31e0;
  --sky-2: #4b63f2;
  --sky-3: #b8d2f6;
  --sky-4: #eaf7f2;
  --yellow: #ffd43b;
  --green: #86e03a;
  --green-dark: #2f7d12;
  --red: #e8262b;
  --bar: #2f2f33;
  --tile: clamp(92px, 17vh, 184px);
  --gap-x: calc(var(--tile) * 0.62);
  --gap-y: calc(var(--tile) * 0.16);
  --display: 'Black Han Sans', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --body: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--sky-4);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.booting { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; color: #fff; font: 1.6rem var(--display); }

/* ---------- 배경 ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(172deg, var(--sky-1) 0%, var(--sky-2) 30%, var(--sky-3) 68%, var(--sky-4) 100%);
}
.backdrop i {
  position: absolute; border: 3px solid rgba(255, 255, 255, .38); border-radius: 4px;
  animation: drift var(--dur, 24s) ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) rotate(var(--r0, 0deg)); }
  to { transform: translate(var(--dx, 30px), var(--dy, -40px)) rotate(var(--r1, 40deg)); }
}

/* ---------- 공통 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .45em 1.1em; border: 3px solid var(--ink); border-radius: 14px;
  background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.yellow { background: var(--yellow); }
.btn.green { background: var(--green); }
.btn.blue { background: #74a8ff; }
.btn.red { background: #ff8a8a; }
.btn.dark { background: #222; color: #fff; border-color: #000; box-shadow: 0 5px 0 #000; }
.btn.small { min-height: 36px; padding: .25em .8em; font-size: .9rem; border-radius: 11px; box-shadow: 0 4px 0 var(--ink); }
.btn.icon { padding: .45em .7em; }

/* ---------- 상단 ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 18px 10px;
}
.top.solid { background: linear-gradient(var(--sky-1), var(--sky-2)); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.brand { display: flex; flex-direction: column; min-width: 0; color: #fff; text-decoration: none; line-height: 1.05; }
.brand b, .brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-short { display: none; }
.brand b { font: 2rem var(--display); letter-spacing: .02em; text-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.brand small { font-weight: 700; opacity: .85; margin-top: 2px; }
.top nav { display: flex; gap: 10px; flex: none; justify-content: flex-end; }
.demo-ribbon {
  position: fixed; left: 50%; bottom: 128px; z-index: 3; transform: translateX(-50%); white-space: nowrap;
  background: #2b31e0aa; color: #fff; border: 2px dashed #fff9; border-radius: 999px; padding: 2px 12px; font-size: .8rem; font-weight: 700;
}

/* ---------- 게임 고르기 ---------- */
.select-screen { position: fixed; inset: 0; }
.shelf {
  position: absolute; left: 0; right: 0; top: 78px; bottom: 132px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  display: flex; align-items: center;
  scroll-behavior: smooth; overscroll-behavior: contain;
}
.shelf::-webkit-scrollbar { display: none; }
.grid {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(3, var(--tile)); grid-auto-columns: var(--tile);
  column-gap: var(--gap-x); row-gap: var(--gap-y);
  padding: 30px calc(var(--gap-x) * .8) 40px;
  margin: auto;
}
.tile {
  position: relative; width: var(--tile); height: var(--tile); padding: 0; border: 0; background: none;
  transform: translateY(var(--dy, 0px));
  transition: transform .15s;
}
.tile .face {
  position: absolute; inset: 0; border-radius: 9px; overflow: hidden;
  transform: rotate(var(--rot, 0deg));
  background: var(--c, #4f6bff);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 5px 0 rgba(0, 0, 0, .22);
}
.tile .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .face::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55), inset 0 -6px 0 rgba(0, 0, 0, .15);
}
.tile .art {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; padding: 8%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .45), transparent 55%), var(--c, #4f6bff);
  text-align: center;
}
.tile .art .emoji { font-size: calc(var(--tile) * .42); line-height: 1; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .2)); }
.tile .art .name {
  font: calc(var(--tile) * .12) / 1.1 var(--display); color: #fff;
  text-shadow: -2px -2px 0 #111, 2px -2px 0 #111, -2px 2px 0 #111, 2px 2px 0 #111, 0 4px 0 #111;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all;
}
.tile .face.has-tag .art { padding-bottom: 26%; }
.tile .team-tag {
  position: absolute; left: 6%; right: 6%; bottom: 6%; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0;
  padding: 2px 6px; border: 2px solid #fff; border-radius: 8px; background: rgba(17, 17, 17, .82);
  color: #ffb21e; font: calc(var(--tile) * .1) / 1.25 var(--display); box-shadow: 0 2px 0 rgba(0, 0, 0, .3);
}
.tile .team-tag i { font-style: normal; flex: none; }
.tile .team-tag b { font-weight: 400; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.empty .face {
  background: repeating-conic-gradient(#3d4b7c 0 25%, #46558a 0 50%) 0 0 / 16px 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
  opacity: .72;
}
.tile.empty .face::after { box-shadow: none; }
.tile.empty .face span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: calc(var(--tile) * .7) / 1 var(--display); color: #4f7ad8;
}
.badge-new {
  position: absolute; top: -16px; right: -22px; z-index: 3;
  padding: 2px 12px 3px; border: 3px solid #fff; border-radius: 999px;
  background: var(--red); color: #fff; font: 1.25rem / 1.1 var(--display); font-style: italic; letter-spacing: .04em;
  transform: rotate(-8deg) skewX(-6deg); box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  pointer-events: none;
}
.badge-medal {
  position: absolute; top: -14px; right: -14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 8px, #8a5a00 8px 10px, #f7c933 10px 16px, #fff2a8 16px 17px, #e2a50f 17px 20px, #8a5a00 20px 22px);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25));
  pointer-events: none;
}

.badge-vote {
  position: absolute; top: -14px; left: -14px; z-index: 3; width: 42px; height: 42px; display: grid; place-items: center;
  border: 3px solid #fff; border-radius: 50%; background: #111; font-size: 1.3rem; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); pointer-events: none;
}
.camp-banner-slot { position: fixed; left: 50%; top: 14px; z-index: 6; transform: translateX(-50%); max-width: calc(100vw - 32px); pointer-events: none; }
.camp-banner {
  display: block; padding: 8px 18px; border: 3px solid #111; border-radius: 999px; background: #fff; color: #111;
  font-weight: 800; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 5px 0 #111;
  pointer-events: auto; animation: hop .4s ease-out;
}
.camp-banner b { color: #e8590c; }
.camp-banner.gold { background: linear-gradient(#ffe066, #fab005); }
.btn.vote { background: #fff; }
.btn.vote.on { background: var(--yellow); }
.react.vote-react { background: #fff3bf; }
.react.vote-react.on { background: var(--yellow); }

.season-pick { position: fixed; right: 18px; bottom: 150px; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px;
  border: 3px solid #111; border-radius: 14px; background: #fff; font-weight: 800; box-shadow: 0 4px 0 #111; }
.season-pick select { border: 0; background: none; font-weight: 800; max-width: 52vw; }
button.camp-banner { cursor: pointer; font: inherit; font-weight: 800; }
body.archived [data-upload-link], body.archived [data-act="edit"], body.archived [data-act="remix"] { display: none !important; }

/* ---------- 정렬·필터·검색 ---------- */
.select-screen .shelf { top: 124px; }
.sorter { position: fixed; left: 18px; top: 80px; z-index: 5; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 36px); }
.sorter-btn, .sorter-search, .sorter-count {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; border: 3px solid var(--ink); border-radius: 12px;
  background: #fff; box-shadow: 0 4px 0 var(--ink); font-weight: 800; white-space: nowrap;
}
.sorter-btn { padding: 0 10px; transition: transform .08s, box-shadow .08s; }
.sorter-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.sorter-btn:active, .sorter-btn[aria-expanded="true"] { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); background: var(--yellow); }
.sorter-icon { font-size: 1.1rem; }
.sorter-caret { font-size: .75rem; opacity: .6; transition: transform .2s; }
.sorter-btn[aria-expanded="true"] .sorter-caret { transform: rotate(180deg); }
.sorter-dot { padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-style: normal; font-size: .75rem; line-height: 1.5; }
.sorter-search { padding: 0 4px 0 10px; cursor: text; }
.sorter-search input { width: 9.5em; border: 0; outline: 0; background: none; font-weight: 700; transition: width .25s; }
.sorter-search:focus-within { box-shadow: 0 4px 0 var(--ink), 0 0 0 4px var(--yellow); }
.sorter-search:focus-within input { width: 14em; }
.sorter-count { display: none; padding: 0 4px 0 10px; background: #111; color: #fff; border-color: #111; font-size: .9rem; }
.sorter-count.on { display: inline-flex; animation: hop .3s ease-out; }
.sorter-count b { color: var(--yellow); }
.sorter-count button { width: 26px; height: 26px; border: 0; border-radius: 8px; background: #fff3; color: #fff; font-weight: 900; }
.sorter-count button:hover { background: var(--red); }
.sorter-pop { position: absolute; left: 0; top: calc(100% + 12px); }
.sorter-panel {
  width: min(460px, calc(100vw - 36px)); max-height: min(70vh, 560px); overflow: auto; padding: 14px 16px 12px;
  border: 4px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 8px 0 var(--ink), 0 18px 40px #0004;
  transform-origin: 30px 0; animation: pop-in .18s ease-out;
}
.sorter-panel::before { content: ''; position: absolute; left: 26px; top: -14px; border: 10px solid transparent; border-bottom-color: var(--ink); border-top: 0; }
.sorter-panel section + section { margin-top: 10px; }
.sorter-panel h3 { margin: 0 0 6px; font: .95rem var(--display); color: #556; letter-spacing: .04em; }
.sorter-panel select.input { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px; border: 2px solid var(--ink); border-radius: 999px; background: #f3f4f8; font-weight: 800; font-size: .9rem;
  box-shadow: 0 3px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .15s;
}
.chip:hover { transform: translateY(-1px); background: #fff; }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.chip.on { background: var(--green); }
.sorter-foot { display: flex; justify-content: space-between; margin-top: 14px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.85) translateY(-6px); } }
.shelf-empty { margin: auto; display: grid; justify-items: center; gap: 12px; padding: 30px 20px; text-align: center; color: #fff; font-weight: 800; text-shadow: 0 2px 0 #0005; }
.shelf-empty p { margin: 0; font-size: 1.15rem; }
.shelf-empty .tile { animation: wobble 1.6s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
/* 정렬을 바꾸면 카드를 나눠 주듯 하나씩 놓습니다 */
.grid.dealing .tile { animation: deal .42s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(var(--n, 0) * 22ms); }
@keyframes deal { from { opacity: 0; transform: translateY(calc(var(--dy, 0px) + 40px)) scale(.6) rotate(-8deg); } }

/* 고른 칸의 초록 꺾쇠 */
.cursor { position: absolute; inset: -16px; z-index: 2; pointer-events: none; animation: pulse 1s ease-in-out infinite; }
.cursor i {
  position: absolute; width: 30%; height: 30%;
  border: 11px solid var(--green); filter: drop-shadow(0 0 0 var(--green-dark)) drop-shadow(0 3px 0 var(--green-dark));
}
.cursor i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.cursor i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; }
.cursor i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 16px; }
.cursor i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.tile.selected { z-index: 3; transform: translateY(var(--dy, 0px)) scale(1.1); transition: transform .2s cubic-bezier(.2, 1.5, .4, 1); }
.tile.selected .face { animation: hop .25s ease-out; box-shadow: 0 0 0 4px #fff, 0 0 26px 6px rgba(255, 230, 120, .75), 0 12px 18px rgba(0, 0, 0, .35); }
/* 고른 칸이 또렷하게: 나머지 칸은 살짝 어둡게 */
.grid:has(.tile.selected) .tile:not(.selected):not(:hover) .face { filter: brightness(.82) saturate(.85); transition: filter .2s; }
.tile .face { transition: filter .2s; }
@media (hover: hover) { .tile:not(.selected):hover { transform: translateY(calc(var(--dy, 0px) - 4px)) scale(1.05); z-index: 2; } }
@keyframes hop { 40% { transform: rotate(var(--rot, 0deg)) translateY(-8px); } }

/* ---------- 아래 정보 띠 ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; height: 118px;
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(#4a4a4f, var(--bar) 35%, #232326);
  border-top: 5px solid #e8e8ea; box-shadow: 0 -4px 0 rgba(0, 0, 0, .25);
  display: flex; align-items: center; gap: 18px; padding-left: 190px; padding-right: 22px; color: #fff;
}
.bar::before {
  content: ''; position: absolute; left: 34px; top: -26px; border: 13px solid transparent; border-bottom: 14px solid #e8e8ea;
}
.nameplate { position: absolute; left: 30px; bottom: 16px; display: grid; justify-items: center; }
.nameplate .who {
  width: 96px; height: 96px; display: grid; place-items: center; font-size: 60px; line-height: 1;
  background: #fff; border: 5px solid var(--ink); border-radius: 18px; box-shadow: 0 0 0 4px #fff, 0 6px 0 4px #0006;
  image-rendering: pixelated;
}
.nameplate .plate {
  margin-top: -6px; max-width: 160px; padding: 1px 10px 3px; border: 3px solid #fff; border-radius: 9px; background: var(--ink);
  font: 1.25rem / 1.2 var(--display); color: #ffb21e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 0 #7a3c00;
}
.bar .info { flex: 1; min-width: 0; }
.bar .title {
  margin: 0; font: clamp(1.6rem, 4.2vw, 3rem) / 1.1 var(--display); letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 3px 0 #000;
}
.bar .desc { margin: 4px 0 0; color: #d6d6dc; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .actions { display: flex; align-items: center; gap: 14px; }
.bar .stats { color: #ffe9a8; font-weight: 800; white-space: nowrap; }
.btn.start { font: 1.6rem var(--display); padding: .25em 1em; background: var(--yellow); border-radius: 16px; }
.hint { position: fixed; right: 18px; bottom: 128px; z-index: 3; color: #233; font-weight: 700; font-size: .85rem; opacity: .7; pointer-events: none;
  /* 키보드 안내는 처음 10초만 보이고 사라져요(타일 위에 겹쳐 어지럽지 않게) */
  animation: hint-out .8s 10s forwards; }
@keyframes hint-out { to { opacity: 0; visibility: hidden; } }
@media (hover: none) { .hint { display: none; } }
.toast {
  position: fixed; left: 50%; top: 84px; z-index: 50; transform: translateX(-50%);
  padding: 10px 18px; border: 3px solid var(--ink); border-radius: 14px; background: var(--yellow); font-weight: 800;
  box-shadow: 0 5px 0 var(--ink); animation: toast 3.2s forwards;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- 실행 화면 ---------- */
.play-screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: #15151a; }
.play-top {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(#3b3b40, #26262a); border-bottom: 4px solid #e8e8ea; color: #fff;
}
.play-top .who { font-size: 1.9rem; }
.play-top .meta { flex: 1; min-width: 0; }
.play-top h1 { margin: 0; font: 1.5rem / 1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-top small { color: #ffb21e; font-weight: 800; }
.play-top .tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stage { flex: 1; position: relative; background: #fff; }
.app-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.reactions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: #26262a; border-top: 3px solid #000;
}
.react {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 3px solid #000; border-radius: 999px;
  background: #fff; font-weight: 800; box-shadow: 0 4px 0 #000;
}
.react.on { background: var(--yellow); }
.react:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.link-card { display: grid; justify-items: center; gap: 16px; text-align: center; color: #fff; }

.recipe {
  position: absolute; right: 14px; top: 90px; max-height: calc(100% - 170px); z-index: 5; width: min(420px, calc(100vw - 28px));
  display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow: auto;
  background: #fff; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 10px 0 rgba(0, 0, 0, .35);
  animation: recipe-in .25s ease-out;
}
.recipe[hidden] { display: none; }
@keyframes recipe-in { from { transform: translateX(30px); opacity: 0; } }
.story-h { margin: 6px 0 0; font: 1rem var(--display); }
.remix-box { display: grid; gap: 8px; padding: 10px 12px; border: 3px dashed #adb5bd; border-radius: 14px; background: #f8f9ff; }
.remix-box p { margin: 0; }
.remix-box.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 40% { background: #fff3bf; border-color: #fab005; } }
.remix-steps ol { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.problem-text { border-left-color: #74c0fc; }
.remix-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.team-link { color: inherit; text-decoration: none; }
.team-link:hover { text-decoration: underline; }
.team-link.dark { color: var(--ink); font-weight: 800; }
.recipe-head { display: flex; align-items: center; justify-content: space-between; font: 1.3rem var(--display); }
.recipe p { margin: 0; }
.recipe-text { white-space: pre-wrap; padding: 12px 14px; border-radius: 14px; background: #f4f7ff; border-left: 6px solid var(--yellow); line-height: 1.6; font-weight: 600; }
textarea.prompt-input { min-height: 96px; font-family: var(--body); font-size: .95rem; }

/* ---------- 패널(올리기·안내·관리) ---------- */
.page { position: fixed; inset: 0; overflow-y: auto; padding: 86px 16px 48px; }
.panel {
  max-width: 820px; margin: 0 auto; padding: 24px 26px 28px;
  background: #fff; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 10px 0 rgba(0, 0, 0, .3);
}
.panel h1 { margin: 0 0 4px; font: 2rem / 1.2 var(--display); }
.panel h2 { margin: 26px 0 10px; font: 1.3rem / 1.2 var(--display); display: flex; align-items: center; gap: 10px; }
.panel h2 .step {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sky-1); color: #fff; font-size: 1rem;
}
.panel p.lead { margin: 0 0 6px; color: #444; font-weight: 600; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field > span { font-weight: 800; }
.field small { color: #555; }
.input, textarea.input, select.input {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fff;
}
textarea.input { min-height: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; resize: vertical; }
.input:focus { outline: none; border-color: var(--sky-1); box-shadow: 0 0 0 4px #b9c4ff; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.7rem;
  border: 3px solid #ccc; border-radius: 12px; background: #fff;
}
.choice[aria-pressed='true'] { border-color: var(--ink); background: #fff6c8; box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.swatch { width: 44px; height: 44px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 0 0 2px #bbb; }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--ink), 0 4px 0 3px var(--ink); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs .btn[aria-selected='true'] { background: var(--sky-1); color: #fff; }
.preview-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
.preview-box { position: relative; aspect-ratio: 4 / 3; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; background: #f3f3f6; }
.preview-box .empty-note { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #666; font-weight: 700; }
.thumb-side { display: grid; gap: 10px; justify-items: center; text-align: center; }
.thumb-side .tile { --tile: 170px; }
.thumb-tip { max-width: 190px; font-size: .78rem; line-height: 1.35; word-break: keep-all; }
@media (pointer: coarse) { .thumb-tip { display: none; } }
.cropper { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.cropper canvas { display: block; max-width: 100%; max-height: 360px; }
.cropper .box { position: absolute; border: 3px solid var(--green); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); cursor: move; border-radius: 6px; }
.notice { padding: 12px 14px; border: 3px dashed #f0a500; border-radius: 14px; background: #fff8e1; font-weight: 600; }
.notice.bad { border-color: var(--red); background: #ffecec; }
.notice.good { border-color: #2b8a3e; background: #ebfbee; }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.error { color: #c40000; font-weight: 800; }
.prompt-card { position: relative; margin: 10px 0; padding: 14px 16px; border: 3px solid var(--ink); border-radius: 14px; background: #f4f7ff; white-space: pre-wrap; font-weight: 600; line-height: 1.6; }
.prompt-card .btn { position: absolute; right: 10px; top: 10px; }
/* 📖 만드는 법: 스크롤 없이 한 화면 */
/* ---------- 📖 ChatGPT로 앱 만들기 따라 하기(guide.js) ---------- */
.guide-page { display: flex; align-items: flex-start; justify-content: center; padding-bottom: 16px; }
.guide-panel { display: flex; flex-direction: column; gap: 10px; width: min(1040px, 100%); max-width: 1040px; max-height: calc(100dvh - 140px); margin: 0 auto; padding-top: 16px; padding-bottom: 16px; }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.guide-panel h1 { margin: 0; font-size: clamp(1.4rem, 3.2vw, 2rem); }
.guide-panel h1 small { font: 800 .55em var(--body); padding: 2px 10px; border-radius: 999px; background: var(--yellow); vertical-align: middle; }
.g-device { display: inline-flex; padding: 3px; gap: 3px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; }
.g-device button { border: 0; border-radius: 999px; padding: 5px 12px; background: none; font: 800 .9rem var(--body); cursor: pointer; color: #556; }
.g-device button.on { background: var(--ink); color: #fff; }
/* 🎯 지금 미션 한 줄(guide.js missionHtml) */
.g-mission { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff8d6; }
.g-mission:empty { display: none; }
.g-mission .ms-badge { flex: none; font-size: .85rem; padding: 2px 10px; box-shadow: 0 2px 0 var(--ink); }
.g-mission b { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: clamp(1.05rem, 2.2vw, 1.3rem) var(--display); color: var(--sky-1); }
.g-mission small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; font-weight: 700; }
@media (max-width: 700px) { .g-mission { flex-wrap: wrap; gap: 4px 8px; } .g-mission b { max-width: none; white-space: normal; } .g-mission small { flex-basis: 100%; white-space: normal; } }
/* 단계 줄: 동그라미 n개(지금 단계는 노랑, 다 한 단계는 파랑 테두리 + ✓) */
.guide-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 4px; position: relative; }
.guide-steps::before { content: ''; position: absolute; left: 6%; right: 6%; top: 26px; height: 6px; border-radius: 3px; background: #e3e7f3; z-index: 0; }
.guide-steps button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; font-weight: 800; color: #667; font-size: .85rem; }
.guide-steps button i { display: grid; place-items: center; width: 52px; height: 52px; border: 4px solid #d6d9e4; border-radius: 50%; background: #fff; font-style: normal; font-size: 1.45rem; transition: transform .18s, border-color .18s, background .18s; }
.guide-steps button b { position: absolute; top: -4px; right: calc(50% - 34px); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d6d9e4; color: #fff; font-size: .75rem; }
.guide-steps button.done i { border-color: var(--sky-2); background: color-mix(in srgb, var(--sky-3) 35%, #fff); }
.guide-steps button.done b { background: var(--sky-2); font-size: 0; }
.guide-steps button.done b::after { content: '✓'; font-size: .8rem; }
.guide-steps button[aria-selected=true] { color: var(--ink); }
.guide-steps button[aria-selected=true] i { border-color: var(--ink); background: var(--yellow); transform: scale(1.1); box-shadow: 0 4px 0 var(--ink); }
.guide-steps button[aria-selected=true] b { background: var(--ink); }
/* 단계 카드: 왼쪽 화면 그림 · 오른쪽 할 일 */
.g-card { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(220px, 330px) 1fr; align-items: start; gap: 8px 24px; padding: 18px 22px; border: 3px solid var(--ink); border-radius: 20px; background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--sky-3) 30%, #fff)); overflow: auto; }
.g-card.pop { animation: panel-in .35s cubic-bezier(.2, 1.25, .4, 1); }
.g-art-wrap { align-self: center; display: grid; place-items: center; }
.g-art { font-size: clamp(3.4rem, 9vw, 6.5rem); line-height: 1; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .12)); animation: g-bob 2.4s ease-in-out infinite; }
@keyframes g-bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.g-text small { font-weight: 800; color: var(--sky-1); }
.g-text h2 { margin: 2px 0 2px; font: clamp(1.25rem, 2.6vw, 1.7rem) var(--display); }
.g-why { margin: 0 0 8px; color: #555; font-weight: 700; }
.g-text .actions-row { margin-top: 10px; }
/* 할 일 체크리스트: 번호 동그라미 + 체크하면 초록 */
.g-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: todo; }
.g-todo li { counter-increment: todo; }
.g-todo label { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 10px; padding: 6px 10px; border: 2px solid #dfe3f0; border-radius: 12px; background: #fff; cursor: pointer; line-height: 1.5; font-size: 1.02rem; transition: background .15s, border-color .15s; }
.g-todo label::before { content: counter(todo); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sky-1); color: #fff; font: 900 .9rem var(--body); }
.g-todo input { position: absolute; opacity: 0; pointer-events: none; }
.g-todo label:has(input:checked) { border-color: #2f9e44; background: #ebfbee; }
.g-todo label:has(input:checked)::before { content: '✓'; background: #2f9e44; }
.g-todo label:has(input:checked) span { color: #2b8a3e; }
.g-todo label:has(input:focus-visible) { outline: 3px solid var(--sky-2); outline-offset: 2px; }
.g-todo kbd { padding: 0 6px; border: 2px solid #c5cae9; border-bottom-width: 3px; border-radius: 6px; background: #f7f8ff; font: 800 .85em var(--body); }
.g-ideas, .g-fixes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.g-ideas span { padding: 4px 10px; border: 2px solid #d6d9e4; border-radius: 999px; background: #fff; font-size: .88rem; font-weight: 700; transition: transform .2s, background .2s; }
.g-ideas span.on { border-color: var(--ink); background: var(--yellow); transform: scale(1.12) rotate(-2deg); }
.g-fixes .chip { font-size: .88rem; }
.g-draft { margin-top: 8px; padding: 8px 12px; border: 2px dashed #b9c0d4; border-radius: 12px; background: #fff; }
.g-draft pre { margin: 4px 0 0; white-space: pre-wrap; font: .82rem / 1.45 var(--body); color: #555; max-height: 7.5em; overflow: hidden; }
.g-tips { margin-top: 10px; padding: 6px 12px; border-radius: 12px; background: #fff4e6; border: 2px solid #ffd8a8; }
.g-tips summary { cursor: pointer; font-weight: 900; color: #d9480f; }
.g-tips ul { margin: 6px 0 2px; padding-left: 1.2em; line-height: 1.6; }
.g-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.g-more .pill { cursor: pointer; border: 2px solid #d6d9e4; background: #fff; color: var(--ink); font-size: .85rem; }
.g-sheet { width: 100%; }
.g-sheet ul, .g-sheet p { text-align: left; }
.g-sheet ul { padding-left: 1.2em; line-height: 1.7; }
.g-sheet .prompt-card { max-height: 46vh; overflow: auto; font-size: .9rem; }
/* 화면 모양 그림(진짜 ChatGPT·올리기 화면을 흉내 — 눌러야 할 곳은 노란 빛) */
.mock { width: 100%; max-width: 330px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 6px 0 var(--ink); font-size: .78rem; text-align: left; }
.mock-top { display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-bottom: 2px solid #eee; background: #f8f9fa; }
.mock-top i { width: 9px; height: 9px; border-radius: 50%; background: #ff8787; } .mock-top i + i { background: #ffd43b; } .mock-top i + i + i { background: #69db7c; }
.mock-top b { margin-left: 6px; font-weight: 900; }
.mock-body { display: grid; gap: 6px; padding: 10px; min-height: 120px; align-content: start; }
.mock-hello { margin: 26px 0; text-align: center; font-weight: 900; font-size: .95rem; color: #333; }
.mock-me, .mock-ai { margin: 0; padding: 6px 9px; border-radius: 12px; line-height: 1.4; }
.mock-me { justify-self: end; max-width: 85%; background: #edf2ff; }
.mock-ai { max-width: 92%; background: #f8f9fa; }
.mock-code { border-radius: 10px; background: #1e1e2e; color: #cdd6f4; overflow: hidden; }
.mock-code > div { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: #313244; font-size: .72rem; }
.mock-code pre { margin: 0; padding: 6px 8px; font: .72rem / 1.4 ui-monospace, monospace; }
.mock-input { display: flex; align-items: center; gap: 6px; margin: 0 8px 8px; padding: 6px 6px 6px 10px; border: 2px solid #dee2e6; border-radius: 999px; }
.mock-input span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-input em { color: #adb5bd; font-style: normal; }
.mock-input > b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #212529; color: #fff; }
.mock-hot { position: relative; border-radius: 8px; box-shadow: 0 0 0 3px var(--yellow), 0 0 14px 4px rgba(255, 212, 59, .8); animation: mock-hot 1.4s ease-in-out infinite; }
.mock-code .mock-hot { padding: 1px 6px; background: var(--yellow); color: var(--ink); }
@keyframes mock-hot { 50% { box-shadow: 0 0 0 5px var(--yellow), 0 0 22px 8px rgba(255, 212, 59, .9); } }
@media (prefers-reduced-motion: reduce) { .mock-hot, .g-art { animation: none; } }
.mock-up .mock-field { margin: 0; display: grid; gap: 2px; font-weight: 800; color: #555; }
.mock-up .mock-field span { padding: 3px 8px; border: 2px solid #dee2e6; border-radius: 8px; color: #222; font-weight: 600; }
.mock-up .mock-field.code span { background: #1e1e2e; color: #cdd6f4; font-family: ui-monospace, monospace; }
.mock-prev { margin: 0; text-align: center; font-weight: 800; color: var(--sky-1); }
.mock-go { margin: 2px 0 0; text-align: center; } .mock-go b { display: inline-block; padding: 5px 12px; border: 2px solid var(--ink); background: var(--yellow); font-weight: 900; }
@media (max-width: 700px) {
  .guide-page { scroll-padding-bottom: 80px; }
  .guide-panel { max-height: none; gap: 10px; padding: 14px 12px; }
  .guide-steps button span { display: none; } /* 휴대폰: 동그라미만(이름은 카드 제목에) */
  .g-card { flex: none; }
  .guide-panel h1 small { display: none; }
  .guide-steps::before { top: 20px; }
  .guide-steps button i { width: 38px; height: 38px; font-size: 1.05rem; border-width: 3px; }
  .guide-steps { gap: 2px; }
  .guide-steps button b { right: calc(50% - 26px); width: 18px; height: 18px; font-size: .65rem; }
  .g-card { grid-template-columns: 1fr; padding: 12px 12px; gap: 8px; overflow: visible; }
  .g-art-wrap { order: 2; }
  .g-art { font-size: 2.8rem; }
  .mock { max-width: 300px; }
  .g-todo label { font-size: .95rem; padding: 7px 8px; gap: 8px; grid-template-columns: 26px 1fr; }
  .g-todo label::before { width: 24px; height: 24px; font-size: .8rem; }
  .g-text .actions-row .btn { flex: 1 1 auto; }
  .g-nav { position: sticky; bottom: 0; z-index: 3; padding: 8px 0; background: linear-gradient(transparent, #fff 30%); }
  .g-nav .btn { padding: .2em .6em; }
}
/* 휴대폰: 🛡️ 꼭 지켜요 · 🙋 자주 묻는 것 은 카드 맨 아래로(아래 줄은 ◀ ▶ 만) */
.g-more-m { display: none; margin-top: 12px; }
@media (max-width: 700px) { .g-nav .g-more { display: none; } .g-more-m { display: flex; } }
.vote-admin { margin: 18px 0; padding: 14px 16px; border: 3px solid var(--ink); border-radius: 16px; background: #fffbea; }
.vote-admin h2 { margin-top: 0; }
.tally { margin: 10px 0 0; padding-left: 1.4em; display: grid; gap: 4px; }
.tally-n { font-weight: 900; color: #e8590c; }
.versions { margin: 14px 0; padding: 10px 14px; border: 3px dashed #868e96; border-radius: 14px; background: #f8f9fa; }
.versions summary { cursor: pointer; font-weight: 800; }
.version-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.version-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #fff; border: 2px solid #dee2e6; border-radius: 12px; }
.team-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.team-head .who { width: 84px; height: 84px; display: grid; place-items: center; font-size: 52px; border: 5px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 var(--ink); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 16px; margin: 14px 0 20px; }
.team-card { display: grid; justify-items: center; gap: 6px; text-align: center; }
.team-card .tile { display: block; }
.team-card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
a.nameplate { text-decoration: none; }
table.admin { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.admin th, table.admin td { padding: 8px 6px; border-bottom: 2px solid #eee; text-align: left; vertical-align: middle; }
table.admin td .btn { margin: 2px; }
.muted { color: #666; }
dialog.modal {
  width: min(440px, calc(100vw - 32px)); padding: 22px; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 10px 0 rgba(0, 0, 0, .35);
  text-align: center;
}
dialog.modal::backdrop { background: rgba(10, 14, 60, .55); }
dialog.modal h2 { margin: 0 0 8px; font: 1.5rem var(--display); }
dialog.modal .qr svg { width: min(260px, 70vw); height: auto; }
dialog.modal .url { word-break: break-all; font-size: .85rem; color: #333; }
.pin-input { font: 2rem var(--display); letter-spacing: .5em; text-align: center; width: 9em; }
.done-tile { display: flex; justify-content: center; margin: 20px 0; }
.done-tile .tile { --tile: 180px; }

/* ---------- 프로젝터 전시 화면 ---------- */
.show {
  position: fixed; inset: 0; display: grid; gap: 2vh 2.4vw; padding: 2.6vh 2.6vw 2vh; color: #fff;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 19vw, 300px); grid-template-rows: auto minmax(0, 1fr) auto;
}
.show-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.show-head .brand b { font-size: clamp(1.6rem, 3.4vw, 3.2rem); }
.show-head .brand small { font-size: clamp(.9rem, 1.4vw, 1.3rem); }
.show-count { padding: .3em .9em; border: 3px solid #111; border-radius: 999px; background: var(--yellow); color: #111; font: clamp(1rem, 1.6vw, 1.6rem) var(--display); box-shadow: 0 5px 0 #111; }
.show-spot { position: relative; display: grid; place-items: center; min-height: 0; }
.show-card { position: relative; display: flex; align-items: center; gap: 4vw; width: 100%; animation: show-in .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes show-in { from { opacity: 0; transform: translateX(6vw) scale(.92); } }
.show-big { flex: none; }
.show-big .face { box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .18), 0 12px 0 rgba(0, 0, 0, .25); }
.show-text { min-width: 0; display: grid; gap: 1.6vh; justify-items: start; }
.show-team { display: inline-flex; align-items: center; gap: .4em; padding: .15em .7em .25em; border: 4px solid #fff; border-radius: 14px; background: #111;
  color: #ffb21e; font: clamp(1.2rem, 2.4vw, 2.4rem) var(--display); box-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.show-team i { font-style: normal; }
.show-text h2 { margin: 0; font: clamp(2.4rem, 5.6vw, 6rem) / 1.05 var(--display); text-shadow: 0 6px 0 rgba(0, 0, 0, .3); word-break: keep-all; }
.show-text p { margin: 0; font-size: clamp(1.1rem, 2vw, 2rem); font-weight: 700; color: #1b2a8a; background: rgba(255, 255, 255, .85); padding: .3em .7em; border-radius: 12px; }
.show-problem { margin: 0; max-width: 46vw; padding: .3em .8em; border-radius: 12px; background: #e7f5ff; color: #1864ab; font-size: clamp(1rem, 1.7vw, 1.7rem); font-weight: 800; }
.show-text blockquote { margin: 0; max-width: 46vw; padding: .5em .8em; border-left: 8px solid var(--yellow); border-radius: 10px; background: rgba(17, 17, 17, .7);
  font-size: clamp(.95rem, 1.5vw, 1.5rem); line-height: 1.45; }
.show-stats { font: clamp(1rem, 1.8vw, 1.8rem) var(--display); color: #ffe9a8; }
.show-stats:not(:empty) { padding: .2em .7em .3em; border-radius: 12px; background: rgba(17, 17, 17, .72); }
.show-progress { position: absolute; left: 0; right: 0; bottom: -1.4vh; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.show-progress::after { content: ''; position: absolute; inset: 0; background: var(--yellow); transform-origin: left; animation: show-bar var(--dwell) linear forwards; }
.show-progress.paused::after { animation-play-state: paused; background: #fff; }
@keyframes show-bar { from { transform: scaleX(0); } }
.show-empty { display: grid; justify-items: center; gap: 2vh; text-align: center; }
.show-empty h2 { margin: 0; font: clamp(2rem, 4.4vw, 4.6rem) / 1.15 var(--display); text-shadow: 0 6px 0 rgba(0, 0, 0, .3); }
.show-empty p { margin: 0; font-size: clamp(1.1rem, 2vw, 2rem); font-weight: 800; }
.show-join { grid-row: 2 / 4; grid-column: 2; align-self: center; display: grid; justify-items: center; gap: 1vh; padding: 2.2vh 1.2vw;
  background: #fff; color: #111; border: 5px solid #111; border-radius: 26px; box-shadow: 0 10px 0 rgba(0, 0, 0, .3); text-align: center; }
.show-join > * { max-width: 100%; min-width: 0; }
.show-qr svg { width: 100%; max-width: 100%; height: auto; display: block; }
.show-qr { width: 100%; }
.show-url { font: clamp(.9rem, 1.3vw, 1.3rem) var(--display); color: var(--sky-1); word-break: break-all; }
.show-code-label { margin-top: .6vh; font-weight: 800; color: #666; font-size: clamp(.8rem, 1vw, 1rem); }
.show-code { padding: .1em .4em; border: 4px dashed #111; border-radius: 14px; background: var(--yellow); font: clamp(1.3rem, 2.3vw, 2.5rem) / 1.15 var(--display); letter-spacing: .06em; overflow-wrap: anywhere; }
.show-hint { font-weight: 800; font-size: clamp(.8rem, 1.05vw, 1.1rem); line-height: 1.4; color: #333; }
.show-strip { grid-column: 1; display: flex; gap: 14px; overflow: hidden; padding: 10px 6px 14px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.show-strip .tile { flex: none; opacity: .65; transition: opacity .3s, transform .3s; }
.show-strip .tile .team-tag { display: none; }
.show-strip .tile.on { opacity: 1; transform: translateY(-6px) scale(1.08); }
.show-strip .tile.on .face { outline: 5px solid var(--green); outline-offset: 3px; }
.show-party[hidden] { display: none; }
.show-party { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; overflow: hidden; background: rgba(10, 14, 70, .72); }
.show-burst { position: absolute; width: 160vmax; height: 160vmax; background: repeating-conic-gradient(rgba(255, 212, 59, .28) 0 10deg, transparent 10deg 20deg); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.show-party-card { position: relative; display: grid; justify-items: center; gap: 2.4vh; text-align: center; animation: party-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes party-pop { from { transform: scale(.3) rotate(-10deg); opacity: 0; } }
.show-party-card h2 { margin: 0; font: clamp(2.4rem, 5.4vw, 6rem) / 1.1 var(--display); color: var(--yellow); text-shadow: -4px -4px 0 #111, 4px -4px 0 #111, -4px 4px 0 #111, 4px 4px 0 #111, 0 9px 0 #111; }
.show-party-card p { margin: 0; color: #fff; font: clamp(1.4rem, 3vw, 3rem) var(--display); }
.show-party-card .badge-new { font-size: clamp(1.4rem, 2.4vw, 2.4rem); top: -24px; right: -30px; }
.confetti { position: absolute; top: -4vh; width: 14px; height: 22px; border-radius: 3px; animation: fall var(--d) var(--delay) ease-in forwards; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }
@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .show-join { grid-row: auto; grid-column: 1; grid-template-columns: 110px 1fr; text-align: left; align-items: center; }
  .show-join .show-qr { grid-row: span 4; }
  .show-card { flex-direction: column; text-align: center; gap: 2vh; }
  .show-text { justify-items: center; }
}

/* ---------- 시상식 ---------- */
.awards {
  position: fixed; inset: 0; overflow: hidden; display: grid; place-items: center; color: #fff; cursor: pointer; user-select: none;
  background: radial-gradient(ellipse at 50% -10%, rgba(255, 230, 120, .45), transparent 55%), radial-gradient(ellipse at 15% 110%, rgba(116, 168, 255, .35), transparent 50%), linear-gradient(#141a5c, #0b0f33);
}
.award-center { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2.4vh; text-align: center; padding: 3vh 4vw; animation: party-pop .6s cubic-bezier(.2, 1.5, .4, 1); }
.awards h1 { margin: 0; font: clamp(2.2rem, 6vw, 6.4rem) / 1.1 var(--display); text-shadow: 0 7px 0 rgba(0, 0, 0, .45); }
.award-sub { margin: 0; font-size: clamp(1.1rem, 2.4vw, 2.2rem); font-weight: 800; color: #dbe4ff; line-height: 1.5; }
.award-hint { margin: 0; font-size: clamp(1rem, 1.8vw, 1.6rem); color: var(--yellow); font-weight: 800; animation: pulse 1.4s ease-in-out infinite; }
.award-trophy, .award-drum { font-size: clamp(5rem, 14vw, 12rem); line-height: 1; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .4)); }
.award-trophy { animation: hop 1.2s ease-in-out infinite; }
.award-drum { animation: drum .18s ease-in-out infinite alternate; }
@keyframes drum { to { transform: rotate(-8deg) scale(1.06); } }
.award-rank.r1 { color: #ffd43b; } .award-rank.r2 { color: #e9ecef; } .award-rank.r3 { color: #ffb37a; }
.award-row { display: flex; gap: 4vw; justify-content: center; flex-wrap: wrap; }
.award-card { display: grid; justify-items: center; gap: 1.2vh; }
.award-title { font: clamp(1.6rem, 3.6vw, 3.6rem) / 1.1 var(--display); text-shadow: 0 5px 0 rgba(0, 0, 0, .4); }
.award-problem { max-width: min(60vw, 720px); font-size: clamp(1rem, 1.8vw, 1.6rem); font-weight: 700; color: #dbe4ff; }
.award-votes { padding: .1em .8em .2em; border: 3px solid #fff; border-radius: 999px; background: #111; color: var(--yellow); font: clamp(1.1rem, 2vw, 2rem) var(--display); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; }
.podium-col { display: grid; justify-items: center; gap: 1vh; }
.podium-apps { display: flex; gap: 1.6vw; justify-content: center; align-items: flex-end; }
.podium-col .award-title { font-size: clamp(1rem, 1.8vw, 1.8rem); }
.podium-block { display: grid; place-items: center; width: max(clamp(140px, 20vw, 300px), 100%); border: 5px solid #111; border-radius: 16px 16px 0 0; color: #111;
  font: clamp(1.6rem, 3vw, 3rem) / 1.1 var(--display); padding-top: 1vh; box-shadow: inset 0 -12px 0 rgba(0, 0, 0, .15); }
.podium-block b { font-size: .8em; }
.p1 .podium-block { height: 22vh; background: linear-gradient(#ffe066, #fab005); }
.p2 .podium-block { height: 15vh; background: linear-gradient(#f8f9fa, #ced4da); }
.p3 .podium-block { height: 10vh; background: linear-gradient(#ffc9a0, #e8833a); }
.award-nav { position: fixed; left: 16px; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 12px; color: #aab4e8; font-weight: 800; }
.awards .show-burst { position: absolute; }

/* ---------- 참가 인증서 ---------- */
/* 인증서는 1060px 기준으로 디자인하고, 모든 크기를 cqw(인증서 너비의 1%)로 적어 휴대폰·인쇄에서도 같은 모양으로 줄어듭니다. */
.cert-page { display: grid; justify-items: center; gap: 16px; }
.cert-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.print-area { display: grid; gap: 24px; justify-items: center; width: 100%; }
.cert-wrap { width: min(1060px, 100%); container-type: inline-size; animation: cert-in .7s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes cert-in { from { opacity: 0; transform: translateY(24px) rotate(-1deg) scale(.96); } }
.cert {
  position: relative; width: 100%; aspect-ratio: 297 / 210; padding: 3.2% 5.5% 2.6%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; color: #1d1d2b;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, .95), transparent 55%),
    repeating-radial-gradient(circle at 50% 120%, transparent 0 1.1cqw, rgba(43, 49, 224, .035) 1.1cqw 1.25cqw),
    radial-gradient(circle at 15% 85%, rgba(134, 224, 58, .14), transparent 30%),
    radial-gradient(circle at 88% 20%, rgba(255, 212, 59, .25), transparent 32%),
    linear-gradient(160deg, #fffdf3, #fff4cf 70%, #ffeaa8);
  border: 1cqw solid #2b31e0; outline: .4cqw solid #ffd43b; outline-offset: -2.1cqw; border-radius: 1.7cqw;
  box-shadow: 0 12px 0 rgba(0, 0, 0, .3);
}
.cert::before { content: ''; position: absolute; inset: 2.9cqw; border: .15cqw dashed rgba(43, 49, 224, .25); border-radius: 1cqw; pointer-events: none; }
.cert-corner { position: absolute; width: 7%; aspect-ratio: 1; border: 1cqw solid var(--green); filter: drop-shadow(0 .3cqw 0 var(--green-dark)); }
.cert-corner.tl { left: 3.2%; top: 4.4%; border-right: 0; border-bottom: 0; border-radius: 1.3cqw 0 0 0; }
.cert-corner.tr { right: 3.2%; top: 4.4%; border-left: 0; border-bottom: 0; border-radius: 0 1.3cqw 0 0; }
.cert-corner.bl { left: 3.2%; bottom: 4.4%; border-right: 0; border-top: 0; border-radius: 0 0 0 1.3cqw; }
.cert-corner.br { right: 3.2%; bottom: 4.4%; border-left: 0; border-top: 0; border-radius: 0 0 1.3cqw 0; }
.cert-serial { position: absolute; left: 12%; top: 7.5%; font-size: 1.2cqw; font-weight: 800; color: #6b6b85; letter-spacing: .05em; }
.cert-top { display: flex; align-items: center; gap: 1cqw; font: 1.8cqw var(--display); color: #2b31e0; }
.cert-top img { width: 3.8cqw; height: auto; border-radius: .8cqw; }
.cert-season { padding: .2cqw 1cqw; border-radius: 99px; background: #2b31e0; color: #fff; font-size: .85em; }
.cert-title { margin: .35em 0 0; font: 6.3cqw / 1 var(--display); letter-spacing: .12em; color: #2b31e0; text-shadow: 0 .45cqw 0 #ffd43b, 0 .9cqw 0 rgba(0, 0, 0, .08); }
.cert-en { margin: .4em 0 0; font-weight: 900; letter-spacing: .4em; font-size: 1.1cqw; color: #6b6b85; }
.cert-en::before, .cert-en::after { content: '✦'; margin: 0 1.2em; color: #fab005; letter-spacing: 0; }
.cert-body { flex: 1; min-height: 0; display: flex; align-items: center; gap: 3.2%; width: 100%; padding: 1% 1.5%; }
.cert-shot { position: relative; flex: none; display: block; }
.cert-shot .cursor { inset: -1.4cqw; animation: none; }
.cert-shot .cursor i { border-width: .9cqw; }
.cert-tile { --tile: 18cqw !important; display: block; }
.cert-text { flex: 1; display: grid; gap: .55em; font-size: 1.7cqw; line-height: 1.6; font-weight: 600; }
.cert-text p { margin: 0; }
.cert-team { display: flex; align-items: center; gap: .3em; font: 4cqw / 1.1 var(--display); color: #e8590c; text-shadow: 0 .3cqw 0 rgba(232, 89, 12, .15); }
.cert-app { font-size: 1.15em; color: #2b31e0; }
.cert-problem { padding: .4em .8em; border-left: .6cqw solid #74c0fc; border-radius: .8cqw; background: rgba(255, 255, 255, .75); font-style: italic; }
.cert-chips { display: flex; flex-wrap: wrap; gap: .6cqw; }
.cert-chips span { padding: .1em .7em; border-radius: 99px; background: rgba(43, 49, 224, .1); color: #2b31e0; font-size: .85em; font-weight: 800; }
.cert-seal { position: relative; flex: none; width: 15cqw; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; text-align: center;
  border-radius: 50%; color: #5c3b00; transform: rotate(8deg);
  background: radial-gradient(circle, #fff3bf 0 52%, #ffd43b 53% 60%, #f59f00 61% 64%, #ffe066 65%);
  box-shadow: 0 0 0 .5cqw #fff, 0 0 0 .8cqw #f59f00, 0 .9cqw 0 .8cqw rgba(0, 0, 0, .15); }
.cert-seal::before { content: ''; position: absolute; inset: -1.2cqw; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(#ffd43b 0 6deg, #f59f00 6deg 12deg); mask: radial-gradient(circle, transparent 60%, #000 61%); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); }
.seal-medal { font-size: 4cqw; line-height: 1; }
.cert-seal b { font: 1.6cqw var(--display); }
.cert-seal strong { font: 2.6cqw / 1 var(--display); color: #e8590c; }
.seal-ribbon { position: absolute; z-index: -2; bottom: -3.6cqw; left: 50%; width: 9cqw; height: 6cqw; transform: translateX(-50%);
  background: linear-gradient(90deg, #e03131 0 45%, transparent 45% 55%, #e03131 55%); clip-path: polygon(0 0, 100% 0, 100% 100%, 78% 82%, 55% 100%, 55% 0, 45% 0, 45% 100%, 22% 82%, 0 100%); }
.cert-seal.rank1 { background: radial-gradient(circle, #fff3bf 0 52%, #ffd43b 53% 60%, #f59f00 61% 64%, #ffe066 65%); }
.cert-seal.rank2 { color: #343a40; background: radial-gradient(circle, #f8f9fa 0 52%, #dee2e6 53% 60%, #868e96 61% 64%, #e9ecef 65%); box-shadow: 0 0 0 .5cqw #fff, 0 0 0 .8cqw #868e96, 0 .9cqw 0 .8cqw rgba(0, 0, 0, .15); }
.cert-seal.rank3 { color: #5c2b00; background: radial-gradient(circle, #fff4e6 0 52%, #ffc078 53% 60%, #d9480f 61% 64%, #ffa94d 65%); box-shadow: 0 0 0 .5cqw #fff, 0 0 0 .8cqw #d9480f, 0 .9cqw 0 .8cqw rgba(0, 0, 0, .15); }
.cert-seal.rank2::before { background: repeating-conic-gradient(#dee2e6 0 6deg, #868e96 6deg 12deg); }
.cert-seal.rank3::before { background: repeating-conic-gradient(#ffc078 0 6deg, #d9480f 6deg 12deg); }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; width: 100%; padding: 0 7% 1%; }
.cert-date { font-size: 1.6cqw; font-weight: 700; }
.cert-sign { position: relative; display: grid; justify-items: center; gap: .4cqw; }
.cert-sign b { font: 2.4cqw var(--display); }
.cert-line { min-width: 22cqw; padding-top: .4cqw; border-top: .2cqw solid #1d1d2b; text-align: center; font-size: 1.1cqw; font-weight: 800; letter-spacing: .5em; color: #6b6b85; }
.cert-stamp { position: absolute; right: -6.2cqw; top: -1.6cqw; width: 6cqw; height: 6cqw; display: grid; place-items: center; text-align: center;
  border: .35cqw solid #e03131; border-radius: .6cqw; color: #e03131; font: 1.1cqw/1.15 var(--display); transform: rotate(-8deg); opacity: .82;
  box-shadow: inset 0 0 0 .2cqw rgba(224, 49, 49, .3); background: rgba(255, 255, 255, .25); }
.cert-qr { justify-self: end; display: grid; justify-items: center; gap: .2cqw; width: 9cqw; }
.cert-qr svg { width: 100%; height: auto; background: #fff; border-radius: .4cqw; }
.cert-qr small { font-size: 1cqw; font-weight: 800; white-space: nowrap; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { height: auto; overflow: visible; background: #fff; }
  .backdrop, .top, .no-print, .demo-ribbon, .toast, .camp-banner-slot, .season-pick, .sorter, .live-float { display: none !important; }
  .page { position: static; padding: 0; overflow: visible; }
  .print-area { display: block; }
  .cert-wrap { width: 297mm; break-after: page; page-break-after: always; }
  .cert { height: 210mm; aspect-ratio: auto; border-radius: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 좁은 화면(휴대폰 세로) ---------- */
@media (max-width: 700px), (max-height: 520px) and (orientation: landscape) {
  .top { gap: 8px; padding-left: 14px; padding-right: 12px; }
  .brand b { font-size: clamp(1.05rem, 5vw, 1.5rem); text-shadow: 0 3px 0 rgba(0, 0, 0, .28); }
  .brand small { font-size: clamp(.68rem, 3vw, .78rem); margin-top: 3px; }
  .top nav { gap: 6px; }
  .top nav .btn { min-height: 38px; padding: .2em .6em; font-size: .9rem; border-radius: 11px; box-shadow: 0 4px 0 var(--ink); }
  .top nav .label { display: none; }
  .top nav .label-short { display: inline; }
  .top.solid [data-sound] { display: none; }
  .hint { display: none; }
  .demo-ribbon { bottom: 110px; }
  .select-screen .shelf { top: 116px; }
}
@media (max-width: 700px) {
  :root { --tile: 26vw; --gap-x: 4.5vw; --gap-y: 5.5vw; }
  .shelf { top: max(72px, calc(env(safe-area-inset-top) + 62px)); bottom: 112px; overflow-x: hidden; overflow-y: auto; display: block; }
  .select-screen .shelf { top: max(116px, calc(env(safe-area-inset-top) + 106px)); }
  .shelf-empty { padding-top: 12vh; }
  .sorter { left: 10px; right: 10px; top: max(66px, calc(env(safe-area-inset-top) + 56px)); max-width: none; gap: 6px; }
  .sorter-btn, .sorter-search, .sorter-count { height: 36px; border-radius: 11px; }
  .sorter-btn b { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; }
  .sorter-search { flex: 1; min-width: 0; }
  .sorter-search input, .sorter-search:focus-within input { width: 100%; min-width: 0; }
  .sorter-count { padding-left: 8px; font-size: .8rem; }
  .sorter-pop { right: 0; }
  .sorter-panel { width: auto; max-height: 62vh; }
  .grid { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(3, var(--tile)); grid-auto-rows: var(--tile); justify-content: center; padding: 22px 0 40px; }
  .tile { --dy: 0px !important; }
  .badge-new { font-size: .9rem; right: -10px; top: -12px; padding: 1px 8px 2px; }
  .badge-medal { transform: scale(.75); top: -16px; right: -16px; }
  .cursor { inset: -10px; }
  .cursor i { border-width: 8px; }
  .bar { height: 100px; padding-left: 104px; padding-right: 12px; gap: 10px; }
  .bar::before { left: 22px; }
  .nameplate { left: 12px; bottom: 10px; }
  .nameplate .who { width: 70px; height: 70px; font-size: 42px; border-width: 4px; border-radius: 14px; }
  .nameplate .plate { font-size: .95rem; max-width: 92px; }
  .bar .title { font-size: 1.5rem; }
  .bar .desc { font-size: .85rem; }
  .bar .stats { display: none; }
  .bar .btn.vote .label { display: none; }
  .camp-banner-slot { top: auto; bottom: 108px; }
  .season-pick { right: 10px; bottom: 150px; }
  .camp-banner { font-size: .82rem; padding: 6px 12px; }
  .btn.start { font-size: 1.2rem; padding: .2em .7em; }
  .preview-wrap { grid-template-columns: 1fr; }
  .play-top { flex-wrap: wrap; row-gap: 8px; }
  .play-top h1 { font-size: 1.15rem; }
  .play-top .tools { order: 3; width: 100%; justify-content: space-between; }
  .play-top .tools .btn { flex: 1; }
  .play-top .tools .label { display: none; }
  .recipe { top: auto; bottom: 64px; left: 10px; right: 10px; width: auto; max-height: 60%; }
  .panel { padding: 18px 16px 22px; border-radius: 20px; }
  .panel h1 { font-size: 1.6rem; }
  .page { padding: 74px 12px 40px; }
}
@media (max-width: 380px) {
  .top nav .label-short { display: none; }
  .brand b { font-size: clamp(.95rem, 5.2vw, 1.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 움직임·디테일 ---------- */
/* 불러오는 동안 빈 칸이 반짝반짝 */
.grid.skeleton .tile .face { background: linear-gradient(110deg, #3d4b7c 30%, #6274b0 50%, #3d4b7c 70%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; opacity: .55; }
.grid.skeleton .tile:nth-child(3n+2) .face { animation-delay: .15s; }
.grid.skeleton .tile:nth-child(3n) .face { animation-delay: .3s; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* 고른 칸: 빛이 한 번 쓱 지나가요 */
.tile.selected .face::before {
  content: ''; position: absolute; inset: -20%; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 48%, transparent 58%);
  transform: translateX(-100%); animation: glare .9s .1s ease-out forwards;
}
@keyframes glare { to { transform: translateX(100%); } }
.tile.empty.selected .face::before { display: none; }

/* 아래 정보 띠: 고를 때마다 글자가 톡 올라와요 */
.bar .info { animation: bar-in .28s ease-out; }
.bar .nameplate .who { animation: who-in .35s cubic-bezier(.2, 1.6, .4, 1); }
.bar .actions { animation: bar-in .32s ease-out; }
@keyframes bar-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes who-in { from { transform: scale(.6) rotate(-12deg); } }
.btn.start { animation: start-glow 2.4s ease-in-out infinite; }
@keyframes start-glow { 0%, 100% { outline: 0 solid rgba(255, 212, 59, 0); } 50% { background-color: #ffe98a; outline: 7px solid rgba(255, 212, 59, .5); } }

/* NEW 배지 까딱, 메달 반짝 */
.badge-new { animation: wiggle 2.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(-8deg) skewX(-6deg); } 78% { transform: rotate(4deg) skewX(-6deg) scale(1.08); } 86% { transform: rotate(-12deg) skewX(-6deg); } }
.badge-medal::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%) 0 0 / 250% 100%; animation: shine 2.8s ease-in-out infinite; mix-blend-mode: overlay; }
@keyframes shine { 0%, 60% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
.badge-vote { animation: hop .4s ease-out; }

/* 버튼: 마우스를 올리면 살짝 떠올라요 */
@media (hover: hover) {
  .btn:not([disabled]):hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
  .btn.small:not([disabled]):hover { box-shadow: 0 6px 0 var(--ink); }
  .btn.dark:not([disabled]):hover { box-shadow: 0 7px 0 #000; }
  .react:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #000; }
  .btn:not([disabled]):active, .react:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
}
.react { transition: transform .08s, box-shadow .08s, background .2s; }
.react b.bump { display: inline-block; animation: bump .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bump { from { transform: scale(1.9); color: #e8590c; } }

/* 알림: 통통 튀며 등장 */
.toast { animation: toast-in 3.2s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes toast-in {
  0% { opacity: 0; transform: translate(-50%, -24px) scale(.8); }
  7% { opacity: 1; transform: translate(-50%, 4px) scale(1.04); }
  11%, 86% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(.96); }
}

/* 페이지·패널 등장 */
.page > .panel, .page > .cert-tools { animation: panel-in .4s cubic-bezier(.2, 1.25, .4, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(28px) scale(.98); } }
.play-screen .play-top { animation: drop-in .3s ease-out; }
@keyframes drop-in { from { transform: translateY(-100%); } }
.play-screen .reactions { animation: rise-in .35s ease-out; }
@keyframes rise-in { from { transform: translateY(100%); } }
dialog[open] { animation: pop-in .2s ease-out; }

/* 앱 불러오는 중 · START! */
.stage-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: #f3f5fb; color: #445; }
.stage-loading .tile { animation: float 1.2s ease-in-out infinite alternate; }
.stage-loading b { font: 1.3rem var(--display); }
.stage-loading b i { font-style: normal; animation: dot 1s infinite; }
.stage-loading b i:nth-child(2) { animation-delay: .2s; }
.stage-loading b i:nth-child(3) { animation-delay: .4s; }
@keyframes float { to { transform: translateY(-14px) rotate(3deg); } }
@keyframes dot { 50% { opacity: .15; } }
.start-splash { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.start-splash b {
  font: clamp(3rem, 12vw, 8rem) var(--display); color: var(--yellow); letter-spacing: .06em;
  text-shadow: -5px -5px 0 #111, 5px -5px 0 #111, -5px 5px 0 #111, 5px 5px 0 #111, 0 10px 0 #111;
  animation: splash 1s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
@keyframes splash {
  0% { opacity: 0; transform: scale(.3) rotate(-8deg); }
  30% { opacity: 1; transform: scale(1.08) rotate(-3deg); }
  65% { opacity: 1; transform: scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: scale(1.6) rotate(-3deg); }
}

/* 이모지 퐁퐁 · 색종이 */
.burst-layer { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.burst-layer i { position: absolute; left: -.6em; top: -.6em; font-size: 1.6rem; font-style: normal; animation: burst var(--d) cubic-bezier(.15, .8, .3, 1) forwards; }
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) scale(.4); }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.15) rotate(var(--r)); }
}
.confetti-layer { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
.done-panel h1 { animation: party-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.done-tile .tile { animation: float 1.4s ease-in-out infinite alternate; }

/* 팀 카드·시상대에도 살짝 */
.team-card { animation: panel-in .45s cubic-bezier(.2, 1.25, .4, 1) backwards; }
.team-card:nth-child(2) { animation-delay: .05s; }
.team-card:nth-child(3) { animation-delay: .1s; }
.team-card:nth-child(n+4) { animation-delay: .15s; }
.team-card .tile { transition: transform .15s; }
.team-card .tile:hover { transform: translateY(-5px) rotate(-2deg); }

/* ---------- 링크 앱이 막혔을 때 ---------- */
.link-help {
  position: absolute; inset: 0; z-index: 4; overflow: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 18px;
  background: radial-gradient(circle at 50% 0%, #fff 0, #eef2ff 60%, #dfe6ff 100%); text-align: center;
  animation: panel-in .35s cubic-bezier(.2, 1.25, .4, 1);
}
.link-help.maybe { background: rgba(238, 242, 255, .97); }
.link-help h2 { margin: 6px 0 0; font: clamp(1.25rem, 3.4vw, 1.8rem) / 1.25 var(--display); word-break: keep-all; }
.link-help > p { margin: 0; max-width: 34em; word-break: keep-all; }
.link-help .tile { flex: none; animation: float 1.4s ease-in-out infinite alternate; }
.link-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.link-help-close { position: absolute; top: 12px; right: 12px; }
.owner-tip { max-width: 34em; margin-top: 8px; padding: 10px 14px; border: 3px dashed #adb5bd; border-radius: 14px; background: #fff; text-align: left; }
.owner-tip summary { cursor: pointer; font-weight: 800; }
.owner-tip ol { margin: 10px 0 6px; padding-left: 1.3em; display: grid; gap: 6px; line-height: 1.5; }
.owner-tip .link-ways { justify-content: flex-start; }
.link-copied {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 3px 10px; border: 2px solid #fff; border-radius: 999px;
  background: rgba(17, 17, 17, .72); color: #fff; font-size: .8rem; font-weight: 800; pointer-events: none;
  animation: fade-late 6s forwards;
}
@keyframes fade-late { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.link-state .notice { margin: 10px 0 0; line-height: 1.6; }
.link-state .notice .btn { margin-top: 6px; }
@media (max-width: 700px) {
  .link-help { justify-content: flex-start; padding-top: 18px; }
  .link-ways .btn { flex: 1 1 100%; }
}

/* ---------- 앱 오류 도우미 ---------- */
.app-doctor { z-index: 4; }
.stage > .app-doctor { position: absolute; left: 10px; bottom: 10px; max-width: min(460px, calc(100% - 20px)); }
.app-doctor.open { padding: 12px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff4e6; box-shadow: 0 6px 0 rgba(0, 0, 0, .35); animation: pop-in .2s ease-out; }
.app-doctor.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doc-x { border: 0; background: none; font-size: 1.1rem; font-weight: 900; }
.app-doctor ul { margin: 8px 0; padding-left: 1.1em; display: grid; gap: 6px; }
.app-doctor li { font-weight: 700; }
.app-doctor li small { display: block; color: #6c757d; font-weight: 500; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; word-break: break-all; }
.doc-chip { padding: 5px 12px; border: 3px solid var(--ink); border-radius: 999px; background: #ffd8a8; font-weight: 900; box-shadow: 0 4px 0 var(--ink); animation: wiggle-chip 2s ease-in-out infinite; }
@keyframes wiggle-chip { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-6deg); } 92% { transform: rotate(6deg); } }
.preview-doctor .app-doctor { margin-top: 10px; }
.react.report-react { padding: 4px 10px; background: #f1f3f5; }
.report-reasons { display: grid; gap: 8px; margin: 12px 0 16px; text-align: left; }
.report-reasons label { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 2px solid #dee2e6; border-radius: 12px; font-weight: 700; cursor: pointer; }
.report-reasons label:has(input:checked) { border-color: var(--red); background: #fff5f5; }

/* ---------- 진행 현황판 · 신고 ---------- */
.report-admin.alert { border-color: var(--red) !important; background: #fff5f5; animation: shake .45s; }
.report-badge:not(:empty) { padding: 4px 10px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 900; animation: hop .4s; }
.report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.report-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 2px solid #ffc9c9; border-radius: 12px; background: #fff; }
.report-count { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 900; font-size: .85rem; }
.report-reasons-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.report-reasons-mini span { padding: 1px 8px; border-radius: 999px; background: #f1f3f5; font-size: .8rem; font-weight: 700; }
.pg-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.pg-big { display: flex; align-items: baseline; gap: 4px; font: 1.1rem var(--display); }
.pg-big b { font-size: 2.2rem; color: var(--sky-1); }
.pg-big small { margin-left: 4px; font: 700 .9rem var(--body); color: #555; }
.pg-bar { flex: 1 1 160px; height: 16px; border: 3px solid var(--ink); border-radius: 999px; background: #f1f3f5; overflow: hidden; }
.pg-bar i { display: block; height: 100%; width: var(--p); background: repeating-linear-gradient(-45deg, var(--green) 0 10px, #74c043 10px 20px); transition: width .6s cubic-bezier(.2, 1.2, .4, 1); animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }
.pg-chip { padding: 4px 10px; border-radius: 999px; background: #edf2ff; font-weight: 800; font-size: .9rem; }
.pg-chip.warn { background: #fff3bf; }
.pg-chip.good { background: #d3f9d8; }
.pg-table td, .pg-table th { text-align: center; }
.pg-table td:first-child, .pg-table td:nth-child(3) { text-align: left; }
.pg-table tr.pg-wait td { background: #fffbe6; }
.pg-dot { color: #ced4da; font-size: 1.1rem; }
.pg-dot.on { color: #2b8a3e; }
.pg-tag { padding: 0 6px; border-radius: 6px; background: #ffe3e3; color: #c92a2a; font-size: .75rem; font-weight: 800; }
.pg-roster { margin-top: 12px; }
.pg-roster summary { cursor: pointer; font-weight: 800; }
.pg-roster textarea { min-height: 130px; font-family: var(--body); }

/* ---------- 발표 모드 ---------- */
.present-setup h2 { margin-top: 20px; }
.present-families { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.present-fam { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); transition: transform .1s; }
.present-fam:hover { transform: translateY(-3px); }
.present-fam b { font-size: .95rem; }
.present-fam small { color: #666; font-weight: 700; }
.present-fam.done { opacity: .5; background: #e9ecef; }
.present-fam.done .tile { filter: grayscale(.8); }
.present { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: linear-gradient(170deg, var(--sky-1), #1b1f8a); color: #fff; }
.present-head { display: flex; align-items: center; gap: 24px; padding: 14px 24px; }
.present-head .brand b { font-size: 1.5rem; }
.present-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; animation: bar-in .4s ease-out; }
.present-avatar { flex: none; width: 76px; height: 76px; display: grid; place-items: center; font-size: 48px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 #0006; }
.present-who div { min-width: 0; display: grid; }
.present-who b { font: clamp(1.6rem, 3vw, 2.6rem) / 1.1 var(--display); color: var(--yellow); text-shadow: 0 3px 0 #000; }
.present-who div > span { font: clamp(1.1rem, 2vw, 1.6rem) var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.present-who small { color: #dbe4ff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.present-timer {
  --p: 1; position: relative; flex: none; width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 360deg), rgba(255, 255, 255, .15) 0); box-shadow: 0 6px 0 #0006;
}
.present-timer::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #111; }
.present-clock { position: relative; font: 2.6rem var(--display); letter-spacing: .02em; }
.present-timer.warn { background: conic-gradient(var(--yellow) calc(var(--p) * 360deg), rgba(255, 255, 255, .15) 0); }
.present-timer.danger { background: conic-gradient(#ff6b6b calc(var(--p) * 360deg), rgba(255, 255, 255, .15) 0); }
.present-timer.danger .present-clock { color: #ff8787; }
.present-timer.danger.running { animation: pulse .5s ease-in-out infinite; }
.present-main { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding: 0 24px; min-height: 0; }
.present-tabs { display: flex; gap: 8px; }
.present-tabs .chip { color: var(--ink); }
.present-stage { position: relative; min-height: 0; border: 6px solid #fff; border-radius: 18px; background: #fff; overflow: hidden; box-shadow: 0 10px 0 #0005; color: var(--ink); }
.present-qr { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; font: 1.4rem var(--display); }
.present-qr .qr { width: min(46vh, 380px); }
.present-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 14px 24px 18px; }
.present-controls .btn { font-size: 1.1rem; }
.present-left { font-weight: 800; color: #dbe4ff; }
.present-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(10, 14, 70, .82); }
.present-overlay[hidden] { display: none; }
.present-timeup, .present-finale { display: grid; justify-items: center; gap: 10px; text-align: center; font: clamp(2.4rem, 6vw, 5rem) var(--display); color: var(--yellow); text-shadow: 0 6px 0 #000; animation: party-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.present-timeup small, .present-finale p { font: 700 clamp(1rem, 2vw, 1.6rem) var(--body); color: #fff; text-shadow: none; margin: 0; }
.present-finale h2 { margin: 0; font: inherit; }
.roulette { display: grid; justify-items: center; gap: 24px; padding: 20px; }
.roulette h2 { margin: 0; font: clamp(2rem, 5vw, 4rem) var(--display); color: var(--yellow); text-shadow: 0 5px 0 #000; }
.roulette-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; max-width: 1100px; }
.roulette-item { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 18px; transition: transform .08s, background .08s; }
.roulette-item b { font-weight: 800; }
.roulette-item.on { background: rgba(255, 212, 59, .35); transform: scale(1.12); }
.roulette-item.win { background: var(--yellow); color: var(--ink); transform: scale(1.25); animation: hop .4s ease-out 2; }
@media (max-width: 800px) {
  .present-head { flex-wrap: wrap; gap: 12px; padding: 10px 12px; }
  .present-head .brand { display: none; }
  .present-timer { width: 96px; height: 96px; }
  .present-clock { font-size: 1.6rem; }
  .present-avatar { width: 56px; height: 56px; font-size: 34px; }
  .present-main { padding: 0 10px; }
  .present-controls { gap: 8px; padding: 10px; }
  .present-controls .btn { font-size: .95rem; padding: .3em .7em; }
}

/* ---------- 부탁 문장 만들기 도우미 ---------- */
.wizard { max-width: 1100px; }
.wiz-meter { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.wiz-dots { display: flex; gap: 6px; }
.wiz-dots i { width: 34px; height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: #f1f3f5; transition: background .3s; }
.wiz-dots i.on { background: var(--green); animation: hop .35s ease-out; }
.wiz-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.wiz-step { padding: 4px 0 12px; border-bottom: 2px dashed #e9ecef; }
.wiz-step h2 { margin-top: 14px; }
.wiz-step .chips { margin: 8px 0; }
.wiz-step .input + .input { margin-top: 8px; }
.wiz-examples .chip { background: #fff9db; font-size: .82rem; }
.wiz-kinds .chip { font-size: 1rem; padding: 7px 14px; }
.wiz-preview { position: sticky; top: 90px; padding: 16px; border: 4px solid var(--ink); border-radius: 20px; background: #f4f7ff; box-shadow: 0 8px 0 rgba(0, 0, 0, .2); }
.wiz-preview h2 { margin: 0 0 10px; }
.wiz-prompt { max-height: 46vh; overflow: auto; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border-left: 6px solid var(--yellow); white-space: pre-wrap; font: 600 .9rem / 1.6 var(--body); }
.wiz-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wiz-cta { font-size: 1.1rem; }
@media (max-width: 860px) {
  .wiz-grid { grid-template-columns: 1fr; }
  .wiz-preview { position: static; }
}

/* ---------- 캠프 전 점검 ---------- */
.check-codes { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin: 12px 0; }
.check-codes .field { margin: 0; }
.check-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 10px; }
.check-total { padding: 4px 12px; border-radius: 999px; font-weight: 900; background: #f1f3f5; }
.check-total.ok { background: #d3f9d8; } .check-total.warn { background: #fff3bf; } .check-total.bad { background: #ffe3e3; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 3px solid #dee2e6; border-radius: 14px; background: #fff; animation: panel-in .3s ease-out; }
.check-row.ok { border-color: #8ce99a; } .check-row.warn { border-color: #ffd43b; background: #fffbe6; } .check-row.bad { border-color: #ff8787; background: #fff5f5; }
.check-icon { font-size: 1.5rem; line-height: 1; }
.check-row.wait .check-icon { animation: spin 1.2s linear infinite; display: inline-block; }
.check-row p { margin: 4px 0 0; }
.check-fix { display: block; margin-top: 4px; color: #495057; font-weight: 700; }
@media (max-width: 700px) { .check-codes { grid-template-columns: 1fr; } }

/* ---------- 가족 QR 카드 ---------- */
.cards-area { display: grid; justify-items: center; gap: 24px; overflow-x: auto; padding-bottom: 20px; }
.cards-sheet { display: grid; grid-template-columns: repeat(2, 85mm); grid-auto-rows: 54mm; justify-content: center; align-content: start; width: 190mm; padding: 4mm 0; background: #fff; box-shadow: 0 10px 30px #0003; animation: panel-in .4s cubic-bezier(.2, 1.25, .4, 1); }
.qr-card { width: 85mm; height: 54mm; padding: 3mm 3.5mm; display: flex; flex-direction: column; gap: 1.6mm; border: .3mm dashed #adb5bd; background: #fff; color: var(--ink); font-size: 3mm; overflow: hidden; }
.qc-top { display: flex; align-items: center; gap: 1.5mm; font-size: 2.6mm; }
.qc-top img { width: 4.2mm; height: 4.2mm; border-radius: 1mm; }
.qc-top b { color: var(--sky-1); font-family: var(--display); font-weight: 400; font-size: 3mm; }
.qc-top span { margin-left: auto; color: #6c757d; font-weight: 700; }
.qc-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 24mm minmax(0, 1fr) 23mm; gap: 2.5mm; align-items: center; }
.qc-tile { --tile: 24mm; }
.qc-tile .face { box-shadow: inset 0 -1mm 0 rgba(0, 0, 0, .15); }
.qc-text { display: grid; gap: 1mm; min-width: 0; }
.qc-title { font: 4.3mm / 1.15 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.qc-team { color: #e8590c; font-weight: 800; font-size: 3mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-text small { font-size: 2.3mm; color: #495057; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qc-qr svg { display: block; width: 23mm; height: 23mm; }
.qc-foot { display: flex; justify-content: space-between; gap: 2mm; white-space: nowrap; overflow: hidden; padding-top: 1.2mm; border-top: .3mm dashed #dee2e6; font-size: 2.2mm; color: #495057; font-weight: 700; }
.qc-foot b { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); }
.cards-page .chips { display: inline-flex; }
@media print {
  @page cards { size: A4 portrait; margin: 10mm; }
  .cards-area { display: block; overflow: visible; padding: 0; }
  .cards-sheet { page: cards; margin: 0; padding: 0; box-shadow: none; break-after: page; animation: none; }
  .cards-sheet:last-child { break-after: auto; }
  .qr-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 발명 성장 기록 ---------- */
.growth-line { list-style: none; margin: 6px 0; padding: 4px 2px 8px; display: flex; gap: 10px; overflow-x: auto; }
.growth-line li { position: relative; flex: none; display: grid; justify-items: center; gap: 3px; width: 92px; text-align: center; }
.growth-line li:not(:last-child)::after { content: '➜'; position: absolute; right: -12px; top: 22px; color: #adb5bd; font-weight: 900; }
.growth-line .tile .team-tag { display: none; }
.growth-line b { font: .95rem var(--display); }
.growth-line small { color: #6c757d; font-size: .72rem; }
.growth-line .growth-name { color: #495057; font-weight: 700; }
.growth-line .btn.small { min-height: 28px; font-size: .78rem; padding: .1em .5em; }
.growth-now b { color: #2b8a3e; }
.growth-now .tile { animation: hop .5s ease-out; }
.version-banner {
  position: absolute; left: 50%; top: 10px; z-index: 4; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border: 3px solid var(--ink); border-radius: 999px;
  background: #fff3bf; font-weight: 800; box-shadow: 0 5px 0 rgba(0, 0, 0, .3); white-space: nowrap; animation: banner-in .3s ease-out;
}
@keyframes banner-in { from { transform: translate(-50%, -150%); } }

/* ---------- 업적 배지 ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border: 2px solid var(--ink); border-radius: 999px; background: linear-gradient(#fff9db, #ffe066); font-weight: 800; font-size: .85rem; box-shadow: 0 3px 0 var(--ink); cursor: help; animation: pop-in .3s ease-out backwards; }
.badge i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; font-style: normal; font-size: .95rem; }
.badge:nth-child(2) { animation-delay: .05s; } .badge:nth-child(3) { animation-delay: .1s; } .badge:nth-child(n+4) { animation-delay: .15s; }
.badge.locked { background: #f1f3f5; color: #6c757d; border-color: #ced4da; box-shadow: 0 3px 0 #ced4da; }
.badge.locked i { filter: grayscale(1); opacity: .5; }
.done-badges .badge-row { justify-content: center; }

/* ---------- 캠프 앨범 ---------- */
.album-tools { max-width: 980px; margin: 0 auto 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.album { max-width: 980px; margin: 0 auto; overflow: hidden; background: #fff; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 12px 0 rgba(0, 0, 0, .25); animation: panel-in .45s cubic-bezier(.2, 1.25, .4, 1); }
.album-hero { padding: 34px 28px 26px; text-align: center; color: #fff; background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(160deg, var(--sky-1), var(--sky-2) 60%, #7b8cff); }
.album-kicker { margin: 0; font-weight: 800; opacity: .85; letter-spacing: .08em; }
.album-hero h1 { margin: 6px 0 8px; font: clamp(1.8rem, 5vw, 2.8rem) / 1.15 var(--display); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.album-hero > p { margin: 0 auto; max-width: 36em; }
.album-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.album-stat { min-width: 92px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .35); }
.album-stat b { display: block; font: 2rem var(--display); color: var(--yellow); }
.album-stat span { font-weight: 700; font-size: .85rem; }
.album section > h2 { margin: 0 0 14px; font: 1.5rem var(--display); }
.album-awards, .album-families { padding: 26px 28px; }
.album-awards { background: linear-gradient(#fff9db, #fff); }
.album-podium { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.album-award { position: relative; display: grid; justify-items: center; gap: 6px; width: 170px; padding: 16px 10px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 5px 0 var(--ink); }
.album-award.rank1 { background: linear-gradient(#ffe066, #fff3bf); transform: translateY(-8px); }
.album-medal { position: absolute; top: -18px; font-size: 2.2rem; }
.album-award small { color: #555; font-weight: 700; }
.album-family { padding: 18px 0; border-top: 2px dashed #e9ecef; break-inside: avoid; }
.album-family > header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.album-avatar { width: 54px; height: 54px; display: grid; place-items: center; font-size: 34px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.album-family h3 { margin: 0; font: 1.4rem var(--display); }
.album-family h3 a { color: inherit; text-decoration: none; }
.album-badges { font-size: 1.1rem; letter-spacing: .1em; }
.album-app { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: start; margin: 10px 0 14px; break-inside: avoid; }
.album-app-text h4 { margin: 2px 0 6px; font: 1.2rem var(--display); }
.album-app-text p { margin: 0 0 6px; line-height: 1.55; }
.album-problem { padding: 8px 12px; border-left: 5px solid #74c0fc; border-radius: 10px; background: #f1f8ff; }
.album-prompt { white-space: pre-wrap; padding: 8px 12px; border-radius: 10px; background: #f8f9fa; font-size: .9rem; }
.album-rank { padding: 1px 8px; border-radius: 999px; background: #ffe066; font: 800 .8rem var(--body); vertical-align: middle; }
.album-foot { display: flex; align-items: center; gap: 18px; padding: 22px 28px; background: #f4f7ff; border-top: 3px solid var(--ink); }
.album-qr { flex: none; width: 110px; }
.album-foot p { margin: 0; line-height: 1.6; }
@media (max-width: 600px) {
  .album-app { grid-template-columns: 1fr; justify-items: start; }
  .album-awards, .album-families { padding: 20px 16px; }
}
@media print {
  @page album { size: A4 portrait; margin: 12mm; }
  .album-page { page: album; }
  .album { border: 0; box-shadow: none; border-radius: 0; animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 스탬프 랠리 ---------- */
.rally-chip { display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fff3bf; box-shadow: 0 4px 0 var(--ink); font-weight: 900; color: var(--ink); text-decoration: none; white-space: nowrap; }
.rally-chip:hover { transform: translateY(-2px); }
.rally-chip.done { background: linear-gradient(#ffe066, #fab005); animation: wiggle-chip 2.4s ease-in-out infinite; }
.rally-card { margin: 16px 0; padding: 20px; border: 4px dashed #f08c00; border-radius: 22px; background: repeating-linear-gradient(45deg, #fff9db 0 14px, #fff3bf 14px 28px); text-align: center; }
.rally-card.done { border-style: solid; border-color: #f59f00; box-shadow: 0 0 0 6px #ffe066; }
.rally-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.rally-slot { position: relative; width: 96px; height: 96px; display: grid; place-items: center; border: 3px dashed #adb5bd; border-radius: 50%; background: #fff; text-decoration: none; }
.rally-slot > b { font: 2rem var(--display); color: #dee2e6; }
.rally-slot .tile .team-tag { display: none; }
.rally-slot.on { border: 0; background: none; }
.rally-stamp { position: absolute; right: -8px; bottom: -6px; padding: 2px 8px; border: 3px solid #e03131; border-radius: 10px; color: #e03131; background: rgba(255, 255, 255, .85); font: 1.1rem var(--display); font-style: normal; transform: rotate(-14deg); animation: stamp-in .35s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.rally-slot:nth-child(2) .rally-stamp { animation-delay: .08s; } .rally-slot:nth-child(3) .rally-stamp { animation-delay: .16s; } .rally-slot:nth-child(n+4) .rally-stamp { animation-delay: .24s; }
@keyframes stamp-in { from { transform: rotate(-14deg) scale(2.4); opacity: 0; } }
.rally-count { margin: 14px 0 0; font: 1.6rem var(--display); }
.rally-todo { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.rally-next { display: grid; justify-items: center; gap: 4px; padding: 10px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.rally-next small { color: #666; font-weight: 700; }
.rally-win { text-align: center; }
.rally-medal { font-size: 5rem; animation: party-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
@media (max-width: 700px) { .rally-chip { height: 36px; padding: 0 8px; font-size: .85rem; } .rally-slot { width: 78px; height: 78px; } .rally-slot .tile { --tile: 62px !important; } }

/* ---------- 칭찬 쪽지 ---------- */
.react.note-react { background: #ffe3ec; }
.note-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
.note-choices label { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 2px solid #dee2e6; border-radius: 12px; font-weight: 700; cursor: pointer; }
.note-choices label:has(input:checked) { border-color: #f06595; background: #fff0f6; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.note-list li { padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: #fff0f6; border: 2px solid #fcc2d7; animation: pop-in .25s ease-out backwards; }
.note-list li:nth-child(2) { animation-delay: .05s; } .note-list li:nth-child(n+3) { animation-delay: .1s; }
.note-text { font-weight: 800; }
.note-count { margin-left: 6px; color: #d6336c; }
.note-list small { display: block; color: #6c757d; font-weight: 700; }

/* ---------- 투표 실시간 레이스 ---------- */
.race { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 18px 28px; color: #fff; background: radial-gradient(circle at 50% -20%, #5c7cfa, #1b1f8a 70%); }
.race-head { display: flex; align-items: center; gap: 24px; }
.race-head > div:first-child { flex: 1; }
.race-kicker { margin: 0; font-weight: 800; opacity: .8; }
.race-head h1 { margin: 0; font: clamp(1.8rem, 4vw, 3.4rem) var(--display); color: var(--yellow); text-shadow: 0 5px 0 #000; }
.race-total { text-align: center; }
.race-total b { display: block; font: clamp(2.6rem, 6vw, 5rem) / 1 var(--display); color: #fff; text-shadow: 0 5px 0 #000; }
.race-total span { font-weight: 800; color: #dbe4ff; }
.race-total.bump b { animation: bump .6s cubic-bezier(.2, 1.8, .4, 1); }
.race-join { display: grid; justify-items: center; gap: 4px; }
.race-qr { width: 96px; padding: 4px; background: #fff; border-radius: 10px; }
.race-board { --row: calc(100% / var(--n)); --row-tile: clamp(26px, calc((100vh - 260px) / var(--n) - 10px), 64px); position: relative; min-height: 0; }
.race-row { position: absolute; left: 0; right: 0; top: calc(var(--row) * var(--i, 0)); height: var(--row); display: grid; grid-template-columns: 2.2em minmax(140px, 26%) 1fr 3em; align-items: center; gap: 12px; transition: top .8s cubic-bezier(.3, 1.3, .5, 1); }
.race-rank { font: 1.6rem var(--display); text-align: center; color: var(--yellow); }
.race-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.race-who .tile .team-tag, .race-who .tile .badge-new { display: none; }
.race-name { display: grid; min-width: 0; }
.race-name b { font: clamp(.9rem, 1.8vw, 1.4rem) var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-name small { color: #dbe4ff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-track { height: min(60%, 38px); border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.race-bar { display: block; height: 100%; width: var(--w, 0%); min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, #ffd43b, #ff922b); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); transition: width .9s cubic-bezier(.3, 1.3, .5, 1); }
.hidden-rank .race-bar { background: linear-gradient(90deg, #74c0fc, #b197fc); }
.race-n { font: 1.6rem var(--display); }
.race-row.flash .race-track { animation: flash-row 1s ease-out; }
@keyframes flash-row { 0%, 30% { box-shadow: 0 0 0 4px var(--yellow), 0 0 24px var(--yellow); } }
.race-controls { display: flex; justify-content: center; gap: 12px; }
.race-empty { text-align: center; font-size: 1.4rem; }
@media (max-width: 700px) { .race { padding: 12px; } .race-join { display: none; } .race-row { grid-template-columns: 1.6em minmax(90px, 34%) 1fr 2.2em; gap: 6px; } }

/* ---------- 소감 · 발명 노트 ---------- */
.reflect { margin: 4px 0 16px; padding: 10px 14px; border: 3px dashed #b197fc; border-radius: 14px; background: #f8f0fc; }
.reflect summary { cursor: pointer; font-weight: 800; }
.reflect .field { margin: 10px 0 0; }
.reflect-list { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.cert-proud { border-color: #f783ac !important; }
.album-proud { padding: 8px 12px; border-left: 5px solid #f783ac; border-radius: 10px; background: #fff0f6; }
.note-page { overflow-x: auto; }
.inv-note { width: 190mm; min-height: 270mm; margin: 0 auto; padding: 10mm 12mm; display: flex; flex-direction: column; gap: 4mm; background: #fff; color: var(--ink); box-shadow: 0 10px 30px #0003; font-size: 3.6mm; animation: panel-in .4s ease-out; }
.inv-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 3mm; border-bottom: .8mm solid var(--ink); }
.inv-kicker { margin: 0; color: #6c757d; font-weight: 800; font-size: 3mm; }
.inv-head h1 { margin: 1mm 0 0; font: 8mm var(--display); color: var(--sky-1); }
.inv-family { display: flex; align-items: center; gap: 2mm; font: 6mm var(--display); }
.inv-avatar { width: 12mm; height: 12mm; display: grid; place-items: center; border: .6mm solid var(--ink); border-radius: 3mm; font-size: 8mm; }
.inv-note section h2 { display: flex; align-items: center; gap: 2mm; margin: 0 0 1.5mm; font: 4.6mm var(--display); }
.inv-note section h2 i { display: grid; place-items: center; width: 6mm; height: 6mm; border-radius: 50%; background: var(--sky-1); color: #fff; font: 3.4mm var(--display); font-style: normal; }
.note-fill { margin: 0; padding: 2mm 3mm; border-radius: 2mm; background: #f4f7ff; white-space: pre-wrap; line-height: 1.5; }
.inv-prompt { font-size: 3mm; }
.note-lines { display: grid; gap: 6mm; padding: 3mm 1mm 1mm; }
.note-lines i { display: block; border-bottom: .3mm dashed #adb5bd; }
.inv-app { display: grid; grid-template-columns: 30mm 1fr 26mm; gap: 4mm; align-items: center; }
.inv-title { font: 5.4mm var(--display); }
.inv-app p { margin: 1mm 0 0; }
.inv-qr { display: grid; justify-items: center; font-size: 2.6mm; color: #555; }
.inv-qr svg { width: 24mm; height: 24mm; }
.inv-growth { display: flex; align-items: center; gap: 3mm; flex-wrap: wrap; }
.inv-growth > span { display: grid; justify-items: center; font-size: 2.8mm; }
.inv-growth .tile .team-tag { display: none; }
.inv-reflect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.inv-reflect h2 { grid-column: 1 / -1; }
.inv-reflect h3 { margin: 0 0 1mm; font-size: 3.4mm; }
.inv-notes { margin: 0; color: #c2255c; font-weight: 700; }
.inv-foot { margin-top: auto; display: grid; grid-template-columns: 1fr 60mm; gap: 6mm; align-items: end; padding-top: 3mm; border-top: .5mm solid var(--ink); }
.inv-foot h3 { margin: 0; font-size: 3.6mm; }
.inv-sign { display: grid; grid-template-columns: auto 1fr; gap: 3mm 2mm; align-items: end; font-weight: 800; }
.inv-sign i { border-bottom: .3mm solid #495057; height: 6mm; }
@media print {
  @page note { size: A4 portrait; margin: 10mm; }
  .note-page { page: note; overflow: visible; }
  .inv-note { width: auto; min-height: 270mm; padding: 0; box-shadow: none; animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.album-notes { color: #c2255c; font-weight: 700; }

/* ---------- 바뀐 코드 보기 ---------- */
dialog.modal:has(.diff-modal) { width: min(960px, 96vw); }
.diff-sum { display: flex; gap: 10px; font-weight: 900; }
.diff-sum .add { color: #2b8a3e; } .diff-sum .del { color: #c92a2a; }
.diff-view { max-height: 60vh; overflow: auto; border: 3px solid var(--ink); border-radius: 12px; background: #fff; font: .78rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: left; }
.diff-line { display: grid; grid-template-columns: 3.2em 1.4em 1fr; }
.diff-line code { white-space: pre-wrap; word-break: break-all; padding-right: 8px; font: inherit; }
.diff-n { color: #adb5bd; text-align: right; padding-right: 6px; user-select: none; }
.diff-mark { text-align: center; font-weight: 900; user-select: none; }
.diff-line.add { background: #ebfbee; } .diff-line.add .diff-mark { color: #2b8a3e; }
.diff-line.del { background: #fff5f5; } .diff-line.del .diff-mark { color: #c92a2a; }
.diff-line.del code { text-decoration: line-through; text-decoration-color: #ffa8a8; }
.diff-skip { padding: 2px 10px; background: #f1f3f5; color: #6c757d; text-align: center; font-family: var(--body); font-weight: 700; }

/* ---------- 승인 대기 ---------- */
.review-admin.alert { border-color: #f59f00 !important; background: #fff9db; }
.pending-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.pending-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid #ffd43b; border-radius: 14px; background: #fff; animation: panel-in .3s ease-out; }
.pending-list li small { display: block; color: #555; }
.pending-list .tile .team-tag { display: none; }
.preview-modal-box { position: relative; width: min(820px, 88vw); height: min(560px, 62vh); border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
@media (max-width: 700px) { .pending-list li { grid-template-columns: 56px 1fr; } .pending-list li .actions-row { grid-column: 1 / -1; } }

/* ---------- 인터넷 끊김 · 설치 ---------- */
.net-banner { position: fixed; left: 50%; top: 10px; z-index: 70; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 8px 16px; border: 3px solid var(--ink); border-radius: 14px; background: #ffe3e3; font-weight: 800; box-shadow: 0 5px 0 var(--ink); animation: banner-in .3s ease-out; text-align: center; }
.net-banner.back { background: #d3f9d8; }
.install-only { display: none; }
body.can-install .install-only { display: block; }

/* ---------- 선생님 대시보드 ---------- */
.panel.dash { max-width: 1180px; padding: 0; overflow: hidden; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 18px 22px; color: #fff; background: linear-gradient(135deg, var(--sky-1), #5f6ff5); }
.dash-title h1 { margin: 0; font: 1.7rem var(--display); text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.dash-title p { margin: 2px 0 0; font-weight: 700; opacity: .85; }
.dash-pills { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; background: rgba(255, 255, 255, .2); color: inherit; white-space: nowrap; }
.dash-head .pill.on { background: #d3f9d8; color: #2b8a3e; } .dash-head .pill.off { background: #ffe3e3; color: #c92a2a; } .dash-head .pill.warn { background: #fff3bf; color: #e67700; }
.app-table .pill.warn { background: #fff3bf; color: #e67700; } .app-table .pill.off { background: #f1f3f5; color: #6c757d; }
.dash-head-actions { display: flex; gap: 8px; }
.dash-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 18px 22px 6px; }
.kpi { position: relative; display: grid; justify-items: start; gap: 2px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 var(--ink); text-align: left; transition: transform .1s, box-shadow .1s; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); }
.kpi i { position: absolute; right: 10px; top: 8px; font-style: normal; font-size: 1.5rem; opacity: .9; }
.kpi b { font: 2rem / 1.05 var(--display); color: var(--sky-1); }
.kpi b em { font-style: normal; font-size: 1.1rem; color: #6c757d; }
.kpi > span { font-weight: 800; color: #495057; font-size: .9rem; }
.kpi small { width: 100%; color: #6c757d; font-weight: 700; font-size: .78rem; }
.kpi.alert { background: #fff5f5; border-color: #e03131; box-shadow: 0 5px 0 #e03131; animation: shake .5s; }
.kpi.alert b { color: #e03131; }
.kpi.good { background: #ebfbee; } .kpi.good b { color: #2b8a3e; }
.kpi.live b { color: #e67700; }
.kpi.live::after { content: ''; position: absolute; left: 12px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: #fa5252; animation: pulse 1s ease-in-out infinite; }
.kpi-bar { display: block; height: 8px; margin-top: 4px; border-radius: 999px; background: #e9ecef; overflow: hidden; }
.kpi-bar i { position: static; display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .6s; }
.dash-launch { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 12px 22px 4px; }
.dash-launch a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #f4f7ff; border: 2px solid #dbe4ff; color: var(--ink); text-decoration: none; transition: background .15s, transform .1s; }
.dash-launch a:hover { background: #e7edff; transform: translateY(-2px); }
.dash-launch i { grid-row: span 2; font-style: normal; font-size: 1.8rem; }
.dash-launch b { font-size: .95rem; }
.dash-launch small { color: #6c757d; font-weight: 700; font-size: .75rem; }
.dash-tabs { display: flex; gap: 4px; padding: 14px 22px 0; border-bottom: 3px solid var(--ink); overflow-x: auto; scrollbar-width: none; }
.dash-tabs [role=tab] { position: relative; flex: none; padding: 9px 16px 8px; border: 3px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0; background: none; font-weight: 800; color: #6c757d; margin-bottom: -3px; }
.dash-tabs [role=tab]:hover { color: var(--ink); background: #f8f9fa; }
.dash-tabs [role=tab][aria-selected=true] { color: var(--ink); background: #fff; border-color: var(--ink); }
.tab-badge:not(:empty) { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #e03131; color: #fff; font-size: .75rem; }
.dash-pane { padding: 18px 22px 8px; animation: panel-in .25s ease-out; }
.dash-pane > h2:first-child { margin-top: 0; }
.dash-card { margin-bottom: 16px; padding: 14px 16px; border: 3px solid #e9ecef; border-radius: 18px; background: #fff; }
.dash-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.dash-card.alert { border-color: #ffa8a8; background: #fff5f5; }
.review-admin.alert { border-color: #ffd43b; background: #fff9db; }
.vote-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vote-steps li { display: grid; gap: 8px; justify-items: start; padding: 12px; border: 2px dashed #dee2e6; border-radius: 14px; font-weight: 800; }
.vote-steps li > b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e9ecef; }
.vote-steps li.now { border-style: solid; border-color: #f59f00; background: #fff9db; }
.vote-steps li.now > b { background: #f59f00; color: #fff; }
.vote-steps li.done { border-style: solid; border-color: #8ce99a; background: #ebfbee; }
.tally { margin: 6px 0 12px; padding-left: 1.4em; display: grid; gap: 6px; }
.tally li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 35%) auto; gap: 10px; align-items: center; }
.tally-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tally-bar { height: 12px; border-radius: 999px; background: #f1f3f5; overflow: hidden; }
.tally-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd43b, #ff922b); transition: width .6s; }
.danger-zone { padding-top: 10px; border-top: 2px dashed #f1f3f5; }
.dash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.dash-tools .sorter-search { box-shadow: 0 3px 0 var(--ink); }
.dash-check { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.table-wrap { overflow-x: auto; border: 2px solid #e9ecef; border-radius: 14px; }
.app-table { margin: 0; }
.app-table tr.is-hidden td { opacity: .6; }
.app-cell { display: flex; align-items: center; gap: 8px; }
.app-cell .tile .team-tag { display: none; }
.row-actions { white-space: nowrap; }
.row-actions .btn { margin: 1px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.share-card { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 16px; border: 3px solid #e9ecef; border-radius: 18px; background: #fff; }
.share-card > i { font-style: normal; font-size: 2.2rem; }
.share-card p { margin: 0 0 4px; }
.setting-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 4px; border-bottom: 2px dashed #f1f3f5; }
.setting-row > i { font-style: normal; font-size: 1.8rem; text-align: center; }
.setting-row p { margin: 2px 0 0; }
.dash-foot { padding: 6px 22px 18px; }
@media (max-width: 1000px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-launch { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vote-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .dash-head, .dash-kpis, .dash-launch, .dash-tabs, .dash-pane, .dash-foot { padding-left: 12px; padding-right: 12px; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi b { font-size: 1.6rem; }
  .dash-launch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting-row { grid-template-columns: 36px 1fr; }
  .setting-row .setting-control { grid-column: 2; }
}
@media (max-width: 600px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { padding: 8px 10px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
  .kpi i { font-size: 1rem; right: 6px; top: 6px; }
  .kpi b { font-size: 1.35rem; }
  .kpi > span { font-size: .78rem; }
  .kpi small { font-size: .68rem; }
  .dash-launch a { padding: 8px; }
  .dash-launch i { font-size: 1.4rem; }
}

/* ---------- 🎯 주제 띠 (둘째 줄, app.js topicSwitchHtml): 노란 띠 + 큰 제목. 누르면 🎯 미션 카드 ---------- */
.topic-switch { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; height: 48px; padding: 0 6px; border: 3px solid var(--ink); border-radius: 14px; background: var(--yellow); box-shadow: 0 4px 0 var(--ink); }
[data-topic-switch] { display: contents; }
.ts-ico { display: none; margin-right: 6px; } /* 휴대폰: 번호 칸이 숨으니 제목 앞에 이모지만 */
.ts-text { display: flex; align-items: center; gap: 8px; min-width: 0; height: 100%; padding: 0 6px; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; white-space: nowrap; }
.ts-label { flex: none; font-style: normal; padding: 2px 9px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: .8rem var(--display); }
.ts-text b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: clamp(1.1rem, 1.6vw, 1.45rem) / 1.15 var(--display); color: var(--ink); }
.ts-more { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--yellow); font-weight: 900; font-size: .78rem; animation: ts-wiggle 2.6s ease-in-out infinite; }
@keyframes ts-wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-6deg); } 90% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .ts-more { animation: none; } }
.ts-text:hover b, .ts-text:focus-visible b { text-decoration: underline; text-underline-offset: 4px; }
.ts-nav { flex: none; width: 32px; height: 32px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font: 900 .85rem var(--body); cursor: pointer; box-shadow: 0 2px 0 var(--ink); }
.ts-nav:active { transform: translateY(2px); box-shadow: none; }
.ts-all { flex: none; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 800 .8rem var(--body); cursor: pointer; white-space: nowrap; }
.ts-all.on { background: var(--sky-1); color: #fff; }
/* 🖥 넓은 화면: 주제 띠는 정렬 줄 아래 가운데 한 줄을 통째로(긴 주제도 안 잘리게, 갤러리는 그만큼 아래로).
   빛나는 테두리로 화면에서 가장 눈에 띄게 — 대신 위쪽 단추·분류 안내는 조용하게(아래 '미션이 주인공') */
@media (min-width: 701px) and (min-height: 521px) {
  .topic-switch { position: fixed; left: 50%; top: 132px; transform: translateX(-50%); max-width: calc(100vw - 36px); height: 62px; padding: 0 10px; gap: 10px; border-width: 4px; border-radius: 18px;
    box-shadow: 0 5px 0 var(--ink), 0 0 0 6px rgba(255, 212, 59, .35), 0 0 34px 6px rgba(255, 212, 59, .5); animation: ts-glow 2.8s ease-in-out infinite; }
  .ts-text b { font-size: clamp(1.45rem, 2.3vw, 2.1rem); }
  .ts-label { font-size: .95rem; padding: 3px 12px; }
  .ts-nav { width: 38px; height: 38px; font-size: 1rem; }
  .select-screen.has-topic .shelf { top: 206px; }
}
@keyframes ts-glow { 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 9px rgba(255, 212, 59, .25), 0 0 46px 10px rgba(255, 212, 59, .6); } }
@media (prefers-reduced-motion: reduce) { .topic-switch { animation: none !important; } }
html[data-calm="1"] .topic-switch { animation: none !important; }
/* 🎯 미션이 주인공: 주제가 있으면 분류 안내(놀이·배움…)는 숨겨요 — 정렬·필터 창의 '분류'로 골라요 */
.select-screen.has-topic .genre-legend { display: none; }
.select-screen.has-topic .sorter .roulette-chip .label { display: none; }
/* 📱 휴대폰: 둘째 줄이 꽉 차서 주제 띠는 그 아래 한 줄로(갤러리는 그만큼 아래로) */
@media (max-width: 700px) {
  .topic-switch { position: fixed; left: 10px; right: 10px; top: max(110px, calc(env(safe-area-inset-top) + 100px)); z-index: 5; justify-content: space-between; height: 56px; }
  .ts-text { flex: 1; justify-content: center; padding: 0 2px; }
  .ts-text b { font-size: 1.08rem; line-height: 1.2; white-space: normal; text-align: center; word-break: keep-all; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .ts-label, .ts-more { display: none; } .ts-ico { display: inline; }
  .select-screen.has-topic .shelf { top: max(176px, calc(env(safe-area-inset-top) + 166px)); }
}
/* 📱 휴대폰 가로: 정렬 줄 안에서 제목만 크게(번호·미션 표시는 숨겨요) */
@media (min-width: 701px) and (max-height: 520px) {
  .topic-switch { height: 40px; }
  .ts-text { overflow: hidden; } .ts-label, .ts-more { display: none; } .ts-text b { font-size: 1rem; }
}
/* 🎯 미션 카드(주제 설명, topics-ui.js showMission) */
dialog.modal:has(.mission-card) { width: min(560px, calc(100vw - 24px)); }
.mission-card { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 6px 2px 2px; }
.ms-badge { padding: 4px 14px; border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow); font: 1rem var(--display); box-shadow: 0 3px 0 var(--ink); transform: rotate(-2deg); }
dialog.modal .ms-title { margin: 2px 0 0; font: clamp(1.6rem, 6vw, 2.3rem) / 1.25 var(--display); color: var(--sky-1); word-break: keep-all; }
.ms-desc { margin: 0; padding: 14px 16px; width: 100%; box-sizing: border-box; border: 3px dashed #c5cae9; border-radius: 16px; background: #f7f8ff; font-size: 1.15rem; font-weight: 800; line-height: 1.6; word-break: keep-all; white-space: pre-line; }
.ms-actions { justify-content: center; flex-wrap: wrap; }
.ms-close { margin: 0; }
.ms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; text-align: left; }
.ms-list button { width: 100%; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; text-align: left; box-shadow: 0 3px 0 var(--ink); }
.ms-list button:hover, .ms-list button:focus-visible { background: #fff8d6; }
.ms-list button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ms-list i { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); font: 1rem var(--display); font-style: normal; }
.ms-list b { font: 1.15rem var(--display); color: var(--sky-1); word-break: keep-all; }
.ms-list small { color: #6c757d; font-weight: 700; word-break: keep-all; }
.topic-setting .topic-fields { display: grid; gap: 8px; margin-top: 8px; }
.topic-setting .topic-fields textarea { min-height: 0; font-family: var(--body); }
.show-topic { flex: 1; text-align: center; font: clamp(1rem, 2vw, 1.8rem) var(--display); color: var(--yellow); text-shadow: 0 3px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 로그인 ---------- */
.me-chip { background: #f3f0ff; }
.me-chip.teacher { background: #e7f5ff; }
.login-panel { max-width: 760px; }
.login-tabs { display: flex; gap: 6px; margin: 10px 0 16px; padding: 4px; border: 3px solid var(--ink); border-radius: 16px; background: #f1f3f5; width: max-content; }
.login-tabs [role=tab] { padding: 8px 18px; border: 0; border-radius: 12px; background: none; font-weight: 900; color: #6c757d; }
.login-tabs [role=tab][aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.login-families { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.login-fam { display: grid; justify-items: center; gap: 4px; padding: 14px 8px 10px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 var(--ink); transition: transform .1s, background .15s; }
.login-fam:hover { transform: translateY(-3px); }
.login-fam span { font-size: 2.6rem; line-height: 1; }
.login-fam b { font-weight: 900; word-break: keep-all; }
.login-fam.on { background: var(--yellow); transform: translateY(-3px) scale(1.04); }
.login-code { padding: 16px; border: 3px dashed #f59f00; border-radius: 18px; background: #fff9db; animation: pop-in .2s ease-out; }
.login-who { margin: 0 0 8px; font-size: 1.15rem; }
.login-who span { font-size: 1.6rem; }
.login-code-input { font: 2rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5em; text-align: center; max-width: 320px; }
.login-me { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.login-avatar { width: 96px; height: 96px; display: grid; place-items: center; font-size: 60px; border: 5px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 0 6px 0 var(--ink); animation: who-in .5s cubic-bezier(.2, 1.6, .4, 1); }
.login-me h1 { margin: 0; }
.login-me p { margin: 0; }
.login-gate { text-align: center; max-width: 620px; }
.login-gate-fams { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0; font-size: 2rem; }
.family-badge { margin: 0; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #f3f0ff; font-size: 1.1rem; }
.family-badge small { font-size: .85rem; color: #666; }
.fam-add { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.fam-avatar { font-size: 1.4rem; padding: 4px; }
.fam-bulk { margin: 6px 0 12px; }
.fam-bulk summary { cursor: pointer; font-weight: 800; }
.fam-bulk textarea { min-height: 110px; font-family: var(--body); margin-bottom: 8px; }
.fam-tools { margin-bottom: 10px; }
.fam-assign { padding: 4px 6px; font-size: .9rem; min-height: 34px; max-width: 190px; }

/* ---------- 시작(로딩) 화면 ---------- */
.boot-splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #4b63f2, #1b1f8a 75%); color: #fff;
  opacity: 0; pointer-events: none; animation: boot-show .25s forwards;
}
.boot-splash::before { content: ''; position: absolute; inset: -50%; background: repeating-conic-gradient(rgba(255, 255, 255, .06) 0 8deg, transparent 8deg 16deg); animation: spin 30s linear infinite; }
@keyframes boot-show { to { opacity: 1; pointer-events: auto; } }
.boot-quick .boot-splash { animation-delay: .45s; } /* 앱 하나·발표 링크: 빨리 끝나면 안 보이게(theme-boot.js) */
.boot-splash.done { animation: boot-hide .45s forwards; }
@keyframes boot-hide { from { opacity: var(--o, 1); } to { opacity: 0; visibility: hidden; } }
.boot-logo { position: relative; display: flex; gap: .06em; font: clamp(4rem, 16vw, 9rem) / 1 var(--display); }
.boot-logo i {
  font-style: normal; color: var(--c); display: inline-block;
  text-shadow: -5px -5px 0 #111, 5px -5px 0 #111, -5px 5px 0 #111, 5px 5px 0 #111, 0 10px 0 #111;
  animation: gather .9s cubic-bezier(.2, 1.4, .4, 1) both, letter-hop 1.4s ease-in-out infinite;
  animation-delay: calc(.1s + var(--i) * .09s), calc(1.15s + var(--i) * .12s);
}
@keyframes gather { from { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(2.2); } 70% { opacity: 1; } }
@keyframes letter-hop { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-14px) rotate(-4deg); } }
.boot-sub { position: relative; margin: 0; font: clamp(1.2rem, 4vw, 2rem) var(--display); letter-spacing: .2em; opacity: 0; animation: boot-appear .4s .8s forwards; }
.boot-bar { position: relative; width: min(320px, 70vw); height: 16px; border: 3px solid #fff; border-radius: 999px; overflow: hidden; opacity: 0; animation: boot-appear .3s .9s forwards; }
.boot-bar i { position: absolute; inset: 0; width: 40%; border-radius: inherit; background: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, #fab005 10px 20px); animation: boot-run 1.1s ease-in-out infinite alternate; }
@keyframes boot-appear { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes boot-run { from { transform: translateX(-10%); } to { transform: translateX(160%); } }
.boot-press { position: relative; margin: 0; font: 1rem var(--display); letter-spacing: .3em; color: #dbe4ff; opacity: 0; animation: boot-appear .3s 1s forwards; }
.boot-press span { animation: dot 1s infinite; }
.boot-press span:nth-child(2) { animation-delay: .2s; } .boot-press span:nth-child(3) { animation-delay: .4s; }
.boot-stuck { position: relative; margin: 6px 0 0; font-weight: 800; color: #fff; }
.boot-stuck button { margin-left: 6px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 12px; background: var(--yellow); font: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .boot-splash::before { display: none; } }

/* ---------- 휴대폰 전체 화면 실행 ---------- */
.play-screen.immersive .play-top, .play-screen.immersive .reactions, .play-screen.immersive .recipe { display: none; }
.play-screen.immersive { height: 100dvh; }
@media (max-width: 430px) { .top nav [data-sound] { display: none; } }

.login-fam small { color: #6c757d; font-weight: 700; font-size: .78rem; }
.login-fam.fresh { border-style: dashed; }
.family-setup .setup-hello { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.family-setup .setup-hello h1 { margin: 0; }
.family-setup .setup-hello p { margin: 4px 0 0; }
.setup-name { font-size: 1.3rem; font-weight: 800; }
.setup-pins { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 12px; }
.setup-pins .pin-input { width: 100%; }
.setup-pins .pin-input:placeholder-shown, .pin-change .pin-input:placeholder-shown { font: 800 1.05rem var(--body); letter-spacing: 0; }
.setup-pins .pin-input, .pin-change .pin-input { font: 1.6rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .4em; text-align: center; }
.pin-change { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)) auto; gap: 10px; align-items: end; margin: 10px 0; padding: 12px; border: 3px dashed #ced4da; border-radius: 14px; }
.pin-change[hidden] { display: none; }
.pin-change .field { margin: 0; }
.fam-migrate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
@media (max-width: 600px) { .pin-change { grid-template-columns: 1fr 1fr; } }

/* ---------- 🎨 테마 ---------- */
:root[data-pattern=circle] .backdrop i { border-radius: 50%; }
:root[data-pattern=bubble] .backdrop i { border: 0; border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .1) 55%, rgba(255, 255, 255, .04)); }
:root[data-pattern=star] .backdrop i { border: 0; background: rgba(255, 255, 255, .24); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
:root[data-pattern=none] .backdrop i { display: none; }
:root.theme-dark .backdrop::after { content: ''; position: absolute; inset: 0; background: radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 44%, #fffbe0, transparent), radial-gradient(1px 1px at 86% 58%, #fff, transparent), radial-gradient(1.5px 1.5px at 22% 72%, #fff, transparent), radial-gradient(1px 1px at 58% 82%, #fff, transparent); opacity: .8; }
.input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky-2) 35%, transparent); }
.dash-head { background: linear-gradient(135deg, var(--sky-1), color-mix(in srgb, var(--sky-2) 85%, #fff)); }
.present { background: linear-gradient(170deg, var(--sky-1), color-mix(in srgb, var(--sky-1) 70%, #000)); }
.album-hero { background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(160deg, var(--sky-1), var(--sky-2) 60%, color-mix(in srgb, var(--sky-2) 60%, #fff)); }

.theme-picker { width: 100%; text-align: left; }
.theme-picker h2, .theme-picker > p { text-align: center; }
dialog.modal:has(.theme-picker) { width: min(600px, calc(100vw - 24px)); padding: 18px; }
dialog.modal:has(.g-sheet) { width: min(560px, calc(100vw - 24px)); }
.theme-picker > p { margin: 0 0 12px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.theme-chip { position: relative; display: grid; gap: 6px; justify-items: center; padding: 8px 6px 9px; border: 3px solid #d6d9e4; border-radius: 16px; background: #fff; cursor: pointer; font-size: .9rem; transition: transform .12s, border-color .12s; }
.theme-chip:hover { transform: translateY(-2px); }
.theme-chip[aria-pressed=true] { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.theme-chip[aria-pressed=true]::after { content: '✓'; position: absolute; top: -9px; right: -7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; font-size: .8rem; }
.theme-swatch { position: relative; width: 100%; height: 54px; border-radius: 11px; background: linear-gradient(172deg, var(--a), var(--b) 35%, var(--c) 72%, var(--d)); overflow: hidden; }
.theme-swatch i { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 14px; border: 2px solid #111; border-radius: 6px; background: var(--k); box-shadow: 0 2px 0 #111; }
.theme-swatch.own { background: conic-gradient(from 90deg, #ff4d6d, #ffb35c, #f5c400, #2fb344, #14a3c7, #3b5bff, #8b3dff, #ff4d6d); }
.theme-swatch.own i { display: none; }
.theme-own input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.theme-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.theme-row > span { flex: none; width: 6.2em; font-weight: 800; font-size: .92rem; }
.theme-dots { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.theme-dots .swatch { width: 30px; height: 30px; }
.theme-dots .pill { cursor: pointer; border: 2px solid #d6d9e4; background: #fff; }
.theme-dots .pill[aria-pressed=true] { border-color: var(--ink); background: var(--yellow); }
.more-menu { display: grid; gap: 10px; }
.more-menu h2 { text-align: center; }
@media (max-width: 700px) {
  .top nav [data-more] { display: inline-flex; }
  .top nav [data-guide-link], .top nav [data-theme-open], .top nav [data-sound] { display: none; }
  .theme-row > span { width: 100%; }
}

/* ---------- ❓ 사용법 둘러보기(비추기 + 안내 카드) ---------- */
.tour-shade > i { position: fixed; z-index: 90; background: rgba(8, 10, 40, .62); transition: all .32s cubic-bezier(.3, .9, .3, 1); }
.tour-shade > b { position: fixed; z-index: 91; pointer-events: none; border: 4px solid var(--yellow); border-radius: 16px; box-shadow: 0 0 0 4px rgba(0, 0, 0, .35), 0 0 28px 6px color-mix(in srgb, var(--yellow) 70%, transparent); transition: all .32s cubic-bezier(.3, .9, .3, 1); animation: tour-glow 1.6s ease-in-out infinite; }
@keyframes tour-glow { 50% { box-shadow: 0 0 0 4px rgba(0, 0, 0, .35), 0 0 40px 12px color-mix(in srgb, var(--yellow) 85%, transparent); } }
.tour-shade > b em { position: absolute; color: var(--yellow); font-style: normal; font-size: 1.1rem; text-shadow: 0 0 6px #fff; animation: tour-twinkle 1.4s ease-in-out infinite; }
.tour-shade > b em:nth-child(1) { top: -16px; left: -12px; }
.tour-shade > b em:nth-child(2) { top: -18px; right: 14px; animation-delay: .45s; }
.tour-shade > b em:nth-child(3) { bottom: -16px; right: -12px; animation-delay: .9s; }
@keyframes tour-twinkle { 50% { transform: scale(.4) rotate(45deg); opacity: .4; } }
.tour-card { position: fixed; z-index: 92; padding: 12px 14px 12px; border: 3px solid var(--ink); border-radius: 20px; background: #fff; box-shadow: 0 7px 0 var(--ink), 0 20px 40px rgba(0, 0, 0, .3); transition: left .32s cubic-bezier(.3, .9, .3, 1), top .32s cubic-bezier(.3, .9, .3, 1); outline: none; }
.tour-card.pop .tour-msg { animation: tour-pop .38s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tour-pop { from { transform: scale(.92); opacity: 0; } }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 800; color: #667; }
.tour-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef0f6; font-size: 1.2rem; line-height: 1; }
.tour-msg { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 8px; }
.tour-guide { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(150deg, var(--sky-1), var(--sky-2)); font-size: 2rem; box-shadow: 0 4px 0 var(--ink); animation: g-bob 2.4s ease-in-out infinite; }
.tour-msg h3 { margin: 0 0 3px; font: 1.2rem var(--display); }
.tour-msg p { margin: 0; line-height: 1.5; font-size: .95rem; }
.tour-tip { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 10px; background: color-mix(in srgb, var(--yellow) 30%, #fff); font-weight: 700; font-size: .8rem; }
.tour-dots { display: flex; gap: 5px; justify-content: center; margin: 4px 0 8px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 4px; background: #d6d9e4; transition: width .2s, background .2s; }
.tour-dots i.done { background: var(--sky-2); }
.tour-dots i.now { width: 22px; background: var(--ink); }
.tour-play { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: #556; }
.tour-play [data-timer] { flex: 1; }
.tour-play button, .tour-nav button { min-height: 32px; padding: 0 10px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 800; font-size: .82rem; }
.tour-play button[data-replay] { border-color: #d6d9e4; }
.tour-nav { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.tour-nav button { min-height: 38px; font-size: .9rem; box-shadow: 0 3px 0 var(--ink); }
.tour-nav button.primary { background: var(--yellow); }
.tour-nav button[disabled] { opacity: .35; box-shadow: none; }
.tour-glass { width: 18px; height: 21px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.tour-glass .sand-top, .tour-glass .sand-bottom { fill: var(--yellow); stroke: none; }
.tour-glass .sand-top { transform-origin: 12px 13px; transform: scaleY(var(--tour-left, 1)); }
.tour-glass .sand-bottom { transform-origin: 12px 23px; transform: scaleY(calc(1 - var(--tour-left, 1))); }
.tour-glass .sand-stream { stroke: var(--yellow); stroke-dasharray: 2 2; opacity: 0; }
.tour-card.playing .tour-glass .sand-stream { opacity: 1; animation: tour-sand .5s linear infinite; }
.tour-card.playing .tour-glasswrap { animation: tour-tilt 5s linear infinite; }
@keyframes tour-sand { to { stroke-dashoffset: -4; } }
@keyframes tour-tilt { 0%, 92% { transform: none; } 100% { transform: rotate(180deg); } }
.tour-glasswrap { display: inline-grid; }
/* ❓ 처음 온 기기: 사용법 단추가 콩콩 + 말풍선 */
[data-tour].tour-invite { animation: tour-knock 1.4s ease-in-out infinite; background: var(--yellow); }
@keyframes tour-knock { 0%, 70%, 100% { transform: none; } 78% { transform: translateY(-5px) rotate(-6deg); } 86% { transform: translateY(0) rotate(5deg); } }
.tour-intro { position: fixed; z-index: 6; right: 16px; top: 74px; display: flex; align-items: center; gap: 10px; max-width: min(360px, calc(100vw - 32px)); padding: 10px 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 5px 0 var(--ink); animation: panel-in .45s cubic-bezier(.2, 1.25, .4, 1); }
.tour-intro::before { content: ''; position: absolute; top: -12px; right: var(--tip, 190px); border: 9px solid transparent; border-bottom-color: var(--ink); border-top: 0; }
.tour-intro span { flex: 1; font-size: .88rem; line-height: 1.35; }
.tour-intro span b { display: block; font-size: .95rem; }
.tour-intro .btn { flex: none; }
@media (max-width: 700px) {
  .tour-card { padding: 10px 12px; border-radius: 18px; }
  .tour-guide { width: 44px; height: 44px; font-size: 1.6rem; border-radius: 13px; }
  .tour-msg h3 { font-size: 1.08rem; }
  .tour-msg p { font-size: .9rem; }
  .tour-intro { top: auto; bottom: 122px; left: 12px; right: 12px; max-width: none; }
  .tour-intro::before { display: none; }
}
:root.theme-dark .hint { color: rgba(255, 255, 255, .7); }
@media (max-width: 700px) { .top.solid nav [data-tour] { display: none; } }
@media (max-width: 430px) {
  .top nav { gap: 4px; }
  .top nav .btn { padding: .2em .42em; }
  .top { padding-left: 12px; padding-right: 10px; }
}
/* 🔓 입장 허용 */
.fam-table .pill.on { background: #d3f9d8; color: #2b8a3e; } .fam-table .pill.warn { background: #fff3bf; color: #e67700; } .fam-table .pill.off { background: #ffe3e3; color: #c92a2a; }
.fam-table .pill.live { background: #c3fae8; color: #087f5b; }
.fam-table td .btn.small { margin-left: 4px; }
.login-fam.locked { opacity: .72; border-style: dashed; box-shadow: 0 3px 0 #adb5bd; border-color: #adb5bd; filter: grayscale(.6); }
.login-fam.locked span { position: relative; }
.login-fam.locked small { color: #e67700; }
.login-fam.fresh:not(.locked) { animation: fam-ready 1.6s ease-in-out infinite; }
@keyframes fam-ready { 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 6px color-mix(in srgb, var(--yellow) 60%, transparent); } }
/* 🎨 가족 테마: 처음 설정의 색 고르기 · 가족 페이지 머리 */
.theme-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-dot { position: relative; width: 52px; height: 38px; border: 3px solid #d6d9e4; border-radius: 12px; background: linear-gradient(160deg, var(--a), var(--b) 55%, var(--c)); cursor: pointer; transition: transform .12s; }
.theme-dot::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 14px; height: 8px; border: 2px solid #111; border-radius: 4px; background: var(--k); }
.theme-dot:hover { transform: translateY(-2px); }
.theme-dot[aria-pressed=true] { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); transform: scale(1.08); }
.team-head.themed { padding: 16px 18px; border: 3px solid var(--ink); border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 5px 0 var(--ink); }
.team-head.themed h1 { color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.team-head.themed .lead { color: rgba(255, 255, 255, .9); }
.team-head .team-intro { margin: 4px 0 2px; font-weight: 800; font-size: 1.05rem; }
.team-head.themed .team-intro { display: inline-block; padding: 4px 12px; border-radius: 12px; background: rgba(255, 255, 255, .2); }
.team-head { flex-wrap: wrap; }
.team-head > div:nth-child(2) { flex: 1; min-width: 0; }
.team-mine { display: flex; flex-wrap: wrap; gap: 8px; }
.team-head.themed .btn.yellow { background: var(--k); }
/* 🎵 배경음악 단추: 켜져 있으면 은은하게 반짝 */
.bgm-btn[aria-pressed=false] { opacity: .55; }
.bgm-btn[aria-pressed=true] { background: var(--yellow); animation: bgm-glow 2.4s ease-in-out infinite; }
@keyframes bgm-glow { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 5px color-mix(in srgb, var(--yellow) 55%, transparent); } }
@media (max-width: 700px) { .top nav [data-bgm] { display: none; } }
/* 오른쪽 아래 연구회 이름: 앱이 실행되는 화면·프로젝터 화면·인쇄에서는 숨겨요 */
.org-credit { position: fixed; right: 12px; bottom: max(6px, env(safe-area-inset-bottom)); z-index: 4; padding: 2px 10px; border-radius: 999px; background: rgba(10, 12, 40, .38); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .04em; pointer-events: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body:is([data-page=play], [data-page=present], [data-page=show], [data-page=awards], [data-page=race], [data-page=cert], [data-page=certs], [data-page=cards], [data-page=note], [data-page=famcards], [data-page=report], [data-page=studio]) .org-credit { display: none; }
@media print { .org-credit { display: none; } }
/* 갤러리: 아래 띠(▶ 시작) 바로 위 오른쪽, 키보드 안내는 그 위로 */
body[data-page=home] .org-credit { bottom: calc(118px + 8px); right: 18px; }
body[data-page=home] .hint { bottom: calc(118px + 36px); }
body[data-page=home] .org-credit { font-size: .78rem; }
@media (max-width: 700px) { body[data-page=home] .org-credit { bottom: max(3px, env(safe-area-inset-bottom)); right: 10px; font-size: .62rem; padding: 1px 8px; background: rgba(0, 0, 0, .25); color: rgba(255, 255, 255, .8); } }

/* ---------- 📢 캠프 진행 띠 ---------- */
.live-banner { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 8px 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--ink); font-weight: 700; pointer-events: auto; }
.live-banner > i { font-style: normal; font-size: 1.3rem; }
.live-banner b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.live-banner span { font-size: .92rem; }
.live-banner em { font-style: normal; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--yellow); font: 1rem ui-monospace, Menlo, Consolas, monospace; font-weight: 800; }
.live-banner em.done { background: #e8262b; color: #fff; animation: live-blink 1s steps(2) infinite; }
@keyframes live-blink { 50% { opacity: .4; } }
.live-banner .live-votes { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--yellow) 45%, #fff); font-weight: 800; }
.live-banner.phase-gather { background: #e7f5ff; } .live-banner.phase-make { background: #fff9db; } .live-banner.phase-last { background: #ffe8cc; }
.live-banner.phase-vote { background: #fff3bf; } .live-banner.phase-awards { background: linear-gradient(90deg, #ffe066, #ffd8a8); } .live-banner.phase-notice { background: #f3f0ff; }
.camp-banner-slot .live-banner { animation: live-in .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes live-in { from { transform: translateY(-16px) scale(.9); opacity: 0; } }
.live-float { position: fixed; left: 50%; bottom: 14px; z-index: 40; transform: translateX(-50%); max-width: calc(100vw - 24px); transition: transform .35s cubic-bezier(.3, .9, .3, 1), opacity .3s; }
.live-float .live-banner { box-shadow: 0 5px 0 var(--ink), 0 10px 26px rgba(0, 0, 0, .25); }
.live-float.quiet { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }
.live-float.quiet.peek { transform: translateX(-50%); opacity: 1; }
.live-float.pop .live-banner { animation: live-in .5s cubic-bezier(.2, 1.4, .4, 1); }
body[data-page=home] .live-float { display: none; }
@media (max-width: 700px) {
  .live-banner { padding: 6px 12px; border-radius: 16px; gap: 2px 8px; }
  .live-banner span { font-size: .8rem; }
  .live-float { bottom: 10px; }
}
@media print { .live-float { display: none; } }

/* 대시보드: 단계 버튼 */
.dash-live { margin: 0 0 12px; padding: 12px 16px; border: 3px solid var(--ink); border-radius: 18px; background: linear-gradient(135deg, #fffbe6, #fff); }
.dash-live h2 { margin: 0 0 8px; font-size: 1.15rem; }
.live-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.live-step { display: grid; justify-items: center; gap: 2px; min-width: 92px; padding: 8px 10px; border: 3px solid #d6d9e4; border-radius: 14px; background: #fff; cursor: pointer; font-weight: 800; transition: transform .12s; }
.live-step i { font-style: normal; font-size: 1.5rem; }
.live-step:hover { transform: translateY(-2px); border-color: var(--ink); }
.live-step.on { border-color: var(--ink); background: var(--yellow); box-shadow: 0 4px 0 var(--ink); }
.live-arrow { color: #adb5bd; font-size: 1.4rem; font-weight: 900; }
.live-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.live-now .live-banner { box-shadow: none; padding: 4px 12px; border-width: 2px; }
.live-form .choices, .help-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-radio { cursor: pointer; } .pill-radio input { position: absolute; opacity: 0; }
.pill-radio span { display: inline-block; padding: 5px 12px; border: 2px solid #d6d9e4; border-radius: 999px; font-weight: 800; }
.pill-radio input:checked + span { border-color: var(--ink); background: var(--yellow); }
.pill-radio input:focus-visible + span { outline: 3px solid var(--sky-2); }
dialog.modal:has(.live-form), dialog.modal:has(.help-form) { width: min(520px, calc(100vw - 24px)); }
.help-reasons .btn { flex: 1 1 45%; }
/* 🙋 도움 요청 */
.help-card { border-color: #ffa94d; }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.help-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff4e6; animation: help-in .4s cubic-bezier(.2, 1.4, .4, 1); }
.help-list .help-who { font-size: 1.1rem; } .help-list .help-why { font-weight: 800; } .help-list .btn { margin-left: auto; }
@keyframes help-in { from { transform: scale(.9); opacity: 0; } }
.help-btn.waiting { background: #ffa94d; animation: help-wait 1.2s ease-in-out infinite; }
@keyframes help-wait { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 6px rgba(255, 169, 77, .45); } }
/* ⛶ 전체 화면 단추 */
.top nav [data-fullscreen][aria-pressed=true] { background: var(--yellow); }
@media (max-width: 700px) { .top nav [data-fullscreen] { display: none; } }
/* 📱 가족 기기 관리 */
dialog.modal:has(.device-sheet) { width: min(520px, calc(100vw - 24px)); }
.device-sheet p { text-align: left; }
.device-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.device-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 2px solid #d6d9e4; border-radius: 12px; }
.device-list li .btn { margin-left: auto; }
/* 🎲 앱 뽑기 */
.roulette-chip { background: #e5dbff; cursor: pointer; font: inherit; font-weight: 900; }
dialog.modal:has(.roulette-box) { width: min(420px, calc(100vw - 24px)); }
.roulette-window { display: grid; place-items: center; margin: 8px auto; padding: 14px; width: max-content; border: 4px solid var(--ink); border-radius: 22px; background: repeating-linear-gradient(90deg, #fff3bf 0 12px, #ffe066 12px 24px); box-shadow: inset 0 0 0 6px #fff; }
.roulette-window.won { animation: roulette-won .6s cubic-bezier(.2, 1.6, .4, 1); background: radial-gradient(circle, #fff 30%, #ffd43b); }
@keyframes roulette-won { 0% { transform: scale(.9); } 60% { transform: scale(1.08) rotate(-2deg); } }
.roulette-name { display: grid; gap: 2px; margin: 6px 0 10px; } .roulette-name b { font: 1.3rem var(--display); }
@media (max-width: 1400px) { .sorter .roulette-chip .label { display: none; } }
/* 🧪 리허설 */
dialog.modal:has(.rehearsal-sheet) { width: min(560px, calc(100vw - 24px)); }
.rehearsal-steps { margin: 10px 0; padding-left: 0; list-style: none; display: grid; gap: 6px; text-align: left; }
.rehearsal-steps li { padding: 6px 10px; border-radius: 10px; background: #f8f9fa; font-weight: 700; }
.rehearsal-steps li.ok { background: #ebfbee; } .rehearsal-steps li.fail { background: #fff5f5; } .rehearsal-steps li.run { background: #fff9db; }
/* 위쪽 단추가 많아져서: 컴퓨터에서는 투표·방송 띠를 오른쪽, 위쪽 줄 바로 아래로 */
@media (min-width: 701px) {
  .camp-banner-slot { top: 84px; left: auto; right: 18px; transform: none; max-width: min(640px, calc(100vw - 600px)); }
  .camp-banner-slot .live-banner { justify-content: flex-start; border-radius: 18px; }
}
@media (min-width: 701px) and (max-width: 1100px) { .camp-banner-slot { top: 130px; max-width: calc(100vw - 36px); } }
body[data-page=admin] .live-float { display: none; }
.roulette-box .actions-row { justify-content: center; }
dialog.modal:has(.roulette-box) { width: min(460px, calc(100vw - 24px)); }
/* 위쪽 단추 정리: ❓ 사용법 · 🙋 도움 · ⚙️ 화면·소리는 늘 아이콘만(이름은 title·aria-label) — 글자는 ＋ 올리기와 로그인만 */
.top nav [data-tour] .label, .top nav [data-help] .label, .top nav [data-more] .label { display: none; }
@media (min-width: 701px) { .top nav :is([data-tour], [data-help], [data-more]) { min-width: 44px; justify-content: center; padding-left: .5em; padding-right: .5em; } }
/* 가운데 크기 화면(태블릿·작은 노트북): 글자 대신 아이콘, 더 좁으면 몇 개는 ⋯ 안으로 */
@media (min-width: 701px) and (max-width: 1180px) {
  .top nav [data-tour] .label, .top nav [data-guide-link] .label, .top nav .me-chip .label, .top nav [data-help] .label, .top nav [data-more] .label { display: none; }
}
@media (min-width: 701px) and (max-width: 940px) {
  .top nav [data-more] { display: inline-flex; }
  .top nav [data-theme-open], .top nav [data-sound], .top nav [data-bgm], .top nav [data-fullscreen] { display: none; }
}
@media (max-width: 380px) { .top nav [data-tour] { display: none; } } /* 아주 좁은 휴대폰: ❓ 는 ⋯ 안에 */
@media (max-width: 430px) { .top nav .label-short { display: none; } }
/* 이미 올리기 화면이면 ＋ 올리기 단추는 필요 없어요(좁은 화면에 자리 만들기) */
@media (max-width: 700px) { body:is([data-page=upload], [data-page=edit], [data-page=remix]) .top nav [data-upload-link] { display: none; } }
/* 🔐 코드 바꾸기 */
dialog.modal:has(.codes-form), dialog.modal:has(.codes-done) { width: min(480px, calc(100vw - 24px)); }
.codes-form .field { text-align: left; }
.code-big { display: inline-block; margin: 6px 0 2px; padding: 4px 14px; border: 3px dashed var(--ink); border-radius: 12px; background: #fff9db; font: 1.4rem ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .05em; }
.weak-code { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- 🖥 캠프 상황판 (#/stage) ---------- */
body:is([data-page=stage], [data-page=report], [data-page=famcards], [data-page=cards], [data-page=certs], [data-page=cert]) .live-float, body[data-page=stage] .org-credit { display: none; }
.stage-board { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 380px); grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px 20px; padding: 16px 22px; color: #fff; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .14), transparent 45%), linear-gradient(160deg, var(--sky-1), color-mix(in srgb, var(--sky-1) 70%, #000)); }
.stage-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-head b { display: block; font: clamp(1.4rem, 2.6vw, 2.4rem) var(--display); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.stage-head small { font-weight: 800; opacity: .85; }
.stage-head nav { display: flex; gap: 8px; }
.stage-main { display: grid; place-items: center; min-height: 0; }
.stage-phase { display: grid; justify-items: center; gap: 8px; text-align: center; animation: live-in .6s cubic-bezier(.2, 1.3, .4, 1); }
.stage-phase > i { font-style: normal; font-size: clamp(4rem, 11vh, 8rem); line-height: 1; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .2)); animation: g-bob 2.4s ease-in-out infinite; }
.stage-phase h1 { margin: 0; font: clamp(2.4rem, 6.5vw, 6rem) / 1.05 var(--display); text-shadow: 0 6px 0 rgba(0, 0, 0, .25); word-break: keep-all; }
.stage-phase p { margin: 0; max-width: 46ch; font-size: clamp(1.1rem, 2.2vw, 2rem); font-weight: 800; opacity: .95; word-break: keep-all; }
.stage-clock { margin-top: 10px; padding: .05em .5em; border: 6px solid #fff; border-radius: 28px; background: rgba(0, 0, 0, .3); font: clamp(4rem, 16vh, 12rem) / 1 ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .02em; color: var(--yellow); }
.stage-clock.done { color: #fff; background: #e8262b; animation: live-blink 1s steps(2) infinite; }
.stage-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.stage-qr { display: grid; justify-items: center; gap: 4px; padding: 12px; border-radius: 22px; background: #fff; color: var(--ink); text-align: center; }
.stage-qr svg { width: 100%; max-width: 240px; height: auto; }
.stage-qr b { font: 1.2rem var(--display); } .stage-qr small { font-weight: 800; word-break: break-all; color: #495057; }
.stage-count { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-radius: 20px; background: rgba(255, 255, 255, .14); text-align: center; }
.stage-count b { display: block; font: clamp(2rem, 4.5vw, 3.6rem) / 1 var(--display); } .stage-count b small { font-size: .5em; opacity: .8; }
.stage-count span { font-weight: 800; font-size: .95rem; }
.stage-bar { grid-column: 1 / -1; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; } .stage-bar em { display: block; height: 100%; background: var(--yellow); transition: width .6s; }
.stage-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stage-steps li { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 12px; font-weight: 800; opacity: .55; }
.stage-steps li i { font-style: normal; }
.stage-steps li.on { opacity: 1; background: var(--yellow); color: var(--ink); }
.stage-feed { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 10px 14px; border-radius: 20px; background: rgba(0, 0, 0, .22); }
.stage-feed-label { flex: none; font: 1.1rem var(--display); }
.stage-tiles { display: flex; gap: 12px; overflow: hidden; }
.stage-tile { display: grid; justify-items: center; gap: 4px; } .stage-tile small { font-weight: 800; white-space: nowrap; max-width: 12vw; overflow: hidden; text-overflow: ellipsis; }
.stage-tile.new { animation: stage-new 1.2s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes stage-new { 0% { transform: scale(.3) rotate(-20deg); } 60% { transform: scale(1.2) rotate(4deg); } }
@media (max-width: 800px) { .stage-board { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; overflow-y: auto; } }

/* 💌 칭찬·소감 말풍선(발표·시상식) · 🏅 부문상 */
.present-main { position: relative; }
.award-bubbles { position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }
.award-bubbles span { position: absolute; left: calc(50% + var(--x)); bottom: -12%; max-width: min(46vw, 520px); padding: 8px 16px; border: 3px solid var(--ink); border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--ink); font-weight: 800; font-size: clamp(.9rem, 1.6vw, 1.3rem); transform: translateX(-50%); opacity: 0; animation: bubble-up 7.5s ease-in-out calc(var(--i) * .9s + .6s) forwards; }
@keyframes bubble-up { 0% { bottom: -12%; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { bottom: 92%; opacity: 0; } }
.award-cat .award-kicker { margin: 0; padding: 4px 16px; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 1.1rem var(--display); }
.award-team { font-weight: 800; opacity: .85; }
/* 📋 가족 한눈에 */
dialog.modal:has(.fam-detail) { width: min(640px, calc(100vw - 24px)); }
.fam-detail { text-align: left; } .fam-detail h2 { text-align: center; }
.fam-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.fam-stats div { display: grid; justify-items: center; padding: 8px; border-radius: 12px; background: #f1f3f5; } .fam-stats b { font-size: 1.2rem; }
.fam-apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.fam-apps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 2px solid #d6d9e4; border-radius: 14px; }
.fam-apps li p { margin: 4px 0; font-size: .9rem; } .fam-apps li small { display: block; }
/* 📝 캠프 소감 */
dialog.modal:has(.survey-form) { width: min(500px, calc(100vw - 24px)); }
.survey-moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.survey-moods label { cursor: pointer; } .survey-moods input { position: absolute; opacity: 0; }
.survey-moods span { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border: 3px solid #d6d9e4; border-radius: 16px; font-weight: 800; font-size: .9rem; transition: transform .12s; }
.survey-moods span i { font-style: normal; font-size: 2.4rem; }
.survey-moods input:checked + span { border-color: var(--ink); background: var(--yellow); transform: scale(1.06); box-shadow: 0 4px 0 var(--ink); }
.survey-moods input:focus-visible + span { outline: 3px solid var(--sky-2); }
.survey-form .field { text-align: left; }
.live-banner[data-survey] { cursor: pointer; }
.survey-bars { display: grid; gap: 6px; margin-bottom: 10px; }
.survey-bars div { display: grid; grid-template-columns: 9em 1fr 2.5em; align-items: center; gap: 8px; font-weight: 800; }
.survey-bars i { height: 14px; border-radius: 7px; background: #f1f3f5; overflow: hidden; } .survey-bars em { display: block; height: 100%; background: var(--yellow); }
.survey-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.convert-card { border-color: #74a8ff; background: #e7f5ff; } .convert-card ol { margin: 6px 0 8px; padding-left: 1.3em; line-height: 1.6; }
.dash-launch { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stage-side { overflow: hidden; }
.stage-qr svg { max-width: min(240px, 26vh); }
.stage-steps { grid-template-columns: 1fr 1fr; gap: 4px 6px; }
.stage-steps li { padding: 3px 8px; font-size: .9rem; }

/* ---------- 🧹 캠프 전 정리 · 🖼 대표 화면 찍기 ---------- */
dialog.modal:has(.clear-form) { width: min(620px, calc(100vw - 24px)); }
.clear-form { text-align: left; } .clear-form h2 { text-align: center; }
.clear-opts { display: grid; gap: 6px; margin: 10px 0; }
.clear-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 2px solid #dee2e6; border-radius: 12px; cursor: pointer; }
.clear-opt:has(input:checked) { border-color: #f08c00; background: #fff9db; }
.clear-opt input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.clear-opt span { display: grid; gap: 2px; } .clear-opt small { color: #6c757d; }
.clear-apps summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.clear-apps ul { list-style: none; margin: 0; padding: 0 4px; max-height: 210px; overflow: auto; display: grid; gap: 4px; }
.clear-apps label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.retake-sheet progress { width: 100%; height: 18px; }
.notice.wiz-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: #e7f5ff; border-color: #74a8ff; }

/* ---------- 🎯 우리 가족 미션 ---------- */
.mission-chip { background: #d3f9d8; }
.mission-meter { height: 18px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; margin: 8px 0 16px; }
.mission-meter i { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, #69db7c, #2f9e44); transition: width .6s; }
.mission-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mission { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.mission.done { background: #ebfbee; } .mission.locked { opacity: .6; }
.mission-icon { font-size: 2rem; width: 46px; text-align: center; }
.mission > div { display: grid; gap: 2px; } .mission small { color: #6c757d; }
.mission-dots { display: flex; gap: 5px; margin-top: 4px; } .mission-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #adb5bd; } .mission-dots i.on { background: #40c057; border-color: #2b8a3e; }
.mission-go { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 560px) { .mission { grid-template-columns: auto 1fr; } .mission > .pill, .mission-go { grid-column: 1 / -1; justify-content: flex-start; } }

/* ---------- 🎁 가족 기념 앨범 ---------- */
.keepsake-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 14px 0; padding: 12px 14px; border: 3px dashed #f08c00; border-radius: 16px; background: #fff9db; }
.keepsake-card > div { flex: 1 1 260px; display: grid; gap: 2px; } .keepsake-card small { color: #6c757d; }
.keepsake-icon { font-size: 2.2rem; }

/* ---------- 🎟 가족 입장 카드 · 포스터 ---------- */
.famcards-area { display: grid; gap: 18px; justify-items: center; padding-bottom: 30px; }
.famcards-sheet { width: 210mm; max-width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; padding: 8mm; background: #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); }
.fam-card { display: grid; gap: 8px; padding: 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; min-height: 128mm; align-content: start; }
.fc-top { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #495057; } .fc-top img { width: 24px; height: 24px; } .fc-top span { margin-left: auto; }
.fc-body { display: grid; grid-template-columns: 1fr 42%; gap: 8px; align-items: center; }
.fc-who { display: grid; justify-items: center; text-align: center; gap: 2px; }
.fc-avatar { font-size: 3.4rem; line-height: 1.1; } .fc-name { font: 1.7rem var(--display); word-break: keep-all; } .fc-who small { color: #6c757d; }
.fc-qr { display: grid; justify-items: center; gap: 2px; } .fc-qr svg { width: 100%; height: auto; } .fc-qr small { font-size: .72rem; color: #495057; }
.fc-steps { margin: 0; padding-left: 1.3em; font-size: .86rem; line-height: 1.5; } .fc-steps small { color: #6c757d; }
.fc-url { font-weight: 800; word-break: break-all; }
.fc-pin { font: 1.4rem var(--display); letter-spacing: .15em; color: #e8590c; }
.fc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: auto; padding-top: 8px; border-top: 2px dashed #ced4da; font-size: .82rem; }
.fc-blank { font-size: 1.4rem; letter-spacing: .2em; color: #adb5bd; } .fc-org { margin-left: auto; color: #6c757d; font-size: .72rem; }
.fam-poster { width: 210mm; max-width: 100%; min-height: 270mm; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 14mm; background: linear-gradient(160deg, var(--sky-1), var(--sky-2)); color: #fff; text-align: center; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); }
.fam-poster h1 { margin: 0; font: clamp(2rem, 8vw, 3.6rem) var(--display); text-shadow: 0 5px 0 rgba(0, 0, 0, .3); }
.fp-camp { margin: 0; font-weight: 800; font-size: 1.3rem; }
.fp-qr { width: min(110mm, 80%); padding: 10px; background: #fff; border: 5px solid var(--ink); border-radius: 22px; } .fp-qr svg { display: block; width: 100%; height: auto; }
.fp-url { margin: 0; font-weight: 900; font-size: 1.3rem; }
.fp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; counter-reset: fp; }
.fp-steps li { padding: 6px 14px; border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 1.1rem; }
.fp-org { margin: 8px 0 0; opacity: .9; }
@media (max-width: 700px) { .famcards-sheet { grid-template-columns: 1fr; } .fam-card { min-height: 0; } }
@media print {
  @page famcards { size: A4 portrait; margin: 0; }
  .famcards-page { page: famcards; }
  .famcards-area { display: block; padding: 0; }
  .famcards-sheet, .fam-poster { width: 210mm; box-shadow: none; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .famcards-sheet { height: 297mm; grid-template-rows: 1fr 1fr; padding: 8mm; }
  .fam-poster { height: 297mm; }
  .famcards-sheet:last-child { break-after: auto; }
}

/* ---------- 📑 캠프 결과 보고서 ---------- */
.report-page { display: grid; justify-items: center; }
.report-sheet { width: 210mm; max-width: 100%; padding: 14mm 14mm 18mm; background: #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); color: #212529; }
.report-sheet h2 { margin: 18px 0 8px; font: 1.25rem var(--display); border-bottom: 3px solid var(--ink); padding-bottom: 4px; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 5px double var(--ink); padding-bottom: 10px; }
.rp-head h1 { margin: 0; font: 2.2rem var(--display); } .rp-camp { margin: 0; font-weight: 800; color: #495057; } .rp-head p { margin: 2px 0 0; }
.rp-org { font-weight: 900; font-size: 1.05rem; white-space: nowrap; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rp-kpi { display: grid; justify-items: center; padding: 8px 4px; border: 2px solid #ced4da; border-radius: 12px; background: #f8f9fa; }
.rp-kpi b { font: 1.5rem var(--display); } .rp-kpi b small { font-size: .9rem; color: #6c757d; } .rp-kpi > small { color: #495057; font-size: .8rem; text-align: center; }
.rp-note { color: #495057; margin: 8px 0 0; }
.rp-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rp-bars li { display: grid; grid-template-columns: 150px 1fr 34px; gap: 4px 10px; align-items: center; }
.rp-bar { height: 16px; border-radius: 4px; background: #f1f3f5; overflow: hidden; } .rp-bar i { display: block; height: 100%; background: var(--sky-2); border-radius: 4px; }
.rp-bars b { text-align: right; } .rp-bars small { grid-column: 2 / -1; color: #6c757d; font-size: .78rem; margin-top: -4px; }
.rp-awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rp-award { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 6px 10px; border: 2px solid #ced4da; border-radius: 12px; }
.rp-award span { grid-row: span 2; font-size: 1.7rem; align-self: center; } .rp-award small { color: #6c757d; }
.rp-moods { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 1.05rem; } .rp-moods b { font-size: 1.25rem; }
.rp-quotes { margin: 8px 0 0; padding-left: 1.1em; display: grid; gap: 4px; } .rp-quotes small { color: #6c757d; }
.rp-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.rp-table th, .rp-table td { border: 1px solid #ced4da; padding: 4px 6px; text-align: left; vertical-align: top; }
.rp-table th { background: #f1f3f5; } .rp-table td small { display: block; color: #6c757d; }
.rp-table td:nth-child(1), .rp-table td:nth-child(5), .rp-table td:nth-child(6) { text-align: center; white-space: nowrap; }
.rp-memo p { margin: 0; min-height: 22mm; border-bottom: 1px dashed #adb5bd; font-weight: 800; color: #495057; padding-top: 4px; }
@media (max-width: 700px) { .rp-kpis { grid-template-columns: repeat(2, 1fr); } .rp-bars li { grid-template-columns: 110px 1fr 28px; } .report-sheet { padding: 16px; } }
@media print {
  @page report { size: A4 portrait; margin: 10mm; }
  .report-page { page: report; display: block; }
  .report-sheet { width: auto; padding: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-table tr, .rp-award, .rp-bars li { break-inside: avoid; }
}

/* ---------- 🪑 빈 자리 = 아직 만드는 가족 · 🛬 도착 ---------- */
.tile.empty:not(.waiting) .face { opacity: .45; }
.tile.empty.waiting .face {
  opacity: 1; display: grid; align-content: center; justify-items: center; gap: 2px; padding: 8%;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .1) 0 10px, transparent 10px 20px), linear-gradient(160deg, #5b6bb5, #3d4b8c);
  border: 3px dashed rgba(255, 255, 255, .55); box-shadow: 0 4px 0 rgba(0, 0, 0, .2);
}
.tile.empty.waiting .face span { position: static; display: block; font: inherit; color: inherit; }
.tile.empty.waiting .face .wait-avatar { font-size: calc(var(--tile) * .36); line-height: 1.1; filter: grayscale(.35) drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); animation: wait-bob 2.6s ease-in-out infinite; }
.tile.empty.waiting .wait-name { max-width: 100%; color: #fff; font: calc(var(--tile) * .11) / 1.2 var(--display); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.tile.empty.waiting .wait-note { color: #dbe4ff; font-size: calc(var(--tile) * .085); font-weight: 800; }
.tile.empty.waiting .wait-note i { font-style: normal; animation: wait-dot 1.4s infinite; } .tile.empty.waiting .wait-note i:nth-child(2) { animation-delay: .2s; } .tile.empty.waiting .wait-note i:nth-child(3) { animation-delay: .4s; }
.tile.empty.waiting.mine .face { border: 3px solid var(--yellow); background: linear-gradient(160deg, #ffe066, #fab005); }
.tile.empty.waiting.mine .wait-avatar { filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.tile.empty.waiting.mine .wait-name { color: var(--ink); text-shadow: none; } .tile.empty.waiting.mine .wait-note { color: #5c3d00; }
@keyframes wait-bob { 50% { transform: translateY(-5px) rotate(-4deg); } }
@keyframes wait-dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.tile.arrive { animation: arrive .9s cubic-bezier(.2, 1.3, .4, 1) backwards; z-index: 2; }
.tile.arrive::after { content: '도착!'; position: absolute; left: -14px; top: -14px; z-index: 4; transform: rotate(-10deg); padding: 2px 10px; border: 3px solid #fff; border-radius: 999px; background: #2f9e44; color: #fff; font: 1.05rem var(--display); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); animation: arrive-tag 3.2s ease-out forwards; pointer-events: none; }
@keyframes arrive { 0% { opacity: 0; transform: translateY(calc(var(--dy, 0px) - 160px)) rotateY(180deg) scale(.7); } 60% { opacity: 1; transform: translateY(calc(var(--dy, 0px) + 8px)) rotateY(0) scale(1.06); } }
@keyframes arrive-tag { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- ⚙️ 화면·소리 ---------- */
dialog.modal:has(.quick-settings) { width: min(480px, calc(100vw - 24px)); }
.quick-settings { display: grid; gap: 14px; }
.qs-head { display: flex; align-items: center; justify-content: space-between; } .qs-head h2 { margin: 0; }
.qs-row { display: grid; gap: 6px; } .qs-row > span { font-weight: 900; }
.qs-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.qs-seg button { min-height: 44px; border: 0; border-left: 2px solid var(--ink); background: #fff; font-weight: 900; }
.qs-seg button:first-child { border-left: 0; }
.qs-seg button[aria-pressed=true] { background: var(--yellow); }
.qs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.qs-tile { display: grid; justify-items: start; gap: 2px; padding: 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); text-align: left; }
.qs-tile i { font-style: normal; font-size: 1.6rem; } .qs-tile small { color: #555; font-weight: 700; }
.qs-tile[aria-pressed=true] { background: #d3f9d8; } .qs-tile[aria-pressed=true] small { color: #2b8a3e; }
.qs-tile:active, .qs-seg button:active { transform: translateY(2px); }
.qs-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 6px; border-top: 2px dashed #dee2e6; }

/* ---------- 🔠 글씨 크기 · 🐢 움직임 줄이기 ---------- */
html[data-text=big] { font-size: 112.5%; }
html[data-text=huge] { font-size: 125%; }
html[data-calm] *, html[data-calm] *::before, html[data-calm] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
html[data-calm] .boot-splash::before, html[data-calm] .confetti-layer, html[data-calm] .burst-layer { display: none; }

/* ---------- 🎮 앱 화면 도구: 다시·크게 짝 + 3개 + ⋯ ---------- */
.play-top .tool-pair { display: inline-flex; gap: 0; }
.play-top .tool-pair .btn { border-radius: 0; margin-left: -3px; }
.play-top .tool-pair .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.play-top .tool-pair .btn:last-child { border-radius: 0 10px 10px 0; }
.tools-more-wrap { position: relative; display: inline-flex; }
.tools-more { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; display: grid; min-width: 230px; padding: 6px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 6px 0 var(--ink), 0 14px 30px rgba(0, 0, 0, .35); animation: pop-in .18s ease-out; }
.tools-more[hidden] { display: none; }
.tools-more::before { content: ''; position: absolute; right: 14px; top: -10px; width: 14px; height: 14px; background: #fff; border-left: 3px solid var(--ink); border-top: 3px solid var(--ink); transform: rotate(45deg); }
.tm-item { display: grid; gap: 1px; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-weight: 900; text-align: left; text-decoration: none; }
.tm-item small { color: #6c757d; font-weight: 700; font-size: .78rem; }
.tm-item:hover, .tm-item:focus-visible { background: #fff3bf; }
.react { position: relative; }
.plus-one { position: absolute; right: 6px; top: -4px; font-style: normal; font: 1.1rem var(--display); color: #e8590c; text-shadow: 0 2px 0 #fff; pointer-events: none; animation: plus-up .9s ease-out forwards; }
@keyframes plus-up { from { opacity: 1; transform: translateY(0) scale(.8); } to { opacity: 0; transform: translateY(-34px) scale(1.25); } }
@media (max-width: 700px) {
  .play-top .tools .tool-pair, .play-top .tools .tools-more-wrap { flex: none; }
  .play-top .tools .tool-pair .btn, .play-top .tools .tools-more-wrap .btn { flex: none; }
}
.tools-more-wrap .dots { font-size: 1.25em; line-height: .8; }

/* ---------- 👪 가족 페이지: 가족 색 띠 · 메달 · 큰 카드 ---------- */
.team-head.team-hero { position: relative; overflow: hidden; padding: 20px 22px; border: 4px solid var(--ink); border-radius: 22px; color: #fff; background: radial-gradient(circle at 85% -20%, rgba(255, 255, 255, .35), transparent 45%), linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 6px 0 var(--ink); }
.team-hero::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .12); pointer-events: none; }
.team-hero h1 { margin: 0; color: #fff; font-size: clamp(1.8rem, 5vw, 2.6rem); text-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.team-hero .who { width: 96px; height: 96px; font-size: 58px; transform: rotate(-4deg); }
.team-kicker { margin: 0; font-weight: 900; font-size: .85rem; letter-spacing: .04em; opacity: .9; }
.team-hero .lead { color: rgba(255, 255, 255, .92); }
.team-hero .team-intro { display: inline-block; padding: 4px 12px; border-radius: 12px; background: rgba(255, 255, 255, .22); }
.team-hero .btn.yellow { background: var(--k); }
.team-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.team-stat { display: grid; justify-items: center; min-width: 74px; padding: 6px 10px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; background: rgba(0, 0, 0, .18); }
.team-stat b { font: 1.25rem var(--display); } .team-stat small { font-size: .74rem; font-weight: 800; opacity: .9; }
.medal-case { margin-top: 14px; }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 8px; margin: 8px 0; }
.badge.medal { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; box-shadow: none; text-align: center; font-size: .82rem; line-height: 1.2; cursor: help; }
.badge.medal i { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border: 4px solid #b8860b; border-radius: 50%; font-style: normal; font-size: 1.9rem;
  background: radial-gradient(circle at 35% 30%, #fff9db, #ffd43b 55%, #f59f00); box-shadow: 0 4px 0 #8a6100, inset 0 -4px 0 rgba(0, 0, 0, .12); overflow: hidden; }
.badge.medal i::after { content: ''; position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: rgba(255, 255, 255, .55); transform: rotate(25deg); animation: medal-shine 3.2s ease-in-out infinite; }
.badge.medal:nth-child(2n) i::after { animation-delay: 1.1s; } .badge.medal:nth-child(3n) i::after { animation-delay: 2s; }
@keyframes medal-shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.badge.medal.locked { color: #6c757d; }
.badge.medal.locked i { border-color: #ced4da; background: repeating-linear-gradient(45deg, #f1f3f5 0 6px, #e9ecef 6px 12px); box-shadow: 0 4px 0 #ced4da; color: #adb5bd; font: 1.6rem var(--display); filter: none; opacity: 1; }
.badge.medal.locked i::after { display: none; }
.badge.medal:focus-visible i, .badge.medal:hover i { transform: translateY(-3px) rotate(-6deg); transition: transform .15s; }
.team-page .team-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.team-page .team-card { grid-template-columns: auto 1fr; justify-items: start; align-items: start; gap: 14px; padding: 14px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .2); text-align: left; }
.team-card-body { display: grid; gap: 5px; min-width: 0; }
.team-card-title { font: 1.3rem / 1.2 var(--display); }
.team-card-problem { color: #495057; font-weight: 700; }
.team-card-stats { color: #6c757d; font-weight: 800; font-size: .85rem; }
.team-card-notes { display: flex; flex-wrap: wrap; gap: 5px; }
.team-card-notes span { position: relative; padding: 3px 9px; border-radius: 12px 12px 12px 3px; background: #ffe3ec; font-size: .8rem; font-weight: 800; }
.team-page .team-card-actions { justify-content: flex-start; }
@media (max-width: 520px) { .team-page .team-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } .team-page .team-card .tile { --tile: 130px !important; } .team-page .team-card-actions, .team-card-notes { justify-content: center; } .team-hero .who { width: 76px; height: 76px; font-size: 44px; } }
@media (max-width: 520px) {
  .team-head.team-hero { flex-direction: column; text-align: center; padding: 16px 12px; }
  .team-hero > div:nth-child(2) { width: 100%; }
  .team-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .team-stat { min-width: 0; padding: 5px 2px; } .team-stat b { font-size: 1rem; } .team-stat small { font-size: .66rem; }
  .medal-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px 4px; }
  .badge.medal i { width: 50px; height: 50px; font-size: 1.5rem; }
  .team-mine { justify-content: center; }
}
.badge.medal { align-content: start; } .medal-grid { align-items: start; }

/* ---------- 🪜 올리기 단계 길잡이 ---------- */
.up-steps { position: sticky; top: -8px; z-index: 6; display: grid; gap: 6px; margin: 4px -8px 10px; padding: 10px 8px 8px; border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.up-meter { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: #f1f3f5; overflow: hidden; }
.up-meter i { display: block; height: 100%; background: linear-gradient(90deg, #69db7c, #2f9e44); transition: width .4s; }
.up-steps ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.up-steps ol::-webkit-scrollbar { display: none; }
.up-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 4px; border: 2px solid #ced4da; border-radius: 999px; background: #fff; font-weight: 800; font-size: .86rem; white-space: nowrap; }
.up-chip span { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: #e9ecef; font-size: .78rem; }
.up-chip.done { border-color: #2f9e44; background: #ebfbee; } .up-chip.done span { background: none; }
.up-chip.now { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); } .up-chip.now:not(.done) span { background: var(--yellow); }
.up-count { color: #495057; font-weight: 800; font-size: .8rem; }
.up-step-head { scroll-margin-top: 190px; }
@media (max-width: 700px) { .up-steps { top: -12px; } .up-step-head { scroll-margin-top: 180px; } }

/* ---------- ⭐ 날아가는 별 ---------- */
.fly-star { position: fixed; z-index: 120; font-style: normal; font-size: 2rem; pointer-events: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3)); }
.got-star { display: inline-block; animation: got-star .5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes got-star { 40% { transform: scale(1.8); color: #e8590c; } }

/* ---------- 📽 강당 화면: 뒷줄에서도 읽히게 ---------- */
.stage-board { grid-template-rows: auto minmax(0, 1fr) auto auto; }
.stage-main { grid-column: 1; grid-row: 2; }
.stage-side { grid-column: 2; grid-row: 2 / 4; justify-content: center; }
.stage-timeline { grid-column: 1; grid-row: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; }
.stage-timeline li { gap: 6px; padding: 6px 14px; border-radius: 999px; font: clamp(1rem, 2.4vh, 1.5rem) var(--display); opacity: .6; background: rgba(255, 255, 255, .1); }
.stage-timeline li + li::before { content: '›'; margin: 0 6px 0 -10px; opacity: .6; }
.stage-timeline li.on { opacity: 1; background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .3); transform: scale(1.08); }
.stage-feed { grid-row: 4; }
.stage-feed-label { font-size: clamp(1.1rem, 2.4vh, 1.5rem); }
.stage-tile small { font-size: clamp(.9rem, 2vh, 1.2rem); }
.stage-count span { font-size: clamp(.95rem, 2vh, 1.25rem); }
.stage-qr b { font-size: clamp(1.1rem, 2.4vh, 1.5rem); }
.race-qr { width: clamp(96px, 16vh, 150px); }
.race-name b { font-size: clamp(1.3rem, 4.2vh, 2.4rem); }
.race-join small, .race-join span { font-size: clamp(.9rem, 2vh, 1.2rem); font-weight: 800; }
.race-name small { font-size: clamp(.85rem, 2vh, 1.15rem); }
.race-total span { font-size: clamp(.95rem, 2.2vh, 1.3rem); }
@media (max-width: 800px) { .stage-main, .stage-side, .stage-timeline, .stage-feed { grid-column: 1; grid-row: auto; } }
html[data-text=big] .page { padding-top: 94px; } html[data-text=huge] .page { padding-top: 104px; }
@media (max-width: 700px) { html[data-text=big] .page { padding-top: 80px; } html[data-text=huge] .page { padding-top: 86px; } }

/* ---------- 🔔 단계가 바뀌면 크게 ---------- */
.phase-alert { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; pointer-events: none; box-shadow: inset 0 0 0 10px var(--yellow); animation: phase-edge .6s ease-in-out 4 alternate; }
.phase-alert-card { display: grid; justify-items: center; gap: 6px; max-width: min(520px, calc(100vw - 32px)); padding: 22px 26px; border: 5px solid var(--ink); border-radius: 26px; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 10px 0 var(--ink), 0 24px 60px rgba(0, 0, 0, .45); animation: live-in .5s cubic-bezier(.2, 1.4, .4, 1); }
.phase-alert-card i { font-style: normal; font-size: 4rem; line-height: 1; }
.phase-alert-card b { font: clamp(1.6rem, 6vw, 2.4rem) var(--display); }
.phase-alert-card p { margin: 0; font-weight: 800; font-size: 1.1rem; word-break: keep-all; }
.phase-alert-card small { padding: 4px 12px; border-radius: 999px; background: var(--ink); color: var(--yellow); font-weight: 900; }
.phase-alert.out { opacity: 0; transition: opacity .5s; }
@keyframes phase-edge { from { box-shadow: inset 0 0 0 0 var(--yellow); } to { box-shadow: inset 0 0 0 14px var(--yellow); } }

/* ---------- 🗳 투표 이유 ---------- */
.why-pick { position: fixed; left: 50%; top: 132px; z-index: 60; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; width: max-content; max-width: calc(100vw - 24px); padding: 10px 12px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 6px 0 var(--ink); animation: live-in .4s cubic-bezier(.2, 1.4, .4, 1); }
.why-pick > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.award-why { display: block; margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--ink); font-weight: 800; font-size: clamp(.85rem, 1.6vw, 1.15rem); }
.award-why b { color: #e8590c; }
@media (max-width: 700px) { .why-pick { top: 118px; } }

/* ---------- 📱 도움 데스크 ---------- */
body[data-page=helpdesk] .org-credit, body[data-page=helpdesk] .live-float, body[data-page=pitch] .live-float { display: none; }
.helpdesk .hd { max-width: 640px; margin: 0 auto; display: grid; gap: 12px; }
.hd.ring { animation: hd-ring .5s ease-in-out 3; }
@keyframes hd-ring { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 var(--ink); }
.hd-head b { display: block; font: 1.3rem var(--display); } .hd-head small { color: #495057; font-weight: 800; }
.hd-head nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hd-sec { padding: 12px 14px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .2); }
.hd-sec h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.15rem; }
.hd-sec summary { cursor: pointer; list-style: none; } .hd-sec summary::-webkit-details-marker { display: none; }
.hd-sec summary h2::after { content: '▾'; color: #6c757d; } .hd-sec[open] summary h2::after { content: '▴'; }
.hd-count { min-width: 28px; padding: 0 8px; border-radius: 999px; background: #e9ecef; text-align: center; } .hd-count.on { background: #fa5252; color: #fff; animation: bump .5s; }
.hd-helps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hd-help { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; padding: 10px; border: 3px solid #fa5252; border-radius: 16px; background: #fff5f5; animation: pop-in .3s ease-out; }
.hd-help.claimed { border-color: #fab005; background: #fff9db; }
.hd-who { grid-row: span 2; font-size: 2.2rem; }
.hd-help > div:nth-child(2) { display: grid; gap: 2px; } .hd-help > div:nth-child(2) > b { font-size: 1.15rem; }
.hd-help small { color: #495057; font-weight: 700; }
.hd-acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .hd-acts .btn { min-height: 46px; font-size: 1rem; }
.hd-acts .btn:only-child { grid-column: 1 / -1; }
.hd-empty { padding: 16px; text-align: center; color: #495057; font-weight: 800; }
.hd-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.hd-fam { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 3px dashed #adb5bd; border-radius: 14px; background: #fff; font-weight: 800; }
.hd-fam span { font-size: 1.8rem; } .hd-fam small { color: #495057; } .hd-fam.open { border-style: solid; border-color: #2f9e44; background: #ebfbee; }
.hd-shot { display: flex; justify-content: center; margin-bottom: 8px; min-height: 52px; font-size: 1.1rem; }
.hd-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.hd-photos figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; } .hd-photos img { width: 100%; height: 100%; object-fit: cover; }
.hd-photos figure .btn { position: absolute; right: 4px; bottom: 4px; min-height: 0; padding: 2px 6px; }
.hd-login { max-width: 520px; }
.help-by { color: #e67700; }

/* ---------- 📸 사진 슬라이드·앨범 ---------- */
.stage-photos { position: relative; width: 100%; height: 100%; min-height: 40vh; }
.stage-slides { position: absolute; inset: 0 0 46px; }
.photo-slide { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; animation: slide-in .9s ease-out; }
.photo-slide img { max-width: 100%; max-height: 100%; border: 6px solid #fff; border-radius: 18px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); object-fit: contain; }
.photo-slide figcaption { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); max-width: 90%; padding: 6px 16px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; font-weight: 800; font-size: clamp(1rem, 2.4vh, 1.5rem); }
@keyframes slide-in { from { opacity: 0; transform: scale(1.04); } }
.stage-photo-label { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font: clamp(1.1rem, 2.6vh, 1.6rem) var(--display); }
.stage-photo-label small { opacity: .75; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.photo-grid figure { margin: 0; border-radius: 12px; overflow: hidden; background: #f1f3f5; } .photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-grid figcaption { padding: 4px 8px; font-size: .8rem; font-weight: 700; }
.rp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; } .rp-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

/* ---------- 🎙 1분 발표 카드 ---------- */
.pitch-page { display: grid; gap: 18px; justify-items: center; }
.pitch-form .field textarea { min-height: 3.2em; }
.pitch-time { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin: 6px 0 12px; font-weight: 800; }
.pitch-time span { grid-column: 1 / -1; color: #495057; }
.pitch-meter { height: 14px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #f1f3f5; } .pitch-meter i { display: block; height: 100%; width: 0; background: #40c057; } .pitch-meter i.over { background: #fa5252; }
.pitch-time b { font: 1.4rem ui-monospace, Menlo, monospace; }
.pitch-card { width: min(560px, 100%); padding: 18px 20px; border: 4px solid var(--ink); border-radius: 22px; background: #fffdf3; box-shadow: 0 8px 0 rgba(0, 0, 0, .25); }
.pitch-card header { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 3px dashed #ced4da; }
.pitch-who { font-size: 2.6rem; } .pitch-card header div { display: grid; } .pitch-card header small { color: #e8590c; font-weight: 900; } .pitch-card header b { font: 1.5rem var(--display); } .pitch-card header span { color: #495057; font-weight: 800; }
.pitch-card ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.pitch-card li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.pitch-card li i { font-style: normal; font-size: 1.6rem; } .pitch-card li small { color: #6c757d; font-weight: 800; } .pitch-card li p { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; line-height: 1.45; word-break: keep-all; }
.pitch-big { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; gap: 12px; padding: 20px; background: #15151a; overflow: auto; }
.pitch-card.big { width: min(1000px, 100%); } .pitch-card.big li p { font-size: clamp(1.4rem, 3.6vh, 2.4rem); } .pitch-card.big header b { font-size: clamp(1.8rem, 4vh, 3rem); }
.pitch-float { position: absolute; right: 14px; top: 14px; z-index: 6; width: min(420px, 40%); max-height: calc(100% - 28px); overflow: auto; animation: pop-in .3s ease-out; }
.pitch-float .pitch-card { padding: 12px 14px; } .pitch-float .pitch-card li p { font-size: clamp(.95rem, 2vh, 1.25rem); }
@media print {
  @page pitch { size: A5 portrait; margin: 10mm; }
  .pitch-page { page: pitch; display: block; }
  .pitch-print { display: block; } .pitch-card { width: auto; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 📴 비상 안내 카드 · 📋 진행표 ---------- */
body:is([data-page=offline], [data-page=runsheet]) :is(.live-float, .org-credit) { display: none; }
.offline-page, .runsheet-page { display: grid; justify-items: center; }
.offline-card, .runsheet { width: 210mm; max-width: 100%; padding: 12mm 13mm; background: #fff; color: #212529; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); }
.offline-card header { border-bottom: 5px double var(--ink); padding-bottom: 6px; } .offline-card h1 { margin: 0; font: 2.2rem var(--display); } .offline-card header p { margin: 2px 0 0; color: #495057; font-weight: 700; }
.offline-card h2 { margin: 14px 0 6px; font: 1.25rem var(--display); }
.offline-card li { margin: 3px 0; line-height: 1.45; }
.offline-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .offline-cols > div { padding: 8px 10px; border: 2px solid #ced4da; border-radius: 12px; } .offline-cols ol { margin: 4px 0 0; padding-left: 1.2em; }
.offline-fill, .offline-card footer { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: end; margin-top: 8px; font-weight: 800; }
.offline-fill i, .offline-card footer i { border-bottom: 2px solid #adb5bd; height: 1.4em; }
.offline-card footer { margin-top: 14px; padding-top: 8px; border-top: 2px dashed #ced4da; } .offline-card footer span:last-child { grid-column: 1 / -1; color: #c92a2a; }
.rs-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 5px double var(--ink); padding-bottom: 6px; }
.rs-head h1 { margin: 0; font: 2rem var(--display); } .rs-head p { margin: 2px 0 0; color: #495057; font-weight: 700; }
.rs-qr { display: grid; justify-items: center; width: 92px; } .rs-qr svg { width: 80px; height: 80px; } .rs-qr small { font-size: .62rem; word-break: break-all; text-align: center; }
.rs-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .82rem; }
.rs-table th, .rs-table td { border: 1px solid #adb5bd; padding: 4px 6px; vertical-align: top; text-align: left; }
.rs-table th { background: #f1f3f5; }
.rs-n { width: 1.8em; text-align: center !important; color: #6c757d; } .rs-time { width: 4.5em; } .rs-who { width: 3.5em; white-space: nowrap; } .rs-ok { width: 1.6em; text-align: center !important; font-size: 1.1rem; }
.rs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.rs-grid h2 { margin: 6px 0 4px; font: 1.1rem var(--display); } .rs-grid h2 small { font: .75rem var(--body); color: #c92a2a; font-weight: 800; }
.rs-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; }
.rs-lines li { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: end; } .rs-lines i { border-bottom: 1.5px solid #adb5bd; height: 1.2em; }
.rs-help { margin: 0; padding-left: 1.1em; font-size: .8rem; display: grid; gap: 2px; }
@media (max-width: 700px) { .offline-cols, .rs-grid { grid-template-columns: 1fr; } .offline-card, .runsheet { padding: 16px; } }
@media print {
  @page sheet { size: A4 portrait; margin: 8mm; }
  .offline-page, .runsheet-page { page: sheet; display: block; }
  .offline-card, .runsheet { width: auto; padding: 0; box-shadow: none; }
}

/* ---------- 🐢 무거운 앱 ---------- */
.slow-bar { position: absolute; left: 50%; top: 10px; z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); padding: 6px 8px 6px 14px; border: 3px solid var(--ink); border-radius: 999px; background: #fff3bf; color: var(--ink); font-weight: 800; box-shadow: 0 5px 0 rgba(0, 0, 0, .3); animation: banner-in .3s ease-out; }
.stage-loading.paused { display: grid; place-items: center; align-content: center; gap: 10px; height: 100%; padding: 20px; text-align: center; color: var(--ink); } .stage-loading.paused p { max-width: 36ch; }
@media (max-width: 700px) { .slow-bar { font-size: .85rem; border-radius: 16px; flex-wrap: wrap; justify-content: center; } }

/* ---------- 🎮 분류(놀이·배움·도우미·그 밖) · 👩‍🏫 선생님 예시 ---------- */
.genre-ico { display: none; }
/* 갤러리 선반: 왼쪽 위 작은 분류 아이콘만(테두리 색은 쓰지 않아요 — 화면이 어지럽지 않게) */
.grid .genre-ico {
  display: grid; place-items: center; position: absolute; left: 5%; top: 5%; z-index: 2;
  width: calc(var(--tile) * .17); height: calc(var(--tile) * .17); border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 2px var(--gc); font-size: calc(var(--tile) * .095); line-height: 1;
}
/* 📌 선생님이 맨 앞에 고정한 앱: 카드 위 가운데 압정(오른쪽 위는 메달·NEW 자리) */
.grid .tile > .pin-ico {
  display: block; position: absolute; left: 50%; top: calc(var(--tile) * -.09); z-index: 4; font-size: calc(var(--tile) * .2); line-height: 1;
  transform: translateX(-50%) rotate(12deg); filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); pointer-events: none;
}
.pill.pinned { background: #ff6b6b; color: #fff; }
/* 예시 작품: 리본 + 금색 이름표 */
.grid .face.is-sample .team-tag { background: #ffd43b; color: #3a2a00; }
/* 아래 정보 띠의 분류 꼬리표 */
.genre-pill { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: var(--gc, #666); color: #fff; font-size: .82em; font-weight: 800; vertical-align: 1px; }
.genre-pill.sample { background: #ffd43b; color: #3a2a00; }
/* 갤러리 왼쪽 아래 분류 안내(누르면 그 분류만) */
.genre-legend { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.genre-key {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 7px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .78); color: #3a3f4b; font: 800 .78rem / 1.35 var(--body, inherit); cursor: pointer;
}
.genre-key:hover { background: #fff; color: #222; }
.genre-key.on { background: var(--gc, #ffd43b); color: #fff; box-shadow: 0 0 0 2px #fff; }
.genre-key.sample.on { color: #3a2a00; }
/* 좁은 화면은 위 줄이 가득 차서, 🧺 정렬 창의 '분류'로 골라요 */
@media (max-width: 1100px) { .genre-legend { display: none; } }
/* 올리기: 분류 고르기 */
.genre-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.genre-opt {
  display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 3px solid #d6d9e4; border-radius: 14px; background: #fff; cursor: pointer; text-align: center; color: var(--ink);
}
.genre-opt i { font-style: normal; font-size: 1.8rem; line-height: 1.1; }
.genre-opt b { font-size: .95rem; }
.genre-opt small { color: #667; font-size: .74rem; line-height: 1.25; }
.genre-opt[aria-checked="true"] { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 14%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 35%, transparent); }
@media (max-width: 560px) { .genre-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sample-check { margin-top: 10px; align-items: flex-start; }
.sample-check[hidden] { display: none; }
.pill.sample { background: #ffd43b; color: #3a2a00; }
.genre-set { min-width: 108px; padding: 4px 6px; font-size: .85rem; }

/* ---------- ✋ 실제 사이트 손 점검표(#/check) ---------- */
.live-check { margin-top: 26px; padding-top: 18px; border-top: 3px dashed #d6d9e4; }
.live-check h2 { margin: 0 0 4px; }
.lc-bar { display: block; height: 10px; margin: 10px 0 12px; border-radius: 999px; background: #e9ecf3; overflow: hidden; }
.lc-bar em { display: block; height: 100%; background: var(--green); transition: width .3s; }
.lc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lc-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid #e1e4ee; border-radius: 12px; background: #fff; }
.lc-list li.done { border-color: #b2e2c0; background: #f1fbf4; }
.lc-list li.done b { text-decoration: line-through; text-decoration-color: rgba(47, 158, 68, .6); }
.lc-list label { flex: 1; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; min-width: 0; }
.lc-list input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--green); }
.lc-list span { display: grid; gap: 2px; min-width: 0; }
.lc-list small { color: #5c6370; line-height: 1.35; }

/* ---------- 🖥 상황판: 분류 숫자 · ⏭ 다음 단계 예고 ---------- */
.stage-count .stage-genres { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 0; }
.stage-count .stage-genres span { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; background: var(--gc); color: #fff; font-size: clamp(.85rem, 2vh, 1.3rem); line-height: 1.4; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.stage-count .stage-genres span b { font: 400 1em / 1.4 var(--display); display: inline; }
.stage-count .stage-genres span.zero { opacity: .45; }
.stage-next { margin: 1.2vh 0 0; font-size: clamp(1rem, 2.6vh, 1.8rem); opacity: .8; }
.stage-next b { font-family: var(--display); font-weight: 400; }
.stage-next.soon { opacity: 1; display: inline-block; padding: .2em .8em; border-radius: 999px; background: var(--yellow); color: var(--ink); animation: next-soon 1.2s ease-in-out infinite; }
.stage-next.soon::before { content: '곧 '; }
@keyframes next-soon { 50% { transform: scale(1.06); } }
.rp-genres { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-weight: 700; }
.rp-genres span { padding: 1px 9px; border: 2px solid var(--gc); border-radius: 999px; color: var(--ink); font-size: .85rem; }
.rp-genres b { color: var(--gc); }
.award-genre { display: inline-block; margin: 2px auto; padding: 1px 12px; border-radius: 999px; background: var(--gc); color: #fff; font-weight: 800; font-size: clamp(.8rem, 1.8vh, 1.2rem); }
.present-who .genre-pill { font-style: normal; font-size: .7em; vertical-align: middle; }
.genre-award-check { display: flex; align-items: flex-start; margin: 4px 0 10px; }
.genre-award-check input { margin-top: 4px; }
@media (max-width: 700px) { .genre-pill .pill-more { display: none; } }
/* 🧭 예시 작품 → 이런 앱 만들기 */
.bar .make-like { background: #ffd43b; color: #3a2a00; }
@media (max-width: 700px) { .bar .make-like .label { display: none; } }

/* ---------- 🗂 캠프 마무리 · 🏠 이어 만들기 · 📨 학부모 안내문 ---------- */
.badge-home { position: absolute; left: 50%; bottom: -12px; z-index: 3; transform: translateX(-50%) rotate(-3deg); padding: 1px 9px; border: 2px solid #fff; border-radius: 999px; background: #2f9e44; color: #fff; font: .9rem / 1.3 var(--display); white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); pointer-events: none; }
.camp-banner.home { background: #d3f9d8; }
.wrap-form h3 { margin: 14px 0 6px; }
.wrap-form .clear-opt { text-align: left; }
.wrap-until { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px 34px; font-weight: 800; }
.wrap-until .input { width: auto; padding: 4px 8px; }
.wrap-progress { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-weight: 700; }
.wrap-progress .bad { color: var(--red); } .wrap-progress .good { color: #2f9e44; }
.parents-page textarea.parents-text { width: 100%; font: 1rem / 1.55 var(--body); }
.parents-sheet { max-width: 720px; margin: 18px auto; padding: 28px 32px; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); }
.parents-sheet header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.parents-sheet header b { font: 1.5rem var(--display); } .parents-sheet header span { font-weight: 700; color: #555; }
.ps-body p { margin: 0 0 4px; line-height: 1.6; word-break: keep-all; }
.parents-sheet footer { display: flex; justify-content: center; gap: 40px; margin-top: 18px; }
.ps-qr { display: grid; justify-items: center; gap: 4px; } .ps-qr svg { width: 110px; height: 110px; } .ps-qr small { font-weight: 800; }
@media print {
  .parents-page .no-print { display: none !important; }
  .parents-sheet { box-shadow: none; margin: 0; max-width: none; padding: 10mm; }
}

/* ---------- 🚪 대문(행사 찾기 → 참여 코드) ---------- */
.portal { box-sizing: border-box; width: 100%; max-width: 100vw; overflow-x: hidden; min-height: 100vh; display: grid; align-content: start; justify-items: center; gap: 18px; padding: clamp(28px, 8vh, 80px) 16px 40px; }
.portal-head { text-align: center; color: #fff; }
.portal-head h1 { margin: 0; font: clamp(2.2rem, 7vw, 3.6rem) / 1.1 var(--display); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.portal-head p { margin: 8px 0 0; font-weight: 700; opacity: .9; word-break: keep-all; }
.portal-head { max-width: 100%; }
.portal-box { box-sizing: border-box; width: min(560px, 100%); padding: 20px; border: 4px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 0 8px 0 var(--ink); }
.portal-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; }
.portal-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: 700 1.05rem var(--body); background: none; }
.portal-events { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.portal-event { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 14px 16px; border: 3px solid #d6d9e4; border-radius: 16px; background: #f8f9fc; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.portal-event i { font-style: normal; font-size: 1.8rem; }
.portal-event b { font-size: 1.1rem; }
.portal-event small { padding: 2px 10px; border-radius: 999px; background: #e9ecef; font-weight: 800; color: #555; }
.portal-event.now small { background: #d3f9d8; color: #2b8a3e; }
.portal-event span { font-size: 1.6rem; opacity: .5; }
.portal-event:hover, .portal-event.picked { border-color: var(--ink); background: #fff9db; }
.portal-gate { margin-top: 14px; padding: 16px; border-radius: 16px; background: #f1f3ff; }
.portal-gate h2 { margin: 0 0 8px; }
.portal-help { margin: 12px 0 0; font-size: .92rem; line-height: 1.6; color: #444; word-break: keep-all; }
.portal-help a { font-weight: 800; }
.portal-login { margin: 14px 0 0; text-align: center; font-weight: 700; }
.portal-foot { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink); font-weight: 700; }
.portal-foot a { color: inherit; }

/* ---------- 📋 만족도 설문(survey.js) ---------- */
dialog.modal:has(.sv-form) { width: min(560px, calc(100vw - 24px)); }
.survey-page .panel { max-width: 620px; margin: 0 auto; }
.sv-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; color: #6c757d; font-weight: 800; font-size: .85rem; }
.sv-form h2 { margin: 0 0 4px; }
.sv-intro { margin: 0 0 12px; }
.sv-q { margin: 0 0 14px; padding: 12px 14px; border: 3px solid #e3e6ef; border-radius: 16px; text-align: left; }
.sv-q legend { padding: 0 6px; font-weight: 800; line-height: 1.4; }
.sv-q input[type=radio] { position: absolute; opacity: 0; }
.sv-stars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.sv-stars span, .sv-options span { display: grid; place-items: center; min-height: 44px; padding: 6px 8px; border: 3px solid #d6d9e4; border-radius: 14px; font-weight: 900; cursor: pointer; transition: transform .12s; }
.sv-stars span { font-size: 1.2rem; }
.sv-stars input:checked + span, .sv-options input:checked + span { border-color: var(--ink); background: var(--yellow); transform: scale(1.04); box-shadow: 0 3px 0 var(--ink); }
.sv-stars input:focus-visible + span, .sv-options input:focus-visible + span { outline: 3px solid var(--sky-2); }
.sv-ends { display: flex; justify-content: space-between; margin-top: 4px; color: #6c757d; font-weight: 700; }
.sv-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; margin-top: 6px; }
.sv-options span { font-size: .95rem; word-break: keep-all; text-align: center; }
.sv-text textarea { width: 100%; box-sizing: border-box; margin-top: 6px; resize: vertical; }
.sv-team { text-align: left; }
.sv-thanks { text-align: center; padding: 10px 0; } .sv-thanks i { font-style: normal; font-size: 3.4rem; } .sv-thanks h1 { margin: 6px 0; }
.sv-card .sv-actions { flex-wrap: wrap; gap: 6px; }
.sv-link { margin: 6px 0 10px; word-break: break-all; }
.sv-count { font-size: 1.05rem; margin: 6px 0 10px; }
.sv-result { padding: 10px 0; border-top: 2px dashed #e3e6ef; } .sv-result h4 { margin: 0 0 6px; }
.sv-avg { margin: 0 0 6px; font-size: 1.05rem; }
.sv-result .survey-bars div { grid-template-columns: minmax(4em, 9em) 1fr 2.5em; }
.sv-edit { width: min(640px, calc(100vw - 32px)); text-align: left; }
dialog.modal:has(.sv-edit) { width: min(680px, calc(100vw - 16px)); }
.sv-edit-list { margin: 10px 0; padding-left: 0; list-style: none; display: grid; gap: 10px; max-height: 52vh; overflow: auto; }
.sv-edit-q { display: grid; gap: 6px; padding: 10px; border: 3px solid #e3e6ef; border-radius: 14px; }
.sv-edit-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sv-edit-row .input { flex: 1; min-width: 120px; }
.sv-edit-row select.input { flex: 0 1 auto; min-width: 110px; }
.sv-poster-sub { margin: 0; font-weight: 800; font-size: 1.2rem; }
.rp-survey { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
@media print {
  .sv-poster-page { page: famcards; }
  .sv-poster { height: 297mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 2026-10-22: 누가 로그인했나 · 휴대폰 키보드 · 휴대폰 가로 갤러리 ---------- */
/* 👪 오른쪽 위 가족 칩: 선생님이 넣은 실제 이름(김대현)을 휴대폰에서도 늘 보여요(별명만이면 어느 가족인지 헷갈려요) */
.me-chip .me-name { display: inline-block; max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 1180px) { .me-chip .me-name { max-width: 5em; } }
@media (max-width: 430px) { .me-chip .me-name { max-width: 3.6em; font-size: .85rem; } }
.login-nick { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: #f3f0ff; font-size: .9rem; }
.login-not-us { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: #fff4e6; font-weight: 700; font-size: .92rem; }
.login-fam small { word-break: keep-all; text-align: center; }
/* 🔑 가족을 고르면 나머지 타일은 접혀요 → PIN 칸이 화면 위쪽(휴대폰 키보드에 안 가려짐) */
.login-panel.picking > .lead, .login-panel.picking .login-fam:not(.on) { display: none; }
.login-panel.picking .login-families { grid-template-columns: 1fr; margin-bottom: 10px; }
.login-panel.picking .login-fam.on { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; padding: 10px 16px; transform: none; text-align: left; justify-items: start; }
.login-panel.picking .login-fam.on span { font-size: 2.2rem; }
/* ⌨️ 키보드가 올라온 만큼 아래 여백(아이폰은 화면 높이가 그대로라 입력칸을 올릴 자리가 필요해요) */
@media screen { .page { padding-bottom: calc(48px + var(--kb, 0px)); } }
@media screen and (max-width: 700px) { .page { padding-bottom: calc(40px + var(--kb, 0px)); } }
/* 📱 휴대폰 가로(키가 낮은 화면): 넓은 화면처럼 옆으로 밀면 맨 윗줄만 보여요 → 세로 휴대폰처럼 위아래로 넘기고, 한 줄에 여러 칸 */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --tile: min(31vh, 17vw); --gap-x: 2.6vw; --gap-y: 4.5vh; }
  .shelf { bottom: 78px; overflow-x: hidden; overflow-y: auto; display: block; }
  .select-screen .shelf { top: 112px; }
  .grid { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, var(--tile)); grid-auto-rows: var(--tile); justify-content: center; padding: 16px 3vw 30px; }
  .tile { --dy: 0px !important; }
  .bar { height: 74px; padding-left: 92px; padding-right: 14px; gap: 12px; }
  .bar::before { left: 20px; top: -22px; }
  .nameplate { left: 12px; bottom: 7px; }
  .nameplate .who { width: 56px; height: 56px; font-size: 32px; border-width: 4px; border-radius: 12px; }
  .nameplate .plate { font-size: .8rem; max-width: 80px; }
  .bar .title { font-size: 1.2rem; }
  .bar .desc { font-size: .8rem; }
  .bar .stats { display: none; }
  .btn.start { font-size: 1.1rem; padding: .15em .7em; }
  .camp-banner-slot { top: auto; bottom: 84px; }
  .camp-banner { font-size: .8rem; padding: 5px 12px; }
  .badge-new { font-size: .85rem; right: -10px; top: -12px; padding: 1px 8px 2px; }
  .badge-medal { transform: scale(.7); top: -16px; right: -16px; }
}

/* 🎯 주제 여러 개 — 대시보드·올리기 */
.topic-list { margin: 6px 0 0; padding-left: 1.3em; display: grid; gap: 2px; }
.topic-bulk { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 800; }
.topic-bulk select { width: auto; max-width: 220px; padding: 4px 8px; }
.app-table .topic-set { min-width: 130px; max-width: 200px; padding: 4px 6px; }
.topic-editor .topic-now { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; white-space: nowrap; }
.topic-editor textarea { min-height: 0; font-family: var(--body); }
/* 주제마다 이름(미션·활동…)·앞 이모지 */
.topic-look { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 2px dashed #d0d4f0; border-radius: 12px; background: #fafbff; }
.topic-look label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; }
.topic-look .topic-icon { width: 3.4em; text-align: center; font-size: 1.1rem; padding: 4px; }
.topic-look .topic-word { width: 6.5em; padding: 4px 8px; }
.topic-preview { padding: 3px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); font: .95rem var(--display); white-space: nowrap; }
.topic-picks { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.topic-pick-btn { min-width: 34px; height: 32px; padding: 0 6px; border: 2px solid #d0d4f0; border-radius: 9px; background: #fff; font: 1.05rem var(--body); cursor: pointer; }
.topic-pick-btn.word { font: 800 .85rem var(--body); padding: 0 10px; }
.topic-pick-btn.on { border-color: var(--ink); background: var(--yellow); }
.topic-pick .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* 🐙 올리기: GitHub 저장소에서 가져오기(upload.js fetchRepo) */
.gh-box { padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #f3f0ff; }
.gh-box .field { margin: 0; }
.gh-or { margin: 10px 0 4px; text-align: center; color: #666; font-weight: 800; font-size: .9rem; }
.gh-row { display: flex; gap: 8px; align-items: stretch; }
.gh-row .input { flex: 1; min-width: 0; }
.gh-row .btn { flex: none; white-space: nowrap; }
.gh-state { margin: 6px 0 0; font-weight: 700; }
.gh-state:empty { display: none; }
.story-repo { margin: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 🧭 부탁 도우미: 맨 위에 늘 보이는 '따라 하기로 돌아가기' */
.wiz-back { position: sticky; top: 0; z-index: 3; display: inline-flex; margin-bottom: 8px; }
/* 📖 따라 하기: 3단계 부탁 만들기(카드 안) — 그림 없이 넓게 */
.g-card.wide { grid-template-columns: 1fr; }
.g-build { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-build > .gb-q:first-child, .g-build > .gb-done { grid-column: 1 / -1; }
@media (max-width: 900px) { .g-build { grid-template-columns: 1fr; } }
.gb-q { display: grid; align-content: start; gap: 6px; padding: 8px 12px; border: 2px solid #dfe3f0; border-radius: 14px; background: #fff; }
.gb-q .input { padding: 6px 10px; }
.gb-q > b { font-size: 1.02rem; }
.gb-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.gb-chips .chip { font-size: .84rem; padding: 3px 9px; }
.gb-done { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 14px; background: #fff8d6; border: 2px dashed #f2c94c; }
.gb-done b { color: #2b8a3e; }
/* 화면 그림 더: Codex 폴더·허락, GitHub 새 저장소·올리기, 갤러리 🐙 칸 */
.mock-side { margin: 0; padding: 3px 8px; border-radius: 8px; background: #f1f3f5; font-weight: 700; justify-self: start; }
.mock-h { margin: 0; font-weight: 900; font-size: .85rem; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mock-radio { margin: 0; color: #333; }
.mock-ask { margin: 0; padding: 6px 9px; border-radius: 10px; background: #fff4e6; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mock-ask .mock-hot, .mock-btn { padding: 2px 8px; border: 2px solid var(--ink); background: var(--yellow); font-weight: 900; }
.mock-go .gh { background: #2da44e; color: #fff; border-color: #1a7f37; }
.mock-menu { margin: 0; padding: 4px 8px; border: 1px solid #d0d7de; border-radius: 8px; background: #f6f8fa; justify-self: end; }
.mock-drop { margin: 0; padding: 14px 8px; border: 2px dashed #8c959f; border-radius: 10px; text-align: center; color: #57606a; font-weight: 700; }
.mock-tabs { margin: 0; display: flex; gap: 5px; } .mock-tabs > * { padding: 2px 8px; border-radius: 8px; border: 2px solid #dee2e6; }
.mock-tabs b { border-color: var(--ink); background: var(--yellow); }
.mock-app { display: grid; justify-items: center; gap: 4px; padding: 12px; border-radius: 12px; background: linear-gradient(160deg, #e7f5ff, #fff0f6); font-size: 2rem; }
.mock-app b { font-size: .95rem; } .mock-app span { font-size: .8rem; padding: 3px 12px; border-radius: 999px; background: #4f6bff; color: #fff; font-weight: 800; }
.mock-tip { margin: 0; text-align: center; font-weight: 700; } .mock-tip .mock-hot { padding: 1px 6px; background: var(--yellow); }

/* 📖 따라 하기: 4단계 우리 저장소 주소 칸 · 진짜 Codex 앱처럼 어두운 그림 */
.g-repo { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #f3f0ff; }
.g-repo [data-repo-ok] { font-weight: 800; color: #2b8a3e; font-size: .85rem; }
@media (max-width: 700px) { .g-repo { grid-template-columns: 1fr; } }
.mock-dark { background: #1e1e1e; color: #eee; border-color: #111; }
.mock-dark .mock-top { background: #2a2a2a; border-color: #333; color: #ddd; }
.mock-dark .mock-hello { color: #fff; }
.mock-dark .mock-me { background: #2f3b52; color: #fff; }
.mock-dark .mock-ai { background: #2a2a2a; color: #eee; }
.mock-composer { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: #2a2a2a; }
.mock-chips { margin: 0; display: flex; gap: 8px; font-size: .72rem; } .mock-chips > * { padding: 2px 6px; border-radius: 6px; }
.mock-chips .mock-hot { background: var(--yellow); color: var(--ink); }
.mock-type { margin: 0; padding: 6px 8px; border-radius: 8px; background: #333; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row { margin: 0; display: flex; justify-content: space-between; align-items: center; color: #aaa; font-size: .72rem; }
.mock-send { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #111; }
.g-fixes .chip.yellow { background: var(--yellow); border-color: var(--ink); font-weight: 900; }

/* 👪 가족 표: 번호·조·GPT 계정 번호(fam-groups.js) — 조마다 스프레드시트처럼 색 */
.fam-table .fam-no { width: 4.2em; padding: 4px 6px; }
.fam-table .fam-group { width: 5.2em; padding: 4px 6px; }
.fam-table .fam-gpt { width: 6em; padding: 4px 6px; }
.fam-table tr.fam-in-group > td { background: color-mix(in srgb, var(--gc) 55%, #fff); }
.fam-table tr.fam-group-head > td { background: var(--gc); font-size: 1rem; padding: 6px 10px; border-top: 3px solid var(--ink); }
.fam-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.fam-group-pill { display: inline-block; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--gc, #f1f3f5); font-weight: 800; font-size: .85rem; margin: 2px 0; }
/* 로그인 화면 가족 타일: 조·번호 표 */
.login-fam .fam-tag { display: inline-block; margin: 2px auto 0; padding: 0 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--gc, #f1f3f5); font: 800 .72rem var(--body); font-style: normal; color: var(--ink); }
.fam-table .fam-gpt-id { display: block; max-width: 12em; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: #2b8a3e; font-weight: 700; }
.fam-table .fam-gpt-id.none { color: #e8590c; }
/* 📖 따라 하기 1단계: 우리 가족 ChatGPT 계정(그 가족만 보여요) */
.g-account { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #e6fcf5; }
.g-account:empty { display: none; }
.g-account b.gid { font: 1.1rem ui-monospace, monospace; padding: 2px 8px; border-radius: 8px; background: #fff; border: 2px dashed #12b886; user-select: all; }
.g-account .muted { flex-basis: 100%; font-size: .85rem; }
/* ---------- 🖼 전시 모드 (#/kiosk, kiosk.js): 흘러가는 타일 띠 → 눌러서 체험 → 가만히 두면 다시 갤러리 ---------- */
.kiosk-setup { max-width: 640px; display: grid; gap: 12px; }
.kiosk-setup .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 800; cursor: pointer; }
.pill-check:has(input:checked) { background: var(--yellow); }
.kiosk-idle .input { max-width: 8em; }
.kiosk-count { margin: 0; font-weight: 900; color: var(--sky-1); }
body.kiosk-on .org-credit, body.kiosk-on .live-float, body.kiosk-on .demo-ribbon { display: none !important; }
.kiosk { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(160deg, var(--sky-1), var(--sky-2) 60%, color-mix(in srgb, var(--sky-3) 70%, #fff)); }
.kiosk-head { display: flex; align-items: center; gap: 18px; padding: 18px 28px 6px; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.kiosk-head > b { font: clamp(1.6rem, 3vw, 2.6rem) var(--display); }
.kiosk-head > span { font-size: clamp(1rem, 1.6vw, 1.4rem); font-weight: 800; }
.kiosk-head > span b { color: var(--yellow); animation: kiosk-nudge 2.4s ease-in-out infinite; display: inline-block; }
@keyframes kiosk-nudge { 50% { transform: translateY(-4px); } }
.kiosk-exit { margin-left: auto; width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(0, 0, 0, .12); color: rgba(255, 255, 255, .6); font-size: .9rem; cursor: pointer; }
.kiosk-exit.holding { background: var(--red, #ff6b6b); color: #fff; transition: background 2s; }
/* 줄 수(--rows)에 맞춰 타일 크기를 화면 높이로 정해요 — 줄이 찌그러져 이름표가 잘리지 않게 */
.kiosk-rows { --rows: 1; flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; min-height: 0; padding: 4px 0 14px; }
.kiosk-row { flex: none; overflow-x: clip; overflow-y: visible; padding: 8px 0; }
.kiosk-track { display: flex; gap: 26px; width: max-content; animation: kiosk-flow var(--dur, 60s) linear infinite; }
.kiosk-row.rev .kiosk-track { animation-direction: reverse; }
.kiosk-rows.paused .kiosk-track { animation-play-state: paused; }
@keyframes kiosk-flow { to { transform: translateX(-50%); } }
.kiosk-tile { --tile: clamp(90px, calc((100dvh - 120px) / var(--rows) - 92px), 240px); display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .2s; }
.kiosk-tile:hover, .kiosk-tile:focus-visible { transform: scale(1.08) rotate(-2deg); }
.kiosk-tile .tile { pointer-events: none; }
.kiosk-tile .tile { margin-bottom: 4px; }
.kiosk-who { max-width: calc(var(--tile) + 30px); overflow: hidden; text-overflow: ellipsis; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); border: 2px solid var(--ink); font-weight: 900; font-size: .9rem; white-space: nowrap; }
.kiosk-empty { margin: auto; color: #fff; font: 1.6rem var(--display); }
.kiosk-play { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; background: #11131f; }
.kiosk-play[hidden] { display: none; }
.kiosk-play-head { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--sky-1); color: #fff; }
.kiosk-play-head b { font: 1.5rem var(--display); }
.kiosk-play-head span { font-weight: 800; opacity: .9; }
.kiosk-back { font-size: 1.15rem; }
.kiosk-stage { position: relative; flex: 1; min-height: 0; display: grid; }
.kiosk-stage .app-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.kiosk-loading { margin: auto; color: #fff; font-weight: 800; }
.kiosk-warn { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(10, 14, 60, .45); }
.kiosk-warn[hidden] { display: none; }
.kiosk-warn-card { display: grid; justify-items: center; gap: 14px; padding: 26px 34px; border: 4px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 0 8px 0 var(--ink); font-size: 1.4rem; }
.kiosk-warn-card .btn { font-size: 1.2rem; }
@media (prefers-reduced-motion: reduce) { .kiosk-track { animation-duration: calc(var(--dur, 60s) * 3); } }

/* ---------- 📖 따라 하기: 닌텐도 게임 튜토리얼처럼(10/24) ----------
   카드 크기는 단계마다 같게(높이 고정 + 스크롤 자리 미리) · 넘길 때 옆으로 미끄러지기 · 삐약이 말풍선 · STAGE ★ · STAGE CLEAR! */
@media (min-width: 701px) and (min-height: 600px) {
  .guide-panel { height: calc(100dvh - 140px); }
  .g-card { flex: 1 1 0; }
}
.g-card { scrollbar-gutter: stable; grid-template-columns: 320px 1fr; background: #fffdf5 radial-gradient(circle, rgba(43, 49, 224, .07) 1.5px, transparent 1.6px) 0 0 / 18px 18px; border-width: 4px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .05); position: relative; }
.g-card.pop { animation: g-slide-next .28s cubic-bezier(.2, .9, .3, 1); }
.g-card.pop[data-dir="prev"] { animation-name: g-slide-prev; }
@keyframes g-slide-next { from { opacity: 0; transform: translateX(36px); } }
@keyframes g-slide-prev { from { opacity: 0; transform: translateX(-36px); } }
@media (max-width: 1100px) { .g-card { grid-template-columns: 270px 1fr; } }
/* STAGE 4 / 8 · ★★☆☆ */
.g-text small.g-stage { display: inline-block; padding: 3px 12px; border: 3px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--yellow); font: .95rem var(--display); letter-spacing: .04em; }
/* 💬 삐약이 말풍선(게임 대화 상자) */
.g-talk { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 10px; margin: 8px 0 10px; cursor: pointer; }
.g-talk-face { display: grid; place-items: center; width: 52px; height: 52px; border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 1.8rem; box-shadow: 0 3px 0 var(--ink); animation: g-bob 2.4s ease-in-out infinite; }
.g-talk-box { position: relative; padding: 14px 16px 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.g-talk-box::before { content: ''; position: absolute; left: -11px; bottom: 14px; width: 16px; height: 16px; background: #fff; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.g-talk-name { position: absolute; top: -13px; left: 14px; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; background: #ff922b; color: #fff; font: .8rem var(--display); }
.g-talk .g-why { margin: 0; min-height: 1.5em; color: var(--ink); font-size: 1.05rem; font-weight: 800; line-height: 1.5; }
.g-talk-next { position: absolute; right: 10px; bottom: 4px; font-size: .7rem; font-style: normal; color: var(--sky-1); animation: g-blink 1s steps(2) infinite; }
@keyframes g-blink { 50% { opacity: 0; } }
/* 할 일: 번호 → 다 하면 ★ (얻을 때 통 튀어요) */
.g-todo label:has(input:checked)::before { content: '★'; background: #fab005; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.g-todo label:has(input:checked) { border-color: #f08c00; background: #fff9db; }
.g-todo label:has(input:checked) span { color: #8a5a00; }
.g-todo label.got::before { animation: g-coin .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes g-coin { 0% { transform: scale(.4) rotateY(0); } 60% { transform: scale(1.35) rotateY(360deg); } 100% { transform: scale(1); } }
/* 단계 줄: 다 한 단계는 ★, 지금 단계 위에 ▼ */
.guide-steps button.done b::after { content: '★'; }
.guide-steps button.done b { background: #fab005; }
.guide-steps button[aria-selected=true]::before { content: '▼'; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); color: var(--ink); font-size: .8rem; animation: g-point 1s ease-in-out infinite; }
@keyframes g-point { 50% { transform: translate(-50%, 4px); } }
/* ⭐ STAGE CLEAR! */
.g-clear { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgba(255, 253, 245, .82); pointer-events: none; animation: g-clear-out 1.5s ease forwards; }
.g-clear b { font: clamp(2.2rem, 6vw, 4rem) var(--display); color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); animation: g-clear-pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.g-clear span { font-size: 2.2rem; color: #fab005; letter-spacing: .2em; text-shadow: 0 3px 0 var(--ink); animation: g-clear-pop .6s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes g-clear-pop { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }
@keyframes g-clear-out { 80% { opacity: 1; } to { opacity: 0; } }
/* Ⓐ Ⓑ 단추 표시 */
.g-key { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; background: var(--ink); color: #fff; font: .8em var(--display); vertical-align: -.1em; }
.g-key.a { background: #e03131; } .g-key.b { background: #f59f00; }
@media (prefers-reduced-motion: reduce) { .g-card.pop, .g-talk-face, .g-talk-next, .guide-steps button[aria-selected=true]::before, .g-clear b, .g-clear span { animation: none !important; } }
html[data-calm="1"] .g-card.pop, html[data-calm="1"] .g-talk-face { animation: none !important; }
@media (max-width: 700px) {
  .g-card { grid-template-columns: 1fr; }
  .g-talk-face { width: 42px; height: 42px; font-size: 1.4rem; }
  .g-talk .g-why { font-size: .98rem; }
}
/* 따라 하기 카드: 한 화면에 더 많이(간격 줄이기) */
.g-card { padding: 14px 18px; gap: 6px 20px; }
.g-text h2 { margin: 4px 0 0; }
.g-talk { margin: 6px 0 8px; }
.g-talk-box { padding: 12px 14px 10px; }
.g-todo { gap: 5px; }
.g-todo label { padding: 5px 10px; font-size: .98rem; line-height: 1.45; }
.g-text .actions-row { margin-top: 8px; }
.g-tips { margin-top: 8px; }
/* 왼쪽 칸: 화면 그림 + 그 아래 💡 힌트 단추(접힘 → 누르면 그 자리에서 펼쳐짐), 칸 가운데에 */
.g-side { display: grid; gap: 12px; align-content: center; align-self: center; justify-items: center; min-width: 0; }
.g-side .g-art-wrap { align-self: start; justify-self: stretch; }
.g-side .g-tips { margin-top: 0; font-size: .92rem; justify-self: stretch; }
.g-side .g-tips:not([open]) { justify-self: center; padding: 6px 16px; border-radius: 999px; box-shadow: 0 3px 0 #ffc078; }
.g-side .g-tips:not([open]) summary { list-style: none; }
.g-side .g-tips:not([open]) summary::-webkit-details-marker { display: none; }
.g-tips summary { color: #e8590c; }
@media (max-width: 700px) { .g-side { order: 2; } }
/* 🎯 선생님: 앱을 다른 주제로 옮기기 — 대시보드 고르기 칸·옮기기 막대, 앱 화면 ⋯ 메뉴 */
.tm-topics { display: contents; }
.app-table .pick-col { width: 34px; text-align: center; }
.app-table .pick-col input { width: 18px; height: 18px; cursor: pointer; }
.topic-move { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff3bf; font-weight: 900; box-shadow: 0 4px 0 var(--ink); }
.topic-move select { width: auto; max-width: 320px; }
.topic-filter { width: auto; max-width: 220px; padding: 4px 8px; }
.app-table .topic-set { max-width: 240px; }
/* 🐙 HTML 파일 고르기 · 🖱 끌어다 놓기 */
.gh-pick-q { display: block; font-weight: 900; margin-bottom: 6px; }
.gh-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-picks .btn { text-transform: none; }
.drop-zone { border: 3px dashed #adb5bd; border-radius: 16px; padding: 18px; background: #f8f9fa; text-align: center; }
.drop-zone .drop-big { font-size: 1.05rem; }
.drop-overlay { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; background: rgba(34, 139, 230, .25); pointer-events: none; }
.drop-overlay[hidden] { display: none; }
.drop-overlay > div { display: grid; gap: 6px; padding: 28px 40px; border: 4px dashed var(--ink); border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 8px 0 var(--ink); }
.drop-overlay b { font-size: 1.8rem; }
.drop-overlay span { font-weight: 800; color: #495057; }
/* 📋 설문: 갤러리 위 단추 · 답하는 사람 · 우리 답 목록 · QR · 응답 관리 */
.top .sv-top-btn { background: #e7f5ff; }
.top .sv-top-btn[hidden] { display: none; }
.sv-who-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.sv-who-picks .btn.on { background: var(--yellow, #ffd43b); box-shadow: 0 3px 0 var(--ink); }
.sv-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sv-head .sv-head-name { display: grid; text-align: center; }
.sv-mine { margin: 10px 0 14px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #f8f9fa; }
.sv-mine h3 { margin: 0 0 6px; font-size: 1rem; }
.sv-mine ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sv-mine li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; background: #fff; }
.sv-mine-acts { display: flex; gap: 6px; }
.sv-qr-modal { text-align: center; }
.sv-qr-big { width: min(70vw, 320px); margin: 8px auto; }
.sv-qr-big svg { width: 100%; height: auto; }
.sv-manage { margin-top: 10px; }
.sv-manage summary { cursor: pointer; font-weight: 900; }
.sv-table td { vertical-align: middle; }
/* 📋 설문 QR 포스터: 화면(강당 프로젝터)에서는 가운데 크게 — 한 화면에 꽉(인쇄는 위 A4 그대로) */
@media screen {
  .sv-poster-page { min-height: 100dvh; display: grid; justify-items: center; align-content: start; gap: 10px; padding: 12px 16px; }
  .sv-poster-page .cert-tools { justify-content: center; }
  .sv-poster-page .sv-poster { width: min(100%, 92vh); min-height: 0; height: auto; padding: clamp(14px, 3vh, 36px); border-radius: 28px; gap: clamp(4px, 1.2vh, 12px); }
  .sv-poster-page .sv-poster h1 { font-size: clamp(2rem, 7vh, 4.4rem); }
  .sv-poster-page .sv-poster .sv-poster-sub { font-size: clamp(1rem, 2.6vh, 1.6rem); }
  .sv-poster-page .sv-poster .fp-qr { width: min(80vw, 58vh); }
  .sv-poster-page .sv-poster .fp-url { font-size: clamp(1rem, 2.6vh, 1.6rem); }
}
.sv-poster-sub2 { font-size: .95rem !important; opacity: .9; }
/* 📋 설문 한 문항씩: 진행 막대 · 번호 단추 · 이전/다음 — 한 화면 안에(스크롤 짧게) */
.sv-stepped .sv-step { min-height: 190px; }
.sv-stepped .sv-step .sv-q { margin: 0; border: 0; padding: 0; }
.sv-stepped .sv-step legend { font-size: 1.25rem; font-weight: 900; line-height: 1.45; margin-bottom: 12px; }
.sv-stepped .sv-stars label span { min-width: 52px; min-height: 52px; font-size: 1.25rem; }
.sv-bar { height: 10px; border-radius: 999px; background: #e9ecef; overflow: hidden; margin: 6px 0 8px; }
.sv-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd43b, #fab005); border-radius: inherit; transition: width .25s; }
.sv-dots { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 12px; }
.sv-dot { min-width: 30px; height: 30px; padding: 0 6px; border: 2px solid #ced4da; border-radius: 999px; background: #fff; font-weight: 900; font-size: .85rem; cursor: pointer; color: #495057; }
.sv-dot.done { background: #d3f9d8; border-color: #51cf66; }
.sv-dot.on { background: #ffd43b; border-color: var(--ink); color: var(--ink); }
.sv-nav { justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.sv-progress { font-weight: 900; min-width: 56px; text-align: center; }
.sv-nav [hidden] { display: none !important; }
/* 📊 설문 결과 그래프: 막대는 한 색(파랑) — 크기만, 숫자·글은 글자 색. 막대 두께 ≤ 18px, 끝만 둥글게(바닥 쪽은 각지게), 옅은 바탕 줄 */
.svz { --svz-bar: #2a78d6; --svz-track: #eef1f5; --svz-ink: #1b1b1f; --svz-ink-2: #52514e; display: grid; gap: 14px; color: var(--svz-ink); }
.svz-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.svz-tile { flex: 1 1 120px; display: grid; padding: 10px 14px; border: 2px solid #dee2e6; border-radius: 14px; background: #fff; }
.svz-tile b { font: 2rem/1.1 var(--display, inherit); color: var(--svz-ink); }
.svz-tile span { color: var(--svz-ink-2); font-weight: 800; font-size: .85rem; }
.svz-overview { padding: 12px 14px; border: 2px solid #dee2e6; border-radius: 14px; background: #fff; }
.svz-overview h4, .svz-card h4 { margin: 0 0 10px; font-size: 1rem; line-height: 1.4; }
.svz-avg-grid { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 8px 12px; align-items: center; }
.svz-avg-label { font-weight: 800; font-size: .9rem; color: var(--svz-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svz-avg-label small, .svz-qn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: 4px; border-radius: 999px; background: #f1f3f5; color: var(--svz-ink-2); font-size: .72rem; font-weight: 900; vertical-align: 1px; }
.svz-avg-bar { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.svz-avg-bar b { font-weight: 900; min-width: 2.2em; text-align: right; }
.svz-avg-bar small { color: var(--svz-ink-2); font-size: .8rem; }
.svz-track { position: relative; display: block; height: 16px; border-radius: 0 4px 4px 0; background: var(--svz-track); background-image: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), #dfe3e8 calc(20% - 1px) 20%); }
.svz-track em { display: block; height: 100%; max-width: 100%; border-radius: 0 4px 4px 0; background: var(--svz-bar); transition: width .4s; }
.svz-axis { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 12px; margin-top: 4px; }
.svz-ticks { position: relative; height: 14px; margin-right: 4.4em; }
.svz-ticks i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: .72rem; color: var(--svz-ink-2); }
.svz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.svz-card { padding: 12px 14px; border: 2px solid #dee2e6; border-radius: 14px; background: #fff; display: grid; align-content: start; gap: 6px; }
.svz-card.svz-wide { grid-column: 1 / -1; }
.svz-big { margin: 0; font: 2.2rem/1 var(--display, inherit); color: var(--svz-ink); }
.svz-big small { font: 800 .9rem/1 var(--body); color: var(--svz-ink-2); }
.svz-dist { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 8px; align-items: center; font-size: .88rem; }
.svz-dist > span { font-weight: 800; color: var(--svz-ink-2); white-space: nowrap; }
.svz-dist > b { font-weight: 900; text-align: right; white-space: nowrap; }
.svz-dist > b small { color: var(--svz-ink-2); font-weight: 700; }
.svz-ends { display: flex; justify-content: space-between; margin: 2px 0 0; font-size: .76rem; }
.svz-texts { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.svz-big-view .svz-texts { max-height: none; columns: 2 320px; display: block; }
.svz-big-view .svz-texts li { break-inside: avoid; margin-bottom: 6px; }
.sv-results-page { padding: 12px 16px; display: grid; gap: 10px; }
.sv-results-page .cert-tools { justify-content: center; align-items: center; }
.sv-results-page .cert-tools .muted { color: #fff; font-weight: 800; }
.svz-more { border-top: 2px dashed #dee2e6; padding-top: 8px; }
.svz-more > summary { cursor: pointer; font-weight: 900; margin-bottom: 10px; }
.sv-results-panel { max-width: 1200px; width: 100%; margin: 0 auto; }
.sv-results-panel h1 { margin: 0 0 12px; }
.svz-big-view .svz-avg-label { font-size: 1.05rem; }
.svz-big-view .svz-track { height: 18px; }
.svz-big-view .svz-avg-bar b { font-size: 1.15rem; }
@media (max-width: 560px) { .svz-avg-grid, .svz-axis { grid-template-columns: minmax(84px, 38%) 1fr; } }
@media print { .sv-results-page .cert-tools { display: none; } .svz-card, .svz-overview { break-inside: avoid; } }
/* 😞→😄 5점: 왼쪽 빨강(불만족) → 오른쪽 초록(만족). 안 고른 것도 옅은 색 띠, 고르면 진한 테두리·바탕 · 아래 💬 의견 칸 */
.sv-faces { gap: 6px; }
.sv-face { --fc: #adb5bd; --fbg: #f8f9fa; }
.sv-face.f1 { --fc: #e03131; --fbg: #fff5f5; } .sv-face.f2 { --fc: #f76707; --fbg: #fff4e6; } .sv-face.f3 { --fc: #f59f00; --fbg: #fff9db; }
.sv-face.f4 { --fc: #74b816; --fbg: #f4fce3; } .sv-face.f5 { --fc: #2b8a3e; --fbg: #ebfbee; }
.sv-faces .sv-face span { display: grid; gap: 2px; justify-items: center; min-height: 86px; padding: 8px 2px 6px; border: 3px solid color-mix(in srgb, var(--fc) 45%, #fff); border-bottom-width: 6px; border-bottom-color: var(--fc); background: var(--fbg); color: var(--ink); }
.sv-faces .sv-face i { font-style: normal; font-size: 1.7rem; line-height: 1; filter: grayscale(.35); transition: filter .15s, transform .15s; }
.sv-faces .sv-face b { font-size: 1.05rem; line-height: 1; }
.sv-faces .sv-face small { font-size: .66rem; font-weight: 800; color: #495057; text-align: center; line-height: 1.15; word-break: keep-all; }
.sv-faces .sv-face input:checked + span { border-color: var(--ink); border-bottom-color: var(--fc); background: color-mix(in srgb, var(--fc) 28%, #fff); transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 0 var(--ink); }
.sv-faces .sv-face input:checked + span i { filter: none; transform: scale(1.18); }
.sv-faces:has(input:checked) .sv-face input:not(:checked) + span { opacity: .55; }
.sv-scale .sv-ends small { font-weight: 800; color: #495057; }
.sv-note { display: grid; gap: 4px; margin-top: 12px; padding: 10px 12px; border: 2px dashed #ced4da; border-radius: 14px; background: #f8f9fa; animation: sv-note-in .2s ease-out; }
.sv-note[hidden] { display: none; }
.sv-note span { font-weight: 900; font-size: .92rem; }
.sv-note textarea { min-height: 64px; }
@keyframes sv-note-in { from { opacity: 0; transform: translateY(-4px); } }
.svz-notes { margin-top: 4px; }
.svz-notes > summary { cursor: pointer; font-weight: 900; font-size: .88rem; }
.svz-score { display: inline-block; padding: 0 6px; border-radius: 999px; font-weight: 900; font-size: .78rem; background: #f1f3f5; }
.svz-score.f1 { background: #ffe3e3; } .svz-score.f2 { background: #ffe8cc; } .svz-score.f3 { background: #fff3bf; } .svz-score.f4 { background: #e9fac8; } .svz-score.f5 { background: #d3f9d8; }
@media (max-width: 420px) { .sv-faces .sv-face small { font-size: .6rem; } .sv-faces .sv-face span { min-height: 80px; } }
/* 📑 설문 결과지(한 장): 흰 종이 1000px — 화면·그림(PNG)·PDF 가 같은 모양. 갈라지는 색(빨강 불만족 · 회색 보통 · 초록 만족)은 막대에만, 글자는 글자 색 */
.svr-wrap { width: 100%; display: grid; justify-items: center; }
.svr { --ink-1: #1b1b1f; --ink-2: #495057; --line: #e9ecef; width: 1000px; max-width: 100%; box-sizing: border-box; padding: 40px 44px 28px; background: #fff; color: var(--ink-1); border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-family: var(--body); display: grid; gap: 22px; }
.svr-stage .svr { box-shadow: none; border-radius: 0; }
.svr h1, .svr h2, .svr h3, .svr h4 { margin: 0; }
.svr-head { display: grid; gap: 8px; padding-bottom: 18px; border-bottom: 4px solid var(--ink-1); }
.svr-pill { justify-self: start; padding: 4px 14px 5px; border: 3px solid var(--ink-1); border-radius: 999px; background: #ffd43b; font: 1rem var(--display); }
.svr-head h1 { font: 2.2rem/1.15 var(--display); letter-spacing: .01em; }
.svr-head p { margin: 0; color: var(--ink-2); font-weight: 700; }
.svr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.svr-kpi { display: grid; gap: 2px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; background: #f8f9fa; }
.svr-kpi i { font-style: normal; font-size: 1.3rem; }
.svr-kpi b { font: 2.3rem/1.05 var(--display); }
.svr-kpi span { font-weight: 800; color: var(--ink-1); }
.svr-kpi small { color: var(--ink-2); font-size: .78rem; font-weight: 700; }
.svr-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .95rem; }
.svr-who > span { padding: 3px 12px; border-radius: 999px; background: #f1f3f5; font-weight: 700; }
.svr h2 { font: 1.35rem var(--display); margin-bottom: 10px; }
.svr h2 small { font: 700 .85rem var(--body); color: var(--ink-2); }
.svr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.svr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.svr-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.svr-rows { display: grid; gap: 0; }
.svr-row { display: grid; grid-template-columns: 250px 74px 1fr 104px; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.svr-row-head { border-top: 0; padding-top: 0; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.svr-label { font-weight: 800; font-size: 1.02rem; word-break: keep-all; line-height: 1.3; }
.svr-label small { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 6px; border-radius: 999px; background: #f1f3f5; font-size: .75rem; color: var(--ink-2); vertical-align: 1px; }
.svr-avg b { font: 1.6rem var(--display); } .svr-avg small { color: var(--ink-2); font-weight: 700; margin-left: 2px; }
.svr-stack { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: #f1f3f5; gap: 2px; }
.svr-stack i { display: grid; place-items: center; min-width: 2px; }
.svr-stack em { font-style: normal; font-weight: 900; font-size: .8rem; color: #fff; }
.svr-stack em.dark { color: var(--ink-1); }
.svr-sat { display: grid; justify-items: end; line-height: 1.1; }
.svr-sat b { font: 1.25rem var(--display); }
.svr-sat small { color: var(--ink-2); font-size: .75rem; font-weight: 700; }
.svr-hls { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.svr-hl { padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line); }
.svr-hl.good { background: #ebfbee; border-color: #b2f2bb; } .svr-hl.todo { background: #fff5f5; border-color: #ffc9c9; }
.svr-hl h3 { font: 1.1rem var(--display); margin-bottom: 8px; }
.svr-hl ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.svr-hl li b { font-size: 1.02rem; } .svr-hl li span { margin-left: 8px; color: var(--ink-2); font-weight: 700; font-size: .88rem; }
.svr-choice h4 { margin-bottom: 6px; } .svr-crow { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px; align-items: center; margin-bottom: 4px; }
.svr-crow i { height: 14px; border-radius: 0 4px 4px 0; background: #f1f3f5; } .svr-crow em { display: block; height: 100%; background: #2a78d6; border-radius: inherit; }
.svr-ngrid { columns: 2 380px; column-gap: 18px; }
.svr-ng { break-inside: avoid; margin-bottom: 14px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; }
.svr-ng h4 { font-size: 1rem; margin-bottom: 6px; } .svr-ng h4 small, .svr-texts h2 small { color: var(--ink-2); }
.svr-ng ul, .svr-texts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.svr-ng li, .svr-texts li { font-size: .92rem; line-height: 1.45; }
.svr-ng li small, .svr-texts li small { color: var(--ink-2); }
/* 그림 저장(html2canvas)은 color-mix 를 못 읽어서 옅은 색을 직접 줘요 */
.svr-face { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; font-weight: 900; font-size: .78rem; background: var(--bg); border: 1px solid var(--c); }
.svr-texts ul { display: block; columns: 2 380px; column-gap: 18px; }
.svr-texts li { break-inside: avoid; margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; background: #f8f9fa; }
.svr-foot { display: flex; justify-content: space-between; padding-top: 12px; border-top: 2px solid var(--line); color: var(--ink-2); font-size: .82rem; font-weight: 700; }
.svr-empty { color: var(--ink-2); }
@media (max-width: 760px) { .svr { padding: 22px 16px; } .svr-row { grid-template-columns: 1fr auto; } .svr-row .svr-stack { grid-column: 1 / -1; } .svr-row .svr-sat { grid-column: 1 / -1; justify-items: start; } .svr-row-head { display: none; } }
@media print { .sv-results-page { padding: 0; } .svr { width: 100%; box-shadow: none; padding: 0; } .svr-block { break-inside: avoid; } .svr-ng, .svr-texts li { break-inside: avoid; } }
/* 🤖 AI 스튜디오(#/studio): 화면 가득 — 왼쪽 💬 대화창 · 오른쪽 📱 앱. 휴대폰은 아래 탭으로 바꿔 봐요 */
.top .studio-top-btn { background: #f3e8ff; }
.top .studio-top-btn[hidden] { display: none; }
.studio-gate { text-align: center; }
.studio-app { position: fixed; z-index: 6; top: calc(var(--top-h, 74px) + 8px); left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 12px; }
.studio-chat, .studio-stage { min-height: 0; display: flex; flex-direction: column; background: #fff; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 rgba(0, 0, 0, .28); overflow: hidden; }
.studio-chat-head, .studio-stage-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 3px solid #e9ecef; background: #fbfaff; }
.studio-chat-name { flex: 1; min-width: 0; display: grid; }
.studio-chat-name b { font: 1.1rem / 1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-chat-name small { color: #495057; font-weight: 700; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-left { color: #5f3dc4; }
.studio-count:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #7048e8; color: #fff; font-size: .72rem; }
.studio-off { margin: 8px 10px 0; padding: 8px 12px; border: 3px dashed #f0a500; border-radius: 14px; background: #fff8e1; font-weight: 700; font-size: .9rem; }
.studio-off[hidden] { display: none; }
.studio-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(#f8f9ff, #fff 140px); overscroll-behavior: contain; }
.studio-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.studio-msg.me { justify-content: flex-end; }
.studio-ava { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font-size: 1.1rem; }
.studio-msg.ai .studio-ava { background: #f3e8ff; }
.studio-bubble { max-width: min(86%, 560px); padding: 9px 13px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.studio-bubble p { margin: 0; }
.studio-bubble p + p, .studio-bubble p + button, .studio-bubble p + pre { margin-top: 8px; }
.studio-msg.me .studio-bubble { background: #fff3bf; border-bottom-right-radius: 6px; }
.studio-msg.ai .studio-bubble { border-bottom-left-radius: 6px; }
.studio-msg.bad .studio-bubble { background: #fff5f5; border-color: #c92a2a; }
.studio-bubble small { display: block; margin-top: 4px; color: #868e96; font-size: .72rem; text-align: right; }
.studio-err { color: #c92a2a; font-weight: 800; }
.studio-edits { color: #2b8a3e; font-weight: 800; font-size: .82rem; }
.studio-bubble code { padding: 0 4px; border-radius: 6px; background: #f1f3f5; font: .88em ui-monospace, Menlo, Consolas, monospace; }
.studio-doing { color: #5f3dc4; font-weight: 800; font-size: .92rem; }
.studio-peek { margin: 6px 0 0; max-height: 64px; overflow: hidden; padding: 6px 8px; border-radius: 10px; background: #1f1f24; color: #b2f2bb; font: .7rem / 1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all;
  -webkit-mask-image: linear-gradient(transparent, #000 50%); mask-image: linear-gradient(transparent, #000 50%); }
.studio-typing { display: inline-flex; gap: 4px; vertical-align: middle; }
.studio-typing i { width: 7px; height: 7px; border-radius: 50%; background: #845ef7; animation: studio-dot 1s infinite; }
.studio-typing i:nth-child(2) { animation-delay: .15s; } .studio-typing i:nth-child(3) { animation-delay: .3s; }
.studio-vcard { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; width: 100%; margin-top: 8px; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 14px; background: #f3f0ff; box-shadow: 0 3px 0 var(--ink); text-align: left; cursor: pointer; }
.studio-vcard span { grid-row: span 2; font-size: 1.5rem; }
.studio-vcard small { color: #5f3dc4; font-weight: 700; }
.studio-vcard.on { background: var(--yellow); }
.studio-empty-note { margin: auto; color: #868e96; font-weight: 700; text-align: center; }
.studio-readonly { margin: 0; padding: 10px 14px; border-top: 3px solid #e9ecef; background: #f8f9fa; font-weight: 700; color: #495057; font-size: .9rem; }
.studio-input { padding: 8px 10px 10px; border-top: 3px solid #e9ecef; background: #fff; }
.studio-ideas { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 8px; }
.studio-ideas .chip { max-width: 100%; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .84rem; }
.studio-ideas .chip.ai { background: #f3f0ff; border-color: #5f3dc4; box-shadow: 0 3px 0 #5f3dc4; }
.studio-ideas .chip:disabled { opacity: .45; cursor: default; transform: none; }
.studio-base { margin: 0 0 6px; font-size: .82rem; font-weight: 700; color: #5f3dc4; }
.studio-base[hidden] { display: none; }
.studio-input-row { display: flex; gap: 8px; align-items: flex-end; }
.studio-input textarea { flex: 1; min-height: 52px; max-height: 160px; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 16px; font: 1rem / 1.45 var(--body); resize: vertical; }
.studio-input textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--yellow); }
.studio-input textarea.bad { border-color: var(--red); }
.studio-input .btn[disabled] { opacity: .6; cursor: wait; }
.studio-stage-head { flex-wrap: wrap; }
.studio-vpills { display: flex; gap: 4px; flex-wrap: wrap; }
.studio-vpill { min-width: 38px; height: 32px; padding: 0 8px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 800; cursor: pointer; }
.studio-vpill.on { background: var(--yellow); box-shadow: 0 2px 0 var(--ink); }
.studio-app-title { flex: 1; min-width: 80px; font: 1.05rem / 1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-tools { display: flex; gap: 6px; }
.studio-frame { position: relative; flex: 1; min-height: 0; background: #fff; }
.studio-frame > .app-frame { position: absolute; inset: 0; }
.studio-stage.big { position: fixed; inset: 6px; z-index: 60; }
.studio-building { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 6px 14px; border: 3px solid var(--ink); border-radius: 999px; background: #f3e8ff; font-weight: 800; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.studio-empty, .studio-work { position: absolute; inset: 14px; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; border: 3px dashed #ced4da; border-radius: 18px; }
.studio-empty span { font-size: 3.4rem; }
.studio-empty b, .studio-work b { font-size: 1.2rem; }
.studio-empty small, .studio-work small { color: #495057; font-weight: 600; }
.studio-work { border-color: #b197fc; background: #f8f0fc; }
.studio-bot { font-size: 4rem; animation: studio-bob 1.2s ease-in-out infinite; }
@keyframes studio-bob { 50% { transform: translateY(-10px) rotate(-6deg); } }
.studio-dots { display: flex; gap: 8px; }
.studio-dots i { width: 12px; height: 12px; border-radius: 50%; background: #845ef7; animation: studio-dot 1s infinite; }
.studio-dots i:nth-child(2) { animation-delay: .15s; } .studio-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes studio-dot { 50% { transform: translateY(-6px); opacity: .5; } }
.studio-code { width: min(100%, 720px); max-height: 46vh; overflow: hidden; margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; background: #1f1f24; color: #b2f2bb;
  font: .78rem / 1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: left; white-space: pre-wrap; word-break: break-all;
  -webkit-mask-image: linear-gradient(transparent, #000 40%); mask-image: linear-gradient(transparent, #000 40%); }
.studio-tabs { display: none; }
.studio-drawer { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .35); display: flex; }
.studio-drawer[hidden] { display: none; }
.studio-drawer-box { width: min(420px, 92vw); height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #fff; border-right: 4px solid var(--ink); animation: studio-slide .18s ease-out; }
@keyframes studio-slide { from { transform: translateX(-30px); opacity: 0; } }
.studio-drawer-box header { display: flex; align-items: center; gap: 8px; }
.studio-drawer-box header b { flex: 1; font: 1.15rem var(--display); }
.studio-drawer-box select { max-width: 150px; padding: 4px 6px; border: 2px solid var(--ink); border-radius: 10px; font: inherit; }
.studio-chat-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.studio-chat-list li { display: flex; gap: 6px; align-items: center; }
.studio-chat-open { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--ink); text-align: left; cursor: pointer; }
.studio-chat-open b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-chat-open small { color: #495057; font-size: .78rem; font-weight: 600; }
.studio-chat-list li.on .studio-chat-open { background: var(--yellow); }
.studio-chat-none { color: #868e96; font-weight: 700; padding: 10px 4px; }
.studio-admin .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.studio-admin .row > * { flex: 0 0 auto; }
.studio-admin .row > input[type=password] { flex: 1 1 260px; }
.studio-admin input[type=password], .studio-admin input[type=number], .studio-admin select { padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; font: inherit; }
.studio-admin input[type=password] { min-width: 220px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.studio-admin input[type=number] { width: 90px; }
/* 🔑 API 키 여러 개: 위에서부터 차례로 */
.studio-admin .pill.on { background: #d3f9d8; color: #2b8a3e; } .studio-admin .pill.off { background: #f1f3f5; color: #6c757d; }
.studio-admin .pill.warn { background: #fff3bf; color: #e67700; } .studio-admin .pill.bad { background: #ffe3e3; color: #c92a2a; }
.studio-admin .studio-keys { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.studio-admin .studio-keys:empty { display: none; }
.studio-admin .studio-keys li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; border: 3px solid var(--ink); border-radius: 14px; background: #f8f9fa; }
.studio-admin .studio-keys li:first-child { background: #ebfbee; }
.studio-admin .studio-key-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; }
.studio-admin .studio-keys code { font-weight: 800; }
.studio-admin .studio-key-label { font-weight: 800; }
.studio-admin .studio-keys .pill { white-space: normal; }
.studio-admin .studio-key-btns { margin-left: auto; display: flex; gap: 4px; }
.studio-admin .studio-key-btns .btn { padding: 4px 9px; min-width: 0; }
.studio-admin .studio-key-limits { order: 2; display: flex; flex-wrap: wrap; gap: 6px 10px; flex-basis: 100%; padding-left: 34px; }
.studio-admin .studio-key-num { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; }
.studio-admin .studio-key-num input { width: 74px; padding: 5px 8px; border: 3px solid var(--ink); border-radius: 10px; font: inherit; }
.studio-admin .studio-key-safe { padding: 8px 10px; border-radius: 12px; background: #fff9db; }
.studio-admin input[data-st-keylabel] { flex: 0 1 150px; min-width: 110px; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; font: inherit; }
.studio-admin .studio-usage { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.studio-admin .studio-usage div { padding: 8px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #f8f9fa; }
.studio-admin .studio-usage b { display: block; font-size: 1.3rem; }
.studio-admin .studio-switch { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 16px; background: #f8f0fc; }
.studio-admin .studio-switch.on { background: #ebfbee; }
.studio-admin .studio-switch b { flex: 1; }
@media (max-width: 800px) {
  .studio-app { top: var(--top-h, 64px); left: 0; right: 0; bottom: 0; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 0; }
  .studio-chat, .studio-stage { grid-row: 1; grid-column: 1; border-radius: 0; border-width: 3px 0 0; box-shadow: none; }
  .studio-app[data-tab="chat"] .studio-stage, .studio-app[data-tab="app"] .studio-chat { visibility: hidden; }
  .studio-tabs { display: flex; grid-row: 2; border-top: 3px solid var(--ink); background: #fff; padding-bottom: env(safe-area-inset-bottom); }
  .studio-tabs button { flex: 1; height: 50px; border: 0; background: #fff; font: 800 1rem var(--body); position: relative; }
  .studio-app[data-tab="chat"] [data-tab-go="chat"], .studio-app[data-tab="app"] [data-tab-go="app"] { background: var(--yellow); }
  .studio-tabs i { position: absolute; top: 8px; margin-left: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
  .studio-tabs i[hidden] { display: none; }
  .studio-bubble { max-width: 88%; }
  .studio-chat-head .label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .studio-bot, .studio-dots i, .studio-typing i { animation: none; } }

/* ⬆️ 스튜디오 올리기: 이미 올린 앱을 이 버전으로 바꾸기 / 새 앱으로 */
.studio-pick { display: grid; gap: 12px; max-width: 460px; }
.studio-pick h2 { margin: 0; font-size: 1.15rem; }
.studio-pick p { margin: 0; }
.studio-pick-list { display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.studio-pick-app { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--ink); font: inherit; cursor: pointer; min-height: 56px; }
.studio-pick-app:hover { background: #fff8d6; }
.studio-pick-app b { display: block; }
.studio-pick-app small { display: block; color: #555; margin-top: 2px; }
.pick-thumb { flex: none; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-size: 26px; background: var(--sky-4); border: 2px solid var(--ink); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-pick .actions-row { justify-content: flex-end; flex-wrap: wrap; }

/* 💳 스튜디오 요금 설정: 처음 만들기·고치기마다 모델·노력 */
.studio-admin .studio-plan { margin: 10px 0; padding: 10px 12px; border: 3px dashed var(--ink); border-radius: 14px; background: #fffdf0; }
.studio-plan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 8px 0; }
.studio-plan-btn { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.studio-plan-btn small { color: #555; font-size: .78rem; line-height: 1.3; }
.studio-plan-btn .studio-plan-usd { color: #2b8a3e; font-weight: 800; }
.studio-plan-btn.on { background: var(--yellow); }
.studio-plan-btn.on small { color: #333; }
.studio-admin .studio-plan-custom label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.studio-admin .studio-plan-custom select { max-width: 100%; }
.studio-admin .studio-usage .studio-plan-real b { display: inline; font-size: inherit; }
.studio-admin .studio-usage small { display: block; }
.studio-cost { margin: 6px 0 0; color: #6a6a7a; font-size: .76rem; }

/* 🧪 선생님 채팅창: '이번 말'에 쓸 요금 묶음 */
.studio-planbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; padding: 6px 8px; border: 2px dashed #b197fc; border-radius: 12px; background: #f8f0fc; }
.studio-planbar-label { font-weight: 800; font-size: .85rem; }
.studio-planbar .chip.plan { padding: 3px 8px; font-size: .78rem; min-height: 28px; }
.studio-planbar .chip.plan.on { background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }
.studio-planbar-now { flex-basis: 100%; color: #444; font-size: .8rem; }
.studio-planbar-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-right: 6px; }
.studio-planbar-row > b { font-size: .78rem; color: #5f3dc4; }

/* ⚠️ 스튜디오 미리 보기 앱에서 난 문제 → AI 에게 고쳐 달라고 하기 */
.studio-errbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fff3bf; font-size: .88rem; }
.studio-errbar[hidden] { display: none; }
.studio-errbar span { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.studio-errnote { color: #c92a2a; font-weight: 700; }

/* 🧭 스튜디오 질문 따라 만들기 · 🔀 아이디어 섞기 */
.studio-guide-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.studio-guide-opts .chip.guide { font-size: .9rem; }
.studio-guide-opts .chip.guide.on { background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }
.studio-guide-foot { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.studio-guide-ask { padding: 8px 10px; border: 2px dashed #b197fc; border-radius: 10px; background: #f8f0fc; }
.studio-msg.guide .studio-bubble { padding-top: 8px; padding-bottom: 8px; }
.studio-ideas .chip.guide-start { background: var(--yellow); font-weight: 800; }
.studio-ideas .chip.shuffle { background: #fff; border-style: dashed; }
.studio-guide-custom { display: flex; gap: 6px; margin-top: 8px; }
.studio-guide-custom input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; font: inherit; }
.studio-guide-opts .chip.guide.more { border-style: dashed; background: #fff; }

/* 🤖 AI 스튜디오에서 만든 앱 배지: 갤러리 타일 왼쪽 위(분류 아이콘 옆) · 정보 띠 · 앱 화면 제목 */
.studio-badge { display: none; }
.grid .studio-badge {
  display: inline-flex; align-items: center; gap: 2px; position: absolute; left: calc(5% + var(--tile) * .19); top: 5%; z-index: 2;
  height: calc(var(--tile) * .17); padding: 0 calc(var(--tile) * .045); border-radius: 999px;
  background: linear-gradient(135deg, #7048e8, #4dabf7); color: #fff; box-shadow: 0 0 0 2px #fff, 0 2px 0 2px rgba(0, 0, 0, .25);
  font-size: calc(var(--tile) * .075); line-height: 1; white-space: nowrap;
}
.grid .studio-badge b { font-weight: 900; letter-spacing: 0; }
.grid .face:not(:has(.genre-ico)) .studio-badge { left: 5%; }
.genre-pill.studio { background: linear-gradient(135deg, #7048e8, #4dabf7); }
.studio-chip { display: inline-block; padding: 0 8px; border-radius: 999px; background: linear-gradient(135deg, #7048e8, #4dabf7); color: #fff; font-weight: 800; font-size: .9em; }

/* Local subscription experiment: same studio, explicit connection/auth state. */
.studio-local-status { padding: .6rem 1rem; background: #fff3cd; color: #342d17; font-size: .85rem; }
.studio-local-status small { display: block; margin-top: .3rem; }
.studio-settings { max-width: 900px; margin-inline: auto; }
.studio-settings .panel { margin-bottom: 18px; padding: 20px; }
.studio-settings form { display: grid; gap: 12px; }
.studio-settings label { display: grid; gap: 6px; }
.studio-settings label[hidden] { display: none; }
.studio-settings pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f1f3f5; padding: 12px; border-radius: 8px; }
.studio-settings-message:not(:empty) { padding: 12px; background: #fff3cd; border: 2px solid var(--ink); border-radius: 10px; }
.studio-setup { max-width: 1000px; margin-inline: auto; }
.studio-setup-heading { padding: 12px 20px; color: white; }
.studio-setup-heading h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin: 8px 0; }
.studio-setup .panel { padding: 24px; margin-bottom: 20px; }
.studio-setup .panel p { line-height: 1.7; }
.studio-setup form, .studio-setup label { display: grid; gap: 10px; }
.setup-choice-head, .setup-selectors, .setup-downloads, .setup-links, .setup-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.setup-choice-head { justify-content: space-between; }
.setup-selectors > label { flex: 1; min-width: 190px; }
.setup-nav { margin: 20px 0; }
.setup-step { scroll-margin-top: 100px; }
.setup-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow, #ffdf38); color: #111; font-size: 1.1rem; }
.setup-command { display: flex; align-items: start; gap: 8px; background: #edf0f7; border-radius: 10px; padding: 12px; margin: 12px 0; }
.setup-command pre { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.studio-setup details { margin: 15px 0; }
.studio-setup summary { cursor: pointer; font-weight: bold; }
.studio-setup [data-setup-status]:not(:empty) { background: #fff3cd; border-radius: 8px; padding: 12px; }
@media (max-width: 600px) { .studio-setup .panel { padding: 16px; } .setup-command { flex-direction: column; } }
.studio-local-options { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .5rem; }
.studio-local-options label { display: flex; align-items: center; gap: .4rem; }
.studio-local-options select { max-width: 100%; padding: .3rem; font: inherit; }
.studio-remote-gate { max-width: 680px; margin: auto; }
.studio-remote-gate label, .modal:has([data-remote-url]) label { display: grid; gap: .4rem; margin: 1rem 0; }
.studio-remote-gate input, .modal [data-remote-url], .modal [data-pair-code] { width: 100%; box-sizing: border-box; }
.modal [data-devices] li { margin: .7rem 0; overflow-wrap: anywhere; }
.modal [data-classroom-url] { width: 100%; box-sizing: border-box; }
.modal [data-classroom-settings] { display: grid; gap: .7rem; margin-top: 1rem; }
.modal [data-classroom-settings] input[type="number"] { width: 6rem; }
.modal [data-members] li { margin: .8rem 0; overflow-wrap: anywhere; }
