/* Two art directions share the same camera, GPS gate and game state. */
.gate-art { display:none }
html[data-ambiance="terre-cuite"] {
  --mast:#923e2e; --mast-ink:#fff1d2; --gate-field:#f1e4ce; --gate-text:#33261e;
  --gate-panel:#f8eedb; --gate-fine:#674e3d; --gate-rule:#c9ae8b; --gate-tint:#a74732;
  --gate-button:#99422e; --gate-button-text:#fff2db; --gate-button-hover:#813522;
  --gate-object:url(assets/relief-terre.webp); --field-line:#8d5537;
  --paper:#f0e2cb; --paper-light:#fcf2df; --ground:#e4cbaa; --hair:#c9b396;
  --ink:#382b22; --soft:#6b5746; --oxide:#96412d; --river:#825039;
  --nav-active:#ecd1ac; --nav-ink:#6e2d20; --land-bg:#fff2dd; --land-ink:#382b22;
  --land-fine:#715b48; --land-line:#c9ac87; --map-edge:#a24a31;
  --tile-bed:#e5c4a0; --tile-selected:#f1d8ae; --ticket:#94412d; --ticket-ink:#fff2db;
  --pawn-main:#d38a4a; --pawn-dark:#83412c; --focus:#92402a;
}
html[data-ambiance="charbon-safran"] {
  --mast:#2c2923; --mast-ink:#ffedc5; --gate-field:#2c2923; --gate-text:#28251e;
  --gate-panel:#e6ad3e; --gate-fine:#4d3b20; --gate-rule:#89631f; --gate-tint:#e6ad3e;
  --gate-button:#2d2922; --gate-button-text:#fff0c9; --gate-button-hover:#181711;
  --gate-object:url(assets/boussole-safran.webp); --field-line:#efd394;
  --paper:#eee2c9; --paper-light:#fbefd8; --ground:#ddd1ac; --hair:#b9a784;
  --ink:#302a22; --soft:#645945; --oxide:#8d521e; --river:#795423;
  --nav-active:#edbd57; --nav-ink:#2a251e; --land-bg:#302d26; --land-ink:#fff2d6;
  --land-fine:#e1cfa7; --land-line:#72654f; --map-edge:#e4ad43;
  --tile-bed:#dec78f; --tile-selected:#efcd83; --ticket:#e8b648; --ticket-ink:#28251c;
  --pawn-main:#e5b74d; --pawn-dark:#826129; --focus:#9d621d;
}
[data-ambiance] #gps-gate {
  display:grid; place-items:center; padding:clamp(16px,4vw,52px);
  background:var(--paper); color:var(--gate-text);
}
[data-ambiance] .gate-card {
  width:min(920px,100%); display:grid; text-align:left; overflow:hidden;
  grid-template-areas:"mast mast" "art copy"; grid-template-columns:1.15fr 1fr;
  border:1px solid var(--gate-rule); background:var(--gate-panel);
}
[data-ambiance] .gate-mast {
  grid-area:mast; display:flex; align-items:center; justify-content:center;
  padding:12px 24px; background:var(--mast); isolation:isolate;
}
[data-ambiance] .gate-card .gate-logo {
  display:block; width:clamp(178px,24vw,234px); height:auto; margin:0;
  mix-blend-mode:lighten; filter:contrast(1.14);
}
[data-ambiance] .gate-art {
  grid-area:art; position:relative; display:grid; place-items:center;
  min-height:330px; overflow:hidden; background:var(--gate-field); isolation:isolate;
}
[data-ambiance] .gate-art::after {
  content:""; display:block; width:104%; aspect-ratio:1024/664;
  background:var(--gate-object) center / contain no-repeat;
}
[data-ambiance] .gate-copy {
  grid-area:copy; min-width:0; display:flex; align-items:flex-start; flex-direction:column;
  justify-content:center; padding:clamp(26px,4vw,50px); background:var(--gate-panel);
  border-left:1px solid var(--gate-rule);
}
[data-ambiance] .gate-copy h1 { margin:0; font:700 clamp(36px,4vw,55px)/1.01 var(--display); letter-spacing:0 }
[data-ambiance] .gate-copy p { margin:10px 0 25px; color:var(--gate-fine); font-size:17px; line-height:1.32 }
[data-ambiance] .gate-copy .action {
  width:100%; min-height:51px; border:0; border-radius:1px; gap:9px; font-size:17px;
  background:var(--gate-button); color:var(--gate-button-text);
}
[data-ambiance] .gate-copy .action:hover:enabled { background:var(--gate-button-hover) }
[data-ambiance] .gate-copy .action { text-decoration:none }
[data-ambiance] .gate-copy h1 { text-wrap:balance }
[data-ambiance] .gate-copy .entry-actions { display:grid; gap:4px; width:100% }
[data-ambiance] .entry-link {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px;
  min-width:0; padding:4px 0; border:0; background:transparent; color:var(--gate-fine);
  font:600 15px/1.2 var(--sans); text-decoration:underline; text-underline-offset:3px;
}
[data-ambiance] .entry-link:hover { color:var(--gate-text) }
.apk-download { display:block; width:min(180px,100%); margin:12px auto 0; border-radius:10px }
.apk-download img { display:block; width:100%; height:auto }
[data-ambiance] .gate-copy .entry-status {
  margin:12px 0 0; padding-left:10px; border-left:2px solid var(--gate-button);
  font-size:15px; line-height:1.35;
}
[data-ambiance] .account-session {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  column-gap:12px; width:100%; margin-top:17px; padding-top:5px;
  border-top:1px solid var(--gate-rule); color:var(--gate-fine); font-size:14px;
}
.account-session span { overflow-wrap:anywhere; min-width:0 }
[data-ambiance] .gate-copy .command-card {
  margin:-5px 0 18px; width:100%; display:flex; align-items:center; gap:12px;
}
.command-crest { flex:none; width:45px }
.command-crest svg { display:block; width:100%; height:49px }
.command-card strong,.command-card small { display:block; overflow-wrap:anywhere }
.command-card strong { font:600 19px/1.25 var(--sans) }
.command-card small { color:var(--gate-fine); margin-top:2px }
#back-to-account { align-self:center; margin-top:3px }
.account-exit { display:inline-flex; align-items:center; min-height:44px; margin-top:3px; color:var(--ink); text-underline-offset:3px }
[data-ambiance="charbon-safran"] .gate-copy h1 {
  font:700 clamp(38px,4.6vw,57px)/.97 var(--narrow); text-transform:uppercase; letter-spacing:.012em;
}
[data-ambiance="charbon-safran"] .gate-copy .action { font:600 19px/1.05 var(--narrow); letter-spacing:.025em }
[data-ambiance] .topbar { background:var(--mast); color:var(--mast-ink); border-bottom-color:var(--map-edge) }
[data-ambiance] .brand { isolation:isolate; background:var(--mast) }
[data-ambiance] .brand img { mix-blend-mode:lighten; filter:contrast(1.14) }
[data-ambiance] .currency em,[data-ambiance] .topbar .tiny { color:var(--mast-ink) }
[data-ambiance] .currency,[data-ambiance] .profile-button { border-color:#ddbd8d66 }
[data-ambiance] .dock { background:var(--paper-light); border-top-color:var(--land-line) }
[data-ambiance] .dock-items>button.active { background:var(--nav-active); color:var(--nav-ink) }
[data-ambiance] .dock-items>button.active::after { border-color:var(--map-edge) }
[data-ambiance] .territory { border:1px solid var(--land-line); border-top:3px solid var(--map-edge); background:var(--land-bg); color:var(--land-ink) }
[data-ambiance] .territory :is(.owner,.land-extra,.land-numbers,.fold,.button-plain) { color:var(--land-fine) }
[data-ambiance] .land-numbers { border-color:var(--land-line) }
[data-ambiance] .land-numbers b { color:var(--land-ink) }
[data-ambiance] .action { color:var(--ticket-ink); background:var(--ticket); border-color:var(--ticket) }
[data-ambiance] .action:hover:enabled { filter:brightness(.94); background:var(--ticket) }
[data-ambiance] .action-price { border-color:currentColor }
[data-ambiance] .mode-button.live,[data-ambiance] .region-line { color:var(--soft) }
[data-ambiance] .sector-heading { border-left-color:var(--map-edge) }
[data-ambiance] .model-stage,[data-ambiance] .palace-print { background:var(--tile-bed); border-color:var(--hair) }
[data-ambiance] .model-shelf button[aria-pressed=true] { background:var(--tile-selected); color:var(--ink); border-color:var(--map-edge) }
[data-ambiance] .map-piece.grouped .piece-count { background:var(--paper-light); color:var(--ink) }
[data-ambiance] .pawn-foot { background:var(--paper-light); border-color:var(--pawn-dark) }
[data-ambiance] .pawn-drawing [fill="#779dae"] { fill:var(--pawn-main) }
[data-ambiance] .pawn-drawing [fill="#40657b"] { fill:var(--pawn-dark) }
[data-ambiance] #needle path:last-child { fill:#504535 }
[data-ambiance] :focus-visible { outline-color:var(--focus) }
@media(max-width:700px) {
  [data-ambiance] #gps-gate { display:block; padding:0 }
  [data-ambiance] .gate-card {
    border:0; width:100%; min-height:100vh; min-height:100dvh;
    grid-template-areas:"mast" "art" "copy"; grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(190px,1fr) auto;
  }
  [data-ambiance] .gate-mast {
    padding:calc(clamp(10px,2.1dvh,22px) + env(safe-area-inset-top)) max(18px,env(safe-area-inset-left)) clamp(11px,2.1dvh,22px);
  }
  [data-ambiance] .gate-card .gate-logo { width:min(61%,255px) }
  [data-ambiance] .gate-art { min-height:0 }
  [data-ambiance] .gate-art::after { width:min(109%,590px); max-height:46dvh }
  [data-ambiance] .gate-copy {
    padding:clamp(20px,3.8dvh,36px) max(24px,env(safe-area-inset-right)) calc(clamp(23px,4.8dvh,45px) + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
    border-left:0; border-top:1px solid var(--gate-rule);
  }
  [data-ambiance] .gate-copy h1 { font-size:clamp(38px,10.8vw,52px) }
  [data-ambiance] .gate-copy p { margin:8px 0 21px; font-size:16px }
  [data-ambiance="charbon-safran"] .gate-copy h1 { font-size:clamp(41px,11.6vw,56px) }
  [data-ambiance="charbon-safran"] .gate-copy { border-top:4px solid #a47731 }
}
@media(max-width:700px) and (max-height:620px) {
  [data-ambiance] .gate-card { grid-template-rows:auto minmax(116px,1fr) auto }
  [data-ambiance] .gate-mast { padding-block:8px }
  [data-ambiance] .gate-card .gate-logo { width:156px }
  [data-ambiance] .gate-copy { padding-block:16px }
}

.icon.pictogram { object-fit:contain; vertical-align:middle; flex-shrink:0 }
.herald-tile img { width:100%; height:100%; object-fit:contain }
[data-ambiance] .model-stage,[data-ambiance] .palace-print {
 background:radial-gradient(ellipse at 50% 70%,#fff5d8 0%,var(--tile-bed) 73%);
 box-shadow:inset 0 1px #fff3d4,inset 0 -1px #a88755;
}
[data-ambiance] .model-shelf button[aria-pressed="true"] { box-shadow:inset 0 -3px #ab7733 }

.action,.button-secondary,.button-plain,[data-ambiance] .gate-copy .action { font-family:var(--sans) }
.dock-items>button { font-family:var(--sans); font-size:clamp(10px,2.8vw,14px) }
[data-ambiance] .gate-art {background:#201f1d url(assets/campaign-map.webp) center/cover no-repeat}
[data-ambiance] .gate-art::after {display:none}
#welcome-pawn {position:absolute;width:clamp(78px,32%,200px);left:50%;top:63%;transform:translate(-50%,-94%);filter:drop-shadow(3px 4px 2px #30291e80)}
[data-ambiance] .gate-mast {position:relative;background:#211f1d}
#welcome-switch {position:absolute;right:14px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;font-size:26px;text-decoration:none;color:#f6e8cd}
#welcome-switch[hidden],#welcome-pawn[hidden]{display:none}
#gps-gate.welcome-return .gate-copy {align-items:center;text-align:center;background:#211f1d;color:#fff0d6;border:0}
.welcome-return #account-copy,.welcome-return #command-name {display:none}
#gps-gate.welcome-return #account-title {text-transform:none;overflow-wrap:anywhere;max-width:100%;margin-bottom:14px}
#gps-gate.welcome-return .command-card {justify-content:center;width:100%;margin:0 0 20px;gap:6px}
.welcome-return .command-crest {width:24px}.welcome-return .command-crest svg {height:29px}
.welcome-return #command-detail,.welcome-return #command-detail>span {display:flex;align-items:center;gap:5px;color:#eddfc6}
.welcome-return #command-detail {flex-wrap:wrap;justify-content:center;gap:12px}
.welcome-return #command-detail .icon {width:21px;height:21px}
#gps-gate.welcome-return #account-action {background:#edb347;color:#241e15;border:0;border-radius:6px}
#gps-gate.welcome-return .entry-status {color:#f3d9aa}
[data-ambiance] .gate-card .gate-logo {width:clamp(142px,43vw,205px);height:auto}
