:root{font-family:Trebuchet MS,Segoe UI,Tahoma,sans-serif;--bg-page: #0f6f43;--bg-page-gradient: linear-gradient(180deg, #1b8b56 0%, #11653e 55%, #0b4f31 100%);--text-primary: #1f2937;--text-secondary: #475569;--text-muted: #64748b;--surface-primary: #ffffff;--border-primary: #d5dbe3;--border-secondary: #e3e7ee;--border-divider: #ccd3dd;--border-control: #c8ced7;--scoresheet-accent-bg: #f3f4f6;--scoresheet-label-bg: #f8fafc;--dice-border-neutral: #a9b3c0;--dice-held-border: #7a8799;--dice-held-shadow: rgb(122 135 153 / 35%);--table-side-inset: 14px;color:var(--text-primary);background:var(--bg-page)}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 20% 10%,rgb(255 255 255 / 15%),transparent 40%),radial-gradient(circle at 80% 90%,rgb(0 0 0 / 20%),transparent 45%),var(--bg-page-gradient)}#app{min-height:100vh}.layout{margin:0 auto;max-width:1240px;padding:1.25rem 1.25rem 5rem;display:grid;grid-template-rows:auto 1fr;gap:1rem;min-height:100vh}.header{display:flex;justify-content:space-between;align-items:center;padding:.5rem .25rem}.header h1{margin:0;font-size:2rem;color:#f8fafc;text-shadow:0 1px 2px rgb(0 0 0 / 35%)}.round-pill{margin:0;border-radius:999px;background:#fffffff0;border:1px solid var(--border-primary);color:var(--text-secondary);padding:.35rem .8rem;font-weight:700}.table-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,430px);gap:1rem;align-items:stretch;height:100%;max-height:800px;min-height:0}.play-area{display:grid;grid-template-rows:1fr auto;gap:0;height:100%;min-height:0;min-width:0}.playfield-shell{display:grid;grid-template-rows:auto 1fr;gap:1rem;height:100%;min-height:0}.sheet-area{min-height:0;min-width:0}.table-panel{background:#f8fafcf2;border:1px solid var(--border-primary);border-radius:14px;box-shadow:0 8px 20px #0000002e;padding:.9rem}.table-panel--controls{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.8rem}.controls,.status,.turn-actions{display:flex;align-items:center;gap:.75rem}.status p{margin:0;font-weight:600}button,.controls select{font:inherit;border:1px solid var(--border-control);border-radius:10px;background:var(--surface-primary);color:var(--text-primary);padding:.5rem .8rem}button:hover:enabled:not(.table-die):not(.info-btn),.controls select:hover{cursor:pointer;border-color:#aab4c2;background:#f3f4f6}button:disabled{opacity:.5;cursor:not-allowed}.turn-actions{position:absolute;left:0;right:0;bottom:calc(10% + 62px);justify-content:center}#rollBtn{min-width:180px;font-weight:700;background:linear-gradient(180deg,#ffd878,#e9b234);border-color:#cf9724;color:#3a2a00}#rollBtn:hover:enabled{background:linear-gradient(180deg,#ffe69e,#f0bd47)}.info-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;border-radius:50%;border:1px solid var(--text-muted);font-size:12px;font-weight:700;color:var(--text-muted);background:transparent;padding:0;cursor:pointer;transition:.1s ease}.info-btn:hover{border-color:var(--text-primary);color:var(--text-primary);background:transparent}.dice-grid{display:grid;grid-template-columns:repeat(5,minmax(88px,1fr));gap:.75rem}.die{min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;border-radius:14px;background:linear-gradient(180deg,#fff,#f2f4f2);border:2px solid #d6d8d0;box-shadow:0 4px 10px #00000029;transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}.die:hover:enabled{transform:translateY(-2px);border-color:var(--dice-border-neutral)}.die small{color:var(--text-muted);font-size:.72rem}.die.held{border-color:var(--dice-held-border);box-shadow:0 0 0 2px var(--dice-held-shadow),0 6px 12px #00000029}.die-face{width:58px;height:58px;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;border-radius:10px;background:#fbfbf8;border:1px solid #e4e6dc}.pip{width:100%;height:100%;border-radius:50%;background:transparent}.pip--active{background:radial-gradient(circle at 30% 30%,#3b3b3b,#101010 70%)}.table-surface{position:relative;height:100%;min-height:500px;padding:0;overflow:hidden;background:radial-gradient(circle at 50% 50%,rgb(255 255 255 / 7%),transparent 55%),linear-gradient(180deg,#0000001f,#0000000a)}.table-side{position:absolute;left:var(--table-side-inset);right:auto;height:auto;display:flex;pointer-events:none;padding:0}.table-side--bot{top:var(--table-side-inset)}.table-side--human{bottom:var(--table-side-inset)}.table-side__label{border:1px solid var(--border-primary);border-radius:999px;background:#fffc;color:var(--text-secondary);padding:.24rem .65rem;font-size:.78rem;line-height:1;font-weight:700;letter-spacing:.03em}.dice-stage{position:absolute;top:0;right:0;bottom:0;left:0}.table-die{position:absolute;width:62px;height:62px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transition:transform .36s ease}.table-die:hover:enabled{box-shadow:none;background:transparent;cursor:pointer}.table-die:hover:enabled .die-face{border-color:var(--dice-border-neutral);box-shadow:0 0 20px #0000007f}.table-die.held:hover:enabled .die-face{border-color:var(--dice-held-border);box-shadow:0 0 0 2px var(--dice-held-shadow),0 0 20px #0000007f}.table-die:disabled{opacity:1;cursor:default}.table-die .die-face{width:100%;height:100%;border:2px solid #d6d8d0;box-shadow:0 4px 10px #0003;transition:border-color .14s ease,box-shadow .14s ease}.table-die.held{box-shadow:none}.table-die.held .die-face{border-color:var(--dice-held-border);box-shadow:0 0 0 2px var(--dice-held-shadow),0 6px 12px #00000038}.scoresheet-panel{display:flex;flex-direction:column;gap:.75rem;height:100%;min-height:0}.scoresheet-panel h2{margin:0;color:var(--text-secondary)}.scoresheet-panel__header{display:grid;grid-template-columns:52% 24% 24%;align-items:center;gap:0}.scoresheet-panel__title{margin:0}.scoresheet-wrap{display:grid;grid-template-rows:1fr;flex:1;min-height:0}.scoresheet-joker-cell{text-align:center;min-height:1rem;line-height:1;color:#c24141;letter-spacing:.08em}.scoresheet{width:100%;height:100%;border-collapse:collapse;table-layout:fixed;background:var(--surface-primary);border:1px solid var(--border-primary)}.scoresheet th,.scoresheet td{border:1px solid var(--border-secondary);padding:.42rem .45rem;font-size:.88rem;font-variant-numeric:tabular-nums}.scoresheet tbody th,.scoresheet tbody td{padding:.22rem .45rem;vertical-align:middle}.scoresheet tbody tr{height:calc((100% - 2.2rem)/16)}.scoresheet thead th{background:var(--scoresheet-accent-bg);color:var(--text-secondary);font-weight:700}.scoresheet thead th:first-child,.scoresheet tbody th{text-align:left;width:52%}.scoresheet thead th:nth-child(2),.scoresheet thead th:nth-child(3),.scoresheet .score-cell{text-align:center;width:24%}.scoresheet tbody th{color:var(--text-secondary);font-weight:600;background:var(--scoresheet-label-bg)}.scoresheet-summary-row th,.scoresheet-summary-row td{background:var(--scoresheet-accent-bg);font-weight:700}.scoresheet-summary-row--start th,.scoresheet-summary-row--start td{border-top:2px solid var(--border-divider)}.scoresheet-summary-row--end th,.scoresheet-summary-row--end td{border-bottom:2px solid var(--border-divider)}.scoresheet-total-row th,.scoresheet-total-row td{background:var(--scoresheet-accent-bg);font-weight:800}.scoresheet-total-row td{background:var(--scoresheet-accent-bg)}.scoresheet-total-row--start th,.scoresheet-total-row--start td{border-top:2px solid var(--border-divider)}.score-cell{font-weight:700;color:var(--text-primary);vertical-align:middle;background:var(--surface-primary);transition:background-color .14s ease,color .14s ease}.score-cell-value{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.score-cell--selectable{cursor:pointer;-webkit-user-select:none;user-select:none}.score-cell--selectable .score-cell-value{cursor:pointer}.score-cell--selectable:hover,.score-cell--selectable:focus-visible{background:#eceff3;outline:none}.score-cell--positive{color:#2f8a46}.score-cell--zero{color:#c24141}.score-cell--empty .score-cell-value{color:var(--text-muted)}.score-cell--bot{color:var(--text-secondary)}@keyframes score-flash{0%{background-color:var(--surface-primary)}25%{background-color:#7ecf97}66.7%{background-color:#7ecf97}to{background-color:var(--surface-primary)}}.score-cell--flash{animation:score-flash 2s ease-in-out forwards}.result{text-align:center;border:1px solid var(--border-primary);border-radius:14px;padding:.95rem;margin-top:1rem;background:#fffffff0;color:var(--text-primary);box-shadow:0 6px 18px #00000026;display:flex;flex-direction:column;align-items:center;gap:.6rem}.result h2{margin:0}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:100}.modal-overlay[hidden]{display:none}.modal{background:var(--surface-primary);border:1px solid var(--border-primary);border-radius:14px;padding:1.5rem;max-width:500px;width:calc(100% - 2rem);box-shadow:0 20px 60px #00000059;display:flex;flex-direction:column;gap:1rem}.modal__header{display:flex;justify-content:space-between;align-items:center}.modal__title{margin:0;font-size:1.1rem;color:var(--text-primary)}.modal__close{width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--border-control);font-size:18px;line-height:1;padding:0;color:var(--text-secondary);background:transparent;cursor:pointer;flex-shrink:0;transition:ease-in-out .1s}.modal__close:hover{background:#f3f4f6}.modal__strategies{display:flex;flex-direction:column;gap:.75rem}.strategy-card{border:1px solid var(--border-secondary);border-radius:10px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.3rem}.strategy-card__header{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem}.strategy-card__name{font-weight:700;font-size:.95rem;color:var(--text-primary)}.strategy-card__stats{font-size:.78rem;font-weight:600;color:var(--text-muted);white-space:nowrap}.strategy-card__desc{margin:0;font-size:.82rem;color:var(--text-secondary);line-height:1.5}.yahtzee-banner{position:absolute;top:40%;left:50%;white-space:nowrap;pointer-events:none;z-index:100;font-size:5rem;font-weight:900;color:#ffe666;-webkit-text-stroke:1px rgba(0,0,0,.5);text-shadow:0 0 32px rgba(255,215,0,.9),0 0 12px rgba(255,180,0,.7),0 3px 14px rgba(0,0,0,.95),2px 2px 0 #000,-2px 2px 0 #000,2px -2px 0 #000,-2px -2px 0 #000;animation:yahtzee-slide 1.6s forwards;will-change:transform}@keyframes yahtzee-slide{0%{transform:translateY(-50%) translate(calc(-50% - 100vw));animation-timing-function:cubic-bezier(.22,1,.36,1)}20%{transform:translateY(-50%) translate(-50%);animation-timing-function:linear}72%{transform:translateY(-50%) translate(-50%);animation-timing-function:cubic-bezier(.64,0,.78,0)}to{transform:translateY(-50%) translate(calc(-50% + 100vw))}}.table-die.yahtzee-glow .die-face{animation:dice-glow-enter .5s ease forwards,dice-glow-pulse .75s .5s ease-in-out infinite alternate}@keyframes dice-glow-enter{to{border-color:#e9b234;box-shadow:0 0 0 2px #ffc83259,0 0 14px #ffc83299,0 4px 10px #0003}}@keyframes dice-glow-pulse{0%{box-shadow:0 0 0 2px #ffc83259,0 0 14px #ffc83299,0 4px 10px #0003}to{box-shadow:0 0 0 3px #ffc8328c,0 0 26px #ffc832d9,0 4px 10px #0003}}@media(max-width:960px){.layout{padding:1rem 1rem 3rem;gap:.75rem}.table-layout{max-height:none;gap:.75rem}.table-surface{min-height:420px}.scoresheet-panel{width:100%}}@media(max-width:860px){.layout{padding:.75rem .75rem 2rem;gap:.65rem}.table-layout{grid-template-columns:1fr;max-height:none;min-height:auto}.sheet-area{min-height:auto}.header{flex-direction:column;align-items:flex-start;gap:.5rem}.header h1{font-size:1.6rem}.table-panel--controls{flex-direction:column;align-items:flex-start}.play-area,.playfield-shell{height:auto;min-height:0}.scoresheet-panel,.scoresheet,.scoresheet tbody tr{height:auto}.status{flex-wrap:wrap}.table-surface{min-height:360px}.table-die{width:54px;height:54px}#rollBtn{min-width:140px}}@media(max-width:480px){.layout{padding:.5rem .5rem 1.5rem}.table-surface{min-height:300px}.table-die{width:48px;height:48px}.scoresheet th,.scoresheet td{font-size:.78rem;padding:.28rem .3rem}.scoresheet tbody th,.scoresheet tbody td{padding:.18rem .3rem}}
