@font-face{font-family:Nunito;src:url('nunito-sans.woff2') format('woff2');font-weight:400 800;font-display:swap}
:root{color-scheme:dark;--bg:#1768b2;--panel:#104f8b;--line:#ffffff30;--text:#fff;--muted:#e9f3fc;--you:#087df1;--pig:#e94c45;--wood:#279d51;--brick:#e77c48;--wool:#acbf38;--grain:#f2c84f;--ore:#a4ada5;--sand:#ddce96}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% 0,#2070b5 0,transparent 70%),var(--bg);color:var(--text);font:16px/1.5 Nunito,sans-serif}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}a:visited{color:#e7e6ff}button,select{font:inherit;font-weight:700}button,select{border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);padding:10px 16px;min-height:44px}button{cursor:pointer;transition:background .15s,transform .15s}button:hover:not(:disabled){background:#0c4379;border-color:#a9dbff}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.5;cursor:not-allowed}button.primary{background:#ff941f;color:#182c42;border-color:#ffa94b;box-shadow:0 3px 0 #b55c0a;font-weight:800}button.primary:hover:not(:disabled){background:#ffa43b}button.quiet{background:transparent;border-color:transparent;font-size:13px;color:var(--muted);padding:8px 12px}button[aria-pressed=true]{background:#083f75;border-color:var(--you)}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a7e7ff;outline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
header{max-width:1080px;margin:auto;padding:12px 24px;display:flex;align-items:center;justify-content:space-between}header .brand{font-size:22px;font-weight:800;letter-spacing:-.6px;display:flex;align-items:center;gap:10px;min-height:44px}header .brand img{width:34px;height:34px}nav{display:flex;gap:20px;font-size:14px;font-weight:700;color:var(--muted)}nav a,footer a{display:inline-flex;align-items:center;min-height:44px}main{max-width:760px;margin:auto;padding:0 24px}h1,h2,p{margin-top:0}h2{font-size:18px;font-weight:800}.welcome{text-align:center;padding:20px 0 28px}.hero-pig{display:block;object-fit:contain;width:270px;height:270px;margin:0 auto 8px}.welcome h1{font-size:clamp(40px,7vw,58px);font-weight:800;letter-spacing:-2px;line-height:1.1;margin:0 0 12px;text-wrap:balance}.welcome>p{max-width:420px;margin:0 auto 24px;color:var(--muted)}#start-form{display:flex;justify-content:center}#start{min-width:192px;min-height:52px;font-size:18px}#load-status{font-size:13px;margin:18px auto 0;min-height:24px}.welcome .load-file{margin-top:2px;font-size:13px}
.scoreboard{display:flex;justify-content:center;gap:36px;align-items:center;padding:12px 0}.score{display:flex;align-items:center;gap:12px;min-width:112px}.score>span{color:#fff;display:flex;align-items:center;gap:6px;font-size:15px;font-weight:700;white-space:nowrap}.score strong{font-size:36px;line-height:1;font-weight:800;font-variant-numeric:tabular-nums}.you{color:var(--you)}.pig{color:var(--pig)}.player-dot{display:inline-block;border:2px solid currentColor;width:9px;height:9px;border-radius:50%}.player-diamond{display:inline-block;border:2px solid currentColor;width:9px;height:9px;transform:rotate(45deg)}.versus{display:flex;flex-direction:column;align-items:center;gap:0;color:var(--muted);font-size:11px}.versus #round{font-size:13px;font-weight:800;color:#fff}.status-line{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:4px}.status-line h1{font-size:20px;line-height:1.25;margin:0;font-weight:800}.status-line #dice{border-radius:6px;min-width:28px;height:28px;display:grid;place-items:center;font-size:17px;font-weight:800;background:#faf0d7;color:#18344a;box-shadow:0 2px 0 #073e6c66}.status-line #pause{padding:6px 10px;font-size:12px}.hint{text-align:center;color:var(--muted);font-size:13px;line-height:1.4;margin:0 auto 4px;min-height:19px;max-width:560px}
.board-wrap{width:100%;overflow:auto;overscroll-behavior:contain;scrollbar-color:#8fc7ec var(--panel)}.board-wrap svg{display:block;width:100%;max-width:560px;margin:auto;overflow:visible}.board-wrap.zoomed{max-height:620px;border:1px solid var(--line);border-radius:8px}.board-wrap.zoomed svg{width:950px;min-width:950px;max-width:none}.tile{stroke:#f3d897;stroke-width:4;stroke-linejoin:round}.tile-inset{fill:none;stroke:#ffffff35;stroke-width:1;pointer-events:none}.number-token{fill:#fff5dc;stroke:#746844;stroke-width:.7}.number-text{font-size:18px;font-weight:800;fill:#213d3a;text-anchor:middle;pointer-events:none}.pips{fill:#24463e}.road-base{stroke:#b89b61;stroke-width:2;stroke-linecap:round}.port-line{stroke:#d9eafa;stroke-width:1.4;stroke-dasharray:2 2}.port-label{font-size:12px;fill:#fff;text-anchor:middle;font-weight:800;paint-order:stroke;stroke:var(--bg);stroke-width:3}.target{cursor:pointer}.target:focus{outline:none}.target:focus .target-marker,.target:hover .target-marker{stroke:#fff;stroke-width:3;fill:#fff}.target-marker{stroke:#eaf8ff;stroke-width:1.5;fill:#f4fbffcc}.hit{fill:transparent;stroke:transparent}.board-tools{display:flex;justify-content:space-between;align-items:center;margin-top:-12px;min-height:36px;font-size:11px;color:var(--muted)}.board-tools button{padding:6px 8px;font-size:12px}
.hand-panel{text-align:center;margin-top:0;padding-top:8px;border-top:1px solid var(--line)}.hand{display:flex;justify-content:center;gap:8px}.resource{width:84px;max-width:19%;border-radius:7px;background:#08477f;padding:7px 5px 6px;display:grid;grid-template-columns:1fr 1fr;align-items:center;justify-items:center;box-shadow:0 2px 0 #063c70}.resource img{width:28px;height:28px}.resource b{font-size:25px;line-height:1.2;font-weight:800;font-variant-numeric:tabular-nums}.resource span{grid-column:span 2;font-size:11px;color:var(--muted);line-height:1.2;margin-top:3px}.dev-hand{font-size:12px;color:var(--muted);min-height:0;padding-top:6px}.dev-hand:empty{display:none}.actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px}.actions:empty{margin:0}.actions button{font-size:14px;min-height:44px}.actions .primary{min-width:140px}.choice{text-align:center}.choice:not(:empty){margin-top:12px;padding:12px;background:#0a477e;border-radius:8px}.choice form{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.choice label{font-size:13px}.secondary{display:flex;align-items:center;justify-content:space-between;gap:4px;margin:10px 0 4px}.secondary span{font-size:11px;color:var(--muted)}.secondary button{font-size:12px;padding:8px}.game-details{font-size:13px;border-top:1px solid var(--line)}summary{cursor:pointer;min-height:44px;display:list-item;padding:12px 4px;color:var(--muted);font-weight:700}.game-details div{color:var(--muted);font-size:13px;margin:0 4px 10px}.game-details ol{padding-left:24px;color:var(--muted);font-size:13px}.game-details li{margin-bottom:5px}footer{max-width:712px;margin:12px auto 0;padding:0 0 max(16px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);font-size:12px}footer span{font-size:11px}#error{padding:20px;margin:20px 0;border:1px solid #ffc091;border-radius:8px;text-align:center;background:#104f8b}#error p{margin-bottom:12px}dialog{max-width:440px;background:#104f8b;color:var(--text);border:1px solid #8fb7dc;border-radius:12px;padding:24px}dialog::backdrop{background:#082c50cc}dialog p{color:var(--muted)}noscript{display:block;padding:30px;text-align:center}
@media(max-width:600px){header{padding:8px 16px}header .brand{font-size:19px;gap:8px}header .brand img{width:30px;height:30px}nav{gap:12px;font-size:12px}main{padding:0 12px}.welcome{padding:12px 0 20px}.hero-pig{width:230px;height:230px}.welcome h1{font-size:42px;letter-spacing:-1.5px}.welcome>p{font-size:15px;max-width:290px;margin-bottom:20px}.scoreboard{gap:20px;padding:8px 0}.score{gap:8px;min-width:94px}.score>span{font-size:14px}.score strong{font-size:30px}.versus{font-size:10px}.versus #round{font-size:12px}.status-line{gap:8px;margin:0}.status-line h1{font-size:18px}.hint{font-size:12px;min-height:34px;max-width:330px;margin:0 auto}.board-tools{margin-top:-8px}.hand{gap:6px}.resource{padding:6px 3px}.resource img{width:24px;height:24px}.resource b{font-size:23px}.resource span{font-size:10px}.actions button{padding:9px 12px;font-size:13px}.secondary{flex-wrap:wrap;row-gap:0}.secondary span{font-size:10px;order:3;flex-basis:100%;text-align:center}.secondary>div{margin-left:auto}footer{padding-left:16px;padding-right:16px;font-size:11px;gap:8px}footer span{font-size:10px}.board-wrap.zoomed{max-height:450px}}
@media(prefers-reduced-motion:no-preference){.hero-pig{animation:arrive .4s ease-out}@keyframes arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.thinking .versus #round{animation:breathe 1.7s ease-in-out infinite}@keyframes breathe{50%{opacity:.5}}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

.game-details table{width:100%;border-collapse:collapse;margin:4px 0 0;font-size:15px;font-variant-numeric:tabular-nums}.game-details caption{text-align:left;font-size:14px;font-weight:800;padding:8px 10px;color:#fff}.game-details th,.game-details td{padding:10px;text-align:center}.game-details th[scope=row],.game-details thead th:first-child{text-align:left}.game-details thead th{font-size:12px;font-weight:600;color:var(--muted);border-bottom:1px solid #ffffff30}.game-details tbody tr:nth-child(odd){background:#0b477d}.game-details tbody tr:nth-child(even){background:#14558e}.game-details tbody td{font-size:18px;font-weight:800;color:#fff}.game-details tbody th{font-weight:700}.resource-table{table-layout:fixed}.resource-table th:first-child{width:15%}.resource-table thead img{display:block;margin:0 auto 3px}.resource-table thead span{display:block}.game-details .hidden-cards{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 10px;margin:0 0 8px;font-size:13px;color:var(--muted);border-bottom:1px solid var(--line)}.hidden-cards b{font-size:17px;color:#fff;padding-right:5px}.game-details .awards-table{margin-bottom:16px}.awards-table th:first-child{width:40%}.game-details .awards-table td:nth-child(2){font-size:13px;font-weight:600}.awards-table td:nth-child(3),.awards-table td:nth-child(4){width:15%}
@media(max-width:600px){.game-details th,.game-details td{padding:9px 5px}.game-details caption{padding:8px 5px}.game-details tbody th{font-size:13px}.game-details thead th{font-size:11px}.game-details .hidden-cards{padding:12px 5px}.game-details .awards-table td:nth-child(2){font-size:12px}}

.scoreboard{display:grid;grid-template-columns:1fr auto 1fr;max-width:500px;margin:auto;gap:20px}.score.you,.score.pig{color:#fff;min-width:0}.score.pig{justify-content:flex-end}.score.pig>span{white-space:normal;max-width:120px;line-height:1.15}.player-dot,.player-diamond{width:12px;height:12px;flex-shrink:0;border-color:#fff}.you .player-dot{background:var(--you)}.pig .player-diamond{background:var(--pig)}.welcome .hero-pig{width:250px;height:250px;margin-bottom:4px}.welcome h1{font-size:clamp(38px,6vw,54px);margin-bottom:16px}
@media(max-width:600px){.scoreboard{gap:12px}.score.pig>span{font-size:13px;max-width:95px}.score{gap:7px}.score strong{font-size:28px}.welcome .hero-pig{width:210px;height:210px}.welcome h1{font-size:40px}.welcome>p{font-size:14px}.hidden-cards>span:first-child{max-width:65%}}


.welcome .ranking-headline{font-size:16px;color:#fff;margin:0 auto 12px}.ranking-headline strong{color:#ffe39b;font-size:20px;font-weight:800;margin-right:5px}.ranking-proof{margin:32px auto 0;padding-top:24px;border-top:1px solid var(--line)}.ranking-images{display:grid;grid-template-columns:1fr;gap:20px;align-items:start}.ranking-images figure{margin:0}.ranking-images img{display:block;width:100%;height:auto;border-radius:8px}.ranking-images a{display:block;transition:opacity .15s}.ranking-images a:hover{opacity:.9}.ranking-images figcaption{text-align:left;font-size:12px;margin-top:8px;color:var(--muted)}.ranking-proof>p{font-size:12px;text-align:left;color:var(--muted);margin:16px 0 0;line-height:1.5}
@media(max-width:600px){.welcome .ranking-headline{font-size:14px}.ranking-headline strong{font-size:18px}.ranking-proof{margin-top:24px;padding-top:20px}.ranking-images{grid-template-columns:1fr;gap:20px;max-width:350px;margin:auto}.ranking-images figcaption{font-size:12px}.ranking-proof>p{max-width:350px;margin:16px auto 0}}

#start-form{gap:10px;flex-wrap:wrap}#resume-game{min-width:170px;min-height:52px;font-size:18px}#start-form:has(#resume-game:not([hidden])) #start{min-width:140px;font-size:16px}.secondary #exit-game{color:#fff;font-weight:800}
.secondary #exit-game{border-color:#ffffff55;background:#0b477d;padding:8px 12px}
