/* ─────────────────────────────────────────────
 * 요트 주사위 (2026-11-13) — specs/yacht.md §4 디자인 토큰. 소재: 요트 갑판 — 티크 쟁반, 돛천 빛 주사위(1·4 눈은 붉게), 놋쇠, 바다 신호기
 * 바다 #14324a(바탕) · 선실 #1d4560(상자) · 티크 #a8693a(쟁반) · 돛천 #f1ece0(주사위) · 놋쇠 #d9a441(강조·내 차례) · 신호 빨강 #d2483a(1·4 눈·경고)
 * 시그니처(하나): 밧줄 걸이(.yc-rope + .yc-die.held) — 잡은 주사위가 쟁반 위 밧줄로 올라가 고리에 매달림.
 * 배치·단추·설정 칸은 공용 public/css/boardgame/room.css — 여기선 토큰과 쟁반·점수표만.
 * ───────────────────────────────────────────── */
.yc-root, .chat-fab, .chat-panel {
    --yc-sea: #14324a;
    --yc-cabin: #1d4560;
    --yc-teak: #a8693a;
    --yc-sail: #f1ece0;
    --yc-brass: #d9a441;
    --yc-red: #d2483a;
    --yc-rope: #c9b48a;
    --yc-pip: #14324a;
    --bg-bg: var(--yc-sea);
    --bg-panel: var(--yc-cabin);
    --bg-line: color-mix(in srgb, var(--yc-sail) 16%, var(--yc-cabin));
    --bg-ink: #eef2f4;
    --bg-dim: color-mix(in srgb, #eef2f4 62%, var(--yc-sea));
    --bg-accent: var(--yc-brass);
    --bg-accent-ink: #2a1c05;
    --bg-warn: var(--yc-red);
    --chat-accent: var(--yc-brass);
    --chat-accent-ink: #2a1c05;
}
.yc-board { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; touch-action: manipulation; }
@media (min-width: 760px) {
    .yc-board { grid-template-columns: minmax(300px, 1fr) minmax(330px, 1.15fr); }
}
@media (min-width: 1025px) and (max-width: 1180px) {
    .yc-board { grid-template-columns: minmax(0, 1fr); }
}

/* 쟁반 — 티크 갑판 판자 */
.yc-deck { display: grid; gap: 10px; min-width: 0; container-type: inline-size; }
.yc-rack { --yc-die: clamp(44px, 15cqi, 88px); position: relative; border-radius: 16px; padding: calc(var(--yc-die) + 34px) 12px 14px;
    background: url(/img/yacht/art/tray.webp) center/cover, var(--yc-teak);
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--yc-brass) 70%, #5a3a10), inset 0 10px 18px rgba(0, 0, 0, 0.28); overflow: hidden; }
.yc-rack::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--yc-die) + 30px); background: color-mix(in srgb, var(--yc-sea) 55%, transparent); }
/* 시그니처 — 밧줄 (꼰 줄 무늬) */
.yc-rope { position: absolute; left: 10px; right: 10px; top: 14px; height: 7px; border-radius: 4px; z-index: 1;
    background: repeating-linear-gradient(115deg, var(--yc-rope) 0 5px, color-mix(in srgb, var(--yc-rope) 62%, #4a3410) 5px 8px); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.35); }
.yc-rack-label { position: absolute; right: 14px; top: 26px; font-size: 0.72rem; color: color-mix(in srgb, var(--yc-sail) 70%, transparent); z-index: 1; }
.yc-dice { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; gap: 6px; }
.yc-die { position: relative; width: var(--yc-die); height: var(--yc-die); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px;
    transition: transform 0.28s cubic-bezier(0.3, 0.8, 0.4, 1.15); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.45)); }
.yc-die img { width: 100%; height: 100%; display: block; }
.yc-die kbd { position: absolute; right: -2px; bottom: -6px; font-size: 0.62rem; font-family: inherit; color: var(--yc-sail); opacity: 0.75; }
.yc-die:disabled { cursor: default; }
.yc-die.blank { opacity: 0.55; }
.yc-q { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--yc-die) * 0.44); font-weight: 800; color: color-mix(in srgb, var(--yc-pip) 45%, var(--yc-sail)); }
.yc-die.held { transform: translateY(calc(-1 * (var(--yc-die) + 22px))); }
.yc-die.held::before { content: ""; position: absolute; left: 50%; top: -15px; width: 16px; height: 20px; margin-left: -8px; border: 3px solid var(--yc-rope); border-bottom: 0; border-radius: 9px 9px 0 0; }
.yc-die:focus-visible { outline: 3px solid var(--yc-brass); outline-offset: 3px; }
.yc-die.tumble { animation: yc-tumble 0.7s cubic-bezier(0.25, 0.7, 0.35, 1) both; animation-delay: calc(var(--i) * 0.035s); }
@keyframes yc-tumble {
    0% { transform: translateY(-45%) rotate(-210deg) scale(0.75); opacity: 0.4; }
    55% { transform: translateY(6%) rotate(12deg) scale(1.02); opacity: 1; }
    78% { transform: translateY(-8%) rotate(-4deg); }
    100% { transform: translateY(0) rotate(0); }
}
.yc-word { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); font-family: "hb-games-display", var(--font-sans); font-size: clamp(1.4rem, 1rem + 2vw, 3rem); color: var(--yc-sail); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75); white-space: nowrap; pointer-events: none; animation: yc-word 0.45s ease-out 0.6s both; }
.yc-word.calm { animation: yc-fade 0.2s ease-out both; }
@keyframes yc-word { from { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes yc-fade { from { opacity: 0; } to { opacity: 1; } }
.yc-acts { display: grid; gap: 4px; justify-items: center; }
.yc-roll { min-width: min(100%, 280px); font-size: 1.05rem; }
.yc-roll kbd { font-size: 0.7rem; opacity: 0.7; font-family: inherit; }
.yc-hint { margin: 0; min-height: 1.4em; text-align: center; color: var(--bg-dim); }
.yc-hint b { color: var(--bg-ink); }

/* 점수표 */
.yc-score { min-width: 0; display: grid; gap: 8px; }
.yc-sheetwrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--bg-line); background: var(--bg-panel); }
.yc-sheet { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: clamp(0.76rem, 0.7rem + 0.25vw, 0.92rem); color: var(--bg-ink); }
.yc-sheet th, .yc-sheet td { padding: 0 4px; height: clamp(26px, 3.4vh, 34px); border-bottom: 1px solid color-mix(in srgb, var(--bg-line) 70%, transparent); text-align: center; }
.yc-sheet .yc-cat { width: clamp(84px, 30%, 150px); text-align: left; padding-left: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yc-sheet .yc-cat small { color: var(--bg-dim); font-weight: 400; }
.yc-sheet thead th { height: auto; padding: 6px 2px; font-size: 0.74rem; font-weight: 700; vertical-align: bottom; }
.yc-pl { overflow: hidden; }
.yc-pl.turn { box-shadow: inset 0 -3px 0 var(--yc-brass); }
.yc-pl.me .yc-pname { color: var(--yc-brass); }
.yc-pname { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.yc-flag { width: 24px; height: 18px; display: inline-block; vertical-align: middle; flex: none; border-radius: 2px; }
.yc-flag.seat { width: 26px; height: 20px; }
.yc-sheet td.zero { color: var(--bg-dim); }
.yc-sheet td.fresh { background: color-mix(in srgb, var(--yc-brass) 26%, transparent); font-weight: 800; }
.yc-sub th, .yc-sub td { background: color-mix(in srgb, var(--yc-sea) 45%, transparent); font-size: 0.86em; color: var(--bg-dim); }
.yc-total th, .yc-total td { font-weight: 800; font-size: 1.05em; border-bottom: 0; background: color-mix(in srgb, var(--yc-brass) 14%, transparent); }
.yc-total.grand td { color: var(--yc-brass); }
.yc-pick { width: 100%; min-height: 24px; border: 1px dashed color-mix(in srgb, var(--yc-brass) 75%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--yc-brass) 12%, transparent); color: var(--yc-brass); font: inherit; font-weight: 800; cursor: pointer; padding: 0 2px; }
.yc-pick:hover { background: color-mix(in srgb, var(--yc-brass) 26%, transparent); }
.yc-pick.zero { color: var(--bg-dim); border-color: var(--bg-line); background: transparent; font-weight: 600; }
.yc-pick.ask { color: #fff; background: var(--yc-red); border: 1px solid var(--yc-red); }
.yc-pick:focus-visible { outline: 2px solid var(--yc-brass); outline-offset: 1px; }
.yc-rules { font-size: 0.82rem; color: var(--bg-dim); }
.yc-rules summary { cursor: pointer; color: var(--bg-ink); }
.yc-rules dl { margin: 6px 0 0; display: grid; gap: 3px; }
.yc-rules dl div { display: flex; gap: 8px; }
.yc-rules dt { color: var(--bg-ink); font-weight: 700; min-width: 7.5em; }
.yc-rules dd { margin: 0; }

@media (max-width: 640px) {
    .yc-rack { --yc-die: clamp(44px, 15cqi, 70px); padding-left: 6px; padding-right: 6px; }
    .yc-roll { width: 100%; }
    .yc-sheet .yc-cat { padding-left: 6px; width: 84px; }
    .yc-sheet thead th { font-size: 0.66rem; }
    .yc-rack-label { display: none; }
}
@media (min-width: 2400px) {
    .yc-rack { --yc-die: clamp(84px, 15cqi, 130px); }
    .yc-sheet { font-size: 1.15rem; }
    .yc-sheet th, .yc-sheet td { height: 44px; }
    .yc-flag { width: 34px; height: 25px; }
    .yc-roll { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .yc-die { transition: none; }
    .yc-die.tumble { animation: none; }
    .yc-word { animation: yc-fade 0.2s ease-out both; }
}
