/* [v1.57 bateau] Le chantier naval, la mise à l'eau, l'équipage. Même pixel que iles.css (cadres en box-shadow, variables de html.px). */
#tl-chantier { background: var(--wood-1, #3E2716) var(--tex-wood) repeat; background-size: 128px 96px; }
.tl-bat .tl-top { margin-bottom: 6px; }
.tl-bat .tl-titre b { font-size: 22px; }
.tl-bat-solde { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; line-height: 1; }
.tl-bat-pl { display: inline-flex; align-items: center; gap: 4px; font-size: 20px; }
.tl-bat-pl .mon-ico { width: 18px; height: 18px; }
.tl-bat-res { display: inline-flex; gap: 6px; font-size: 15px; color: var(--ink-muted, #6E5A44); }
.tl-bat-res span { display: inline-flex; align-items: center; gap: 2px; }
.tl-bat-ico { image-rendering: pixelated; height: 14px; width: auto; vertical-align: -2px; flex: none; }
.tl-bat-ico.big { height: 36px; }

.tl-bat-scene { flex: none; margin: 0 8px; position: relative; box-shadow: 0 0 0 2px #24150C, 0 0 0 4px #845A36, 0 0 0 6px #24150C; background: #8ACAF0; }
.tl-bat-scene canvas { display: block; width: 100%; height: auto; aspect-ratio: 180 / 196; image-rendering: pixelated; image-rendering: crisp-edges; }

.tl-bat-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 8px 6px; }
.tl-bat-tab { min-height: 34px; font: 400 18px var(--font); color: var(--paper-3, #D9C49A); background: var(--wood-3, #6E4A2C); border: 0;
  box-shadow: 0 0 0 2px var(--wood-0, #24150C), inset 0 2px 0 0 #845A36, inset 0 -3px 0 0 #3E2716; cursor: pointer; padding: 0 4px; }
.tl-bat-tab.on { background: #E8B640; color: var(--inkc, #2B1D14); box-shadow: 0 0 0 2px var(--wood-0, #24150C), inset 0 2px 0 0 #F6DC86, inset 0 -3px 0 0 #B8862A; }

.tl-bat-liste { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 14px; display: grid; gap: 10px; align-content: start; -webkit-overflow-scrolling: touch; }
.tl-bat-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 8px 10px 10px; cursor: pointer;
  background-color: var(--pxbg, #F1E3C2); color: var(--inkc, #2B1D14); --u: 2px;
  box-shadow: 0 -2px 0 0 #24150C, 0 2px 0 0 #24150C, -2px 0 0 0 #24150C, 2px 0 0 0 #24150C, 0 6px 0 -2px rgba(20,10,4,.5), inset 0 2px 0 0 #F8EED6, inset 0 -4px 0 0 #D9C49A; }
.tl-bat-card.sel { --pxbg: #F6E7B8; box-shadow: 0 -2px 0 0 #8A5A10, 0 2px 0 0 #8A5A10, -2px 0 0 0 #8A5A10, 2px 0 0 0 #8A5A10, 0 6px 0 -2px rgba(20,10,4,.5), inset 0 2px 0 0 #FFF4C0, inset 0 -4px 0 0 #E8B640; }
.tl-bat-card.fini { opacity: .9; }
.tl-eq-card { grid-template-columns: minmax(0, 1fr); cursor: default; }
.tl-bat-ic { display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
.tl-bat-c { min-width: 0; }
.tl-bat-c p { margin: 2px 0; font-family: var(--font-r, var(--font)); font-size: 15px; line-height: 1.15; color: var(--ink-muted, #6E5A44); }
.tl-bat-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-bat-h b { font-size: 23px; font-weight: 400; line-height: 1; }
.tl-bat-pips { display: inline-flex; gap: 3px; }
.tl-bat-pips i { width: 10px; height: 10px; background: #D9C49A; box-shadow: 0 0 0 1px #9C8A70; }
.tl-bat-pips i.on { background: #E8B640; box-shadow: 0 0 0 1px #6A4210, inset 0 1px 0 #F6DC86; }
.tl-bat-c p.tl-bat-niv { color: var(--inkc, #2B1D14); }
.tl-bat-c p.tl-bat-ouvre { display: flex; gap: 5px; align-items: center; color: #16255E; }
.tl-bat-c p.tl-bat-lock { color: #5E1515; }
.tl-bat-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.tl-bat-buy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 12px; font: 400 19px var(--font); border: 0; cursor: pointer;
  background: #E8B640; color: var(--inkc, #2B1D14); box-shadow: 0 0 0 2px var(--wood-0, #24150C), inset 0 2px 0 0 #F6DC86, inset 0 -3px 0 0 #B8862A; }
.tl-bat-buy.ghost { background: var(--paper-2, #E8D6AF); box-shadow: 0 0 0 2px var(--wood-0, #24150C), inset 0 2px 0 0 #F8EED6, inset 0 -3px 0 0 #D9C49A; }
.tl-bat-buy[disabled] { background: var(--paper-2, #E8D6AF); color: var(--ink-muted, #6E5A44); box-shadow: 0 0 0 2px var(--paper-edge, #B89C70); cursor: default; }
.tl-bat-buy:active:not([disabled]) { transform: translateY(1px); }
.tl-bat-prix { display: inline-flex; align-items: center; gap: 3px; }
.tl-bat-prix .mon-ico { width: 15px; height: 15px; }
.tl-bat-fini { font-size: 17px; color: #2E6A22; padding: 6px 2px; }
.tl-bat-intro { margin: 0; color: var(--paper-2, #E8D6AF); font-family: var(--font-r, var(--font)); font-size: 15px; }

/* ---------- pavillons ---------- */
.tl-bat-pavs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tl-bat-pav { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 8px; text-align: center;
  background: var(--paper, #F1E3C2); color: var(--inkc, #2B1D14); box-shadow: 0 0 0 2px #24150C, inset 0 2px 0 0 #F8EED6, inset 0 -3px 0 0 #D9C49A; }
.tl-bat-pav.hisse { background: #F6E7B8; box-shadow: 0 0 0 2px #8A5A10, inset 0 2px 0 0 #FFF4C0, inset 0 -3px 0 0 #E8B640; }
.tl-bat-pav.cache { background: #463E68; color: #F8EED6; box-shadow: 0 0 0 2px #1F1A2E, inset 0 2px 0 0 #7C74A8, inset 0 -3px 0 0 #2C2542; }
.tl-bat-pav canvas { width: 50px; height: 40px; image-rendering: pixelated; }
.tl-bat-pav-q { width: 50px; height: 40px; display: grid; place-items: center; font-size: 30px; color: #B4AED6; }
.tl-bat-pav b { font-size: 16px; font-weight: 400; line-height: 1; min-height: 2em; display: flex; align-items: center; }
.tl-bat-pav small { font-family: var(--font-r, var(--font)); font-size: 13px; line-height: 1.1; color: #D9D2F2; }
.tl-bat-pav .tl-bat-buy { min-height: 30px; font-size: 17px; padding: 0 8px; }
.tl-bat-pav .tl-bat-fini { padding: 4px 0; }

/* ---------- équipage ---------- */
.tl-eq-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
.tl-eq-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 6px; text-align: center; background: #E8D6AF; box-shadow: 0 0 0 2px #9C8A70; }
.tl-eq-slot.vide { opacity: .7; }
.tl-eq-slot.absent { opacity: .6; }
.tl-eq-slot b { font-size: 17px; font-weight: 400; line-height: 1; word-break: break-word; }
.tl-eq-slot small { font-family: var(--font-r, var(--font)); font-size: 13px; line-height: 1.1; color: #16255E; }
.tl-eq-img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; flex: none; }
.tl-eq-img.vide { display: inline-block; background: repeating-linear-gradient(45deg, #D9C49A 0 4px, #E8D6AF 4px 8px); box-shadow: inset 0 0 0 2px #C4B08C; }
.tl-eq-img.p { width: 32px; height: 32px; }
.tl-eq-et { font-style: normal; color: #B8862A; font-size: 15px; letter-spacing: -1px; text-shadow: 0 1px 0 #6A4210; }
.tl-eq-niv { font-style: normal; color: var(--ink-muted, #6E5A44); font-size: 13px; font-family: var(--font-r, var(--font)); }
.tl-bat-c p.tl-eq-tot, p.tl-eq-tot { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; color: var(--inkc, #2B1D14); margin: 6px 0 2px; }
.tl-eq-b { font-size: 14px; padding: 1px 6px; background: #CFE6F2; color: #16255E; box-shadow: 0 0 0 1px #4C8AC8; font-family: var(--font-r, var(--font)); }

/* fiche d'une île */
.tl-eq-fiche { margin: 8px 0 4px; padding: 6px 8px 6px; background: #E6EEF0; box-shadow: 0 0 0 2px #4C8AC8; position: relative; }
.tl-eq-fiche > small { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #16255E; font-family: var(--font-s, monospace); }
.tl-eq-fiche p { margin: 2px 0; font-size: 15px; color: #16255E; }
.tl-eq-l { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.tl-eq-m { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; }
.tl-eq-m b { font-weight: 400; }
.tl-eq-lien { position: absolute; right: 6px; top: 4px; border: 0; background: none; color: #2A4FBF; text-decoration: underline; font: 400 15px var(--font); cursor: pointer; padding: 2px; }

/* ---------- sélecteur de mots ---------- */
.tl-bat-modal { position: fixed; inset: 0; z-index: 70; background: rgba(10,8,6,.6); display: flex; align-items: flex-end; justify-content: center; padding: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.tl-eq-pick { display: flex; flex-direction: column; max-height: calc(100% - 20px); }
.tl-eq-pick h2 { margin: 0; font-size: 28px; font-weight: 400; line-height: 1; }
.tl-eq-filtres { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; flex: none; }
.tl-eq-filtres .chip { font: 400 14px var(--font); padding: 3px 8px; border: 0; cursor: pointer; white-space: nowrap; color: var(--inkc, #2B1D14); }
.tl-eq-filtres .chip.on, html.px .tl-eq-filtres .chip.on { --pxbg: #E8B640; --pxsh: #B8862A; --pxo: #4A2A08; color: var(--inkc, #2B1D14); }
.tl-eq-rows { flex: 1; min-height: 120px; overflow-y: auto; display: grid; gap: 6px; align-content: start; padding: 2px; }
.tl-eq-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; padding: 3px 8px 3px 4px; border: 0; cursor: pointer;
  background: #F8EED6; color: var(--inkc, #2B1D14); box-shadow: 0 0 0 2px #C4B08C; font-family: var(--font); }
.tl-eq-row.on { background: #F6DC86; box-shadow: 0 0 0 2px #8A5A10; }
.tl-eq-row .tl-eq-img { width: 40px; height: 40px; }
.tl-eq-row-t { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.tl-eq-row-t b { font-size: 19px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-eq-row-t small { font-size: 13px; color: var(--ink-muted, #6E5A44); font-family: var(--font-r, var(--font)); }
.tl-eq-row-r { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.tl-eq-row-r small { font-size: 14px; color: #16255E; }
.tl-eq-plus { border: 0; background: none; font: 400 17px var(--font); color: #2A4FBF; padding: 6px; cursor: pointer; }
.tl-eq-msg { min-height: 18px; margin: 4px 0 0; text-align: center; font-size: 15px; color: var(--ink-muted, #6E5A44); }
.tl-eq-msg.warn { color: #C8322E; }

/* ---------- la carte de la mer : le chantier, sur le port ---------- */
.tl-bat-port { position: absolute; left: 8px; bottom: 8px; z-index: 2; gap: 6px; min-height: 34px; padding: 0 10px; }
.tl-bat-port .tl-bat-ico { height: 18px; }

/* ---------- la mise à l'eau (plein écran, comme .tl-scene) ---------- */
.tl-bat-lance-act { position: fixed; z-index: 93; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 10px; padding: 0 12px; }
.tl-bat-lance-act .btn { flex: 1; max-width: 200px; min-height: 50px; padding: 0 8px; font-size: 17px; line-height: 1.05; }
.tl-bat-lance-act[hidden] { display: none; }
