@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');
:root{--plum:#2b1630;--wine:#8d334b;--wine-dark:#6c243b;--cream:#f7f4ef;--paper:#fffdf9;--text:#281f27;--muted:#796e76;--line:#e8e0dd;--gold:#cda36c;--teal:#366b67;--shadow:0 20px 70px rgba(35,17,29,.11)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:'DM Sans',Arial,sans-serif;color:var(--text);background:var(--cream)}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.18}h1,h2{font-family:'Playfair Display',Georgia,serif;font-weight:600}.muted{color:var(--muted)}.eyebrow{font-size:.72rem;letter-spacing:.18em;font-weight:700;color:var(--wine);text-transform:uppercase}.small-note{font-size:.79rem;color:var(--muted);line-height:1.5}.topbar{height:78px;display:flex;align-items:center;gap:22px;padding:0 max(5vw,22px);border-bottom:1px solid rgba(255,255,255,.12)}.brand{font-size:1.12rem;font-weight:700;letter-spacing:.16em;white-space:nowrap}.brand-icon{color:var(--gold);font-size:1.55em;vertical-align:-.08em;margin-right:7px}.brand-dot{color:var(--gold)}.topbar-note{margin-left:auto;font-size:.8rem;letter-spacing:.08em;opacity:.72}.button{min-height:48px;padding:12px 20px;border-radius:10px;border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:15px;font-weight:700;font-size:.92rem;transition:transform .15s ease,background .15s ease,border-color .15s ease;text-align:center}.button:hover{transform:translateY(-1px)}.button:focus-visible,.link-button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:2px}.button.primary{background:var(--wine);color:white}.button.primary:hover{background:var(--wine-dark)}.button.primary span{font-size:1.25em;font-weight:400}.button.subtle{background:#f2ebe8;color:var(--plum)}.button.outline{background:transparent;color:var(--wine);border-color:#cfaeb8}.button.danger-text,.danger-text{color:#a33d48}.link-button{border:0;background:none;padding:6px;color:var(--wine);font-weight:700;font-size:.87rem}.link-button:hover{text-decoration:underline}.stack{display:grid;gap:16px}.stack.compact{gap:10px}.stack label,.recover-form label,.editor-dialog label{display:grid;gap:7px;font-size:.82rem;font-weight:700;color:#4b3a45}.stack input,.recover-form input,.editor-dialog input,.editor-dialog select,.editor-dialog textarea{width:100%;padding:12px 14px;border:1px solid #dcd1d1;border-radius:9px;background:white;color:var(--text);outline:0}.stack input:focus,.recover-form input:focus,.editor-dialog input:focus,.editor-dialog select:focus,.editor-dialog textarea:focus{border-color:var(--wine)}.footer{text-align:center;font-size:.76rem;letter-spacing:.05em;opacity:.45;padding:24px 20px}
/* Participant */
.player-page{min-height:100vh;background:radial-gradient(circle at 82% 10%,#62344c 0,transparent 28%),linear-gradient(145deg,#28152f,#3b2034 55%,#24152c);color:white}.player-shell{min-height:calc(100vh - 145px);display:grid;place-items:center;padding:42px 18px}.player-card{width:min(100%,520px);padding:42px;background:var(--paper);color:var(--text);border-radius:20px;box-shadow:0 30px 90px rgba(15,5,19,.28)}.player-card h1{font-size:clamp(2rem,5vw,2.85rem);margin:12px 0 14px}.player-card .intro{color:var(--muted);line-height:1.65;margin-bottom:27px}.player-card .button{width:100%;margin-top:6px}.player-card .eyebrow{color:var(--wine)}.team-select{border:0;margin:2px 0 0;padding:0;display:grid;gap:9px}.team-select legend{font-size:.82rem;font-weight:700;margin-bottom:7px}.team-option{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:10px;cursor:pointer;font-weight:700}.team-option:has(input:checked){border-color:var(--wine);background:#f8eff0}.team-option input{accent-color:var(--wine);width:16px;height:16px}.team-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#edd5dd;color:#793149}.team-option-b .team-mark{background:#d4e7e2;color:var(--teal)}.separator{display:flex;align-items:center;gap:12px;color:#9b8f97;font-size:.8rem;margin:27px 0 19px}.separator:before,.separator:after{content:'';height:1px;background:var(--line);flex:1}.recover-form{display:grid;gap:10px;grid-template-columns:1fr auto;align-items:end}.recover-form .button{width:auto;margin:0}.error-box{padding:12px;border-radius:9px;background:#ffecec;color:#8e2935}.waiting-icon{font-size:4.5rem;line-height:1;color:var(--wine);margin:15px 0 25px;animation:rotate 8s linear infinite;width:max-content}@keyframes rotate{to{transform:rotate(360deg)}}.player-card.playing{width:min(100%,650px);padding:0;overflow:hidden}.player-meta{padding:24px 30px 0;display:flex;align-items:center;justify-content:space-between;gap:10px}.status-chip{font-size:.73rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--wine)}.team-badge{font-size:.72rem;font-weight:700;padding:7px 10px;border-radius:99px;background:#f4e2e7;color:var(--wine)}.team-badge.team-b{background:#e1f0eb;color:var(--teal)}.player-greeting{padding:9px 30px 21px;color:var(--muted);font-size:.84rem;border-bottom:1px solid var(--line)}.question-panel{padding:35px 30px 30px;min-height:305px}.question-panel h2{font-size:clamp(1.7rem,4vw,2.35rem);margin-bottom:12px}.question-panel p{color:var(--muted);line-height:1.6}.question-label{color:var(--wine);font-size:.75rem;letter-spacing:.16em;font-weight:700;margin-bottom:10px}.question-text{max-width:550px}.answer-form{display:grid;gap:10px;margin-top:26px}.answer-option{display:flex;align-items:center;gap:14px;padding:15px;border:1px solid var(--line);border-radius:12px;cursor:pointer;line-height:1.4}.answer-option:hover,.answer-option:has(input:checked){border-color:var(--wine);background:#fbf2f4}.answer-option input{accent-color:var(--wine);width:17px;height:17px;flex:none}.answer-letter{width:29px;height:29px;border-radius:7px;background:#f5e8e9;color:var(--wine);font-weight:700;display:grid;place-items:center;flex:none}.answer-form .button{margin-top:10px}.answer-form .small-note{text-align:center;margin:0}.sent-check,.result-symbol{font-size:3rem;color:var(--wine);margin:0 0 18px}.player-bottom{padding:18px 30px;display:flex;justify-content:space-between;gap:15px;background:#f7f1ee;border-top:1px solid var(--line);font-size:.8rem;color:var(--muted)}.player-bottom strong{color:var(--text)}.recovery-note{padding:17px 30px;background:#fffaf2;border-top:1px solid #f0e3cc;color:#5a4750;font-size:.84rem}.recovery-note summary{cursor:pointer;font-weight:700}.recovery-note p{margin:12px 0 7px}.recovery-note strong{font-size:1rem;letter-spacing:.12em;color:var(--wine)}
/* Board */
.board-page{min-height:100vh;color:#fff;background:radial-gradient(circle at 50% 10%,#49263e,transparent 36%),#201126}.board-topbar{height:90px}.live-pill{margin-left:auto;border:1px solid #71576d;border-radius:99px;padding:9px 17px;font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.live-pill.is-live:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#eaa277;margin-right:8px;box-shadow:0 0 0 4px #eaa2772d}.board-shell{max-width:1500px;margin:auto;padding:50px 5vw 38px}.board-heading{text-align:center;margin-bottom:45px}.board-heading .eyebrow{color:#d0a989}.board-heading h1{font-size:clamp(2.2rem,5vw,4.7rem);margin:10px 0}.board-heading p:last-child{font-size:.9rem;color:#b9a7b3}.score-layout{display:grid;grid-template-columns:1fr 80px 1fr;align-items:center;gap:18px}.score-side{min-height:460px;border:1px solid #60445a;border-radius:22px;padding:38px 42px;background:linear-gradient(150deg,#44263b,#332036);display:flex;flex-direction:column}.score-side.score-b{background:linear-gradient(150deg,#254343,#1c3037);border-color:#456264}.score-top{display:flex;align-items:center;justify-content:space-between}.team-emblem{width:48px;height:48px;display:grid;place-items:center;border-radius:13px;background:#a65067;font:700 1.1rem 'DM Sans',sans-serif}.score-b .team-emblem{background:#49847c}.team-label{font-size:.72rem;letter-spacing:.18em;color:#d9b7c4;font-weight:700}.score-b .team-label{color:#afd5cc}.score-side h2{font-size:clamp(1.8rem,3vw,2.8rem);margin:24px 0 8px}.score-percent{font-family:'Playfair Display',Georgia,serif;font-size:clamp(4.5rem,10vw,9rem);line-height:1.05;margin:auto 0 25px;font-variant-numeric:tabular-nums}.score-bar{height:6px;background:#ffffff26;border-radius:20px;overflow:hidden}.score-bar div{height:100%;background:#e2a1ae;border-radius:20px;transition:width .5s}.score-b .score-bar div{background:#91d5c7}.score-details{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:25px}.score-details div{display:grid;gap:5px}.score-details strong{font-size:1.48rem}.score-details span{color:#c5aebf;font-size:.73rem}.score-b .score-details span{color:#a8c9c5}.versus{text-align:center;font-family:'Playfair Display',Georgia,serif;font-size:1.5rem;color:#c2a6b8}.board-progress{display:flex;justify-content:space-between;color:#ad9baa;font-size:.83rem;padding:28px 3px}.board-empty{text-align:center;padding:18vh 20px;color:#fff}.board-empty p{color:#bbaaba}
/* Director */
.admin-topbar{background:#fffdf9;border-bottom:1px solid var(--line);color:var(--plum)}.admin-topbar .link-button{margin-left:20px}.admin-shell{max-width:1530px;margin:auto;padding:32px 4vw 80px}.admin-layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:32px;align-items:start}.admin-sidebar{position:sticky;top:20px;background:#fffdf9;border:1px solid var(--line);border-radius:17px;overflow:hidden;box-shadow:0 8px 35px #3d203008}.side-heading{padding:25px 23px 14px;display:flex;align-items:center;justify-content:space-between}.side-count{font-size:.76rem;color:var(--muted)}.competition-list{max-height:420px;overflow:auto}.competition-item{width:100%;text-align:left;display:grid;gap:8px;padding:15px 23px;border:0;border-left:3px solid transparent;background:transparent}.competition-item:hover{background:#f8f2f0}.competition-item.active{background:#f9eff1;border-left-color:var(--wine)}.comp-title{font-weight:700;line-height:1.3}.comp-meta{color:var(--muted);font-size:.74rem}.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:#afa4a9;margin-right:7px}.status-dot.live{background:#d36c65}.status-dot.finished{background:var(--teal)}.empty-side{padding:0 23px;color:var(--muted);font-size:.85rem}.sidebar-create{border-top:1px solid var(--line);padding:23px}.sidebar-create h3{font-family:'DM Sans',sans-serif;font-size:.94rem}.sidebar-create .button{width:100%;margin-top:5px}.sidebar-create input{font-size:.84rem}.admin-main{min-width:0}.welcome-panel{background:var(--plum);color:white;border-radius:20px;padding:70px max(40px,6vw);min-height:450px;display:flex;flex-direction:column;justify-content:center;background-image:radial-gradient(circle at 90% 25%,#603b55,transparent 35%)}.welcome-panel .eyebrow{color:#d3aa8c}.welcome-panel h1{font-size:clamp(2.8rem,5vw,5rem);max-width:630px;margin:13px 0 18px}.welcome-panel p{color:#d5c7d1;max-width:470px;line-height:1.7}.welcome-mark{font-size:4rem;color:var(--gold);line-height:1;margin-bottom:36px}.detail-header{display:flex;justify-content:space-between;gap:20px;align-items:start;margin:8px 0 25px}.detail-header h1{font-size:clamp(2.1rem,3.5vw,3.2rem);margin:8px 0 14px}.detail-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.status-badge{display:inline-block;padding:7px 12px;border-radius:99px;background:#e9e5e4;color:#655d61;font-size:.74rem;font-weight:700}.status-badge.live{background:#f9dfe1;color:#993c4d}.status-badge.finished{background:#dfebe6;color:#366b67}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:19px}.summary-card{background:var(--paper);border:1px solid var(--line);padding:19px 23px;border-radius:13px;display:grid;gap:9px}.summary-card span{font-size:.68rem;letter-spacing:.12em;color:var(--muted);font-weight:700}.summary-card strong{font-family:'Playfair Display',Georgia,serif;font-size:2.05rem}.control-card,.access-card,.wine-card{background:var(--paper);border:1px solid var(--line);border-radius:17px;box-shadow:0 8px 30px #3d203006}.control-card{padding:27px 30px;margin-bottom:18px;border-left:4px solid var(--wine)}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:15px;margin-bottom:19px}.section-heading h2{font-size:1.8rem;margin:7px 0 0}.current-question{background:#faf3f0;border:1px solid #eddcda;border-radius:12px;padding:20px;margin-bottom:20px}.current-meta{font-size:.72rem;letter-spacing:.09em;font-weight:700;color:var(--wine)}.current-question h3{font-family:'DM Sans',sans-serif;font-size:1.05rem;margin:10px 0}.current-question p{font-size:.8rem;color:var(--muted);margin:0}.control-actions,.access-links{display:flex;flex-wrap:wrap;gap:10px}.control-card>.muted{margin-bottom:0}.access-card{padding:25px 30px;margin-bottom:34px;display:flex;justify-content:space-between;gap:20px}.access-card h2{font-size:1.65rem;margin:7px 0 9px}.access-card p{color:var(--muted);font-size:.86rem;max-width:470px;line-height:1.55}.access-links .button{font-size:.8rem;min-height:40px;padding:9px 13px}.join-code{font-size:.8rem;color:var(--muted);margin-top:17px}.join-code strong{font-size:1.07rem;letter-spacing:.12em;color:var(--plum);margin-left:6px}.qr-image{width:160px;height:160px;border:7px solid white;border-radius:10px;box-shadow:0 3px 18px #00000012;object-fit:contain}.wine-section>.section-heading{margin-bottom:7px}.section-note{font-size:.82rem;color:var(--muted);margin-bottom:20px}.wine-card{margin-bottom:14px;overflow:hidden}.wine-heading{display:flex;align-items:center;gap:16px;padding:20px 23px}.wine-number{font-family:'Playfair Display',Georgia,serif;font-size:2rem;color:#c3a0a9}.wine-heading .eyebrow{font-size:.65rem}.wine-heading h3{margin:4px 0 0;font-size:1.14rem}.wine-actions{margin-left:auto;display:flex;gap:10px}.question-list{border-top:1px solid var(--line)}.question-row{padding:16px 23px;display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line)}.question-row>div:first-child{min-width:0}.question-index{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#f2e5e8;color:var(--wine);font-size:.76rem;font-weight:700;margin-right:9px}.question-row strong{font-size:.87rem}.question-options{color:var(--muted);font-size:.76rem;line-height:1.6;margin:7px 0 2px 34px;overflow-wrap:anywhere}.correct-note{display:block;color:var(--teal);font-size:.73rem;font-weight:700;margin-left:34px}.question-row-actions{display:flex;gap:8px;align-items:flex-start;flex:none}.question-row-actions .link-button{font-size:.76rem}.mini-status{font-size:.68rem;padding:5px 8px;border-radius:5px;background:#eee8e5;color:#686066}.add-question{width:100%;border:0;background:#fffbf8;color:var(--wine);font-weight:700;text-align:left;padding:15px 24px}.add-question:hover{background:#faf0ee}.no-questions{padding:18px 24px;margin:0}.empty-wines{padding:45px;text-align:center;background:#fffdf9;border:1px dashed #d7c5ca;border-radius:14px;color:var(--muted)}.auth-card{max-width:470px;margin:8vh auto;padding:40px;background:#fffdf9;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.auth-card h1{font-size:2.55rem;margin:12px 0}.auth-card p{color:var(--muted);line-height:1.6}.auth-card .button{width:100%;margin-top:5px}.editor-dialog{width:min(94vw,570px);max-height:90vh;overflow:auto;border:0;border-radius:18px;padding:32px;background:var(--paper);box-shadow:0 30px 100px #1b0b1a5c;color:var(--text)}.editor-dialog::backdrop{background:#1d101eb0}.dialog-heading h2{font-size:2rem;margin:8px 0 24px}.dialog-actions{display:flex;justify-content:end;gap:10px;margin-top:28px}.editor-dialog textarea{resize:vertical}.toast{position:fixed;bottom:24px;right:24px;max-width:min(400px,calc(100vw - 36px));padding:13px 19px;border-radius:10px;background:var(--plum);color:white;box-shadow:var(--shadow);z-index:10}.toast.error{background:#963749}
@media(max-width:950px){.admin-layout{grid-template-columns:1fr}.admin-sidebar{position:static}.competition-list{max-height:none;display:flex;overflow:auto}.competition-item{min-width:200px;border-left:0;border-bottom:3px solid transparent}.competition-item.active{border-bottom-color:var(--wine)}.sidebar-create{max-width:none}.sidebar-create form{grid-template-columns:repeat(3,1fr) auto;align-items:end}.sidebar-create h3{margin-bottom:12px}.score-layout{grid-template-columns:1fr 55px 1fr;gap:8px}.score-side{padding:28px 22px;min-height:390px}.score-details span{font-size:.65rem}}
@media(max-width:680px){.topbar{height:64px}.topbar-note{display:none}.player-shell{padding:18px 12px;min-height:calc(100vh - 120px)}.player-card{padding:28px 22px;border-radius:15px}.recover-form{grid-template-columns:1fr}.recover-form .button{width:100%}.player-meta,.player-greeting,.question-panel,.player-bottom,.recovery-note{padding-left:22px;padding-right:22px}.player-bottom{font-size:.72rem}.board-shell{padding:30px 16px}.board-heading{margin-bottom:25px}.board-heading h1{font-size:2.35rem}.score-layout{grid-template-columns:1fr;gap:11px}.versus{font-size:1rem}.score-side{min-height:260px;padding:23px}.score-side h2{margin:15px 0 5px}.score-percent{font-size:4.5rem;margin:5px 0 14px}.score-details{margin-top:15px}.board-progress{gap:12px;font-size:.72rem}.admin-shell{padding:17px 12px 50px}.admin-layout{gap:20px}.sidebar-create form{grid-template-columns:1fr}.detail-header{display:block}.detail-actions{margin-top:15px}.summary-card{padding:14px}.summary-card span{font-size:.58rem}.summary-card strong{font-size:1.6rem}.control-card,.access-card{padding:20px}.access-card{display:block}.qr-image{margin-top:18px}.section-heading{align-items:start}.section-heading h2{font-size:1.55rem}.wine-heading{padding:16px;gap:10px}.wine-actions{display:grid;gap:0}.question-row{padding:14px 16px;display:block}.question-row-actions{margin:10px 0 0 34px}.auth-card{margin:6vh 5px;padding:27px}.editor-dialog{padding:23px}}
