/* PLAYORA 돌림판 화면 */
.wh-board { position: absolute; z-index: 2; }
.wh-board canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.wh-board canvas.drag { cursor: grabbing; }
.wh-board canvas.busy { cursor: default; }

/* 판 아래 줄: 판 이름·지금 바늘 아래 / 뽑힌 항목 빼기 */
.wh-under { position: absolute; z-index: 3; display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.wh-now { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; }
.wh-now b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wh-now span { color: var(--ink-3); font-weight: 500; font-size: 13px; flex: none; }
.wh-now.live b { color: var(--acc-2); }
.wh-go { position: absolute; z-index: 3; display: flex; gap: var(--s2); }
.wh-go .go { flex: 1; min-width: 0; }
.wh.land .wh-row { display: none; }
.wh-row { position: absolute; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.wh-row .bt { padding: 0 6px; height: 44px; font-size: 13px; }
.wh-row .bt .n { font-weight: 500; color: var(--ink-3); font-size: 12px; }

/* 결과 */
.res { position: absolute; z-index: 12; left: 50%; transform: translate(-50%, 18px) scale(0.96); opacity: 0; pointer-events: none; transition: opacity .2s, transform .45s var(--ease);
  width: min(420px, calc(100% - 24px)); background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--r3); box-shadow: 0 6px 0 var(--ink); padding: var(--s3) var(--s4) var(--s4); text-align: left; }
.res.on { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.res-k { display: flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--ink-3); font-weight: 600; }
.res-k i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ink); flex: none; }
.res-k .x { margin-left: auto; margin-right: -8px; }
.res-v { display: flex; align-items: center; gap: var(--s2); margin: 2px 0 var(--s2); min-width: 0; }
.res-v .em { font-size: 34px; line-height: 1; flex: none; }
.res-v b { font: 700 clamp(26px, 7vw, 38px)/1.15 var(--f-body); letter-spacing: -0.01em; min-width: 0; overflow-wrap: anywhere; }
.res-note { font-size: 13px; color: var(--ink-2); margin: 0 0 var(--s3); }
.res-acts { display: flex; gap: var(--s2); flex-wrap: wrap; }
.res-acts .bt { flex: 1; min-width: 0; padding: 0 var(--s2); }
.res-acts .bt.pri { flex: 1.4; }

/* 옆 판(넓은 화면) / 아래 시트(휴대폰) */
.wh-panel { position: absolute; z-index: 25; display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r3); overflow: hidden; }
.wh.port .wh-panel { left: 0; right: 0; bottom: 0; top: auto; height: min(84%, 680px); border-radius: var(--r3) var(--r3) 0 0; border-bottom: 0; border-left: 0; border-right: 0; transform: translateY(102%); transition: transform .32s var(--ease); box-shadow: 0 -10px 30px rgba(31, 36, 64, 0.18); }
.wh.port .wh-panel.on { transform: translateY(0); }
.wh.port .wh-panel:not(.on):not(.moving) { visibility: hidden; }
.ph { display: flex; align-items: center; border-bottom: 2px solid var(--ink); flex: none; }
.ph .tabs { border-bottom: 0; flex: 1; min-width: 0; }
.ph .ib { margin-right: 4px; }
.wh.land .ph .x { display: none; }
.pb { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pane { padding: var(--s3) var(--s3) var(--s4); }
.pane-h { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.pane-h .grow { flex: 1; min-width: 0; }
.lbl-s { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }

/* 항목 편집 */
.ed-title { display: flex; gap: var(--s2); align-items: center; margin-bottom: var(--s2); }
.ed-title .fld { font-weight: 700; }
.ed-add { display: flex; gap: var(--s2); align-items: flex-start; margin-bottom: var(--s2); }
.ed-add textarea { flex: 1; min-width: 0; height: 40px; min-height: 40px; max-height: 140px; resize: none; padding-top: 8px; line-height: 1.4; overflow-y: hidden; }
.ed-add textarea.tall { overflow-y: auto; }
.ed-add textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-tools { display: flex; gap: 6px; margin-bottom: var(--s2); flex-wrap: wrap; }
.ed-tools .bt { height: 32px; font-size: 13px; padding: 0 10px; }
.ed-list { list-style: none; margin: 0; padding: 0; }
.it { display: grid; grid-template-columns: 28px 32px minmax(0, 1fr) auto 30px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.it:last-child { border-bottom: 0; }
.it .sw-c { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); padding: 0; }
.it .em-b { width: 32px; height: 32px; border-radius: 8px; border: 1.5px dashed var(--line-2); background: transparent; font-size: 18px; line-height: 1; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); }
.it .em-b.has { border-style: solid; border-color: transparent; }
.it .em-b svg { width: 14px; height: 14px; }
.it .nm { width: 100%; min-width: 0; height: 34px; border: 1.5px solid transparent; border-radius: 8px; padding: 0 8px; background: transparent; font-size: 15px; font-weight: 500; outline: none; }
.it .nm:hover { border-color: var(--line); }
.it .nm:focus { border-color: var(--blue); background: var(--card); }
.it .wt { display: inline-flex; align-items: center; height: 30px; border: 1.5px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.it .wt button { width: 26px; height: 100%; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.it .wt button svg { width: 13px; height: 13px; }
.it .wt button:active { background: var(--paper-2); }
.it .wt span { min-width: 30px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.it .wt.big { border-color: var(--acc); background: rgba(255, 91, 58, 0.08); }
.it .wt.big span { color: var(--ink); font-weight: 700; }
.it .del { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 8px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); }
.it .del svg { width: 17px; height: 17px; }
.it .del:hover { color: var(--acc-2); background: rgba(255, 91, 58, 0.1); }
.it.out .nm { text-decoration: line-through; color: var(--ink-3); }
.it.out .sw-c, .it.out .em-b { opacity: 0.4; }
.it.out .del { color: var(--good); }
.it.flash { animation: itFlash .9s var(--ease); }
@keyframes itFlash { 0% { background: rgba(255, 207, 63, 0.7); } 100% { background: transparent; } }
.ed-foot { margin-top: var(--s3); padding-top: var(--s3); border-top: 2px dashed var(--line-2); display: flex; flex-direction: column; gap: var(--s3); }
.ed-foot .r { display: flex; align-items: center; gap: var(--s3); justify-content: space-between; flex-wrap: wrap; }
.ed-sum { font-size: 13px; color: var(--ink-2); }
.ed-text textarea { width: 100%; height: 260px; font-size: 15px; }
.ed-text p { font-size: 13px; color: var(--ink-2); margin: var(--s2) 0; }
.ed-text .acts { display: flex; gap: var(--s2); justify-content: flex-end; }

/* 묶음 */
.pre-lunch { border: 2px solid var(--ink); border-radius: var(--r2); padding: var(--s3); margin-bottom: var(--s3); background: var(--paper); }
.pre-lunch .t { display: flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: 16px; margin-bottom: var(--s2); }
.pre-lunch .t .em { font-size: 22px; }
.pre-lunch .t small { font-weight: 500; color: var(--ink-3); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip .n { opacity: 0.7; font-weight: 500; margin-left: 3px; }
.pre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--s2); }
.pre { display: flex; align-items: center; gap: var(--s2); min-height: 52px; padding: var(--s2) var(--s3); border: 2px solid var(--ink); border-radius: var(--r2); background: var(--card); text-align: left; box-shadow: 0 2px 0 var(--ink); min-width: 0; }
.pre > span { min-width: 0; }
.pre:active { transform: translateY(2px); box-shadow: none; }
.pre .em { font-size: 22px; line-height: 1; flex: none; }
.pre b { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.pre small { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.pre-num { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; border: 2px solid var(--ink); border-radius: var(--r2); padding: var(--s2) var(--s3); margin-top: var(--s3); background: var(--paper); }
.pre-num .t { font-weight: 700; flex: 1; min-width: 96px; }
.pre-num .t .em { margin-right: 6px; }

/* 기록 */
.hi-list { list-style: none; margin: 0; padding: 0; }
.hi { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: var(--s2); padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.hi time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hi b { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.hi small { display: block; color: var(--ink-3); font-size: 12px; }
.hi-stat { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s3); }
.hi-stat span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; }

/* 내 돌림판 */
.sv-list { list-style: none; margin: 0; padding: 0; }
.sv { display: flex; align-items: center; gap: var(--s2); padding: 6px 0; border-bottom: 1px solid var(--line); }
.sv .open { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 6px 4px; border-radius: 8px; }
.sv .open:hover { background: var(--paper); }
.sv .open b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv .open small { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv .del { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sv .del svg { width: 18px; height: 18px; }
.sv .del:hover { color: var(--acc-2); }
.sv-new { display: flex; gap: var(--s2); margin-bottom: var(--s3); }
.sv-new .fld { flex: 1; min-width: 0; }

/* 색·이모지 고르기 */
.pal { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); margin-bottom: var(--s3); }
.pal button { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--ink); padding: 0; position: relative; }
.pal button[aria-pressed="true"]::after { content: ""; position: absolute; inset: 4px; border: 2.5px solid var(--card); border-radius: 6px; }
.pal-x { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.pal-x input[type="color"] { width: 44px; height: 36px; border: 2px solid var(--ink); border-radius: 8px; padding: 2px; background: var(--card); }
.emo-g { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: var(--s3); }
.emo-g button { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; font-size: 22px; line-height: 1; padding: 0; }
.emo-g button:hover, .emo-g button[aria-pressed="true"] { background: var(--paper-2); }
.emo-x { display: flex; gap: var(--s2); }
.emo-x .fld { flex: 1; min-width: 0; font-size: 20px; }

/* 발표 모드: 판만 크게 */
.wh.present .wh-row, .wh.present .wh-panel, .wh.present .wh-under .sw, .wh.present #bShare, .wh.present #bSnd { display: none !important; }
.wh.present .res { width: min(720px, calc(100% - 32px)); padding: var(--s4) var(--s5) var(--s5); }
.wh.present .res-v b { font-size: clamp(34px, 8vmin, 72px); }
.wh.present .res-v .em { font-size: clamp(36px, 8vmin, 64px); }
.wh.present .wh-now { font-size: 18px; justify-content: center; }
.wh.present .wh-now span { font-size: 15px; }
#bPresent[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
