:root{--bg:#12324c;--bg2:#1c4360;--ink:#faf4e5;--dim:#bed0d7;--line:#ffffff26;--gold:#e3b754;--gold-2:#f5d78c;--bad:#ffb5a8;--body:system-ui,-apple-system,sans-serif;--num:var(--body);--display:Georgia,serif;color-scheme:dark}
body{background:radial-gradient(ellipse at top,#255777,var(--bg) 75%)}button{font:inherit}button:focus-visible,a:focus-visible{outline:3px solid #efb832;outline-offset:4px}.panel{background:#173b55}.page{max-width:580px}.title{font-size:78px;font-weight:400;letter-spacing:.07em}.hero{gap:16px}.hero-mosaic{display:grid;grid-template-columns:repeat(3,54px);gap:5px;transform:rotate(-8deg);margin:15px 0 20px;padding:10px;background:#f3e7c9;box-shadow:12px 16px 0 #081d2d40}.hero-mosaic .tile{width:54px;height:54px;font-size:37px}
.tile{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;border-radius:4px;font:27px/1 Georgia,serif;box-shadow:inset 0 2px 1px #ffffff60,inset 0 -3px 1px #0003,0 2px 3px #0002;border:1px solid #0002;user-select:none}.t0{background:#2476b6;color:#eff8ff}.t1{background:#edbc44;color:#7a4a0e}.t2{background:#b63f38;color:#ffdcbe}.t3{background:#243334;color:#d5b964}.t4{background:#f5efdf;color:#276a8b}.t-1{background:#f9f5e9;color:#25394b}.tile.empty{opacity:.19;box-shadow:none}.tile.preview{opacity:.55;outline:2px dashed #214d60;outline-offset:-3px}
.azul-table{height:100%;display:flex;flex-direction:column}.bar{flex-shrink:0;border-bottom:1px solid var(--line);padding:12px 4px;display:flex;align-items:center;gap:8px}.bar .info{display:flex;align-items:center;gap:24px;flex:1}.wordmark{text-decoration:none;color:var(--ink);font-size:12px;font-weight:800;letter-spacing:.13em}.wordmark span{color:#ebc271}.round-label{font-size:12px;color:var(--dim)}.scroll{overflow:auto;flex:1;min-height:0}.azul-layout{max-width:1380px;margin:auto;padding:24px 10px 40px;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,1fr);gap:28px}.market-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.market h1{font:30px/1.15 Georgia,serif;max-width:330px;margin:8px 0 20px}.bag-count{font-size:12px;text-align:right;color:var(--dim);white-space:nowrap}.turn-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 14px;font-size:14px;background:#ffffff08;border-left:3px solid #ffffff30;min-height:56px}.turn-status.active{border-color:var(--gold);background:#edbb4415}.turn-status .btn{margin-left:auto}.factories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px 8px;padding:24px 0}.factory{aspect-ratio:1;border-radius:50%;background:#ede4d0;border:5px double #367298;position:relative;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 12px #00162550}.factory.spent{opacity:.25;background:none;box-shadow:none}.factory.chosen{outline:3px solid var(--gold);outline-offset:3px}.factory-number{position:absolute;top:-10px;left:calc(50% - 9px);background:#163b59;color:#ecd5a3;font-size:11px;width:18px;text-align:center;border-radius:50%}.factory-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:3px}.tile-button{border:0;background:none;padding:0;cursor:pointer;display:flex}.tile-button:disabled,.center-pick:disabled{cursor:default;opacity:1}.tile-button:not(:disabled):hover{transform:translateY(-3px)}.tile-button.selected .tile{outline:3px solid #bd7d16;outline-offset:1px}.factory .tile{width:clamp(23px,2.9vw,37px);height:clamp(23px,2.9vw,37px);font-size:clamp(21px,2.6vw,30px)}.center-pool{border-top:1px solid #ffffff35;border-bottom:1px solid #ffffff35;padding:16px 0}.center-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.center-heading small{font-size:12px;color:var(--dim)}.center-tiles{display:flex;flex-wrap:wrap;gap:12px;align-items:center;min-height:70px;padding-top:12px}.center-pick{display:flex;align-items:center;gap:8px;border:1px solid #ffffff30;border-radius:6px;padding:6px;background:#ffffff08;color:var(--ink);cursor:pointer}.center-pick.selected{outline:2px solid var(--gold)}.center-tiles>.muted{font-size:13px}.bonus-guide{display:flex;flex-wrap:wrap;gap:18px;color:var(--dim);font-size:12px;padding:20px 0}.bonus-guide b{color:#f1ce7e;font-size:18px;margin-right:4px}
.player-board{background:#eee4ce;color:#283f4a;border:6px double #7b9aa6;padding:18px;border-radius:5px;box-shadow:0 8px 22px #0002}.player-board header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.player-board h2{font:25px Georgia,serif;margin:3px 0}.player-board h2 small{font:12px system-ui;color:#696346}.player-board .eyebrow{color:#577582;font-size:9px}.points{font:36px Georgia,serif;text-align:right;line-height:1}.points small{display:block;font:9px system-ui;letter-spacing:.12em;margin-top:5px}.board-labels{display:flex;justify-content:space-around;font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#526c75;margin-bottom:10px}.board-row{display:grid;grid-template-columns:1fr 15px 1fr;align-items:center;gap:4px;margin:6px 0}.pattern{display:flex;align-items:center;justify-content:space-between;gap:2px;background:transparent;border:1px solid transparent;border-radius:3px;padding:3px 0;min-width:0;color:#566d78}.pattern:disabled{opacity:1}.pattern-slots,.wall-row{display:flex;gap:3px;justify-content:flex-end}.player-board .tile{width:clamp(22px,2.5vw,34px);height:clamp(22px,2.5vw,34px);font-size:24px}.line-number{font-size:9px;min-width:8px}.arrow{color:#74919a;text-align:center;font-size:12px}.pattern.valid{background:#b6d0c7;outline:2px solid #4e7d77;cursor:pointer}.pattern.valid:hover{background:#9ec3b3}.placement-hint{text-align:left;font-size:10px;color:#375e56;margin-bottom:5px}.floor{border:0;border-top:1px solid #69848c50;padding:13px 0 0;margin-top:14px;display:flex;align-items:end;gap:4px;width:100%;background:none;color:#694e3b}.floor-label{font-size:11px;align-self:center;margin-right:auto}.floor-slot{display:flex;flex-direction:column;align-items:center;gap:4px}.floor-slot small{font-size:10px}.floor.valid{cursor:pointer;border-radius:4px;outline:2px dashed #aa714b;outline-offset:4px}.floor-help{font-size:11px;color:#546b6a;margin-bottom:0}.opponent-boards{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.opponent-boards .player-board{padding:12px;background:#ddd7c4}.opponent-boards .tile{width:clamp(20px,2vw,30px);height:clamp(20px,2vw,30px);font-size:22px}.round-summary{padding:16px;margin-top:16px;border:1px solid var(--line)}.round-summary h2{font:23px Georgia}.round-summary p{display:flex;justify-content:space-between;gap:10px;font-size:13px}.score-list p{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:14px 0;border-bottom:1px solid var(--line)}.score-list small{width:100%;color:var(--dim)}
@media(min-width:1500px){.azul-layout{padding-top:40px;gap:40px}.factories{gap:22px 14px}.factory .tile{width:42px;height:42px}.player-board .tile{width:38px;height:38px}.opponent-boards .tile{width:30px;height:30px}}
@media(max-width:1050px){.azul-layout{grid-template-columns:minmax(0,1fr) 360px;gap:18px;padding-inline:0}.factories{grid-template-columns:repeat(3,minmax(0,1fr))}.factory{max-width:115px;width:100%;justify-self:center}.factory .tile{width:32px;height:32px}.player-board{padding:12px}.player-board .tile{width:26px;height:26px}.opponent-boards{grid-template-columns:repeat(2,minmax(0,1fr))}.opponent-boards .tile{width:27px;height:27px}}
@media(max-width:740px){body{padding-inline:8px}.bar{flex-wrap:wrap;gap:6px}.bar .info{width:100%;flex-basis:100%;justify-content:space-between}.bar .btn{flex:1}.azul-layout{grid-template-columns:minmax(0,1fr);gap:20px;padding-top:16px}.market h1{font-size:25px;max-width:none}.bag-count{font-size:11px}.factories{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px 5px;padding:20px 0}.factory{border-width:3px;min-height:72px}.factory .tile{width:26px;height:26px;font-size:22px}.factory-tiles{gap:2px}.factory .tile-button{min-height:28px}.turn-status{font-size:13px}.player-board{padding:14px;max-width:470px;margin:auto}.player-board .tile{width:clamp(24px,7vw,34px);height:clamp(24px,7vw,34px);font-size:25px}.pattern{min-height:37px}.board-row{gap:3px}.opponent-boards{grid-template-columns:1fr}.opponent-boards .player-board{width:100%;padding:14px}.opponent-boards .tile{width:clamp(24px,7vw,34px);height:clamp(24px,7vw,34px)}.center-heading small{font-size:11px}.bonus-guide{padding-bottom:0}.market-heading .eyebrow{font-size:9px}.hero-mosaic{margin-block:8px 15px}.page{padding-top:18px}}
@media(max-width:380px){.factories{grid-template-columns:repeat(3,1fr)}.factory{width:88px}.factory .tile{width:30px;height:30px}.player-board{padding:8px}.player-board .tile{width:23px;height:23px}.board-row{grid-template-columns:1fr 10px 1fr;gap:2px}.pattern-slots,.wall-row{gap:2px}.opponent-boards .tile{width:23px;height:23px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media(max-width:740px){.factories{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;padding:20px 10px}.factory{width:96px;min-height:96px}.factory .tile{width:34px;height:34px;font-size:28px}.factory .tile-button{min-width:34px;min-height:34px}.market h1{font-size:23px;margin-bottom:12px}.bonus-guide{gap:10px;font-size:11px}}

/* ---------- Table Night feel: painted backdrop, fonts, welcome, themed lobby ---------- */
:root{--display:"Cormorant Garamond",Georgia,serif;--body:"Outfit",system-ui,sans-serif;--num:"Outfit",system-ui,sans-serif;--bgimg:url("/azul/art/azul-hero@2x.webp?v=1");--dockbg:rgba(14,38,58,.93)}
body{font-family:var(--body)}
.title{font-family:var(--display);font-weight:700}
.panel{background:rgba(20,52,78,.8);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.sheet,.toast{background:var(--bg2)}
.fx-banner{background:rgba(14,38,58,.92);border-color:rgba(227,183,84,.4)}
.fx-welcome{background:radial-gradient(ellipse at 50% 40%,rgba(36,118,182,.95),rgba(6,20,34,.98) 70%)}
.fx-welcome h1{font-weight:700;color:#fbf3dc;text-shadow:0 0 30px rgba(237,188,68,.55),0 4px 14px #000}
.fx-welcome .wl-fan .c{width:min(17vw,84px);margin-left:calc(min(17vw,84px) / -2)}
.hero-art{width:min(46vw,190px);aspect-ratio:1;border-radius:22px;overflow:hidden;transform:rotate(-6deg);box-shadow:0 0 0 5px #f3e7c9,0 0 0 9px #2476b6,0 26px 50px rgba(0,0,0,.6);margin:10px 0 14px}
.hero-art img{width:100%;height:100%;object-fit:cover;display:block}
/* lobby: the hero is a glazed plaque with an azulejo border, each player a coloured tile */
.page:has(#link){--azb:repeating-conic-gradient(from 45deg,#2476b6 0 25%,#f3e7c9 0 50%) 0 0/16px 16px;gap:18px}
.page:has(#link)>.hero{position:relative;padding:22px 18px 26px;margin:8px 6px 4px;border-radius:18px;background:linear-gradient(#fbf6ea,#f0e4c6) padding-box,var(--azb) border-box;border:10px solid transparent;color:#163b59;box-shadow:0 24px 50px rgba(0,0,0,.6);transform:rotate(-1.2deg)}
.page:has(#link)>.hero .eyebrow{color:#2476b6;letter-spacing:.2em}
.page:has(#link)>.hero .title{color:#163b59;text-shadow:0 2px 0 #edbc4466;letter-spacing:.06em}
.page:has(#link)>.hero p{color:#3d5466!important}
.page:has(#link)>.hero .hero-art{width:110px;box-shadow:0 0 0 4px #fff,0 12px 26px rgba(0,0,0,.35)}
.share{flex-wrap:nowrap!important}.share code{flex:1 1 auto!important;min-width:0;font-size:13px}.share .btn{flex:none}
.page:has(#link) .plist{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:14px 12px;padding:6px 2px 2px}
.page:has(#link) .plist li{--c:#2476b6;--k:#eff8ff;position:relative;flex-direction:column;align-items:flex-start;gap:8px;min-height:104px;padding:12px;border-radius:10px;background:var(--c);color:var(--k);border:1px solid #0003;box-shadow:inset 0 3px 1px #ffffff60,inset 0 -5px 1px #0003,0 10px 20px rgba(0,0,0,.45);font:700 20px/1.1 var(--display)}
.page:has(#link) .plist li:nth-child(5n+2){--c:#edbc44;--k:#4a2c06}.page:has(#link) .plist li:nth-child(5n+3){--c:#b63f38;--k:#fff0e0}.page:has(#link) .plist li:nth-child(5n+4){--c:#f5efdf;--k:#163b59}.page:has(#link) .plist li:nth-child(5n){--c:#243334;--k:#ecd5a3}
.page:has(#link) .plist li:nth-child(odd){transform:rotate(-1.5deg)}.page:has(#link) .plist li:nth-child(even){transform:rotate(1.2deg)}
.page:has(#link) .plist li::after{content:"✦";position:absolute;right:10px;bottom:4px;font-size:28px;opacity:.45}
.page:has(#link) .plist li>span[style*="flex"]{overflow-wrap:anywhere;width:100%;flex:none!important}
.page:has(#link) .plist li .muted{color:inherit!important;opacity:.75;font:600 13px var(--body)}
.page:has(#link) .plist .btn.ghost{color:inherit;border:0;min-height:0;padding:2px 4px;font:700 12px var(--body);text-decoration:underline;background:transparent}
.page:has(#link) .plist+p{border:2px dashed rgba(243,231,201,.3);border-radius:12px;padding:16px;text-align:center;font-weight:600;color:var(--dim)!important}
.page:has(#link) .seg{border-radius:999px;background:rgba(0,0,0,.25);padding:2px}
.page:has(#link) .seg button{border-radius:999px;padding:6px 11px}
.page:has(#link) .seg button[aria-pressed="true"]{background:linear-gradient(180deg,#f5d78c,#e3b754);color:#2a1d04}
.page:has(#link)>.row:has([data-act="rules"]){position:sticky;bottom:0;z-index:5;margin:0;padding:24px 0 max(14px,env(safe-area-inset-bottom));background:linear-gradient(to bottom,rgba(18,50,76,0),var(--bg) 38%);flex-wrap:nowrap}
.page:has(#link)>.row:has([data-act="rules"]) .btn[data-act="start"]{flex:1;min-height:54px;font-size:17px}
.page:has(#link)>.row:has([data-act="rules"])>.muted{flex:1;text-align:center;font-weight:700}
.page:has(#link)>.row:has([data-act="rules"]) .btn[data-act="start"][disabled]{opacity:1;background:#1d4562;color:#7f9cb0;box-shadow:none}

/* ---------- premium pieces: glazed ceramic tiles, painted factory plates, linen boards ---------- */
.azart .tile.t0,.azart .tile.t1,.azart .tile.t2,.azart .tile.t3,.azart .tile.t4,.azart .tile.t-1{background-size:cover;background-position:center;color:transparent;border-radius:5px;box-shadow:inset 0 1px 0 #fff8,0 2px 4px #0004}
.azart .tile.t0{background-image:url(art/az-t0.webp?v=1)}.azart .tile.t1{background-image:url(art/az-t1.webp?v=1)}.azart .tile.t2{background-image:url(art/az-t2.webp?v=1)}.azart .tile.t3{background-image:url(art/az-t3.webp?v=1)}.azart .tile.t4{background-image:url(art/az-t4.webp?v=1)}
.azart .tile.t-1{background-image:url(art/az-first.webp?v=1);color:#163b59;font-weight:700}
.azart .tile.empty{opacity:.22;filter:saturate(.4)}
.azart .tile.preview{opacity:.6;filter:none}
.azart .factory{background:url(art/az-factory@2x.webp?v=1) center/112% no-repeat;border:0;box-shadow:0 8px 18px #0008}
.azart .factory.spent{background:url(art/az-factory@2x.webp?v=1) center/112% no-repeat;opacity:.3}
.azart .player-board{background:url(art/az-board@2x.webp?v=1) center/cover;border:0;border-radius:12px;box-shadow:0 0 0 2px #e3b75488,0 14px 30px #0007}
.azart .wall-row{background:url(art/az-wall.webp?v=1) center/cover;padding:2px;border-radius:4px}
/* ---------- table rework: holding bar, move banners, readable boards before art loads ---------- */
.player-board{background-color:#eee4ce}
.holding{position:sticky;top:0;z-index:6;display:flex;align-items:center;gap:12px;padding:10px 12px;margin:0 0 4px;border-radius:12px;background:linear-gradient(90deg,#1c4360f2,#163b59f2);border:2px solid var(--gold);box-shadow:0 8px 20px #0007;animation:holdin .3s cubic-bezier(.2,1.4,.4,1)}
@keyframes holdin{from{transform:translateY(-10px);opacity:0}}
.holding>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:2px}.holding b{font:700 18px/1.1 var(--display);color:#fbf3dc}.holding small{color:var(--dim);font-size:12px}
.hold-tiles{display:flex;gap:3px}.hold-tiles .tile{width:24px;height:24px}
.pattern.valid{animation:glowline 1.4s ease-in-out infinite}
@keyframes glowline{50%{box-shadow:0 0 0 3px #e3b754,0 0 18px #e3b75488}}
.pattern.pop{animation:popin .55s cubic-bezier(.2,1.6,.4,1)}
.fx-banner.az-fx{background:rgba(14,38,58,.95);border:2px solid #e3b754;border-radius:16px;padding:14px 20px;display:flex;flex-direction:column;align-items:center;gap:6px}
.fx-banner.az-fx .t{font-family:var(--display);font-weight:700;font-size:clamp(24px,7vw,36px);text-align:center}
.az-take{display:flex;gap:4px}.az-take .tile{width:34px;height:34px;animation:fxtile .45s cubic-bezier(.2,1.5,.4,1) both}
.az-take .tile:nth-child(2){animation-delay:.06s}.az-take .tile:nth-child(3){animation-delay:.12s}.az-take .tile:nth-child(4){animation-delay:.18s}.az-take .tile:nth-child(5){animation-delay:.24s}
@keyframes fxtile{from{transform:translateY(-30px) rotate(-20deg);opacity:0}}
.azart .player-board{padding:clamp(22px,6.5vw,34px) clamp(20px,6vw,32px)}
.azart .tile.empty{opacity:.32;filter:saturate(.7)}
.azart .player-board{background-size:100% 100%;padding:36px 30px 30px}
.azart .opponent-boards .player-board{padding:30px 26px 26px}
.azart .player-board,.azart .opponent-boards .player-board{background-size:260% auto;background-position:center;padding:18px 16px;border:5px solid #2476b6;outline:2px solid #f3e7c9;outline-offset:-9px}
.azart .wall-row{background-color:#f3e7c9;background-blend-mode:soft-light}
.azart .wall-row .tile.empty{opacity:.42;filter:saturate(.85)}
