:root {
  font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #2d2341;
  background: #fcf9f5;
  --ink: #2d2341;
  --muted: #726981;
  --paper: #fffefd;
  --line: #e9e2ef;
  --violet: #6943d1;
  --violet-deep: #4b2aa9;
  --violet-wash: #f1ebff;
  --coral: #f57465;
  --mint: #8ee0cc;
  --yellow: #ffdb84;
  --shadow: 0 22px 60px #49327117;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 45% 43% at 82% 12%, #e8dcff 0%, transparent 72%),
    radial-gradient(ellipse 35% 44% at 6% 86%, #ffe8db 0%, transparent 78%),
    #fcf9f5;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .46; cursor: not-allowed; transform: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #9c80ed;
  outline-offset: 3px;
}
.shell { max-width: 1600px; margin: auto; padding: clamp(20px, 3vw, 52px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 17px; font-weight: 900; letter-spacing: .03em; display: flex; align-items: center; gap: 10px; }
.brand:before { content: "✦"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--yellow); font-size: 18px; }
.top-right { display: flex; align-items: center; gap: 16px; }
.host-back { color: var(--muted); font-size: 14px; font-weight: 800; text-decoration: none; letter-spacing: .04em; }
.host-back:hover { color: var(--violet-deep); }
.eyebrow { color: var(--violet); font-weight: 850; font-size: 15px; letter-spacing: .11em; }
.muted, .tip { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { letter-spacing: -.065em; line-height: 1.04; }
h2 { letter-spacing: -.035em; }
.lead { font-size: clamp(18px, 1.8vw, 25px); line-height: 1.54; max-width: 680px; color: #51465f; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid #decff4; border-radius: 999px; background: #fff9; color: #5a4575; font-size: 14px; white-space: nowrap; }
.pill:before { content: ""; width: 8px; height: 8px; background: #65cba9; border-radius: 50%; }
.btn { border: 0; border-radius: 16px; background: var(--violet); color: white; padding: 14px 24px; min-height: 50px; font-weight: 850; box-shadow: 0 6px 0 var(--violet-deep), 0 14px 20px #5630bc22; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover:not(:disabled) { transform: translateY(-3px); background: #7650df; box-shadow: 0 9px 0 var(--violet-deep), 0 18px 28px #5630bc28; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--violet-deep); }
.btn.secondary { background: white; color: var(--ink); border: 2px solid #dfd5ec; box-shadow: 0 5px 0 #e6def0; }
.btn.secondary:hover:not(:disabled) { background: #faf6ff; box-shadow: 0 8px 0 #e6def0; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--violet); }
.btn.danger { background: #fff1ee; color: #a93d3b; box-shadow: none; }
.btn.large { font-size: 21px; padding: 18px 30px; min-height: 62px; }
.btn.wide { width: 100%; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
input, select, textarea { border: 2px solid #ded5e9; border-radius: 15px; background: white; color: var(--ink); padding: 13px 15px; min-height: 50px; max-width: 100%; }
textarea { width: 100%; display: block; min-height: 185px; resize: vertical; line-height: 1.6; }
label { display: block; font-weight: 800; margin-bottom: 9px; }
small { font-size: 13px; }
.message { min-height: 25px; color: #a83742; margin: 18px 0 0; font-weight: 650; }
.hidden { display: none !important; }

/* The opening screen is a room people join, not an instruction page. */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "hero qr" "people people"; gap: clamp(26px, 3vw, 50px); align-items: start; padding-top: clamp(45px, 7vh, 94px); }
.hero { grid-area: hero; min-height: 350px; position: relative; isolation: isolate; }
.hero h1 { font-family: "Noto Serif CJK SC", "Songti SC", Georgia, serif; font-size: clamp(84px, 10vw, 160px); font-weight: 900; margin: 14px 0 20px; position: relative; z-index: 2; }
.hero .lead { max-width: 560px; position: relative; z-index: 2; }
.hero-spark { position: absolute; font-size: clamp(34px, 5vw, 78px); color: var(--coral); top: -27px; left: min(32vw, 490px); transform: rotate(-14deg); }
.hero-cards { position: absolute; left: min(50vw, 740px); top: 27px; width: 275px; height: 255px; pointer-events: none; z-index: 1; }
.hero-card { width: 142px; height: 198px; position: absolute; border-radius: 18px; background: white; border: 2px solid #ded6ec; box-shadow: 0 14px 30px #3d2b5a26; padding: 12px; font: 800 38px Georgia, serif; }
.hero-card:nth-child(1) { transform: rotate(-27deg); left: 0; top: 35px; color: var(--coral); }
.hero-card:nth-child(2) { transform: rotate(-6deg); left: 57px; top: 13px; color: var(--violet); }
.hero-card:nth-child(3) { transform: rotate(17deg); left: 115px; top: 33px; background: var(--yellow); color: var(--ink); }
.hero-card:nth-child(3):after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 108px; }
.lobby-qr { grid-area: qr; justify-self: end; width: 234px; padding: 14px; background: white; border: 2px solid #e3d8ef; border-radius: 25px; box-shadow: 0 13px 0 #eadff4, var(--shadow); transform: rotate(2deg); text-align: center; transition: transform .25s ease; }
.lobby-qr:hover { transform: rotate(0); }
.lobby-qr img { display: block; width: 202px; height: 202px; }
.lobby-qr small { color: var(--violet-deep); display: block; font-weight: 850; padding-top: 2px; font-size: 15px; }
.people { grid-area: people; background: #fffdfbe0; border: 2px solid #eadff0; border-radius: 30px; padding: clamp(22px, 2.5vw, 34px); box-shadow: var(--shadow); }
.people-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.people-head h2 { margin-bottom: 0; font-size: 16px; letter-spacing: .11em; font-weight: 900; color: var(--muted); }
.people-grid { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 95px; padding: 20px 0; }
.person { display: flex; align-items: center; gap: 10px; background: #f2ecff; border: 2px solid #dfd0fa; border-radius: 17px; padding: 8px 10px 8px 8px; font-weight: 800; animation: pop-in .42s cubic-bezier(.16,1.5,.4,1) both; }
.lobby-choosing .person { animation: none; }
.person:nth-child(3n + 2) { background: #fff0e8; border-color: #ffd7c7; }
.person:nth-child(3n) { background: #e9f9f2; border-color: #bfead7; }
.person i { width: 38px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--violet); color: white; font-style: normal; font-size: 12px; font-weight: 900; letter-spacing: -.03em; }
.person:nth-child(3n + 2) i { background: var(--coral); }
.person:nth-child(3n) i { background: #319e7a; }
.person button { border: 0; background: transparent; color: #8c637a; font-size: 22px; width: 30px; height: 30px; border-radius: 50%; }
.person button:hover { background: #fff9; color: #9b3144; }
.person-copy { min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-copy b { font-size: 17px; }
.lobby-hint { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.table-prep { width: 100%; margin: 0 0 13px; color: var(--violet-deep); font-size: 11px; font-weight: 850; letter-spacing: .12em; line-height: 1.5; }
.seat-map { flex: 1; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; max-width: 760px; }
.seat-map-item { display: inline-flex; align-items: center; gap: 5px; max-width: 150px; padding: 5px 9px 5px 5px; border: 1px solid #e7ddef; border-radius: 11px; background: #fffcfae8; color: var(--ink); font-size: 11px; font-weight: 800; }
.seat-map-item b { flex: none; padding: 4px 6px; border-radius: 7px; background: var(--violet-deep); color: white; font: 900 10px system-ui,sans-serif; }
.seat-map-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); margin: 0; font-size: 18px; }
.lobby-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
@media (min-width: 561px) and (max-height: 820px) {
  .lobby { padding-top: 20px; gap: 20px; }
  .hero { min-height: 285px; }
  .hero-cards { transform: scale(.86); transform-origin: top left; }
}
.join-phone .card { min-height: 440px; }
.join-error { min-height: 24px; margin: 18px 0 0; color: #a93d3b; font-size: 14px; }
.nickname-form { display: grid; gap: 10px; margin: 24px 0; }
.nickname-form label { margin: 0; color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.nickname-form input { width: 100%; min-height: 61px; font-size: 21px; font-weight: 750; }
.nickname-form .btn { margin-top: 3px; }
.seat-manager { margin-top: 34px; padding-top: 23px; border-top: 1px solid var(--line); }
.seat-return b { display: inline-grid; place-items: center; min-width: 34px; min-height: 31px; margin-right: 7px; border-radius: 8px; background: var(--violet-deep); color: white; font: 900 12px system-ui,sans-serif; }
.recovery-request { padding: 18px; border: 1px solid #dfd0fa; border-radius: 21px; background: #f7f2ff; }
.recovery-request h3 { font-size: 25px; margin: 9px 0 13px; }
.recovery-request .btn { width: 100%; margin-top: 10px; }
.recovery-request .seat-qr-box { margin: 10px 0; }
.drawer-nickname { margin: 21px 0; }

/* Lobby launch uses two game cards after START; the drawer handles room recovery. */
.drawer-shade { position: fixed; inset: 0; z-index: 9; background: #24123466; backdrop-filter: blur(5px); opacity: 1; transition: opacity .28s ease; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(555px, 94vw); z-index: 10; padding: clamp(25px, 4vw, 45px); overflow-y: auto; background: #fffcf8; border-right: 2px solid #e9def0; box-shadow: 28px 0 65px #2a123b3d; transform: translateX(-105%); transition: transform .45s cubic-bezier(.2, .86, .16, 1); }
.drawer.open { transform: translateX(0); }
.drawer > .back-button { margin-bottom: 38px; }
.back-button { border: 0; background: transparent; color: var(--ink); font-weight: 900; font-size: 19px; padding: 6px 0; }
.back-button:hover { color: var(--violet); }
.setup-intro { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 10px 0 27px; max-width: 390px; }
.drawer-toggle { border: 0; background: transparent; color: var(--violet-deep); font-weight: 900; font-size: 15px; letter-spacing: .09em; padding: 10px 3px; }
.start-mode-panel { width: 100%; }
.start-mode-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 13px; color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .13em; }
.start-mode-head button { border: 0; background: transparent; color: var(--violet-deep); font: inherit; cursor: pointer; }
.start-mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.mode-option { display: grid; grid-template-columns: 60px minmax(0,1fr) 26px; align-items: center; gap: 12px; width: 100%; min-height: 112px; border: 2px solid #e2d8ec; border-radius: 21px; padding: 18px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mode-option:hover { transform: translateY(-3px); border-color: #aa91e6; box-shadow: 0 9px 20px #5739aa13; }
.mode-option:focus-visible, .start-mode-head button:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.mode-option:disabled { opacity: .5; cursor: not-allowed; }
.mode-symbol { display: grid; place-items: center; width: 58px; height: 62px; border-radius: 14px; background: #ffe6dc; color: #ce554a; font: 800 42px Georgia, serif; }
.start-mode-grid .mode-option:nth-child(2) .mode-symbol { background: #e4f6ed; color: #3aa47d; }
.mode-copy strong { display: block; font-size: 20px; letter-spacing: .045em; }
.mode-copy small { display: block; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.mode-arrow { color: var(--violet); font-size: 24px; font-weight: 800; }
@media(max-width:800px) { .start-mode-grid { grid-template-columns: 1fr; } }

/* The phone gives one action the whole screen when a phase demands it. */
.phone { max-width: 630px; margin: clamp(35px, 7vh, 82px) auto 0; }
.phone .card { padding: clamp(27px, 5vw, 42px); border-width: 2px; }
.phone h1 { font-family: "Noto Serif CJK SC", "Songti SC", Georgia, serif; font-size: clamp(44px, 9vw, 64px); margin: 15px 0 18px; }
.phone .lead { font-size: 19px; }
.phone .status { padding: 18px 21px; margin: 26px 0; background: #f0eaff; border-radius: 19px; }
.phone .status strong { display: block; font-size: 22px; }
.phone .status span { display: block; color: #68577b; margin-top: 5px; line-height: 1.55; }
.phone .actions { display: grid; gap: 13px; }
.phone .btn { width: 100%; }
.phone details { margin-top: 29px; padding-top: 22px; border-top: 2px dashed #e9dfef; }
.phone summary { cursor: pointer; font-weight: 800; color: var(--violet-deep); }
.phone .fields { margin-top: 22px; }
.phone .fields > * + * { margin-top: 13px; }
.phone .fields select, .phone .fields input { width: 100%; }
.vote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 22px 0; }
.vote-grid .btn { min-height: 73px; font-size: 19px; }
.tip { font-size: 14px; line-height: 1.6; }
.drawer-line { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; border-top: 1px solid var(--line); padding: 20px 0; background: transparent; color: var(--violet-deep); font-size: 15px; font-weight: 850; letter-spacing: .08em; }
.drawer-plus { font-size: 22px; font-weight: 400; }
.rules-body { padding: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.rules-body p { margin-bottom: 12px; }
.rules-body[hidden] { display: none; }
.next-draft-label { color: var(--violet); font-size: 13px; font-weight: 800; letter-spacing: .08em; margin: 28px 0 0; }
.draft-vault { margin-top: 28px; border-top: 2px dashed #e9dfef; padding-top: 15px; }
.profile-sync-warning { margin: 10px 0; padding: 9px 12px; border-radius: 10px; background: #fff1dc; color: #805c25; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.version-vault { margin-top: 12px; border-top: 1px solid #eadfed; padding-top: 12px; }
.version-vault > small { color: #81728c; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.version-scroll { display: flex; gap: 9px; overflow-x: auto; padding: 12px 2px; scrollbar-width: thin; }
.version-card { display: flex; flex: 0 0 196px; min-height: 124px; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #ddcde7; border-radius: 12px; background: #faf7fd; color: var(--ink); text-align: left; }
.version-card span, .version-card em { color: #735d91; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .05em; }
.version-card strong { flex: 1; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.version-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.version-actions button { padding: 8px 4px; border: 1px solid #ddcde7; border-radius: 8px; background: #fff; color: var(--violet); font-size: 9px; font-weight: 800; letter-spacing: .04em; cursor: pointer; }
.version-actions .version-pin, .version-actions em { grid-column: 1 / -1; text-align: center; }
.version-actions button:hover, .version-actions button:focus-visible { border-color: var(--violet); background: #f3ecfb; }
.version-actions button:disabled { color: #a79cad; cursor: default; opacity: .65; }
.vault-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 2px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.vault-icon { position: relative; width: 39px; height: 40px; flex: none; }
.vault-icon i { position: absolute; width: 24px; height: 32px; border: 2px solid #d7c8e9; border-radius: 5px; background: #fff; box-shadow: 0 2px 0 #e7dcee; }
.vault-icon i:nth-child(1) { left: 1px; top: 5px; transform: rotate(-17deg); }
.vault-icon i:nth-child(2) { left: 7px; top: 3px; transform: rotate(-3deg); background: #fff3e2; }
.vault-icon i:nth-child(3) { left: 12px; top: 4px; transform: rotate(12deg); background: #f5edff; }
.vault-title { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.vault-title small { color: var(--violet); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.vault-title strong { font-size: 17px; }
.vault-count { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.vault-chevron { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--violet-wash); color: var(--violet); font-size: 20px; line-height: 1; transition: transform .22s ease; }
.draft-vault.open .vault-chevron { transform: rotate(45deg); }
.vault-body { padding: 8px 0 0; animation: stage-in .28s ease both; }
.vault-body[hidden] { display: none; }
.vault-hint { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; margin: 5px 0 16px; }
.hand-scroll { overflow-x: auto; overflow-y: visible; scrollbar-width: thin; margin: 0 -6px; padding: 12px 6px 20px; }
.hand { display: flex; align-items: flex-end; width: max-content; min-width: 100%; padding: 9px 5px 5px; }
.hand-slot { position: relative; flex: 0 0 106px; width: 106px; margin-left: -13px; }
.hand-slot:first-child { margin-left: 0; }
.hand-slot .hand-card { margin-left: 0; }
.hand-slot:nth-child(2n) .hand-card { --hand-tilt: 3deg; }
.hand-slot:nth-child(3n) .hand-card { --hand-tilt: -2deg; }
.hand-slot:focus-within, .hand-slot:hover { z-index: 4; }
.hand-edit { position: absolute; z-index: 5; right: 7px; top: 6px; padding: 3px 6px; border: 1px solid #d2b65e; border-radius: 6px; background: #fff9e9; color: #775714; font: 800 9px sans-serif; cursor: pointer; }
.hand-edit:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.hand-card { position: relative; display: flex; flex: 0 0 106px; flex-direction: column; align-items: stretch; width: 106px; height: 166px; padding: 10px; margin-left: -13px; border: 2px solid #ded2e9; border-radius: 13px; background: #fffefd; color: var(--ink); text-align: left; box-shadow: 0 8px 0 #e8def0, 0 14px 21px #49327119; transform: rotate(var(--hand-tilt,0deg)); transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .22s ease, box-shadow .22s ease; }
.hand-card:first-child { margin-left: 0; --hand-tilt: -4deg; }
.hand-card:nth-child(2n) { --hand-tilt: 3deg; }
.hand-card:nth-child(3n) { --hand-tilt: -2deg; }
.hand-card:hover, .hand-card:focus-visible { z-index: 3; transform: translateY(-14px) rotate(0); }
.hand-card.selected { z-index: 2; border-color: var(--violet); background: #faf6ff; box-shadow: 0 9px 0 #d9caf6, 0 16px 26px #6943d12c; transform: translateY(-8px) rotate(0); }
.hand-index { color: var(--violet); font: 800 26px Georgia,serif; line-height: 1; }
.hand-index i { font-style: normal; margin-left: 3px; }
.hand-card.has-face:not(.red-face) .hand-index, .hand-card.has-face:not(.red-face) .hand-art, .ready-choice.has-face:not(.red-face) .ready-symbol { color: #211b2d; }
.hand-card.red-face .hand-index, .hand-card.red-face .hand-art, .ready-choice.red-face .ready-symbol { color: #d74a60; }
.hand-art { position: absolute; inset: 30px 0 20px; display: grid; place-items: center; color: var(--violet-deep); font: 900 85px Georgia, serif; opacity: .16; pointer-events: none; }
.hand-card.no-face { background: radial-gradient(circle at 70% 33%, #fff7e6 0 17%, transparent 18%), #fffefd; }
.hand-card.no-face .hand-art { color: #9b6ddc; opacity: .22; transform: rotate(-12deg); }
.hand-card.no-face:before { content: ''; position: absolute; width: 82px; height: 82px; top: 27px; right: 12px; border: 1px solid #dac9ef; border-radius: 50%; opacity: .65; }
.hand-card .hand-index, .hand-card .hand-body, .hand-card .hand-status { position: relative; z-index: 1; }
.hand-body { flex: 1; display: -webkit-box; overflow: hidden; margin-top: 14px; line-height: 1.4; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.hand-status { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; }
.hand-new { border-style: dashed; background: #fdf9ff; }
.hand-new .hand-body { display: block; color: var(--violet); font-size: 15px; font-weight: 900; line-height: 1.1; }
.tool-status, .draft-meta, .card-workshop-copy p { font-size: 11px; font-weight: 750; letter-spacing: .06em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.composer { margin-top: 26px; }
.composer-label { font-size: 17px; margin-bottom: 14px; }
.composer textarea { margin-top: 17px; min-height: 180px; font-size: 17px; border-color: #d7c6ec; background: #fffefd; }
.composer textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px #ae90ec30; outline: none; }
.draft-meta { display: flex; justify-content: space-between; gap: 16px; margin: 9px 1px 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.draft-meta span:last-child { white-space: nowrap; }
.card-shortcut { border: 1px solid #e6dcee; border-radius: 17px; background: #fcfaff; padding: 13px; }
.card-shortcut-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.card-shortcut-head span:first-child { color: var(--violet-deep); }
.card-workshop { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 12px; align-items: start; }
.editable-card { width: 80px; height: 112px; position: relative; border-radius: 10px; border: 1px solid #ddd1e7; box-shadow: 0 4px 0 #efe6f2; background: #fff; color: var(--ink); }
.editable-card.red { color: #d64960; }
.card-rank { position: absolute; top: 7px; left: 8px; font: 800 21px Georgia,serif; }
.card-suit { position: absolute; bottom: 6px; right: 8px; font: 800 22px Georgia,serif; }
.card-center { position: absolute; inset: 0; display: grid; place-items: center; font: 47px Georgia,serif; opacity: .34; }
.card-workshop-copy p { display: flex; align-items: center; gap: 8px; min-height: 17px; margin: 0 0 7px; color: var(--muted); }
.card-workshop-copy p button { border: 0; padding: 0; color: var(--violet-deep); background: none; font: inherit; letter-spacing: inherit; cursor: pointer; }
.card-choices { display: grid; gap: 5px; }
.rank-choices { grid-template-columns: repeat(4,minmax(0,1fr)); }
.suit-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card-choices button { min-width: 0; min-height: 39px; padding: 3px; border: 1px solid #e5dbea; border-radius: 8px; background: #fff; color: var(--ink); font: 800 16px Georgia,serif; }
.card-choices button:hover, .card-choices button.picked { background: var(--violet-wash); border-color: var(--violet); }
.suit-choices button { display: flex; align-items: center; justify-content: center; gap: 3px; font: 650 11px system-ui,sans-serif; }
.suit-choices b { font: 23px Georgia,serif; }
.suit-choices button:nth-child(-n+2) b { color: #d64960; }
.card-tool-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.card-tool-actions .btn { min-height: 38px; padding: 6px 12px; font-size: 12px; }
.tool-status { min-height: 1em; color: var(--violet-deep); font-size: 11px; margin: 6px 0 0; }
.idea-shelf { margin-top: 30px; }
.idea-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 11px; }
.idea-head .eyebrow { margin: 0; }
.idea-refresh { border: 0; padding: 7px 2px; background: transparent; color: var(--violet-deep); font-size: 14px; font-weight: 800; }
.idea-refresh:hover { text-decoration: underline; }
.idea-shelf input[type=search] { width: 100%; min-height: 46px; background: #faf8fc; font-size: 14px; }
.suggestions { display: grid; gap: 9px; margin-top: 13px; }
.suggestion { display: grid; grid-template-columns: 1fr 22px; gap: 4px 8px; width: 100%; text-align: left; padding: 13px 15px; background: #fff; color: var(--ink); border: 2px solid #e5ddec; border-radius: 15px; animation: pop-in .34s cubic-bezier(.16,1.3,.4,1) both; }
.suggestion:hover { border-color: #ac90e9; background: #fbf7ff; transform: translateY(-2px); }
.suggestion-type { grid-column: 1; color: var(--violet-deep); font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.suggestion-text { grid-column: 1; font-size: 14px; line-height: 1.5; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.suggestion-plus { grid-column: 2; grid-row: 1/3; align-self: center; color: var(--violet); font-size: 24px; }
.composer-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 11px; padding: 12px 0 2px; margin-top: 12px; }
.composer-actions:has(> :only-child) { grid-template-columns: 1fr; }
.composer-actions .btn { min-width: 0; padding: 12px 8px; font-size: 15px; }
.submit-dialog { width: min(460px,calc(100vw - 30px)); max-height: min(85vh,720px); overflow-y: auto; padding: 30px; color: var(--ink); background: #fffefd; border: 2px solid #ddcee9; border-radius: 25px; box-shadow: 0 25px 70px #27163e77; }
.submit-dialog::backdrop { background: #2412348a; backdrop-filter: blur(4px); }
.submit-dialog h2 { font: 900 31px "Noto Serif CJK SC","Songti SC",Georgia,serif; margin: 11px 0; }
.submit-preview { max-height: 38vh; overflow: auto; padding: 16px; border-radius: 13px; border: 1px solid #e2d9e9; background: #faf7fe; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 23px; }
.confirm-actions .btn { padding: 11px 9px; font-size: 14px; }

.table { display: grid; grid-template-columns: minmax(0,1fr); min-height: calc(100vh - 145px); padding-top: clamp(54px, 8vh, 100px); animation: stage-in .4s ease both; }
.table-law { padding-top: clamp(20px, 3vh, 42px); }
.table-main { max-width: 1350px; width: 100%; }
.table-waiting { padding-top: 0; }
.table-waiting .table-main { display: grid; justify-items: center; align-content: center; min-height: calc(100vh - 145px); }
.table-waiting .round-label { margin-bottom: 5px; }
.waiting-label { margin: 0; color: var(--violet-deep); font-size: 15px; font-weight: 900; letter-spacing: .19em; }
.waiting-law { display: grid; justify-items: center; margin-top: 32px; }
.waiting-law-card { position: relative; display: grid; place-items: center; width: clamp(180px, 18vw, 230px); height: clamp(250px, 25vw, 318px); border: 12px solid #fff; outline: 2px solid #c8b7e9; border-radius: 20px; background: linear-gradient(135deg, #7049d2, #43268c); box-shadow: 0 12px 0 #d9cdea, 0 28px 48px #49327124; color: var(--yellow); transform: rotate(-5deg); }
.waiting-law-card::before { content: ""; position: absolute; inset: 13px; border: 2px solid #ffdb8499; border-radius: 8px; }
.waiting-law-card span { font: 900 100px Georgia, serif; text-shadow: 0 6px 0 #25125566; }
.waiting-law p { margin: 33px 0 0; color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.round-label { color: var(--violet); font-weight: 900; font-size: 15px; letter-spacing: .08em; margin-bottom: 18px; }
.table h1 { font-family: "Noto Serif CJK SC", "Songti SC", Georgia, serif; font-size: clamp(50px, 6vw, 90px); margin: 0 0 24px; }
.table h1.law-headline { font-family: "Arial Black", Impact, system-ui, sans-serif; font-size: clamp(35px, 4vw, 61px); font-weight: 950; line-height: .98; letter-spacing: -.065em; color: var(--violet-deep); text-shadow: 4px 5px 0 var(--yellow); max-width: 1170px; transform: rotate(-1deg); margin-bottom: clamp(20px, 3vh, 32px); }
.table .lead { max-width: 740px; }
.round-stage { min-width: 0; }
.stage-name { color: var(--violet); font-size: 13px; font-weight: 900; letter-spacing: .14em; margin: 0 0 15px; }
.before-stage { width: min(100%, 1130px); }
.after-stage { display: grid; grid-template-columns: minmax(270px, 38%) minmax(0, 1fr); align-items: center; gap: clamp(25px, 4vw, 72px); }
.reveal-card { min-width: 0; }
.reveal-card .playing-card { margin: 0 auto; }
.after-law { min-width: 0; }
.rule { display: grid; gap: 15px; font-size: clamp(27px, 3.1vw, 48px); line-height: 1.3; letter-spacing: -.035em; }
.before-stage .rule { font-size: clamp(33px, 3.7vw, 57px); }
.after-stage .rule { font-size: clamp(27px, 2.9vw, 44px); }
.rule-step { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 17px; align-items: start; padding: 20px clamp(20px, 2.3vw, 34px); background: #fffefc; border: 2px solid #e9deee; border-radius: 23px; box-shadow: 0 10px 0 #eee6f1, 0 22px 40px #49327112; }
.rule-step > span { color: var(--coral); font: 900 15px/1.5 "Arial Black", system-ui, sans-serif; letter-spacing: -.04em; }
.rule-step p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.rule-step > p:only-child { grid-column: 1 / -1; }
.stage-default { max-width: 100%; margin: 6px 0 0; color: #81768e; font-size: clamp(17px, 1.5vw, 22px); font-weight: 650; line-height: 1.45; letter-spacing: 0; overflow-wrap: break-word; }
.is-default > .stage-name { color: #9b8fa9; }
.phone-app .stage-default { font-size: 16px; }
.phase-cue { margin: 14px 0 8px; color: #81768e; font-size: 11px; font-weight: 650; line-height: 1.4; letter-spacing: .09em; }
.law-flow:first-child .phase-cue { margin-top: 0; }
.stage-name + .law-flow .phase-cue { margin-top: 0; }
.law-flow + .stage-default { margin-top: 14px; }
.table-side { justify-self: end; text-align: center; }
.mini-qr { padding: 10px; border: 2px solid #e8def0; border-radius: 19px; background: #fff; }
.mini-qr img { display: block; width: 126px; height: 126px; }
.table-side small { display: block; margin-top: 8px; }
.table-actions { margin-top: 43px; }
.table-law .table-actions { margin-top: 23px; }
.table-result-label { display: block; margin-bottom: 9px; color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.composed-card-choice { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.composed-card-choice label { display: grid; gap: 6px; color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.composed-card-choice select { min-width: 145px; font-size: 17px; letter-spacing: normal; }
.table-picker { display: grid; gap: 15px; max-width: 840px; }
.table-axis { min-width: 0; margin: 0; padding: 0; border: 0; }
.table-axis legend { padding: 0 0 8px; color: var(--violet); font: 900 12px/1.2 system-ui, sans-serif; letter-spacing: .11em; }
.table-axis-options { display: flex; flex-wrap: wrap; gap: 8px; }
.table-axis-option { display: grid; place-items: center; min-width: 53px; min-height: 55px; padding: 7px 10px; border: 2px solid #decfeb; border-radius: 12px; background: #fffefb; color: var(--violet-deep); font: 850 19px/1 system-ui, sans-serif; cursor: pointer; transition: transform .16s, box-shadow .16s; }
.table-axis-option .axis-mark { font: 900 32px/1 Georgia,serif; }
.table-axis-option.red-option .axis-mark { color: #d74a60; }
.table-axis-option[aria-pressed="true"] { border-color: var(--violet-deep); background: #f0e5ff; box-shadow: 0 5px 0 #cbb8ec; transform: translateY(-2px); }
.table-axis-option:disabled { opacity: .32; cursor: not-allowed; }
.table-axis-option:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.table-axis-options.suit-options .table-axis-option { min-width: 82px; min-height: 73px; gap: 2px; font-size: 13px; }
.table-axis-options.rank-options .table-axis-option { min-width: 53px; }
.table-alternatives { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 13px; }
.table-alternative { min-height: 48px; padding: 10px 17px; border: 2px solid #dac9ea; border-radius: 15px; background: #fffdf8; color: var(--violet-deep); font: 800 15px/1.2 system-ui, sans-serif; cursor: pointer; }
.table-alternative[aria-pressed="true"] { border-color: var(--violet-deep); background: var(--violet-deep); color: white; box-shadow: 0 4px 0 #372073; }
.table-alternative:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.rule-recall { margin-top: 18px; max-width: 780px; border-top: 1px solid #e2d6ea; }
.rule-recall-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; padding: 13px 3px; border: 0; background: transparent; color: var(--violet); font: 850 12px/1.3 system-ui, sans-serif; letter-spacing: .1em; text-align: left; cursor: pointer; }
.rule-recall-toggle b { color: var(--violet-deep); font-size: 11px; white-space: nowrap; }
.rule-recall-toggle:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.rule-recall-body { padding: 8px 14px 14px; border-radius: 12px; background: #f8f2fa; color: var(--ink); font-size: clamp(15px, 1.4vw, 20px); line-height: 1.45; letter-spacing: 0; }
.rule-recall-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.rule-recall-body p:last-child { margin-bottom: 0; }
.phone-app .rule-recall-body { font-size: 15px; }
.table-dense { padding-top: 12px; }
.table-dense .round-label { margin-bottom: 9px; }
.table-dense h1.law-headline { font-size: clamp(30px, 3vw, 45px); margin-bottom: 12px; }
.table-dense .after-stage { grid-template-columns: minmax(240px, 32%) minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 44px); }
.table-dense .after-stage .rule { gap: 9px; font-size: clamp(24px, 2.25vw, 33px); line-height: 1.3; }
.table-dense .rule-step { grid-template-columns: 24px minmax(0,1fr); gap: 10px; padding: 13px 17px; border-radius: 18px; }
.table-dense .stage-name { margin-bottom: 8px; }
.table-dense .reveal-card .playing-card { width: min(100%, 290px); }
.table-dense .table-actions { margin-top: 12px; }
@media(max-width:800px) { .table-dense .after-stage { grid-template-columns: 1fr; } }
.game-actions .btn { margin: 7px 10px 0 0; }
.round-close-panel { display: grid; gap: 13px; width: min(100%, 980px); padding: 17px 19px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: 0 8px 0 #e9def2; }
.round-close-intro { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 18px; }
.round-close-panel .eyebrow { margin: 0; font-size: 12px; }
.settlement-hint { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.round-close-body { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.round-winner-grid { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.round-winner { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; min-height: 50px; margin: 0; padding: 9px 14px; border: 2px solid #d9c9ea; border-radius: 15px; background: #fffdfb; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.round-winner input { width: 21px; height: 21px; min-height: 0; margin: 0; padding: 0; accent-color: var(--violet); }
.round-winner:has(input:checked) { border-color: var(--violet); background: var(--violet-wash); }
.round-winner:focus-within { outline: 3px solid var(--coral); outline-offset: 2px; }
.round-end { min-height: 50px; margin: 0 !important; white-space: nowrap; }
.round-close-panel.many-seats { gap: 10px; padding: 13px 15px; }
.many-seats .round-close-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.many-seats .round-winner-grid { gap: 7px; }
.many-seats .round-winner { min-height: 48px; padding: 7px 10px; font-size: 14px; }
@media(max-width:800px) { .many-seats .round-close-body { grid-template-columns: 1fr; } }
.game-actions.has-update { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.game-actions.has-update .btn { margin: 0; }
.game-actions.has-update .round-close-panel { gap: 8px; padding: 10px 15px; }
.table-update-control { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.table-update-control .subrule { flex: 0 0 100%; margin: 0; font-size: 13px; line-height: 1.3; }
.table-update-control .update-suit-control { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.table-update-control #update-suit { min-width: 125px; }
.after-law .table-update-control { display: grid; gap: 11px; width: 100%; margin-top: 16px; padding: 14px 16px; border: 1px solid #ded0eb; border-radius: 17px; background: #fbf7ff; }
.after-law .table-update-control .subrule { color: var(--violet-deep); font-size: 15px; font-weight: 750; line-height: 1.4; }
.table-update-choice { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.table-update-choice .btn { min-height: 50px; margin: 0; }
.playing-card { position: relative; width: min(100%, 330px); aspect-ratio: 5/7; display: grid; place-items: center; margin: 24px 0; border: 3px solid #e9deec; border-radius: 27px; background: white; box-shadow: 0 18px 0 #eee3f0, 0 28px 45px #4932711f; font-family: Georgia, serif; transform: rotate(4deg); animation: deal-in .7s cubic-bezier(.2,.9,.15,1.2) both; }
.playing-card.red { color: #d74a60; }.playing-card.black { color: #2d2341; }
.card-heart { font-size: clamp(130px, 19vw, 260px); line-height: 1; filter: drop-shadow(5px 7px 0 #38223b13); }
.card-corner { position: absolute; left: 24px; top: 17px; display: flex; flex-direction: column; align-items: center; font-size: 54px; font-weight: 900; line-height: .9; }
.card-corner small { font-size: 34px; line-height: 1; }
.card-corner.bottom { left: auto; top: auto; right: 24px; bottom: 17px; transform: rotate(180deg); }
.subrule { color: var(--muted); line-height: 1.65; font-size: 15px; }
@keyframes pop-in { from { transform: translateY(20px) scale(.85); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes stage-in { from { transform: translateY(17px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes deal-in { from { transform: translateY(-50px) rotate(-8deg); opacity: 0; } to { transform: translateY(0) rotate(4deg); opacity: 1; } }
@media(max-width: 1050px) { .hero-cards { left: auto; right: 0; opacity: .38; } }
@media(max-width: 800px) { .lobby { grid-template-columns: minmax(0,1fr) 170px; } .lobby-qr { width: 165px; } .lobby-qr img { width: 133px; height: 133px; } .hero { min-height: 295px; } .table { grid-template-columns: 1fr; } .table-side { display: none; } .after-stage { grid-template-columns: 1fr; } .reveal-card .playing-card { margin-left: 0; } }
@media(max-width: 560px) { .shell { padding: 18px; } .brand { font-size: 15px; } .top-right { gap: 8px; } .lobby { grid-template-columns: 1fr 112px; gap: 22px 8px; padding-top: 36px; } .hero { min-height: 225px; } .hero h1 { font-size: 73px; margin-top: 14px; } .hero .lead { font-size: 17px; } .hero-cards { display: none; } .hero-spark { display: none; } .lobby-qr { width: 112px; padding: 7px; border-radius: 16px; } .lobby-qr img { width: 94px; height: 94px; } .lobby-qr small { font-size: 11px; } .people { padding: 20px; } .people-grid { min-height: 70px; } .lobby-actions .btn { width: 100%; } .phone { margin: 35px auto; } .vote-grid { grid-template-columns: 1fr; } .card-workshop { grid-template-columns: 80px minmax(0,1fr); } .card-choices button { min-height: 39px; } }
@media(max-width: 390px) { .phone .card { padding: 20px; } .card-workshop { grid-template-columns: 65px minmax(0,1fr); gap: 9px; } .editable-card { width: 65px; height: 92px; } .card-center { font-size: 38px; } .rank-choices { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Personal space is a canvas: the phase action holds the top, tools unfold below. */
.game-canvas { width: min(100%, 780px); max-width: 780px; margin-top: clamp(25px, 5vh, 60px); }
.phone-app { margin-top: clamp(12px, 2vh, 30px); }
.phone-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; margin: 0 -8px 20px; padding: 8px; border: 1px solid #e9ddf0; border-radius: 18px; background: #fffdf8ee; box-shadow: 0 8px 25px #49327115; backdrop-filter: blur(14px); }
.phone-tabs::-webkit-scrollbar { display: none; }
.phone-tabs button { flex: 1 0 auto; min-width: 75px; padding: 12px 10px; border: 0; border-radius: 11px; background: transparent; color: #756986; font-size: 11px; font-weight: 900; letter-spacing: .06em; white-space: nowrap; transition: background .2s, color .2s, transform .2s; }
.phone-tabs button[aria-selected="true"] { background: var(--violet-deep); color: white; box-shadow: 0 4px 0 #372073; transform: translateY(-2px); }
.phone-tabs button:focus-visible { outline: 3px solid var(--coral); outline-offset: 1px; }
.phone-app #phone-panel { min-height: 65vh; }
.phone-app #phone-panel > .eyebrow { font-size: 11px; }
.phone-app #phone-panel > h1 { margin: 15px 0 18px; }
.phone-app #phone-panel > h1.page-title { margin: 20px 0 12px; font-family: "Arial Black", Impact, system-ui, sans-serif; font-size: clamp(48px, 12vw, 78px); font-weight: 950; line-height: .95; letter-spacing: -.08em; color: var(--ink); }
.phone-app #phone-panel > h1.page-title.waiting-ready-title { margin: 14px 0 16px; font-size: clamp(34px, 9vw, 44px); letter-spacing: -.055em; }
.phone-app #phone-panel > h1.page-title.turn-title { color: var(--violet-deep); text-shadow: 4px 5px 0 var(--yellow); transform: rotate(-1deg); transform-origin: left center; }
.phone-app #phone-panel > h1.page-title.phase-title { font-size: clamp(34px, 9vw, 58px); }
.page-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; border-bottom: 1px solid #e7ddef; padding-bottom: 13px; color: var(--violet); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.page-meta span:last-child { color: var(--muted); letter-spacing: .02em; text-transform: none; }
.page-caption { margin: 0; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .13em; line-height: 1.5; }
.phone-app .ready-ribbon { margin-top: 30px; }
.ready-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.ready-heading .eyebrow { margin: 0; font-size: 11px; }
.ready-heading > span { color: var(--muted); font-size: 10px; font-weight: 850; white-space: nowrap; }
.phone-app .ready-list { gap: 13px; }
.phone-app .ready-choice { grid-template-columns: 42px minmax(0,1fr); align-items: start; min-height: 116px; padding: 17px; border-radius: 22px; background: #fffdf8; box-shadow: 0 8px 0 #eadcb8, 0 16px 30px #49327111; transition: transform .18s ease, box-shadow .18s ease; }
.phone-app button.ready-choice:hover { transform: translateY(-3px); box-shadow: 0 11px 0 #eadcb8, 0 20px 35px #49327118; }
.phone-app .ready-choice.dormant { border-color: #e7dfed; background: #fffcf7; box-shadow: 0 6px 0 #eee7ef; }
.phone-app .ready-choice .ready-symbol { font-size: 35px; line-height: 1; }
.phone-app .ready-choice .ready-copy { gap: 8px; }
.phone-app .ready-choice .ready-copy strong { font-size: 17px; line-height: 1.42; }
.phone-app .ready-choice > b { grid-column: 2; color: var(--violet); font-size: 11px; letter-spacing: .1em; }
.table-empty { display: grid; justify-items: start; gap: 12px; margin-top: 30px; padding: 24px; border: 1px dashed #d8c8e8; border-radius: 25px; background: #fffefa; }
.table-empty-mark { display: grid; place-items: center; width: 66px; height: 83px; border: 2px solid #e4d7ed; border-radius: 10px; color: var(--violet); font-size: 40px; transform: rotate(-8deg); }
.table-empty strong { font-size: 17px; letter-spacing: .08em; }
.table-empty .btn { margin-top: 5px; }
.table-facedown, .table-draw-card { display: grid; place-items: center; width: 132px; height: 178px; margin: 32px 0 20px; border: 7px double #d8c6ef; border-radius: 17px; background: linear-gradient(145deg,#f5eaff,#e5d4ff); color: var(--violet-deep); box-shadow: 0 12px 0 #d8cbea, 0 22px 37px #4932711a; font: 900 64px Georgia,serif; transform: rotate(-6deg); }
.table-draw-card { background: var(--yellow); border-color: #fff7d8; font-size: 88px; }
.table-selected-law { position: relative; margin-top: 30px; padding: 24px; border: 2px solid #e6d8ed; border-radius: 24px; background: #fffdfa; box-shadow: 0 9px 0 #eee6f1; }
.table-selected-law p { position: relative; margin: 0; font-size: 23px; line-height: 1.55; overflow-wrap: anywhere; }
.table-selected-mark { position: absolute; top: 5px; right: 15px; color: var(--yellow); font-size: 48px; }
.table-selected-law + .canvas-hint { margin-top: 23px; }
.seat-vote-grid .btn { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 10px; min-height: 72px; text-align: left; font-size: 18px; }
.seat-vote-grid .btn b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--violet-deep); color: white; font-size: 15px; }
.seat-vote-grid .btn span { min-width: 0; overflow-wrap: anywhere; }
.seat-picker { display: grid; gap: 8px; margin: 18px 0 8px; }
.seat-picker > small { color: var(--violet); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.seat-picker-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.seat-picker-row button { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 150px; min-height: 35px; padding: 3px 9px 3px 4px; border: 1px solid #e4d8ee; border-radius: 10px; background: #faf6ff; color: var(--ink); font-size: 10px; }
.seat-picker-row button b { display: grid; place-items: center; min-width: 29px; min-height: 27px; border-radius: 7px; background: var(--violet-deep); color: white; font-size: 11px; }
.seat-picker-row button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-app .draft-vault.standalone { margin-top: 22px; }
.phone-app .history-vault.standalone { margin-top: 24px; }
.phone-app .played-count { margin: 0 0 18px; color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.phone-app .vault-heading { cursor: default; }
.phone-app .draft-vault.standalone + .composer { margin-top: 32px; }
.phone-rule-step { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 11px; border-top: 1px solid #ece1ed; padding: 18px 0; }
.phone-rule-step small { color: var(--coral); font-size: 12px; font-weight: 900; }
.phone-rule-step p { margin: 0; font-size: clamp(18px, 4.4vw, 25px); line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }

/* A settled private result takes the whole phone stage until the player continues. */
.outcome-stage { width: min(100%, 760px); min-height: calc(100dvh - 160px); margin: clamp(16px, 3vh, 38px) auto 0; display: grid; }
.outcome-card { --outcome-accent: #6943d1; --outcome-wash: #eee8ff; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: min(720px, calc(100dvh - 145px)); padding: clamp(22px, 4vw, 38px); border: 2px solid #e5daf0; border-radius: clamp(25px, 5vw, 38px); background: #fffefd; box-shadow: 0 17px 0 #e9e0ef, 0 30px 65px #49327125; }
.outcome-card::before { content: ""; position: absolute; width: 95%; aspect-ratio: 1; left: 50%; top: 45%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, var(--outcome-wash), transparent 71%); transform: translate(-50%,-50%); }
.outcome-win .outcome-card { --outcome-accent: #4b2aa9; --outcome-wash: #d9f6ec; }
.outcome-lose .outcome-card { --outcome-accent: #8d4664; --outcome-wash: #fbe9e6; }
.outcome-draw .outcome-card { --outcome-accent: #665099; --outcome-wash: #fff0c9; }
.outcome-secret .outcome-card { --outcome-accent: #4b2aa9; --outcome-wash: #e9dfff; }
.outcome-top { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.outcome-top span:first-child { white-space: nowrap; }
.outcome-top span:last-child { text-align: right; }
.outcome-center { flex: 1; display: grid; justify-items: center; align-content: center; text-align: center; padding: clamp(22px, 5vh, 55px) 0; }
.outcome-emblem { position: relative; display: grid; place-items: center; width: clamp(105px, 26vw, 154px); aspect-ratio: 5/6; margin: 0 0 30px; border: 7px solid #fff; outline: 2px solid #dac9ee; border-radius: 17px; background: var(--outcome-wash); box-shadow: 0 9px 0 #e1d5ec, 0 18px 30px #49327120; color: var(--outcome-accent); font: 900 clamp(62px, 15vw, 92px)/1 Georgia,serif; transform: rotate(-7deg); animation: outcome-deal .55s cubic-bezier(.16,1.18,.36,1) both; }
.outcome-emblem::before { content: ""; position: absolute; inset: 9px; border: 2px solid currentColor; border-radius: 8px; opacity: .35; }
.outcome-center h1 { margin: 0; color: var(--outcome-accent); font: 950 clamp(62px, 15vw, 112px)/.94 "Arial Black",Impact,system-ui,sans-serif; letter-spacing: -.085em; text-wrap: balance; animation: outcome-rise .38s .12s ease both; }
.outcome-line { margin: 15px 0 0; color: var(--ink); font-size: clamp(23px, 6vw, 35px); font-weight: 850; letter-spacing: -.035em; }
.outcome-detail { max-width: 520px; margin: 12px 0 0; color: var(--muted); font-size: clamp(14px, 3.6vw, 17px); line-height: 1.5; }
.outcome-choice, .outcome-duel { margin-top: 28px; }
.outcome-choice { display: grid; justify-items: center; gap: 5px; min-width: 134px; max-width: 100%; padding: 13px 21px; border: 1px solid #e4d7ed; border-radius: 16px; background: #fffefbe8; box-shadow: 0 5px 0 #ece4f0; }
.outcome-choice small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.outcome-choice strong { max-width: 100%; color: var(--ink); font-size: clamp(18px, 4.5vw, 24px); overflow-wrap: anywhere; }
.outcome-duel { display: flex; align-items: center; justify-content: center; gap: clamp(7px, 2vw, 17px); width: 100%; }
.outcome-duel .outcome-choice { margin-top: 0; min-width: 0; width: min(40%, 165px); padding-inline: 7px; }
.outcome-duel > span { color: var(--outcome-accent); font-size: 12px; font-weight: 950; letter-spacing: .08em; }
.outcome-bottom { display: grid; gap: 18px; }
.outcome-bottom p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding-top: 15px; border-top: 1px solid #e9e0ef; }
.outcome-bottom small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.outcome-bottom strong { color: var(--outcome-accent); font-size: 13px; text-align: right; }
.outcome-bottom .btn { min-height: 62px; font-size: 19px; }
@keyframes outcome-deal { from { opacity: 0; transform: translateY(-40px) rotate(-19deg) scale(.8); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }
@keyframes outcome-rise { from { transform: translateY(15px); } to { transform: translateY(0); } }
@media(max-width:560px) { .outcome-stage { width: 100%; min-height: calc(100dvh - 95px); margin: 8px auto 0; } .outcome-card { min-height: calc(100dvh - 115px); padding: 20px; border-radius: 26px; } .outcome-center { padding: 24px 0; } .outcome-emblem { margin-bottom: 22px; } .outcome-choice, .outcome-duel { margin-top: 18px; } }
@media(prefers-reduced-motion:reduce) { .outcome-emblem, .outcome-center h1 { animation: none; } }

/* Shared table: keep the card and its active law in one visual field. */
.top { min-width: 0; }
.seat-map { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; max-width: none; }
.seat-map-item { flex: none; min-width: 0; }
.top-right { flex: none; white-space: nowrap; }
.table { min-height: 0; padding-top: clamp(28px, 4vh, 55px); }
.table-law { padding-top: clamp(14px, 2vh, 30px); }
.table-main { min-width: 0; }
.table-law .round-label { margin-bottom: 9px; }
.table h1.law-headline { font-size: clamp(28px, 2.6vw, 38px); margin-bottom: clamp(17px, 2vh, 25px); }
.table-dense h1.law-headline { font-size: clamp(22px, 1.8vw, 25px); margin-bottom: 12px; }
.after-stage { grid-template-columns: minmax(0, 32%) minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 50px); }
.table-dense .after-stage { grid-template-columns: minmax(0, 28%) minmax(0, 1fr); }
.reveal-card, .after-law, .rule-step, .rule-step p { min-width: 0; }
.reveal-card .playing-card { width: min(88%, 330px); margin: 10px auto 0; }
.reveal-card .card-heart { font-size: clamp(85px, 12vw, 210px); }
.after-stage .rule { font-size: clamp(28px, 3.05vw, 44px); line-height: 1.3; }
.rule-step { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: clamp(14px, 1.45vw, 23px); }
.rule-step p { overflow-wrap: break-word; word-break: normal; }
.before-stage .rule { font-size: clamp(25px, 3vw, 48px); }
.table-law .table-actions { margin-top: 17px; }
.table-dense .after-stage .rule { font-size: clamp(22px, 2.1vw, 29px); line-height: 1.18; }
.table-dense .rule-step { padding: 10px 16px; }
.table-law.table-dense .table-actions { margin-top: 8px; }
.table-dense .reveal-card .playing-card { width: min(88%, 290px); box-shadow: 0 8px 0 #eee3f0, 0 12px 18px #4932711f; }

@media(max-width: 1100px) {
  .shell { padding: 20px clamp(20px, 2.5vw, 30px); }
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 7px; }
  .brand { grid-column: 1; grid-row: 1; }
  .top-right { grid-column: 2; grid-row: 1; }
  .seat-map:not(.hidden) { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; width: 100%; }
  .table { padding-top: 20px; }
  .table-law { padding-top: 13px; }
  .table h1.law-headline { font-size: clamp(26px, 2.7vw, 31px); margin-bottom: 12px; }
  .table-dense h1.law-headline { font-size: clamp(23px, 2.3vw, 26px); }
  .stage-name { margin-bottom: 8px; }
  .after-stage { grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: 22px; }
  .table-dense .after-stage { grid-template-columns: minmax(0, 27%) minmax(0, 1fr); }
  .after-stage .rule { font-size: clamp(26px, 3.2vw, 35px); }
  .table-dense .after-stage .rule { font-size: clamp(22px, 2.35vw, 27px); }
  .rule-step { grid-template-columns: 25px minmax(0, 1fr); gap: 9px; padding: 12px 14px; border-radius: 16px; }
  .reveal-card .playing-card { width: min(90%, 270px); }
  .reveal-card .card-heart { font-size: clamp(82px, 14vw, 155px); }
  .reveal-card .card-corner { left: 13px; top: 11px; font-size: 36px; }
  .reveal-card .card-corner small { font-size: 25px; }
  .reveal-card .card-corner.bottom { left: auto; top: auto; right: 13px; bottom: 11px; }
}

@media(min-width: 540px) and (max-width: 800px) {
  .table h1.law-headline { font-size: clamp(20px, 2.8vw, 25px); letter-spacing: -.025em; text-shadow: 2px 3px 0 var(--yellow); }
  .table-dense h1.law-headline { font-size: clamp(19px, 2.6vw, 23px); }
  .after-stage, .table-dense .after-stage { grid-template-columns: minmax(0, 28%) minmax(0, 1fr); gap: 19px; }
  .reveal-card .stage-name { font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
  .after-stage .rule { font-size: clamp(22px, 3vw, 27px); }
  .table-dense .after-stage .rule { font-size: clamp(20px, 2.5vw, 23px); }
  .reveal-card .playing-card, .table-dense .reveal-card .playing-card { width: min(94%, 205px); margin: 9px auto 0; }
  .reveal-card .card-heart { font-size: clamp(78px, 12vw, 105px); }
  .reveal-card .card-corner { left: 10px; top: 8px; font-size: 30px; }
  .reveal-card .card-corner small { font-size: 21px; }
  .reveal-card .card-corner.bottom { left: auto; top: auto; right: 10px; bottom: 8px; }
  .rule-step { grid-template-columns: 22px minmax(0, 1fr); gap: 7px; padding: 10px 11px; }
}
@media(min-width: 540px) and (max-width: 660px) {
  .after-stage, .table-dense .after-stage { grid-template-columns: minmax(0, 1fr); }
}

@media(max-height: 850px) and (min-width: 801px) {
  .table-law:not(.table-dense) .reveal-card .playing-card { width: min(88%, 280px); }
  .table-dense .phase-cue { margin: 6px 0 4px; }
  .table-dense .law-flow + .stage-default { margin-top: 6px; }
  .table-dense .after-stage .rule { font-size: 22px; line-height: 1.18; }
  .table-dense .rule-step { padding-top: 6px; padding-bottom: 6px; }
  .table-has-update .reveal-card .playing-card { width: min(78%, 250px); }
  .table-has-update .table-actions { margin-top: 8px; }
  .table-dense.table-law { padding-top: 0; }
  .table-dense .round-label { margin-bottom: 0; }
  .table-dense h1.law-headline { font-size: 20px; margin-bottom: 4px; transform: none; }
  .table-dense .stage-name { margin-bottom: 2px; }
  .table-dense .rule-step { padding-top: 6px; padding-bottom: 6px; }
  .table-dense .table-actions { margin-top: 20px; }
}

@media(max-height: 760px) and (min-width: 801px) {
  .table-dense .reveal-card .playing-card { width: min(72%, 228px); }
  .table-dense h1.law-headline { font-size: 20px; margin-bottom: 5px; text-shadow: 2px 2px 0 var(--yellow); }
}

@media(max-width: 539px) {
  .top { align-items: start; }
  .brand { font-size: 14px; white-space: nowrap; }
  .top-right { gap: 7px; }
  .host-back, .top-right .pill { font-size: 11px; }
  .table h1.law-headline { font-size: clamp(19px, 4.5vw, 23px); line-height: 1.05; }
  .table-dense h1.law-headline { font-size: clamp(18px, 4vw, 21px); }
  .after-stage, .table-dense .after-stage { grid-template-columns: 1fr; gap: 20px; }
  .reveal-card .playing-card, .table-dense .reveal-card .playing-card { width: min(46vw, 190px); margin: 8px auto 0; }
  .after-stage .rule { font-size: clamp(21px, 5.3vw, 27px); }
  .table-dense .after-stage .rule { font-size: clamp(20px, 5vw, 25px); }
  .before-stage .rule { font-size: clamp(23px, 5.5vw, 30px); }
  .table-law .table-actions { margin-top: 18px; }
}

@media(max-width: 420px) {
  .brand { font-size: 12px; gap: 5px; }
  .brand:before { width: 26px; height: 26px; }
  .top-right .pill { display: none; }
  .table h1.law-headline { transform: none; }
}
.ready-ribbon { margin-top: 37px; }
.ready-list { display: grid; gap: 10px; }
.ready-choice { display: grid; grid-template-columns: 39px minmax(0,1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 75px; padding: 12px 15px; border: 2px solid #e9d9aa; border-radius: 15px; background: #fff9ea; color: var(--ink); text-align: left; box-shadow: 0 5px 0 #eee0b8; }
.ready-choice.selected { border-color: var(--violet); background: #f4eeff; box-shadow: 0 6px 0 #d6c6e8; }
.ready-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 0; }
.ready-confirm .canvas-hint { width: 100%; margin: 0; }
.ready-confirm .btn { flex: 1 1 130px; min-height: 48px; }
.ready-choice .ready-symbol { font: 800 31px Georgia,serif; color: var(--violet); }
.ready-copy { min-width: 0; display: grid; gap: 12px; }
.ready-copy strong { font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; }
.ready-phase { display: grid; gap: 3px; padding-top: 10px; border-top: 1px solid #e8d9ae; }
.ready-phase:first-child { padding-top: 0; border-top: 0; }
.ready-phase small { color: #8a6e3c; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.ready-phase span { font-size: 14px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
#vault-notice { white-space: pre-wrap; line-height: 1.7; }
.ready-choice b { color: #886522; font-size: 12px; white-space: nowrap; }
.ready-choice:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.seat-qr-box:not(:empty) { margin: 16px 0 24px; padding: 15px; border: 1px solid #e9dcef; border-radius: 19px; background: #fff; text-align: center; }
.seat-qr-box img { display: block; width: min(100%, 220px); height: auto; margin: 0 auto 12px; }
.game-canvas > .card { background: transparent; border: 0; box-shadow: none; padding: clamp(12px, 3vw, 28px) 0 80px; }
.game-canvas h1 { max-width: 700px; }
.game-canvas > .card > .lead { max-width: 540px; color: #665c70; font-size: clamp(15px, 3vw, 18px); letter-spacing: .035em; }
.game-canvas .composer { position: relative; margin: clamp(36px, 5vw, 55px) 0 0; padding: clamp(21px, 4vw, 40px); border: 1px solid #e8dded; border-radius: 30px; background: #fffefa; box-shadow: 0 18px 0 #efe8f0, 0 30px 55px #49327116; }
.game-canvas .composer:before { content: "✦"; position: absolute; top: -22px; right: 24px; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: #ffdd83; color: #5d39b5; font-size: 27px; transform: rotate(10deg); }
.game-canvas .composer-label { color: #6750ad; letter-spacing: .1em; font-size: 12px; }
.canvas-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.canvas-topline span { color: #9b8eab; font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.game-canvas .composer textarea { min-height: clamp(225px, 32vh, 340px); margin-top: 0; border: 0; border-radius: 0; border-bottom: 2px solid #e8ddee; padding: 20px 3px; background: transparent; font-size: clamp(18px, 3.8vw, 23px); line-height: 1.8; }
.game-canvas .composer.ready-preview textarea { min-height: clamp(105px, 16vh, 165px); }
.game-canvas .composer.ready-preview textarea:focus { min-height: clamp(225px, 32vh, 340px); }
.game-canvas .composer textarea:focus { box-shadow: none; border-bottom-color: var(--violet); }
.canvas-hint { margin: 15px 3px 0; color: #81768d; font-size: 10px; font-weight: 750; letter-spacing: .11em; line-height: 1.6; }
.canvas-tools { margin-top: 39px; padding-top: 27px; border-top: 1px solid #eee4ee; }
.canvas-tools > .eyebrow { margin: 0 0 13px; font-size: 11px; }
.game-canvas .draft-vault, .game-canvas .history-vault, .game-canvas .canvas-pocket { margin-top: 42px; padding: 13px 20px; border: 1px solid #e8ddee; border-radius: 24px; background: #fffefaed; box-shadow: 0 9px 25px #4932710b; }
.game-canvas .composer > .draft-vault { margin: 29px 0 0; padding: 25px 0 0; border: 0; border-top: 1px solid #eee4ee; border-radius: 0; background: transparent; box-shadow: none; }
.game-canvas .composer.ready-preview > .draft-vault { margin-top: 16px; padding-top: 17px; }
.game-canvas .composer.ready-preview > .canvas-topline { margin-top: 25px; padding-top: 18px; border-top: 1px solid #eee4ee; }
.game-canvas .history-vault { margin-top: 13px; }
.game-canvas .canvas-pocket { margin-top: 45px; }
.history-mark { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 12px; background: #f1ebff; color: var(--violet); font-size: 26px; }
.history-vault #history-body[hidden], .canvas-pocket #canvas-pocket-body[hidden] { display: none; }
.history-vault:has(#history-body:not([hidden])) .vault-chevron, .canvas-pocket.open .vault-chevron { transform: rotate(45deg); }
.played-law { margin: 14px 0 0; padding: 19px; border: 1px solid #eae1ef; border-radius: 17px; background: #faf7fd; }
.played-law small { color: var(--violet); font-weight: 800; letter-spacing: .08em; }
.played-law p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin: 12px 0; }
.played-law blockquote { margin: 9px 0 0; padding-left: 13px; border-left: 3px solid #b7a0e9; color: #62576c; line-height: 1.6; }
.played-card-face { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; min-height: 65px; margin: 14px 0 3px; padding: 7px 13px; border: 2px solid #e7ddea; border-radius: 12px; background: #fff; box-shadow: 0 5px 0 #ece5f0; }
.played-card-face strong { font: 800 29px Georgia,serif; line-height: 1; }
.played-card-face small { margin-top: 5px; font-size: 9px; letter-spacing: .08em; }
.played-card-face.red { color: #d74a60; }.played-card-face.black { color: #211b2d; }.played-card-face.neutral { color: var(--violet); }
.played-law .played-raw { margin: 16px 0 19px; }
.played-phase { margin: 11px 0 0; padding: 4px 0 4px 13px; border-left: 3px solid #b7a0e9; }
.played-phase small { font-size: 10px; }
.played-phase p { margin: 4px 0 0; }
.hand-card.ready { border-color: #dfc579; background: #fff9e9; }
.hand-card.ready .hand-status { color: #855e16; }
.composer textarea[readonly] { background: #f8f4eb; color: #625b51; cursor: default; }
.game-canvas .composer-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
.game-canvas .composer-actions:has(#submit) { grid-template-columns: repeat(3,minmax(0,1fr)); }
.game-canvas .composer-actions .btn { min-height: 54px; }
.game-canvas .composer-actions #play-ready-from-deck { grid-column: 1 / -1; }
.game-canvas .composer-actions #submit { background: #f36d5f; box-shadow: 0 6px 0 #c34f49, 0 14px 20px #d3534828; }
.game-canvas .vote-grid { margin: 35px 0 22px; }
.in-round-law { margin-top: 35px; padding: clamp(22px, 4vw, 36px); border: 1px solid #e8ddee; border-radius: 28px; background: #fffefa; box-shadow: 0 15px 0 #eee5f0, 0 26px 45px #49327112; }
.in-round-law > p:not(.eyebrow) { font-size: clamp(18px, 3.8vw, 25px); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.in-round-law .eyebrow { font-size: 11px; }
.private-note { margin-top: 28px; padding: 17px 20px; border-radius: 16px; background: #f2ebff; color: #4e3c6d; }
.private-note small { color: #6f49ca; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.private-note p { margin: 9px 0 0; line-height: 1.6; }
.phone-playing-card .playing-card { width: 120px; height: 168px; margin: 15px auto 22px; border-radius: 15px; }
.phone-playing-card .card-heart { font-size: 86px; }
.phone-playing-card .card-corner { left: 8px; top: 8px; font-size: 19px; }
.phone-playing-card .card-corner small { font-size: 15px; }
.phone-playing-card .card-corner.bottom { left: auto; top: auto; right: 8px; bottom: 8px; }
@media(max-width:560px) {
  .game-canvas { width: 100%; margin-top: 22px; }
  .game-canvas > .card { padding: 8px 0 65px; }
  .game-canvas .composer { margin-top: 36px; padding: 23px 18px; border-radius: 23px; }
  .game-canvas .composer-actions { gap: 7px; }
  .game-canvas .composer-actions .btn { padding: 9px 4px; font-size: 13px; }
  .game-canvas .draft-vault, .game-canvas .history-vault, .game-canvas .canvas-pocket { padding: 12px 14px; }
}


/* unified-law-suggestion-v4 */
.suggestion > span:not(.suggestion-plus) { grid-column: 1; }
.suggestion-meta { color: #786b82; font-size: 10px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.suggestion-intent { color: var(--ink); font-size: 14px; line-height: 1.55; font-weight: 720; }
.suggestion-tradeoff,
.suggestion-variables { color: #665b6f; font-size: 12px; line-height: 1.5; }
.suggestion-phase { display: grid; gap: 2px; padding-top: 6px; border-top: 1px solid #eee7f2; }
.suggestion-phase b { color: var(--violet-deep); font-size: 10px; letter-spacing: .08em; }
.suggestion-phase span { color: var(--ink); font-size: 13px; line-height: 1.5; }
.suggestion-plus { grid-column: 2; grid-row: 1 / -1; align-self: center; }
.vault-notice:not([hidden]) { margin-top: 18px; padding: 17px; border: 1px solid #ddcfef; border-radius: 17px; background: #f9f5ff; line-height: 1.5; }
.vault-notice > small, .vault-preview-phase small { color: var(--violet-deep); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.vault-notice > p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: break-word; }
.vault-preview-phase { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e7dbf4; }
.vault-preview-private { color: var(--muted); }
.vault-notice .btn { margin-top: 15px; }

/* Interaction polish: movement never carries a touch target away from a finger. */
body.drawer-open { overflow: hidden; }
body.is-busy [data-op], body.is-busy [data-vote], body.is-busy [data-rps],
body.is-busy [data-black-white], body.is-busy [data-play-ready],
body.is-busy #save, body.is-busy #commit, body.is-busy #draw-law,
body.is-busy [data-start-mode] { opacity: .55; pointer-events: none; }
.person button { width: 44px; height: 44px; flex: none; }
.suggestion { transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.suggestion:active, .mode-option:active, .ready-choice:active { border-color: var(--violet); background: var(--violet-wash); }
.hand-card:hover, .hand-card:focus-visible { transform: translateY(-5px) rotate(0); }
.hand-card.selected:hover, .hand-card.selected:focus-visible { transform: translateY(-8px) rotate(0); }
.lobby-qr:hover { transform: rotate(2deg); }
.suggestion:focus-visible, .idea-refresh:focus-visible, .seat-picker button:focus-visible,
.card-choices button:focus-visible, .hand-card:focus-visible, .vault-toggle:focus-visible,
.drawer-line:focus-visible, .drawer-toggle:focus-visible, .person button:focus-visible {
  outline: 3px solid var(--coral); outline-offset: 3px;
}
@media (hover: none), (pointer: coarse) {
  .btn:hover:not(:disabled), .btn.secondary:hover:not(:disabled), .mode-option:hover,
  .suggestion:hover, .phone-app button.ready-choice:hover, .hand-card:hover,
  .hand-card.selected:hover, .person button:hover { transform: none; }
  .hand-card.selected:hover { transform: translateY(-8px) rotate(0); }
  .lobby-qr:hover { transform: rotate(2deg); }
  .btn:active:not(:disabled) { transform: none; box-shadow: 0 3px 0 var(--violet-deep); }
  .mode-option, .suggestion, .ready-choice, .card-choices button, .seat-picker button { touch-action: manipulation; }
}

/* The last screen names the people who emptied their hands. */
.table-finish { padding-top: clamp(30px, 6vh, 75px); }
.table-finish h1 { margin: 0 0 22px; color: var(--violet-deep); font: 950 clamp(58px, 8vw, 112px)/.94 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: -.085em; text-shadow: 5px 6px 0 var(--yellow); }
.finish-result { max-width: 980px; }
.finish-result .stage-name { margin-bottom: 17px; }
.finish-winners { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 14px; max-width: 980px; }
.finish-winner { min-width: 0; min-height: 110px; display: grid; align-content: center; gap: 5px; padding: 17px 19px; border: 2px solid #dfd0ef; border-radius: 22px; background: #fffdfb; box-shadow: 0 8px 0 #e9def2, 0 18px 35px #49327118; }
.finish-winner b { color: var(--violet); font: 900 13px/1.2 system-ui, sans-serif; letter-spacing: .11em; }
.finish-winner strong { color: var(--ink); font-size: clamp(22px, 2.8vw, 36px); line-height: 1.16; overflow-wrap: anywhere; }
.table-standings { margin: 22px 0 4px; max-width: 980px; }
.table-standings > small { display: block; margin-bottom: 10px; color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.table-standings .finish-winners { display: flex; flex-wrap: wrap; gap: 10px; }
.table-standings .finish-winner { min-height: 58px; min-width: 150px; padding: 10px 14px; border-radius: 14px; box-shadow: 0 4px 0 #e9def2; }
.table-standings .finish-winner strong { font-size: 18px; }
.finish-no-winner { color: var(--muted); font-size: clamp(18px, 2vw, 26px); font-weight: 800; letter-spacing: .07em; }
.table-finish .table-actions { margin-top: 35px; }
.phone-finish { padding-top: 18px; }
.phone-finish .page-title { margin: 18px 0 28px; font-size: clamp(50px, 12vw, 75px); }
.phone-finish .finish-winners { grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 11px; }
.phone-finish .finish-winner { min-height: 85px; padding: 13px 14px; border-radius: 17px; }
.phone-finish .finish-winner strong { font-size: 23px; }
.phone-finish .canvas-hint { margin-top: 24px; }
@media(max-width:560px) { .table-finish h1 { font-size: clamp(45px, 12vw, 72px); } .table-finish .finish-winners { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* A shared display can be several times a tablet's area. Keep the public card
   and the current law legible from the table instead of marooning a 1350px app
   in the middle of a high-resolution screen. Tablet and phone rules stay put. */
@media (min-width: 2200px) and (min-height: 1300px) {
  .shell { max-width: 2600px; padding: clamp(48px, 3vh, 76px); }
  .brand { font-size: 25px; }
  .brand:before { width: 46px; height: 46px; font-size: 25px; }
  .host-back, .top-right .pill, .top-right .drawer-toggle { font-size: 19px; }
  .seat-map-item { max-width: 210px; font-size: 15px; padding: 8px 12px 8px 8px; }
  .seat-map-item b { font-size: 13px; padding: 6px 8px; }
  .lobby { grid-template-columns: minmax(0, 1fr) 420px; gap: 68px; }
  .hero { min-height: 550px; }
  .hero h1 { font-size: clamp(160px, 10vh, 215px); }
  .hero .lead { max-width: 1000px; font-size: clamp(28px, 1.6vw, 40px); }
  .lobby-qr { width: 420px; padding: 18px; }
  .lobby-qr img { width: 380px; height: 380px; }
  .lobby-qr small { font-size: 21px; }
  .people { padding: 44px; }
  .people-head h2 { font-size: 22px; }
  .people-grid { min-height: 145px; font-size: 24px; }
  .person-copy b { font-size: 22px; }
  .lobby-actions .btn { min-height: 76px; padding: 18px 38px; font-size: 27px; }
  .start-mode-head { margin-bottom: 25px; font-size: 18px; }
  .start-mode-grid { gap: 30px; }
  .mode-option { grid-template-columns: 116px minmax(0, 1fr) 42px; min-height: 206px; gap: 28px; padding: 30px; border-radius: 30px; }
  .mode-symbol { width: 112px; height: 120px; border-radius: 24px; font-size: 72px; }
  .mode-copy strong { font-size: 35px; }
  .mode-copy small { font-size: 22px; }
  .mode-arrow { font-size: 36px; }
  .table-main { max-width: 2420px; }
  .table-law { padding-top: clamp(36px, 3vh, 66px); }
  .round-label { font-size: 21px; }
  .table h1.law-headline, .table-dense h1.law-headline { max-width: none; font-size: clamp(62px, 4.2vh, 86px); margin-bottom: 34px; }
  .stage-name { font-size: 18px; }
  .after-stage, .table-dense .after-stage { grid-template-columns: minmax(440px, 36%) minmax(0, 1fr); align-items: start; gap: clamp(56px, 3vw, 105px); }
  .after-stage .rule, .table-dense .after-stage .rule { gap: 15px; font-size: clamp(32px, 2.05vh, 45px); line-height: 1.31; }
  .rule-step, .table-dense .rule-step { grid-template-columns: 36px minmax(0, 1fr); gap: 17px; padding: clamp(20px, 1.25vh, 31px); border-radius: 24px; }
  .rule-step > span { font-size: 19px; }
  .stage-default { font-size: 29px; }
  .reveal-card .playing-card, .table-dense .reveal-card .playing-card { width: min(100%, clamp(370px, 23vh, 520px)); margin-top: 16px; }
  .playing-card .card-heart { font-size: clamp(270px, 16vh, 360px); }
  .playing-card .card-corner { font-size: 72px; }
  .playing-card .card-corner small { font-size: 45px; }
  .round-close-panel { width: min(100%, 1600px); padding: 26px 30px; }
  .round-close-panel .eyebrow { font-size: 18px; }
  .round-winner { min-height: 64px; font-size: 21px; padding: 12px 18px; }
  .round-end { font-size: 25px; min-height: 66px; }
}

/* Sealed table actions share the current law canvas. */
.screen-call{margin:1.4rem 0;padding:1.2rem 1.4rem;border:1px solid var(--line);border-radius:24px;background:var(--paper);min-width:0;max-width:100%;overflow-wrap:anywhere}
.screen-call .phase-cue{margin:0 0 .8rem;color:var(--violet);font-size:.78rem;letter-spacing:.14em}
.screen-clock{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1.4rem;background:var(--violet-wash)}
.screen-clock .phase-cue{flex-basis:100%;margin-bottom:0}
.screen-clock-number{font-size:clamp(2.8rem,7vw,5.8rem);font-weight:800;line-height:1;font-variant-numeric:tabular-nums;color:var(--violet-deep)}
.screen-clock-cue{font-size:.85rem;font-weight:800;letter-spacing:.14em;color:var(--muted)}
.screen-clock.is-open{background:#fff3d3;border-color:var(--yellow)}
.screen-clock.is-open .screen-clock-cue{color:var(--violet-deep)}
.screen-choice-grid{display:flex;gap:.7rem;flex-wrap:wrap}.screen-choice-grid .btn{flex:1 1 110px;min-width:0;white-space:normal}
.screen-choice-grid.screen-choice-compact{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.screen-choice-compact .btn{padding:.7rem .2rem;min-height:44px}.screen-choice-grid .btn.screen-option-red{color:#cb425c}
.screen-choice-result p{display:flex;gap:1rem;justify-content:space-between;flex-wrap:wrap;margin:.5rem 0}.screen-choice-result b{font-size:.86rem;color:var(--muted)}
.screen-own-answer{font-size:1.2rem;font-weight:700}.screen-own-answer small{margin-left:.6rem;font-size:.7rem;color:var(--muted);letter-spacing:.1em}.screen-result-value{font-size:1.4rem;font-weight:700}
@media(max-width:600px){.screen-call{padding:1rem;border-radius:20px}.screen-clock-number{font-size:3.6rem}.screen-choice-grid{gap:.5rem}}
