:root {
  color-scheme: dark;
  --glass: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.25);
  --muted: rgba(255,255,255,.62);
  --warm: #fff0bd;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: #0d2b47; color: #fff; font-family: "PingFang SC","Microsoft YaHei",Arial,sans-serif; }
button, input { font: inherit; }
button { color: inherit; }

.app-shell { position: relative; width: 100%; height: 100%; isolation: isolate; overflow: hidden; }
.background { position: fixed; inset: -28px; z-index: -3; background: url("./assets/villa.jpg") center/cover no-repeat; filter: blur(10px) saturate(.84); transform: scale(1.06); }
.veil { position: fixed; inset: 0; z-index: -2; background: radial-gradient(circle at 50% 40%,rgba(88,191,235,.09),transparent 38%),linear-gradient(180deg,rgba(5,31,56,.4),rgba(5,22,40,.76)); }
.screen { height: calc(100vh - 84px); overflow: hidden; }
.admin-mode .screen { height: 100vh; }
.admin-mode .tab-bar { display: none; }
.admin-entry { position: fixed; z-index: 25; top: 14px; right: 16px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; cursor: pointer; color: rgba(255,255,255,.6); background: rgba(7,31,52,.38); backdrop-filter: blur(14px); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.admin-entry:hover { color: #fff; background: rgba(255,255,255,.13); }
.admin-mode .admin-entry { display: none; }
.page { display: none; width: min(100%,1120px); height: 100%; margin: 0 auto; animation: page-in .3s ease both; }
.page.active { display: flex; }

.draw-page { position: relative; padding: 24px 34px 18px; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 5px; letter-spacing: .24em; text-shadow: 0 2px 14px rgba(0,0,0,.2); }
.brand > span { color: var(--warm); font-size: 20px; }
.brand p { margin: 0; font-size: 14px; font-weight: 800; }
.brand small { margin-top: 2px; padding: 5px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: var(--muted); font-size: 10px; letter-spacing: .08em; background: rgba(255,255,255,.07); }
.draw-center { display: flex; flex-direction: column; align-items: center; }
.name-picker { position: relative; z-index: 5; width: min(88vw,760px); margin-bottom: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 18px; background: rgba(7,33,56,.42); backdrop-filter: blur(18px); }
.name-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.name-picker-head > span { color: rgba(255,255,255,.62); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.name-picker-head button { padding: 5px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 9px; cursor: pointer; color: rgba(255,255,255,.8); background: rgba(255,255,255,.08); font-size: 9px; font-weight: 800; }
.quick-add-row { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.quick-add-row input { min-width: 0; padding: 7px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; outline: none; color: #fff; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 800; }
.quick-add-row input:focus { border-color: rgba(255,255,255,.62); }
.quick-add-row input::placeholder { color: rgba(255,255,255,.38); }
.quick-add-row button { padding: 7px 10px; border: 1px solid rgba(255,255,255,.32); border-radius: 10px; cursor: pointer; color: #17344d; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 900; white-space: nowrap; }
.quick-add-row button:hover { background: #fff; }
.name-chips { width: 100%; max-height: min(25vh,160px); margin-top: 8px; display: grid !important; grid-template-columns: repeat(auto-fit,minmax(66px,1fr)); align-content: start; gap: 6px; overflow-x: hidden !important; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.name-chips::-webkit-scrollbar { width: 4px; }
.name-chips::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.24); }
.name-chip { width: 100%; min-width: 0; max-width: 100%; padding: 7px 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; cursor: pointer; color: rgba(255,255,255,.68); background: rgba(255,255,255,.06); font-size: 10px; font-weight: 800; overflow: hidden; overflow-wrap: anywhere; text-align: center; white-space: normal; }
.name-chip:hover { background: rgba(255,255,255,.14); }
.name-chip.selected { border-color: rgba(255,255,255,.7); color: #17344d; background: rgba(255,255,255,.92); }
.name-chip.used { cursor: not-allowed; opacity: .32; text-decoration: line-through; }
.name-empty { padding: 7px 2px; color: rgba(255,255,255,.38); font-size: 10px; white-space: nowrap; }
.orb-wrap { position: relative; display: grid; place-items: center; width: min(52vh,420px); aspect-ratio: 1; }
.draw-orb { position: relative; z-index: 2; width: 67%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.62); border-radius: 50%; cursor: pointer; color: #fff; background: radial-gradient(circle at 32% 24%,rgba(255,255,255,.44),transparent 18%),linear-gradient(150deg,rgba(255,255,255,.25),rgba(255,255,255,.08)); box-shadow: inset 0 1px 1px rgba(255,255,255,.55),0 28px 65px rgba(0,20,42,.34); backdrop-filter: blur(18px); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .2s; }
.draw-orb:hover { transform: scale(1.025); }
.draw-orb:active { transform: scale(.95); }
.draw-orb:focus-visible { outline: 3px solid #fff; outline-offset: 7px; }
.orb-glint { position: absolute; top: 20%; left: 20%; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 18px 6px rgba(255,255,255,.25); }
.orb-icon { color: var(--warm); font-size: 27px; filter: drop-shadow(0 0 10px #fff); }
.draw-orb strong { margin-top: 9px; font-size: 27px; font-weight: 900; letter-spacing: .05em; }
.draw-orb small { margin-top: 7px; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 700; }
.orbit { position: absolute; inset: 8%; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; transform: rotate(-12deg) scaleY(.83); }
.orbit::after { content: ""; position: absolute; width: 7px; height: 7px; top: 20%; right: 8%; border-radius: 50%; background: #fff; box-shadow: 0 0 14px #fff; }
.orbit-two { inset: 4%; opacity: .45; transform: rotate(28deg) scaleY(.92); }
.orb-wrap.drawing .draw-orb { animation: breathe .65s ease-in-out infinite alternate; pointer-events: none; }
.orb-wrap.drawing .orbit-one { animation: spin 1s linear infinite; }
.orb-wrap.drawing .orbit-two { animation: spin-reverse .75s linear infinite; }
.hint { margin: -30px 0 0; min-height: 18px; color: rgba(255,255,255,.65); font-size: 11px; font-weight: 700; }
.draw-status { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.52); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.draw-status i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.result-card { position: relative; z-index: 9; width: min(92vw,420px); min-height: min(64vh,540px); padding: 32px 28px 24px; border: 1px solid rgba(255,255,255,.42); border-radius: 34px; background: linear-gradient(145deg,rgba(255,255,255,.28),rgba(12,55,82,.72)); box-shadow: inset 0 1px rgba(255,255,255,.55),0 32px 72px rgba(0,19,38,.48); backdrop-filter: blur(30px); display: flex; flex-direction: column; align-items: center; justify-content: space-between; animation: reveal .62s cubic-bezier(.22,.9,.3,1.1) both; }
.result-kicker { color: rgba(255,255,255,.75); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.result-person { min-height: 20px; color: var(--warm); font-size: 13px; font-weight: 800; }
.result-copy p { margin: 0 0 7px; color: rgba(255,255,255,.72); font-size: 13px; font-weight: 700; }
.result-copy strong { display: block; font-size: 46px; font-weight: 900; }
.result-copy .order-number { font-size: 65px; line-height: 1; }
.hairline { width: 260px; height: 1px; margin: 25px auto; background: linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent); }
.next-button { width: 100%; height: 46px; border: 1px solid rgba(255,255,255,.45); border-radius: 15px; cursor: pointer; color: #17344d; background: rgba(255,255,255,.9); font-weight: 900; transition: transform .2s,background .2s; }
.next-button:hover { background: #fff; transform: translateY(-1px); }

.content-page { padding: 28px 28px 22px; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
.content-page::-webkit-scrollbar,.timeline-scroll::-webkit-scrollbar { display: none; }
.page-header { margin-bottom: 20px; }
.eyebrow { display: block; margin-bottom: 7px; color: rgba(255,255,255,.55); font-size: 9px; font-weight: 900; letter-spacing: .28em; }
.page-header h1 { margin: 0; font-size: 30px; line-height: 1; font-weight: 900; }
.page-header p { margin: 8px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.day-overview { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; margin-bottom: 14px; }
.day-card { min-width: 0; height: 106px; padding: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; cursor: pointer; color: #fff; background: rgba(255,255,255,.08); backdrop-filter: blur(14px); text-align: left; display: flex; flex-direction: column; align-items: flex-start; transition: .2s; }
.day-card:hover { background: rgba(255,255,255,.14); }
.day-card.selected { border-color: rgba(255,255,255,.52); background: linear-gradient(145deg,rgba(255,255,255,.24),rgba(255,255,255,.1)); }
.day-card small { color: rgba(255,255,255,.56); font-size: 9px; font-weight: 800; }
.day-card strong { margin: 5px 0 7px; font-size: 27px; font-weight: 900; }
.day-card span { color: rgba(255,255,255,.65); font-size: 10px; font-weight: 700; }
.timeline-panel { min-height: 0; flex: 1; padding: 18px 10px 8px 19px; border: 1px solid rgba(255,255,255,.27); border-radius: 25px; background: linear-gradient(145deg,rgba(255,255,255,.17),rgba(255,255,255,.07)); backdrop-filter: blur(18px); overflow: hidden; }
.timeline-heading { padding: 0 9px 14px 1px; border-bottom: 1px solid rgba(255,255,255,.14); display: flex; align-items: flex-end; justify-content: space-between; }
.timeline-heading div { display: flex; align-items: baseline; gap: 9px; }
.timeline-heading strong { font-size: 23px; }
.timeline-heading span,.timeline-heading small { color: rgba(255,255,255,.56); font-size: 10px; font-weight: 700; }
.timeline-scroll { height: calc(100% - 47px); padding: 17px 8px 2px 0; overflow-y: auto; }
.timeline-item { min-height: 73px; display: grid; grid-template-columns: 17px 70px 1fr; gap: 7px; }
.timeline-rail { position: relative; }
.timeline-dot { position: absolute; top: 3px; left: 3px; width: 9px; height: 9px; border: 2px solid rgba(255,255,255,.85); border-radius: 50%; }
.timeline-line { position: absolute; top: 17px; bottom: -3px; left: 7px; width: 1px; background: rgba(255,255,255,.2); }
.timeline-time { color: rgba(255,255,255,.65); font-size: 11px; font-weight: 900; }
.timeline-copy strong { display: block; font-size: 14px; }
.timeline-copy p { margin: 5px 0 18px; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.55; font-weight: 600; }
.notice-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 13px; }
.notice-card { min-height: 150px; padding: 19px; border: 1px solid rgba(255,255,255,.24); border-radius: 23px; background: linear-gradient(145deg,rgba(255,255,255,.17),rgba(255,255,255,.07)); backdrop-filter: blur(17px); display: grid; grid-template-columns: 40px 1fr; gap: 11px; }
.notice-no { color: var(--warm); font-size: 24px; font-weight: 900; }
.notice-card h2 { margin: 1px 0 7px; font-size: 16px; }
.notice-card p { margin: 0; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.7; font-weight: 600; }
.gentle-reminder { padding: 22px 0; text-align: center; color: rgba(255,255,255,.5); font-size: 10px; font-weight: 700; }
.pool-page { display: none; }
.pool-page.active { display: flex; }
.empty-pool { min-height: 360px; flex: 1; border: 1px dashed rgba(255,255,255,.3); border-radius: 30px; background: rgba(255,255,255,.06); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-orb { width: 110px; height: 110px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; background: radial-gradient(circle at 35% 28%,rgba(255,255,255,.28),rgba(255,255,255,.06)); display: grid; place-items: center; color: var(--warm); font-size: 30px; }
.empty-pool > strong { font-size: 19px; }
.empty-pool > p { margin: 9px 0 0; color: rgba(255,255,255,.52); font-size: 11px; font-weight: 700; }
.shell-pool { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 14px; }
.pool-shell-card { overflow: hidden; border: 1px solid rgba(255,255,255,.24); border-radius: 22px; background: linear-gradient(145deg,rgba(255,255,255,.17),rgba(255,255,255,.07)); backdrop-filter: blur(16px); }
.pool-shell-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.pool-shell-card strong { display: block; padding: 13px 14px 15px; font-size: 13px; }

.admin-page { max-width: 1180px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; }
.admin-back { padding: 9px 14px; border: 1px solid rgba(255,255,255,.26); border-radius: 12px; cursor: pointer; color: #fff; background: rgba(255,255,255,.09); font-size: 10px; font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(420px,1.4fr); gap: 14px; padding-bottom: 28px; }
.admin-card { padding: 20px; border: 1px solid rgba(255,255,255,.23); border-radius: 23px; background: linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.06)); backdrop-filter: blur(18px); }
.admin-card-head { margin-bottom: 17px; display: flex; gap: 12px; align-items: flex-start; }
.admin-card-head > span { color: var(--warm); font-size: 11px; font-weight: 900; }
.admin-card h2 { margin: 0; font-size: 17px; }
.admin-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.admin-card textarea,.admin-card input,.password-dialog input { width: 100%; padding: 11px 12px; border: 1px solid rgba(255,255,255,.23); border-radius: 12px; outline: none; color: #fff; background: rgba(255,255,255,.07); }
.admin-card textarea:focus,.admin-card input:focus,.password-dialog input:focus { border-color: rgba(255,255,255,.62); }
.admin-card textarea { resize: vertical; line-height: 1.6; }
.admin-primary { width: 100%; margin-top: 10px; padding: 10px; border: 0; border-radius: 11px; cursor: pointer; color: #17344d; background: #fff; font-size: 11px; font-weight: 900; }
.shell-upload-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.shell-upload-row #shellPhoto { display: none; }
.file-button,.shell-upload-row button { padding: 10px 12px; border: 1px solid rgba(255,255,255,.24); border-radius: 11px; cursor: pointer; color: #fff; background: rgba(255,255,255,.09); font-size: 10px; font-weight: 800; }
.draw-config-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.draw-config-row label { color: rgba(255,255,255,.62); font-size: 10px; font-weight: 900; display: grid; gap: 7px; }
.admin-shell-grid { max-height: 310px; margin-top: 13px; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; overflow-y: auto; }
.admin-shell-item { overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.06); }
.admin-shell-item img { display: block; width: 100%; aspect-ratio: 1.1; object-fit: cover; }
.admin-shell-info { padding: 8px; display: flex; gap: 5px; }
.admin-shell-info input { min-width: 0; padding: 6px 7px; font-size: 9px; }
.admin-shell-info button { flex: 0 0 auto; border: 0; border-radius: 8px; cursor: pointer; color: #ffd0d0; background: rgba(157,49,58,.3); font-size: 9px; }
.data-card { grid-column: 1 / -1; }
.admin-data-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.admin-data-actions button { padding: 12px; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; cursor: pointer; color: #fff; background: rgba(255,255,255,.09); font-size: 10px; font-weight: 800; }
.admin-data-actions button:hover { background: rgba(255,255,255,.16); }
.admin-data-actions .danger-outline { border-color: rgba(255,134,144,.46); color: #ffd0d4; background: rgba(142,36,47,.22); }

.history-page { max-width: 1180px; }
.history-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.history-actions { display: flex; gap: 8px; }
.history-actions button,.restore-button { padding: 9px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; cursor: pointer; color: #fff; background: rgba(255,255,255,.1); font-size: 11px; font-weight: 800; }
.history-actions button:hover,.restore-button:hover { background: rgba(255,255,255,.18); }
.history-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 215px 1fr; gap: 13px; }
.round-list { padding: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: rgba(7,32,54,.4); backdrop-filter: blur(18px); overflow-y: auto; }
.round-item { width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 13px; cursor: pointer; color: rgba(255,255,255,.65); background: transparent; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.round-item:hover { background: rgba(255,255,255,.08); }
.round-item.active { border-color: rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.14); }
.round-item strong { font-size: 13px; }
.round-item span { font-size: 9px; }
.round-item em { color: var(--warm); font-size: 9px; font-style: normal; }
.history-panel { min-width: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 22px; background: linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.06)); backdrop-filter: blur(18px); display: flex; flex-direction: column; overflow: hidden; }
.history-panel-head { padding: 17px 20px; border-bottom: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: space-between; }
.history-panel-head > div { display: flex; flex-direction: column; gap: 4px; }
.history-panel-head strong { font-size: 17px; }
.history-panel-head span { color: rgba(255,255,255,.55); font-size: 10px; }
.reset-trigger { padding: 9px 13px; border: 1px solid rgba(255,183,183,.42); border-radius: 11px; cursor: pointer; color: #ffd3d3; background: rgba(135,39,48,.22); font-size: 10px; font-weight: 900; }
.reset-trigger:hover { background: rgba(160,46,56,.34); }
.reset-trigger[hidden] { display: none; }
.history-table-wrap { position: relative; flex: 1; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th,td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.09); text-align: left; font-size: 11px; }
th { position: sticky; top: 0; z-index: 1; color: rgba(255,255,255,.52); background: rgba(14,48,74,.94); font-size: 9px; letter-spacing: .08em; }
td:first-child { color: var(--warm); font-weight: 900; }
.history-table-wrap table { table-layout: fixed; }
.history-table-wrap tbody { display: table-row-group; }
.history-table-wrap tbody tr { display: table-row; background: rgba(8,32,54,.22); }
.history-table-wrap tbody tr:nth-child(even) { background: rgba(255,255,255,.04); }
.history-table-wrap tbody td { display: table-cell; color: rgba(255,255,255,.88); font-weight: 800; vertical-align: middle; word-break: break-word; }
.history-table-wrap tbody td:first-child { color: var(--warm); }
.empty-history { display: none; padding: 60px 20px; text-align: center; color: rgba(255,255,255,.45); font-size: 12px; }
.empty-history.show { display: block; }
.restore-row { padding: 11px 4px 0; display: flex; align-items: center; gap: 10px; }
.restore-row input { display: none; }
.restore-row span { color: rgba(255,255,255,.45); font-size: 9px; }

.tab-bar { position: fixed; z-index: 20; left: 50%; bottom: 0; width: min(100%,800px); height: 84px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.22); border-bottom: 0; border-radius: 26px 26px 0 0; transform: translateX(-50%); background: rgba(8,32,54,.78); box-shadow: 0 -18px 48px rgba(0,16,34,.25); backdrop-filter: blur(24px); display: grid; grid-template-columns: repeat(5,1fr); }
.tab { position: relative; border: 1px solid transparent; border-radius: 17px; cursor: pointer; color: rgba(255,255,255,.5); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.tab:hover { color: rgba(255,255,255,.8); }
.tab.active { border-color: rgba(255,255,255,.2); color: #fff; background: linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.06)); }
.tab span { font-size: 20px; line-height: 1; }
.tab.active span { color: var(--warm); text-shadow: 0 0 9px #fff; }
.tab small { font-size: 10px; font-weight: 800; }

dialog { border: 1px solid rgba(255,255,255,.3); border-radius: 25px; color: #fff; background: rgba(11,38,61,.96); box-shadow: 0 30px 90px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(0,16,31,.68); backdrop-filter: blur(6px); }
.reset-dialog { width: min(92vw,430px); padding: 0; }
.reset-dialog form { padding: 28px; display: flex; flex-direction: column; }
.dialog-icon { color: var(--warm); font-size: 36px; }
.reset-dialog h2 { margin: 8px 0; font-size: 23px; }
.reset-dialog p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.reset-dialog label { margin: 10px 0 6px; color: rgba(255,255,255,.65); font-size: 10px; font-weight: 800; }
.dialog-actions { margin-top: 23px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dialog-actions button,.alert-dialog button { height: 42px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 900; }
.dialog-cancel { color: #fff; background: rgba(255,255,255,.12); }
.dialog-danger { color: #fff; background: #9e3944; }
.dialog-primary { color: #17344d; background: #fff; }
.roster-dialog { width: min(92vw,460px); padding: 0; }
.roster-dialog form { padding: 28px; display: flex; flex-direction: column; }
.roster-dialog h2 { margin: 8px 0; font-size: 23px; }
.roster-dialog p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.roster-dialog textarea { width: 100%; padding: 12px; resize: vertical; border: 1px solid rgba(255,255,255,.25); border-radius: 13px; outline: none; color: #fff; background: rgba(255,255,255,.08); font: inherit; line-height: 1.6; }
.roster-dialog textarea:focus { border-color: rgba(255,255,255,.65); }
.alert-dialog { width: min(92vw,380px); padding: 26px; }
.alert-dialog h2 { margin: 0 0 8px; }
.alert-dialog p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.alert-dialog button { width: 100%; margin-top: 12px; color: #17344d; background: #fff; }
.password-dialog { width: min(92vw,370px); padding: 26px; }
.password-dialog h2 { margin: 7px 0; }
.password-dialog p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.password-error { min-height: 16px; margin-top: 6px; color: #ffb9bf; font-size: 10px; }

@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { to { transform: scale(.96); filter: brightness(1.15); } }
@keyframes spin { to { transform: rotate(348deg) scaleY(.83); } }
@keyframes spin-reverse { to { transform: rotate(-332deg) scaleY(.92); } }
@keyframes reveal { from { opacity: 0; transform: scale(.76); filter: blur(8px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }

@media (max-width: 760px) {
  .name-picker { width: min(90vw,540px); }
  .name-chips { grid-template-columns: repeat(auto-fit,minmax(58px,1fr)); }
  .name-chips { max-height: 118px; }
  .notice-list { grid-template-columns: 1fr; }
  .history-page { padding: 18px 14px 92px; }
  .history-layout { flex: 0 0 auto; display: block; min-height: auto; }
  .round-list { max-height: 96px; margin-bottom: 10px; }
  .history-header { align-items: flex-start; flex-direction: column; }
  .history-actions { width: 100%; }
  .history-actions button { flex: 1; }
  .history-panel { overflow: visible; }
  .history-panel-head { padding: 14px 15px; }
  .history-table-wrap { overflow: visible; }
  .history-table-wrap table,.history-table-wrap thead,.history-table-wrap tbody { display: block; width: 100%; }
  .history-table-wrap thead { display: none; }
  .history-table-wrap tbody tr { display: grid; grid-template-columns: 52px 1fr; gap: 7px 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(8,32,54,.28); }
  .history-table-wrap tbody tr:nth-child(even) { background: rgba(255,255,255,.05); }
  .history-table-wrap tbody td { display: flex; min-width: 0; padding: 0; border: 0; align-items: center; gap: 8px; font-size: 11px; }
  .history-table-wrap tbody td::before { flex: 0 0 auto; color: rgba(255,255,255,.42); font-size: 9px; font-weight: 900; }
  .history-table-wrap tbody td:nth-child(1)::before { content: "顺序"; }
  .history-table-wrap tbody td:nth-child(2)::before { content: "抽卡人"; }
  .history-table-wrap tbody td:nth-child(3)::before { content: "房间"; }
  .history-table-wrap tbody td:nth-child(4)::before { content: "时间"; }
  .history-table-wrap tbody td:nth-child(1) { grid-row: span 2; justify-content: center; align-items: center; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 16px; }
  .history-table-wrap tbody td:nth-child(1)::before { display: none; }
  .history-table-wrap tbody td:nth-child(n+2) { grid-column: 2; }
  .screen { height: calc(100vh - 76px); }
  .tab-bar { height: 76px; }
  .tab small { font-size: 8px; }
  .admin-grid { grid-template-columns: 1fr; }
  .data-card { grid-column: auto; }
  .admin-data-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-height: 720px) {
  .draw-page { padding-top: 14px; }
  .name-chips { max-height: 92px; }
  .orb-wrap { width: 350px; }
  .result-card { min-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
