@font-face{font-family:Fraunces;src:url('./assets/fonts/fraunces-variable.ttf') format('truetype');font-weight:100 900;font-display:swap}
:root{color-scheme:dark;--bg:#142b24;--surface:#19362b;--ink:#fcf8e9;--muted:#adbbb3;--accent:#e6c979;--on:#123d2e;--gold:#f5d16a;--line:#f9f3d82b;--felt:#003f30;--felt-bottom:#00382b;--display:Fraunces,Georgia,serif}
body{background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,'Arial',sans-serif;color:var(--ink)}
h1,h2,.wordmark,.durava-logo{font-family:var(--display);font-variation-settings:'opsz' 72,'SOFT' 0,'WONK' 0;font-weight:850;letter-spacing:-.05em}
body[data-page=home],body[data-page=home] #app{height:100dvh;overflow:hidden}
body[data-page=home] .shell{max-width:460px;height:100%;padding:0;margin:auto}
.home-screen{height:100%;padding:11px 14px 62px;display:flex;flex-direction:column;gap:0}
.home-header{display:flex;align-items:center;gap:10px;min-height:44px;flex-shrink:0}
.durava-logo{font-size:34px;line-height:1;white-space:nowrap;letter-spacing:-1.7px}
.durava-logo>span{font-family:Georgia,serif;color:#f12819;font-size:32px;margin-left:2px}
.language-switch{display:flex;align-items:center;margin-left:auto;border:1px solid var(--line);border-radius:30px;padding:2px;gap:0}
.language-switch button{height:29px;min-width:35px;padding:0 6px;border-radius:20px;background:none;color:var(--ink);font-size:12px}
.language-switch .active{background:var(--accent);color:var(--on);box-shadow:0 1px 3px #003f3040}
.profile-shortcut{border:1.5px solid var(--ink);border-radius:50%;background:none;width:40px;height:40px;flex:none;font-size:18px}
.home-screen h1{font-size:56px;line-height:.94;margin:29px 0 14px;letter-spacing:-2.5px}
.home-hero{min-height:180px;max-height:286px;flex:1;border-radius:27px;background:radial-gradient(ellipse at 50% 40%,#11513f,#003c2d 80%);position:relative;overflow:hidden;isolation:isolate;container-type:size}
.home-card-fan{position:absolute;inset:20px 0 50px;display:grid;place-items:center;--hero-card-w:clamp(56px,calc((100cqh - 70px)/1.7),127px)}
.home-card-fan .card{position:absolute;border:0;border-radius:7px;box-shadow:0 3px 5px #001b20aa;--card-w:var(--hero-card-w)!important}
.home-card-fan .card:nth-child(1){transform:translate(calc(var(--hero-card-w)*-.61),5px) rotate(-16deg)}
.home-card-fan .card:nth-child(2){transform:translate(-3px,-5px) rotate(-3deg)}
.home-card-fan .card:nth-child(3){transform:translate(calc(var(--hero-card-w)*.61),5px) rotate(16deg)}
.home-hero>p{position:absolute;bottom:14px;left:0;right:0;text-align:center;color:#fffdf0;font-size:18px;line-height:22px;margin:0}
.home-start-actions{display:grid;gap:8px;padding-top:8px;flex:none}
.home-start-actions .btn{height:55px;min-height:55px;padding:8px 15px;border-radius:32px;font-size:21px;font-weight:700;box-shadow:none}
.home-start-actions .quick-play{position:relative;border:0}
.quick-play>svg{position:absolute;right:18px;width:24px;height:24px;stroke-width:1.5}
.home-start-actions .friends-play{height:50px;min-height:50px;background:transparent;border:1.5px solid var(--accent);font-size:17px;color:#11182e;gap:12px}
.friends-play svg{width:24px;height:24px}
.learn-link{display:flex;align-items:center;justify-content:center;gap:12px;height:38px;min-height:38px;background:none;color:var(--ink);font-size:14px}
.learn-link>svg:first-child{width:22px;height:22px}.learn-link>svg:last-child{width:18px;height:18px}
.resume-new{background:none;color:var(--ink);text-decoration:underline;font-size:13px;min-height:28px;margin-top:-5px}
.durava-nav{height:58px;min-height:58px;padding:0 18px;border:0;background:var(--bg);backdrop-filter:none}
.durava-nav .nav-inner{height:100%;border-top:1px solid var(--line);gap:10px;max-width:460px}
.durava-nav .nav-btn{position:relative;display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:0;padding:4px 0 5px;border-radius:0;background:none;color:#11182e;font-size:12px;line-height:14px}
.durava-nav .nav-btn.active{color:var(--ink);background:none;font-weight:700}
.durava-nav .nav-btn.active:after{content:'';position:absolute;bottom:2px;height:3px;width:60px;border-radius:8px;background:var(--accent)}
.tab-icon{height:27px;display:grid;place-items:center;font-size:32px;line-height:1}.tab-icon svg{width:27px;height:27px;stroke-width:1.3}
.screen-header{height:52px;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:5px;margin-bottom:12px}
.screen-header>.durava-logo{text-align:center;font-size:30px}
.screen-header .icon-btn{width:44px;height:44px;background:none;border:0;color:#11182e}
body:not([data-page=game]):not([data-page=home]) .shell{max-width:460px;padding:6px 26px 80px}
body[data-page=settings],body[data-page=settings] #app{height:100dvh;overflow:hidden}
body[data-page=settings] .shell{height:100%;display:flex;flex-direction:column;padding:6px 26px 3px!important}
body[data-page=settings] .screen-header{height:44px;flex:none;margin:0 -10px 0}
.table-setup{min-height:0;flex:1;display:flex;flex-direction:column;gap:13px;color:#11182e}
.setup-title{flex:none}.setup-title h1{font-size:56px;line-height:1;margin:0;color:var(--ink);letter-spacing:-2px}
.setup-title p{font-size:24px;line-height:29px;margin:0;color:#11182e;font-weight:500}
.table-setup fieldset{padding:0;margin:0;border:0;min-width:0;flex:none}
.table-setup legend{font-size:18px;font-weight:700;margin:0 0 7px;padding:0;line-height:21px}
.player-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.player-tile{height:100px;position:relative;background:transparent;border:1px solid #11182e18;border-radius:12px;color:#11182e;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:9px 0 6px}
.player-tile svg{height:33px;width:33px;stroke-width:1.4;margin-bottom:4px}
.player-tile strong{font-size:22px;line-height:25px;font-weight:600}
.player-tile>span{font-size:15px;line-height:18px}
.player-tile.chosen{background:radial-gradient(at 50% 40%,#16533e,#003e2d);color:#fff9e9;border-color:var(--accent);box-shadow:inset 0 0 8px #fff1}
.player-tile i{position:absolute;top:7px;right:7px;font-style:normal;width:21px;height:21px;border-radius:50%;background:var(--gold);color:#003f30;display:grid;place-items:center;font-size:16px;font-weight:700}
.variant-options{display:grid;gap:5px}
.variant-options legend{margin-bottom:5px}
.variant-option{height:48px;min-height:44px;display:flex;align-items:center;gap:17px;padding:0;background:none;text-align:left;color:#11182e}
.variant-option>i{height:31px;width:31px;border-radius:50%;border:2px solid #11182e;flex:none;position:relative}
.variant-option.chosen>i{border-color:var(--accent)}
.variant-option.chosen>i:after{content:'';position:absolute;inset:4px;background:var(--accent);border-radius:50%}
.variant-option>span{display:grid;gap:1px}.variant-option strong{font-size:18px;line-height:21px;font-weight:600}.variant-option small{font-size:15px;line-height:18px;color:var(--muted)}
.deck-segments{display:flex;min-height:46px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.deck-segments>button{flex:1;background:none;min-height:44px;color:#11182e;font-size:17px;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:10px;padding:5px}
.deck-segments>.chosen{background:var(--accent);color:#fff9e9}.deck-segments>button>span{height:18px;width:18px;border-radius:50%;background:#ffffff57;display:grid;place-items:center;font-size:14px}
.private-option{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;margin-top:0;flex:none}
.private-option>span{display:grid;gap:0}.private-option strong{font-size:18px;line-height:22px;font-weight:600}.private-option small{font-size:15px;line-height:18px;color:var(--muted)}
.private-option input{appearance:none;-webkit-appearance:none;width:68px;height:39px;min-width:68px;margin:0;background:#b8c0bb;border:1px solid #6f837c;border-radius:40px;position:relative;cursor:pointer;transition:background var(--ui-time)}
.private-option input:before{content:'';position:absolute;left:3px;top:3px;width:31px;height:31px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0004;transition:transform var(--ui-time)}
.private-option input:checked{background:var(--accent);border-color:var(--accent)}.private-option input:checked:before{transform:translateX(29px)}
.more-rules{display:flex;align-items:center;gap:13px;border-top:1px solid var(--line);padding:0 4px;min-height:43px;background:none;color:#11182e;font-size:15px;flex:none}
.more-rules svg{width:21px;height:21px;flex:none}.more-rules svg:last-child{margin-left:auto}
.setup-bottom{margin-top:auto;flex:none;padding-top:0}.setup-bottom .btn{height:55px;min-height:44px;border-radius:30px;position:relative;font-size:21px}
.setup-bottom .btn>svg{position:absolute;right:18px;width:25px;height:25px}.setup-bottom>p{font-size:13px;line-height:20px;color:var(--muted);text-align:center;margin:0}
.page-heading h1{font-size:43px;line-height:1.02}.page-heading p{font-size:16px;line-height:23px;color:var(--muted);margin-top:9px}
.friends-content .panel>p{font-size:15px;line-height:23px;margin-bottom:18px}.friends-content .btn{border-radius:26px}
.game-dialog{max-height:calc(100dvh - 32px);overflow-y:auto;padding:22px;border-radius:22px;background:var(--bg);color:var(--ink)}
.dialog-content .section-heading h2{font-size:29px}.dialog-content>.btn{border-radius:24px}.dialog-content .setting-row{min-height:76px;gap:12px;align-items:center}
.dialog-content .setting-row select{max-width:180px;flex:none}.dialog-content .setting-row small{font-size:12px;line-height:17px}.dialog-content .setting-row strong{font-size:15px}
.card.back{color:transparent;background:repeating-linear-gradient(45deg,#234d92 0 2px,#1a3f80 2px 4px);border:1px solid #fff9ee;box-shadow:inset 0 0 0 2px #fff9,0 2px 4px #00172a77;border-radius:3px}
.card.back:before{content:'';position:absolute;inset:4px;border:1px solid #ffffffe0;background:radial-gradient(#d3dcf4 17%,transparent 22%) 0 0/6px 6px;opacity:.75}
html[data-theme=night]{--bg:#142b24;--surface:#19362b;--ink:#fcf8e9;--muted:#adbbb3;--line:#f9f3d82b;--accent:#e6c979;--on:#123d2e}
html[data-theme=night] body:not([data-page=game]){color:var(--ink)}
html[data-theme=night] .durava-nav .nav-btn,html[data-theme=night] .screen-header .icon-btn,html[data-theme=night] .table-setup,html[data-theme=night] .setup-title p,html[data-theme=night] .variant-option,html[data-theme=night] .deck-segments>button,html[data-theme=night] .more-rules,html[data-theme=night] .home-start-actions .friends-play{color:var(--ink)}
html[data-theme=night] .player-tile{color:var(--ink);border-color:var(--line)}html[data-theme=night] .player-tile.chosen{color:#fff9e9}
html[data-theme=night] .variant-option>i{border-color:var(--ink)}html[data-theme=night] .deck-segments>.chosen{color:var(--on)}
@media(max-height:690px){.table-setup{gap:11px}.player-tile{height:88px}.setup-title h1{font-size:50px}.setup-title p{font-size:21px;line-height:25px}.variant-option{height:44px}.more-rules{min-height:39px}.private-option{min-height:44px}}
@media(max-height:610px){body[data-page=settings] .shell{padding-top:1px!important}.screen-header{height:44px}.table-setup{gap:7px}.setup-title h1{font-size:44px}.setup-title p{font-size:18px;line-height:23px}.table-setup legend{font-size:16px;margin-bottom:4px}.player-tile{height:73px}.player-tile svg{width:26px;height:26px;margin:0}.player-tile strong{font-size:19px;line-height:21px}.player-tile>span{font-size:13px;line-height:16px}.variant-option{height:41px;min-height:41px;gap:13px}.variant-option>i{width:27px;height:27px}.variant-option strong{font-size:16px;line-height:19px}.variant-option small{font-size:13px;line-height:16px}.deck-segments{min-height:42px}.deck-segments>button{min-height:40px;font-size:15px}.private-option strong{font-size:16px}.private-option small{font-size:13px}.private-option input{transform:scale(.87);transform-origin:right}.more-rules{min-height:34px;font-size:13px}.setup-bottom .btn{height:47px;font-size:19px}.setup-bottom>p{font-size:11px;line-height:17px}}
@media(max-height:510px){body[data-page=settings],body[data-page=settings] #app{overflow:auto;height:auto;min-height:100dvh}body[data-page=settings] .shell{height:auto;min-height:100dvh}.table-setup{gap:10px}.setup-bottom{margin-top:10px}}
@media(max-width:350px){body[data-page=settings] .shell{padding-left:21px!important;padding-right:21px!important}.setup-title h1{font-size:46px}.setup-title p{font-size:20px}.variant-option{gap:13px}.variant-option strong{font-size:16px}.variant-option small{font-size:13px}.private-option strong{font-size:16px}.private-option small{font-size:13px}.private-option input{transform:scale(.85);transform-origin:right}.dialog-content .setting-row{flex-direction:column;align-items:stretch;gap:8px}.dialog-content .setting-row select{max-width:none;width:100%}}
@media(max-width:350px){.durava-logo{font-size:29px}.durava-logo>span{font-size:27px}.home-header{gap:7px}.profile-shortcut{width:36px;height:36px}.home-screen h1{font-size:48px;margin-top:23px}.home-start-actions .btn{font-size:18px}}
@media(max-height:640px){.home-screen{padding-top:6px}.home-screen h1{margin-top:12px;margin-bottom:10px;font-size:49px}.home-hero{min-height:150px}.home-hero>p{font-size:16px;bottom:9px}.home-start-actions .btn{height:47px;min-height:47px}.home-start-actions .friends-play{height:44px;min-height:44px;font-size:15px}.home-start-actions{gap:6px}.learn-link{font-size:12px;gap:8px;height:32px;min-height:32px}}
.future-pill{display:inline-block;margin-bottom:12px;border-radius:20px;padding:5px 10px;background:#f5d16a40;color:var(--ink);font-size:12px}.ki-level select{min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:14px;font-size:16px;color:var(--ink);background:var(--bg);max-width:130px}
@media(max-height:500px){body[data-page=home],body[data-page=home] #app{height:auto;min-height:100dvh;overflow:auto}body[data-page=home] .shell{height:auto;min-height:100dvh}.home-screen{height:auto;min-height:610px;padding-bottom:72px}.home-hero{flex:none;height:190px;min-height:190px}}
