/* Enfonsa la flota · pantalla de joc. Peces comunes de la família Jocs IA (copiades de Xinos v17):
   capçalera de fusta, drap verd, zona de baix fosca amb línia de llautó, paper i lletra a mà. Sempre fosc.
   Estructura comuna als jocs: capçalera · tapet · zona inferior · fulls (Menú, Llibreta, Benvinguda). */
:root { --felt: #0f5a34; --felt-hi: #1d7c4a; --felt-lo: #07351e; --wood: #2a1c12; --brass: #e3ab3c; --brass-lo: #8f6414;
  --ivory: #f3ead3; --tink: #1a1712; --paper: #f7f3e6; --nos: #7db4ea; --vos: #ee9484; --nos-ink: #1f3f8f; --vos-ink: #a3302a;
  --f-ui: 'Barlow Semi Condensed', system-ui, -apple-system, sans-serif; --f-disp: 'Alfa Slab One', Georgia, serif; --f-hand: 'Caveat', 'Segoe Print', cursive;
  color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; height: 100%; overflow: hidden; background: var(--felt-lo); color: var(--ivory); font: 500 16px/1.25 var(--f-ui);
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
svg { display: block; }
p { margin: 0; }

.app { height: 100%; height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--felt-lo); }

/* capçalera de fusta */
.xt-bar { flex: none; background: linear-gradient(#37261a, #241810); border-bottom: 2px solid #120b06; box-shadow: 0 2px 0 rgba(227,171,60,.4);
  display: flex; align-items: center; gap: 7px; padding: 8px 10px; min-height: 62px; position: relative; z-index: 2; }
.ib { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1.5px solid rgba(243,234,211,.2); display: grid; place-items: center; }
.ib:hover { border-color: var(--brass); }
.ib.ico { padding: 0; overflow: hidden; border-color: rgba(243,234,211,.35); }
.ib.ico img { width: 100%; height: 100%; display: block; }
.ib svg { width: 24px; height: 24px; }
.xt-estat { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding-left: 3px; }
.xt-estat .pic { flex: none; width: 30px; height: 34px; }
.xt-estat .pic svg { width: 100%; height: 100%; }
.xt-estat .tx { min-width: 0; }
.xt-estat b { display: block; font-size: 17px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-estat small { display: block; font-size: 13px; opacity: .75; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-score { flex: none; height: 46px; padding: 0 12px; border-radius: 12px; background: var(--paper); color: var(--tink); display: flex; gap: 13px; align-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.xt-score span { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.xt-score small { font: 700 13px var(--f-ui); letter-spacing: .1em; }
.xt-score b { font: 700 27px/.9 var(--f-hand); font-variant-numeric: tabular-nums; }
.xt-score .n, .xt-score .nl { color: var(--nos-ink); } .xt-score .v, .xt-score .vl { color: var(--vos-ink); }

/* drap: fix, omple l'espai entre la capçalera i la zona de baix */
.xt-felt { flex: 1; min-height: 0; position: relative; background: radial-gradient(120% 85% at 50% 45%, var(--felt-hi) 0%, var(--felt) 48%, var(--felt-lo) 100%);
  padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-evenly; gap: 8px; overflow: hidden; }
/* seients (píndoles amb cara) */
.xt-seat { justify-self: start; display: flex; align-items: center; gap: 8px; background: rgba(8,24,15,.62); border: 1.5px solid rgba(243,234,211,.16);
  border-radius: 999px; padding: 5px 12px 5px 5px; --team: var(--nos); transition: border-color .2s, box-shadow .2s; max-width: 100%; position: relative; }
.xt-seat[data-who="1"] { --team: var(--vos); }
.xt-seat.turn { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(227,171,60,.28), 0 0 20px rgba(227,171,60,.4); }
.xt-av { width: 42px; height: 42px; flex: none; }
.xt-av svg { width: 100%; height: 100%; }
.xt-nm { font-weight: 700; font-size: 15px; line-height: 1; }
.xt-rl { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; opacity: .75; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-dots { display: none; gap: 3px; margin-top: 3px; }
.xt-seat.turn .xt-dots { display: flex; }
.xt-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); animation: xtblink 1s infinite; }
.xt-dots i:nth-child(2) { animation-delay: .15s; } .xt-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes xtblink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.xt-ok { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--brass); color: #2a1c12; font-weight: 700; font-size: 14px; line-height: 22px; text-align: center; }
@keyframes xtpop { from { transform: scale(.7); opacity: 0; } }

/* franja de missatges */
.xt-mid { min-height: 58px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 6px 14px;
  border-radius: 14px; background: rgba(7,28,17,.58); }
.xt-mid .st { font-weight: 700; font-size: 16px; line-height: 1.2; }
.xt-mid .sub { font-size: 14px; opacity: .8; margin-top: 2px; }
.xt-mid .tot { font: 400 22px/1.1 var(--f-disp); }
.xt-mid .tot b { font: 700 38px/1 var(--f-hand); color: var(--brass); font-weight: 700; }

/* zona inferior */
.xt-dock { flex: none; background: linear-gradient(#1f150d, #2b1d12); border-top: 2px solid var(--brass); padding: 10px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.xt-st { font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; opacity: .85; text-align: center; }
.xt-dock p { font-size: 14px; opacity: .82; text-align: center; }
.xt-act { min-height: 48px; display: flex; align-items: center; justify-content: center; }
.xt-hint { font-size: 14px; opacity: .82; text-align: center; }
/* finestra de joc: la mateixa peça que el sorteig, el trumfo o el contrar a la Botifarra */
.xt-win { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; padding: 12px 12px 14px; border-radius: 18px;
  background: linear-gradient(#2a1c12, #170f09); border: 2px solid var(--brass); box-shadow: 0 12px 34px rgba(0,0,0,.6); animation: xtpop .2s ease-out; }
.xt-win h3 { margin: 0; font: 400 23px/1.1 var(--f-disp); }
.xt-win p { font-size: 14.5px; line-height: 1.3; opacity: .85; margin: 4px 0 10px; }
.xt-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 6px 14px; border-radius: 12px; font-weight: 700; font-size: 18px; line-height: 1.15; text-align: center; text-decoration: none;
  background: var(--brass); color: #2a1c12; box-shadow: 0 3px 0 var(--brass-lo); }
.xt-btn.alt { background: rgba(255,255,255,.07); color: var(--ivory); border: 1.5px solid rgba(243,234,211,.25); box-shadow: none; line-height: 45px; }
.xt-help { margin-top: auto; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(243,234,211,.25); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.pill:hover, .pill[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); }

/* fulls: Menú, Llibreta, Benvinguda, Comparteix */
.shade { position: fixed; inset: 0; z-index: 10; background: rgba(5,12,8,.72); display: flex; align-items: flex-end; justify-content: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 56px); animation: shIn .18s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 100%; display: flex; flex-direction: column; background: linear-gradient(#3a2a1d, #2a1d13); border: 2px solid var(--brass); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5); animation: shUp .22s ease-out; }
.sh-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.sh-h h2 { margin: 0; font: 400 28px/1.05 var(--f-disp); }
.sh-b > * { flex: none; }
.sh-b { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
@keyframes shIn { from { opacity: 0; } } @keyframes shUp { from { transform: translateY(30px); opacity: 0; } }
.sec { margin-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--brass); }
.sub2 { margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.note { font-size: 14.5px; line-height: 1.35; opacity: .85; }
.note b { opacity: 1; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 0; border-bottom: 1px solid rgba(243,234,211,.14); font-size: 17px; }
.mrow > span small { display: block; font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; opacity: .7; }
.seg { display: flex; gap: 6px; }
.seg button { min-width: 48px; height: 40px; border-radius: 999px; border: 1.5px solid rgba(243,234,211,.25); font-weight: 700; font-size: 17px; }
.seg button[aria-checked="true"] { background: var(--brass); color: #2a1c12; border-color: var(--brass); }
.sheet select { font: 600 16px var(--f-ui); color: var(--tink); background: var(--paper); border: 0; border-radius: 10px; padding: 10px 8px; min-width: 150px; max-width: 60%; }
.sw { position: relative; flex: none; width: 54px; height: 32px; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: rgba(243,234,211,.16); transition: background .15s; pointer-events: none; }
.sw i::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--ivory); transition: transform .15s, background .15s; }
.sw input:checked + i { background: var(--brass); }
.sw input:checked + i::after { transform: translateX(22px); background: #2a1c12; }
.sw input:focus-visible + i { outline: 2px solid var(--brass); outline-offset: 2px; }
.sheet details summary { cursor: pointer; font-weight: 700; font-size: 17px; min-height: 44px; display: flex; align-items: center; }
.sheet details .note { margin: 0 0 8px; }
.lnk { text-align: left; font-weight: 700; font-size: 17px; min-height: 44px; text-decoration: underline; text-decoration-color: rgba(243,234,211,.4); text-underline-offset: 3px; }
.sheet a { color: var(--brass); }
.sheet a.xt-btn { color: #2a1c12; } .sheet a.xt-btn.alt { color: var(--ivory); }
.big { display: flex; justify-content: center; gap: 34px; padding: 10px; border-radius: 14px; background: var(--paper); color: var(--tink); }
.big span { display: flex; flex-direction: column; align-items: center; }
.big small { font: 700 13px var(--f-ui); letter-spacing: .14em; }
.big b { font: 700 46px/.95 var(--f-hand); }
.big .n, .big .nl { color: var(--nos-ink); } .big .v, .big .vl { color: var(--vos-ink); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.kv span:nth-child(even) { text-align: right; font-weight: 700; }
.tw { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; width: 100%; }
th, td { padding: 6px 5px; border-bottom: 1px solid rgba(243,234,211,.14); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; opacity: .75; font-weight: 700; }
.avis-p { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(31,107,62,.28); border: 1px solid rgba(143,224,168,.3); font-size: 14.5px; line-height: 1.35; }
.avis-p svg { flex: none; }
.avis-m { font-weight: 700; white-space: nowrap; }
.sopts { display: flex; flex-direction: column; gap: 8px; }
.sopts button { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(243,234,211,.22); font-size: 16px; line-height: 1.3; }
.sopts button[aria-checked="true"] { border-color: var(--brass); background: rgba(227,171,60,.14); }
.sheet textarea { width: 100%; min-height: 84px; font: 500 16px/1.35 var(--f-ui); color: var(--tink); background: var(--paper); border: 0; border-radius: 12px; padding: 10px; resize: vertical; }
.sbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sbtns .wide { grid-column: 1 / -1; }

/* finestra del sorteig: la mateixa que el sorteig de la Botifarra (només a l'inici de la sessió) */
.xt-panel { position: absolute; z-index: 3; left: 50%; top: 50%; max-height: calc(100% - 12px); overflow-y: auto; overscroll-behavior: contain; transform: translate(-50%, -50%); width: min(92%, 340px); background: #17100a; border: 1.5px solid var(--brass);
  border-radius: 18px; padding: 14px 14px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.6); animation: xtrise .22s ease-out; }
@keyframes xtrise { from { opacity: 0; transform: translate(-50%, -46%); } }
.xt-panel h2 { margin: 0; font: 400 21px/1.1 var(--f-disp); }
.xt-panel > p { margin: 5px 0 0; font-size: 13.5px; opacity: .85; line-height: 1.25; }
.srt { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.srows { flex: 1; min-width: 0; display: grid; gap: 5px; }
.srow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-size: 14px; transition: background .25s, border-color .25s; }
.srow svg { width: 20px; height: 20px; flex: none; }
.srow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow b { font-size: 13px; opacity: .8; }
.srow.hit { background: var(--brass); color: #2a1c12; border-color: var(--brass); }
.srow.hit b { opacity: 1; }
.scut { width: 78px; flex: none; }
.scut svg { width: 100%; height: auto; }
.scut.flip { animation: xtflip .45s ease-out; }
.scut.air { animation: xtair .5s linear infinite; }
@keyframes xtflip { 0% { transform: rotateY(90deg); } 100% { transform: none; } }
@keyframes xtair { 0% { transform: scaleX(1); } 50% { transform: scaleX(.08); } 100% { transform: scaleX(1); } }
.sres { text-align: center; min-height: 2.6em; margin-top: 10px; font-size: 14.5px; line-height: 1.3; }
.sgo { display: flex; justify-content: center; margin-top: 10px; }
.xt-btn.sm { width: auto; min-height: 44px; line-height: 44px; font-size: 16px; }
.gran .xt-panel > p, .gran .sres { font-size: 16.5px; } .gran .srow { font-size: 16px; } .gran .xt-panel h2 { font-size: 25px; }

/* ===================== Enfonsa la flota: peces pròpies ===================== */
.xt-felt.ef { justify-content: flex-start; align-items: center; gap: 6px; padding: 8px 10px; }
.ef-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xt-seat.sm { padding: 3px 12px 3px 3px; }
.xt-seat.sm .xt-av { width: 34px; height: 34px; }
.ef-wrap { flex: 1; min-height: 0; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.ef-mid { align-self: stretch; min-height: 34px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 12px;
  border-radius: 999px; background: rgba(7,28,17,.58); font-weight: 700; font-size: 15px; line-height: 1.2; }

/* taulers */
.bd { --c: 26px; display: grid; grid-template-columns: repeat(11, var(--c)); grid-auto-rows: var(--c); gap: 1px; }
.bd.mini { grid-template-columns: repeat(10, var(--c)); }
.bd .lb { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: rgba(243,234,211,.75); }
.cl { position: relative; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.085); border-radius: 2px; padding: 0; }
button.cl:not(:disabled):hover { background: rgba(227,171,60,.25); }
button.cl:disabled { cursor: default; }
.bd.tir.meu button.cl.ok { cursor: crosshair; }
.cl.mk { box-shadow: inset 0 0 0 2px var(--brass); background: rgba(227,171,60,.22); }
.cl.w { background: rgba(255,255,255,.085) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 8q2-3 4 0t4 0 4 0 4 0M2 13q2-3 4 0t4 0 4 0 4 0' fill='none' stroke='%239ec9e8' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/86% no-repeat; }
.cl.sh { background: #cfc8b2; border: 1px solid #8a826c; }
.cl.sh.sel { background: var(--brass); border-color: var(--brass-lo); }
.cl.sh.ghost { background: rgba(207,200,178,.35); border-color: rgba(207,200,178,.5); }
.cl.dead, .cl.sh.dead { background: #141414; border-color: #000; }
.hb { border-radius: 50% 0 0 50% / 50% 0 0 50% !important; border-right: 0 !important; }
.hm { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; }
.he { border-radius: 0 30% 30% 0 !important; border-left: 0 !important; }
.vb { border-radius: 50% 50% 0 0 / 50% 50% 0 0 !important; border-bottom: 0 !important; }
.vm { border-radius: 0 !important; border-top: 0 !important; border-bottom: 0 !important; }
.ve { border-radius: 0 0 30% 30% !important; border-top: 0 !important; }
.one { border-radius: 45% !important; }
.cl.ht { background: #141414; }
.cl.ht::after, .fl { content: ''; width: 36%; height: 36%; border-radius: 50%; background: #ff3b1f; box-shadow: 0 0 4px 2px #ff7a1f; animation: effl 1.1s infinite ease-in-out; }
@keyframes effl { 0%, 100% { opacity: 1; transform: scale(1); } 35% { opacity: .45; transform: scale(.75); } 60% { opacity: .9; transform: scale(1.1); } }
.cl.boom::before { content: ''; position: absolute; inset: -60%; border-radius: 50%; z-index: 2; pointer-events: none; animation: efbm .9s ease-out forwards; }
@keyframes efbm { 0% { transform: scale(.1); opacity: 1; background: #ffd35a; } 35% { transform: scale(1); opacity: 1; background: #e8432e; } 100% { transform: scale(1.2); opacity: 0; background: #e8432e; } }

/* zona de baix durant la partida: Tramuntana canta el tret (esquerra) i la flota pròpia (dreta) */
.ef-dock { flex-direction: row; align-items: stretch; gap: 8px; }
.ef-bq { flex: 1; min-width: 0; background: var(--paper); color: var(--tink); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; }
.ef-who { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b5a44; }
.ef-who .xt-av { width: 26px; height: 26px; }
.ef-say { font: 400 40px/1.1 var(--f-disp); min-height: 46px; letter-spacing: .04em; }
.ef-say.pop { animation: xtpop .2s ease-out; }
.ef-ans { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; min-height: 36px; }
.ef-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--felt); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; }
.ef-ico .wv { width: 28px; height: 28px; }
.ef-ico .fl { width: 13px; height: 13px; box-shadow: 0 0 5px 3px #ff7a1f; }
.ef-ico .capt { position: absolute; left: 5px; top: 3px; width: 24px; height: 30px; animation: efsk 2.2s forwards ease-in; }
@keyframes efsk { 0%, 25% { transform: translateY(0); } 100% { transform: translateY(24px); } }
.ef-ico .sea { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: #1d6fa3; }
.ef-own { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.ef-own small { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }

/* col·locació */
.ef-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ef-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid rgba(243,234,211,.3); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.ef-chip[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); background: rgba(227,171,60,.12); }
.ef-chip.done { opacity: .38; text-decoration: line-through; }
.ef-chip i { font-style: normal; font: 700 19px/1 var(--f-hand); }
.ef-row { display: flex; gap: 8px; }
.ef-row .xt-btn { flex: 1; }
.ef-row .xt-btn.alt { flex: none; width: auto; padding: 0 14px; font-size: 16px; }
.ef-row .xt-btn.off { background: rgba(255,255,255,.07); color: rgba(243,234,211,.6); box-shadow: none; border: 1.5px dashed rgba(243,234,211,.25); font-size: 15px; }

/* finestres de joc: enfonsat (breu) i final */
.ef-win { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90%, 330px); max-height: calc(100% - 12px); overflow: hidden;
  background: #17100a; border: 1.5px solid var(--brass); border-radius: 18px; padding: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.6); text-align: center; animation: xtrise .22s ease-out; }
.ef-win h2 { margin: 0; font: 400 24px/1.1 var(--f-disp); }
.ef-win p { margin: 6px 0 0; font-size: 15px; line-height: 1.3; opacity: .9; }
.ef-win .xt-btn { margin-top: 12px; }
.ef-win .lnk2 { margin-top: 6px; min-height: 44px; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(243,234,211,.4); }
.ef-win.brief { width: min(80%, 280px); padding: 12px; }
.ef-adm { position: relative; width: 110px; height: 120px; margin: 4px auto 0; overflow: hidden; border-radius: 14px; }
.ef-adm svg.adm { position: absolute; left: 10px; top: 4px; width: 90px; height: 112px; }
.ef-adm.lose { background: linear-gradient(#24496b, #1d3a55); }
.ef-adm.lose svg.adm { animation: efadm 3s .5s forwards ease-in; }
@keyframes efadm { 0% { transform: translateY(0) rotate(0); } 30% { transform: translateY(14px) rotate(-3deg); } 100% { transform: translateY(96px) rotate(4deg); } }
.ef-adm .sea2 { position: absolute; left: -10px; right: -10px; bottom: 0; height: 34px; }
.ef-adm.win { background: radial-gradient(circle at 50% 40%, rgba(227,171,60,.35), transparent 70%); overflow: visible; }
.ef-conf { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 18px; }
.ef-conf i { position: absolute; top: -12px; width: 7px; height: 11px; border-radius: 2px; animation: efcf linear infinite; }
@keyframes efcf { from { transform: translateY(0) rotate(0); } to { transform: translateY(460px) rotate(540deg); } }
.ef-kv { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin-top: 8px; text-align: left; font-size: 15px; }
.ef-kv span:nth-child(even) { text-align: right; font-weight: 700; }

@media (max-height: 640px) {
  .xt-bar { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .xt-dock { padding-top: 7px; padding-bottom: 7px; }
  .ef-say { font-size: 34px; min-height: 40px; }
  .ef-ans { min-height: 30px; }
  .ef-ico { width: 30px; height: 30px; }
  .ef-mid { min-height: 30px; }
  .ef-adm { width: 90px; height: 96px; } .ef-adm svg.adm { left: 8px; width: 74px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) { .cl.ht::after, .fl, .cl.boom::before, .ef-ico .capt, .ef-adm svg.adm, .ef-conf i, .ef-win, .ef-say.pop { animation: none; } }
/* capçalera en mòbils estrets (com a Xinos) */
@media (max-width: 374px) {
  .xt-bar { gap: 5px; padding-inline: 8px; }
  .xt-estat .pic { display: none; }
  .xt-score { padding: 0 7px; gap: 7px; }
  .xt-estat small { letter-spacing: .02em; }
}
/* La Barlow, amb lang="ca", converteix «l·l» en un glif estrany: es desactiva la variant local */
body, button, select, textarea { font-feature-settings: 'locl' 0; }
