/* Cardfarer: Manga-Druck. Papier, Tusche, zwei Schmuckfarben. Farbe gehört den Karten. */
:root {
  --ink: #111114;
  --paper: #f4efe3;
  --paper-2: #fffcf3;
  --red: #e2231a;
  --gold: #f7c520;
  --sea: #0b5bd3;
  --sea-deep: #062f7c;
  --muted: #625d52;
  --line: 3px solid var(--ink);
  --top-h: 68px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --display: "Dela Gothic One", "Zen Kaku Gothic New", system-ui, sans-serif;
  --body: "Zen Kaku Gothic New", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 500 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 90; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.kicker { font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Kopfzeile */
.top {
  height: var(--top-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: stretch;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  border-bottom: var(--line);
  background: var(--paper-2);
  position: sticky;
  top: 0;
  z-index: 40;
}
.logo { display: flex; flex-direction: column; justify-content: center; padding: 0 22px; text-decoration: none; border-right: var(--line); }
.logo-jp { font: 700 10px/1 var(--body); letter-spacing: .28em; color: var(--muted); margin-bottom: 4px; }
.logo-word { font: 400 25px/1 var(--display); letter-spacing: -.01em; }
.logo-word em { font-style: normal; color: var(--red); }
.brand { display: flex; align-items: stretch; min-width: 0; }
.site-switch { display: flex; align-items: center; flex: none; padding: 0 12px; border-right: var(--line); }
.site-switch a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 2px solid var(--ink); background: var(--paper-2); font-weight: 900; font-size: 13px; text-decoration: none; white-space: nowrap; transition: background .12s; }
.site-switch a + a { margin-left: -2px; }
.site-switch a:hover { background: var(--gold); }
.site-switch a[aria-current] { background: var(--ink); color: var(--paper-2); }
.switch-logo { width: 16px; height: 16px; flex: none; }
.switch-mark { width: 24px; height: 7px; flex: none; fill: currentColor; }
.switch-mark .ring { fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  border-right: 1.5px solid var(--ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  transition: background .12s;
}
.nav a small { font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.nav a:hover { background: var(--gold); }
.nav a.active { background: var(--ink); color: var(--paper-2); }
.nav a.active small { color: var(--gold); }
.top-tools { display: flex; align-items: stretch; padding-right: 30px; }
.lang-switch { display: flex; align-items: center; padding: 0 12px; }
.lang-switch button { width: 32px; height: 28px; padding: 0; border: 2px solid var(--ink); background: var(--paper-2); font: 500 11.5px/1 var(--mono); }
.lang-switch button + button { margin-left: -2px; }
.lang-switch button:hover { background: var(--gold); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper-2); }
.account-btn { display: flex; align-items: center; gap: 7px; max-width: 170px; padding: 0 14px; border: 0; border-left: 1.5px solid var(--ink); background: none; font-weight: 900; font-size: 14px; white-space: nowrap; transition: background .12s; }
.account-btn span { overflow: hidden; text-overflow: ellipsis; }
.account-btn:hover { background: var(--gold); }
.sync-dot { display: none; flex: none; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; }
.account-btn[data-state="saved"] .sync-dot { display: block; background: #148a4b; }
.account-btn[data-state="saving"] .sync-dot { display: block; background: var(--gold); animation: sync-pulse 1s ease-in-out infinite; }
.account-btn[data-state="offline"] .sync-dot,
.account-btn[data-state="expired"] .sync-dot { display: block; background: var(--red); }
@keyframes sync-pulse { 50% { opacity: .35; } }
.bounty {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 0 22px 0 46px;
  background: var(--ink);
  color: var(--gold);
  text-decoration: none;
  clip-path: polygon(26px 0, 100% 0, 100% 100%, 0 100%);
  margin-left: -26px;
  min-width: 280px;
}
.bounty-rank { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--paper); }
.bounty-val { font: 400 25px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bounty-val i { font: 900 23px/1 var(--body); margin-right: 6px; }
.bounty.bump .bounty-val { animation: bump .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.09); color: #fff; } 100% { transform: scale(1); } }

#view { flex: 1; min-height: 0; outline: none; }
/* Geräte mit Aussparung, etwa das iPhone Duo: Flächen laufen bis zum Rand, Inhalt bleibt frei. Das Meer der Seekarte füllt den Rand ganz. */
body:not([data-view="karte"]) #view { padding-left: var(--safe-l); padding-right: var(--safe-r); }
#view.turn { animation: page-turn .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes page-turn {
  from { opacity: 0; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
  to { opacity: 1; clip-path: polygon(-20% 0, 100% 0, 100% 100%, -20% 100%); }
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 18px;
  padding: 7px calc(18px + var(--safe-r)) calc(7px + var(--safe-b)) calc(18px + var(--safe-l));
  border-top: var(--line);
  background: var(--paper-2);
  font-size: 11.5px;
  color: var(--muted);
}

/* Knöpfe */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  background: var(--paper-2);
  border: var(--line);
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, background .12s;
}
.btn:hover { background: var(--gold); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--ink); color: var(--gold); }
.btn-wide { width: 100%; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; font-weight: 700; }
.link:hover { color: var(--red); }

/* Seekarte */
.chart-page {
  height: calc(100dvh - var(--top-h) - 34px);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
}
.sea-frame {
  position: relative;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 34px) 100%, 0 100%);
  margin-right: -34px;
  z-index: 1;
  min-width: 0;
}
.sea {
  position: absolute;
  inset: 0 3px 0 0;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, calc(100% - 34px) 100%, 0 100%);
  background: radial-gradient(120% 95% at 30% 15%, #1b72ea 0%, var(--sea) 46%, var(--sea-deep) 100%);
}
.sea::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(2, 16, 66, .6) 0 1.7px, transparent 2px) 0 0 / 9px 9px;
  -webkit-mask-image: linear-gradient(155deg, transparent 12%, #000 92%);
  mask-image: linear-gradient(155deg, transparent 12%, #000 92%);
}
#chart { position: absolute; inset: 8px 44px 8px 8px; width: calc(100% - 52px); height: calc(100% - 16px); overflow: visible; }
.cartouche {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 6px 12px 7px;
  background: var(--paper-2);
  border: var(--line);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1.4deg);
}
.cartouche span { grid-row: span 2; font: 400 24px/1 var(--display); color: var(--red); }
.cartouche b { font: 400 15px/1.1 var(--display); }
.cartouche small { font: 400 10px/1.2 var(--mono); color: var(--muted); }
.sea-vertical {
  position: absolute;
  top: 18px;
  right: 22px;
  writing-mode: vertical-rl;
  font: 400 15px/1 var(--display);
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .34);
  pointer-events: none;
}

.graticule path { stroke: rgba(255, 255, 255, .1); stroke-width: 1; fill: none; }
.waves path { stroke: rgba(255, 255, 255, .34); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.rose circle { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 2; }
.rose .rose-thin { stroke-width: 1; stroke-dasharray: 2 4; }
.rose-a { fill: #fff; }
.rose-b { fill: var(--ink); stroke: #fff; stroke-width: .6; }
.rose-minor { opacity: .75; }
.rose text { fill: #fff; text-anchor: middle; font: 400 16px var(--display); }
.rose .rose-note { font: italic 500 13px var(--body); fill: rgba(255, 255, 255, .78); }
.band-title rect { fill: var(--ink); }
.band-title text { fill: var(--gold); font: 500 12px var(--mono); letter-spacing: .1em; }
.route { fill: none; stroke: rgba(255, 255, 255, .72); stroke-width: 2.6; stroke-dasharray: 3 9; stroke-linecap: round; }
.route-done-casing { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.route-done { fill: none; stroke: var(--gold); stroke-width: 3.6; stroke-linecap: round; }

.isle { cursor: pointer; outline: none; }
.isle:focus-visible .land-edge { stroke: var(--gold); stroke-width: 5; }
.ring { fill: none; stroke: rgba(255, 255, 255, .34); stroke-width: 1.3; }
.ring-0 { fill: rgba(120, 190, 255, .24); stroke: rgba(255, 255, 255, .58); }
.ring-1 { stroke: rgba(255, 255, 255, .26); }
.ring-2 { stroke: rgba(255, 255, 255, .15); }
.land-shadow { fill: var(--ink); }
.land-unknown { fill: url(#none); fill: #dfe4ea; }
.land-known { fill: var(--paper-2); transition: fill .4s; }
.is-done .land-known { fill: var(--gold); }
.land-edge { fill: none; stroke: var(--ink); stroke-width: 3; transition: stroke-width .12s; }
.isle:hover .land-edge { stroke-width: 4.5; }
.land-marks path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.isle-mini .land-edge { stroke-width: 2.4; }
.isle-mini .land-marks path { stroke-width: 1.5; }
.isle-mini.is-fog .land-unknown { fill: rgba(255, 255, 255, .14); }
.isle-mini.is-fog .land-shadow { display: none; }
.isle-mini.is-fog .land-edge { stroke: rgba(255, 255, 255, .7); stroke-width: 1.6; stroke-dasharray: 3 4; }
.isle-mini.is-fog .ring { display: none; }
.mini-code { fill: #fff; text-anchor: middle; font: 500 11px var(--mono); }
.is-done .mini-code { fill: var(--gold); }

.cloud { pointer-events: none; transition: opacity .9s ease, transform .9s ease; }
.isle:not(.is-fog) .cloud { opacity: 0; transform: scale(1.5); }
.cloud-drift { animation: drift 9s ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes drift { from { transform: translateX(-4px); } to { transform: translateX(6px); } }
.cloud-ink circle { fill: #fff; stroke: var(--ink); stroke-width: 6; }
.cloud-fill circle { fill: #fff; }
.cloud-curl path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.isle.is-fog:hover .cloud-fill circle { fill: var(--gold); }
.isle.is-fog:hover .cloud-ink circle { fill: var(--gold); }

.flag { opacity: 0; transition: opacity .4s .3s; pointer-events: none; }
.is-done .flag { opacity: 1; }
.flag-pole { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.flag-cloth { fill: var(--red); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.is-master .flag-cloth { fill: var(--paper-2); }

.tag rect { fill: var(--ink); }
.tag text { fill: #fff; font: 400 13px var(--display); }
.tag-pct rect { fill: var(--paper-2); stroke: var(--ink); stroke-width: 2; }
.tag-pct text { fill: var(--ink); font: 500 13px var(--mono); }
.is-done .tag-pct rect { fill: var(--gold); }
.isle-name {
  fill: #fff;
  text-anchor: middle;
  font: 700 12.5px var(--body);
  paint-order: stroke;
  stroke: rgba(4, 28, 92, .92);
  stroke-width: 3.4px;
  stroke-linejoin: round;
}
.target-ring { opacity: 0; pointer-events: none; transition: opacity .3s; }
.target-ring.on { opacity: 1; }
.target-ring circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-dasharray: 10 8;
  animation: ring-spin 7s linear infinite;
}
@keyframes ring-spin { to { stroke-dashoffset: -180; } }
.ship { transition: transform 1.2s cubic-bezier(.3, .9, .3, 1); pointer-events: none; }
.ship-bob { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(-2px) rotate(-3deg); } 50% { transform: translateY(2px) rotate(3deg); } }
.ship-hull { fill: var(--ink); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.ship-mast { stroke: var(--ink); stroke-width: 2.6; }
.ship-sail { fill: #fff; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.ship-sail-2 { fill: var(--red); }

.map-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 236px;
  padding: 9px 12px;
  background: var(--paper-2);
  border: var(--line);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 13px;
  pointer-events: none;
}
.map-tip b { font-weight: 900; font-size: 14px; }
.tip-cost { margin-top: 3px; font: 500 12.5px var(--mono); color: var(--red); }

/* Logbuch */
.log { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 14px 34px; overflow-y: auto; background: var(--paper); }
.log-rank h2 { font: 400 26px/1.15 var(--display); margin: 2px 0 8px; }
.rank-bar { height: 12px; border: var(--line); background: var(--paper-2); }
.rank-bar i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(115deg, var(--red) 0 8px, #b5150e 8px 12px);
  transition: width .9s cubic-bezier(.3, .9, .3, 1);
}
.rank-next { margin-top: 6px; font-size: 13.5px; }
.log-compass { display: grid; grid-template-columns: 112px 1fr; gap: 10px 14px; align-items: center; padding-top: 14px; border-top: var(--line); }
.compass { position: relative; width: 112px; height: 112px; }
.compass svg { width: 100%; height: 100%; display: block; }
.dial-outer { fill: var(--paper-2); stroke: var(--ink); stroke-width: 3; }
.dial-inner { fill: none; stroke: var(--ink); stroke-width: 1; }
.dial-tick { stroke: var(--ink); stroke-width: 1.2; }
.compass text { text-anchor: middle; dominant-baseline: middle; fill: var(--ink); }
.dial-n { font: 400 12px var(--display); fill: var(--red) !important; }
.dial-s { font: 500 9px var(--mono); }
.needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transition: transform 1s cubic-bezier(.3, 1.7, .5, 1);
}
.needle i, .needle b { position: absolute; left: -7px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; }
.needle i { bottom: 0; border-bottom: 42px solid var(--red); }
.needle b { top: 0; border-top: 30px solid var(--ink); }
.needle-cap { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--gold); border: 2.5px solid var(--ink); }
.compass-copy h3 { font: 400 17px/1.2 var(--display); margin: 3px 0 5px; }
.compass-copy h3 span { color: var(--red); }
.compass-copy p:last-child { font-size: 13.5px; line-height: 1.35; }
.log-compass .btn { grid-column: 1 / -1; }
.log-goals ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.goal {
  width: 100%;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 9px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  text-align: left;
  font-size: 13px;
  transition: background .12s, transform .12s;
}
.goal:hover { background: var(--gold); transform: translateX(-3px); }
.goal-code { font: 400 12.5px var(--display); }
.goal-cost { font: 500 12.5px var(--mono); white-space: nowrap; }
.goal-loot { background: var(--ink); color: var(--paper-2); }
.goal-loot .goal-code { color: var(--gold); font-size: 11.5px; }
.goal-loot:hover { color: var(--ink); }
.goal-loot:hover .goal-code { color: var(--ink); }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border: var(--line); background: var(--paper-2); }
.tally div { padding: 7px 9px; border-right: 2px solid var(--ink); min-width: 0; }
.tally div:last-child { border-right: 0; }
.tally dt { font: 400 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tally dd { margin: 0; font: 400 17px/1.25 var(--display); white-space: nowrap; }
.tally dd small { font-size: 11px; color: var(--muted); }
.tally-light { grid-template-columns: repeat(2, 1fr); margin: 10px 0; }
.demo-note { font-size: 12.5px; line-height: 1.4; padding-top: 2px; }

/* Einstieg */
.intro {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px 60px 24px 24px;
  background: rgba(4, 22, 70, .46);
  transition: opacity .25s;
}
.intro.leaving { opacity: 0; }
.intro-card {
  position: relative;
  max-width: 560px;
  padding: 30px 32px 24px;
  background: var(--paper-2);
  border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(-.6deg);
  animation: intro-in .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes intro-in { from { opacity: 0; transform: rotate(-3deg) scale(.92); } }
.intro-jp {
  position: absolute;
  top: -30px;
  right: 14px;
  font: 400 50px/1 var(--display);
  color: var(--red);
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  transform: rotate(5deg);
}
.intro-card h1 { font: 400 clamp(32px, 4.2vw, 46px)/1.06 var(--display); margin-bottom: 12px; text-wrap: balance; }
.intro-card > p:not(.intro-jp) { font-size: 16.5px; margin-bottom: 18px; text-wrap: pretty; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.intro-card small { display: block; color: var(--muted); font-size: 12.5px; }
.intro-account { display: block; margin-top: 8px; font-size: 14px; }

/* Binder */
.binder { padding: 0 0 40px; }
.rail { display: flex; gap: 4px; padding: 10px 18px; overflow-x: auto; border-bottom: var(--line); background: var(--paper-2); scrollbar-width: thin; }
.rail-pill {
  position: relative;
  flex: none;
  padding: 3px 9px;
  border: 2px solid var(--ink);
  font: 500 12px/1.3 var(--mono);
  text-decoration: none;
  background: linear-gradient(90deg, rgba(247, 197, 32, .75) var(--p, 0%), transparent var(--p, 0%));
}
.rail-pill:hover { border-color: var(--red); }
.rail-pill.done { background: var(--gold); font-weight: 500; }
.rail-pill.active { background: var(--ink); color: var(--paper-2); }
.rail-st { font-size: 11px; padding: 3px 6px; }
.rail-all { position: sticky; left: 0; z-index: 2; background: var(--paper-2); font-weight: 500; white-space: nowrap; box-shadow: 6px 0 0 var(--paper-2); }
.b-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 26px;
  align-items: end;
  padding: 20px 18px 16px;
  border-bottom: var(--line);
}
.b-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.b-code { font: 400 clamp(34px, 5vw, 58px)/1 var(--display); color: var(--red); }
.b-title h1 { font: 900 clamp(20px, 2.4vw, 30px)/1.15 var(--body); text-wrap: balance; }
.b-progress { position: relative; grid-column: 1; height: 22px; border: var(--line); background: var(--paper-2); }
.b-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: repeating-linear-gradient(115deg, var(--gold) 0 10px, #eeb70d 10px 15px);
  transition: width .5s cubic-bezier(.3, .9, .3, 1);
}
.b-progress span { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font: 500 12.5px var(--mono); }
.b-facts { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; align-items: stretch; justify-content: flex-end; gap: 0; margin: 0; }
.b-facts > div { padding: 2px 16px; border-left: 2px solid var(--ink); }
.b-facts dt { font: 400 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.b-facts dd { margin: 0; font: 400 20px/1.3 var(--display); white-space: nowrap; }
.b-facts dd small { font-size: 12px; color: var(--muted); }
.b-cta { display: flex; align-items: center; border-left: 0 !important; padding-right: 3px !important; }
.b-complete { font: 400 15px var(--display); background: var(--gold); border: var(--line); padding: 8px 14px; }

.filters { display: grid; gap: 8px; padding: 12px 18px; border-bottom: 1.5px solid var(--ink); }
.f-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.f-more summary { width: fit-content; cursor: pointer; font-size: 13px; font-weight: 900; }
.f-active { display: inline-block; min-width: 18px; padding: 0 5px; background: var(--red); color: #fff; font: 500 11.5px/18px var(--mono); text-align: center; }
.f-rows { display: grid; gap: 8px; margin-top: 8px; }
.f-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.f-label { font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.f-group { display: inline-flex; align-items: center; }
.f-group-wrap { flex-wrap: wrap; gap: 4px; }
.f-group-wrap .f-chip { margin-left: 0; }
.f-result { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; padding: 10px 18px 0; font-size: 14px; }
.f-result b { font: 400 16px var(--display); }
.f-result .link { margin-left: 8px; font-size: 13px; }
.f-result .b-hint { padding: 0; }
.f-chip {
  min-height: 34px;
  padding: 3px 11px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  margin-left: -2px;
  font-size: 13px;
  font-weight: 700;
}
.f-group .f-chip:first-child { margin-left: 0; }
.f-chip:hover { background: var(--gold); }
.f-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper-2); }
.f-chip-sm { padding: 3px 8px; font: 500 12px var(--mono); }
.f-colors { gap: 5px; }
.f-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); background: var(--c); padding: 0; transition: transform .1s; }
.f-dot:hover { transform: scale(1.14); }
.f-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 5px var(--ink); }
.f-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.f-sort select { min-height: 34px; border: 2px solid var(--ink); background: var(--paper-2); padding: 2px 6px; }
.f-search { flex: 1 1 200px; }
.f-search input { width: 100%; min-height: 36px; padding: 4px 10px; border: 2px solid var(--ink); background: var(--paper-2); }
.b-hint { padding: 10px 18px 0; font-size: 13px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 18px 14px; padding: 14px 18px; }
.grid-end { min-height: 24px; text-align: center; font: 400 12px var(--mono); color: var(--muted); }
.tile { position: relative; min-width: 0; perspective: 800px; }
.t-hit { display: block; width: 100%; padding: 0; border: 0; background: none; }
.card3d {
  position: relative;
  display: block;
  aspect-ratio: 600 / 838;
  border-radius: 4.6% / 3.3%;
  overflow: hidden;
  background: #e4decf;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .16s ease-out, box-shadow .2s;
  transform-style: preserve-3d;
}
.card3d img { width: 100%; height: 100%; object-fit: cover; transition: filter .5s ease, opacity .5s ease; }
.tile:not(.owned) .card3d { background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(17, 17, 20, .35); }
.tile:not(.owned) .card3d img { filter: grayscale(1) contrast(1.22) brightness(1.1); opacity: .5; mix-blend-mode: multiply; }
.tile:not(.owned):hover .card3d img { opacity: .82; }
.tile:not(.owned) .card3d::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(17, 17, 20, .22) 0 .9px, transparent 1.2px) 0 0 / 5px 5px;
  pointer-events: none;
}
.tile.owned .card3d { box-shadow: 3px 4px 0 var(--ink); }
.tile.owned:hover .card3d { box-shadow: 6px 9px 0 rgba(17, 17, 20, .85); }
.t-fallback { display: none; position: absolute; inset: 0; padding: 10px; font-size: 12px; font-weight: 700; flex-direction: column; justify-content: center; text-align: center; gap: 4px; }
.t-fallback b { font: 500 11px var(--mono); }
.noimg .t-fallback { display: flex; }
.noimg .card3d img { display: none; }

.foil, .glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.foil {
  mix-blend-mode: color-dodge;
  background: repeating-linear-gradient(115deg, #ff0040 0%, #ffd000 7%, #37ff8b 14%, #00c8ff 21%, #b84dff 28%, #ff0040 35%);
  background-size: 260% 260%;
  background-position: var(--mx, 50%) var(--my, 50%);
  filter: brightness(.62) saturate(1.25);
}
.glare {
  mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .9), transparent 52%);
}
.tile.owned:hover .glare, .detail-card.owned:hover .glare { opacity: 1; }
.tile.owned.foil-on:hover .foil, .detail-card.owned.foil-on:hover .foil { opacity: .58; }

.t-count { position: absolute; top: -7px; right: -5px; z-index: 2; font: 400 14px/1 var(--display); color: #fff; background: var(--red); border: 2px solid var(--ink); padding: 3px 6px; pointer-events: none; }
.t-count:empty { display: none; }
.t-minus, .t-zoom {
  position: absolute;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transition: opacity .12s, background .12s;
}
.t-minus { top: 6px; left: 6px; }
.t-zoom { top: 42px; left: 6px; }
.t-minus:hover, .t-zoom:hover { background: var(--gold); }
.tile:hover .t-zoom, .tile:focus-within .t-zoom { opacity: 1; }
.tile.owned:hover .t-minus, .tile.owned:focus-within .t-minus { opacity: 1; }
.tile:not(.owned) .t-minus { display: none; }
.tile:not(.owned) .t-zoom { top: 6px; }
@media (hover: none) {
  .t-zoom, .tile.owned .t-minus { opacity: 1; }
}
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; margin-top: 7px; font: 400 11.5px/1.2 var(--mono); }
.t-code { white-space: nowrap; }
.t-rar { padding: 1px 4px; background: var(--ink); color: var(--paper-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-rar-var { background: var(--red); }
.t-price { margin-left: auto; white-space: nowrap; font-weight: 500; }
.tile:not(.owned) .t-code, .tile:not(.owned) .t-price { color: var(--muted); }

.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; }
.empty p[lang] { font: 400 40px var(--display); color: var(--red); }
.empty h2 { font: 400 24px var(--display); margin: 6px 0; }

/* Treffer-Effekte */
.burst {
  position: fixed;
  z-index: 70;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: burst-out .85s ease-out forwards;
}
.burst-lines {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(var(--ink) 0 3deg, transparent 3deg 17deg);
  -webkit-mask-image: radial-gradient(circle, transparent 42%, #000 44%, transparent 70%);
  mask-image: radial-gradient(circle, transparent 42%, #000 44%, transparent 70%);
  animation: burst-lines .5s ease-out forwards;
}
.burst b {
  position: relative;
  font: 400 34px/1 var(--display);
  color: var(--red);
  -webkit-text-stroke: 6px #fff;
  paint-order: stroke fill;
  transform: rotate(-7deg);
  white-space: nowrap;
}
.burst span {
  position: absolute;
  top: 66%;
  font: 500 13px var(--mono);
  background: var(--ink);
  color: var(--gold);
  padding: 2px 6px;
  white-space: nowrap;
}
@keyframes burst-out {
  0% { transform: scale(.35); opacity: 0; }
  18% { transform: scale(1.12); opacity: 1; }
  32% { transform: scale(1); }
  72% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}
@keyframes burst-lines { from { transform: scale(.6) rotate(0); } to { transform: scale(1.15) rotate(10deg); opacity: 0; } }

.takeover {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 70px);
  flex-wrap: wrap;
  padding: 24px;
  background: var(--paper-2);
  overflow: hidden;
  cursor: pointer;
  animation: takeover-in .18s ease-out;
}
.takeover.leaving { opacity: 0; transition: opacity .2s; }
@keyframes takeover-in { from { opacity: 0; } }
.takeover-lines {
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(var(--ink) 0 2.4deg, transparent 2.4deg 9deg);
  -webkit-mask-image: radial-gradient(circle, transparent 26%, #000 66%);
  mask-image: radial-gradient(circle, transparent 26%, #000 66%);
  animation: lines-spin 14s linear infinite;
}
@keyframes lines-spin { to { transform: rotate(360deg); } }
.takeover-card {
  position: relative;
  height: min(70vh, 620px);
  aspect-ratio: 600 / 838;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 10px 12px 0 var(--ink);
  animation: card-slam .5s cubic-bezier(.2, 1.5, .4, 1);
}
.takeover-card img { width: 100%; height: 100%; object-fit: cover; }
.takeover-card .foil { opacity: .4; animation: foil-sweep 2.4s linear infinite; }
@keyframes foil-sweep { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes card-slam { from { transform: scale(2.1) rotate(-12deg); opacity: 0; } 60% { opacity: 1; } }
.takeover-copy {
  position: relative;
  max-width: 460px;
  padding: 16px 20px;
  background: var(--paper-2);
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(-1.5deg);
  animation: copy-pop .4s .12s cubic-bezier(.2, 1.6, .4, 1) backwards;
}
@keyframes copy-pop { from { transform: scale(.5) rotate(6deg); opacity: 0; } }
.takeover-copy b { display: block; font: 400 clamp(52px, 8vw, 96px)/1 var(--display); color: var(--red); }
.takeover-copy h2 { font: 400 clamp(22px, 3vw, 32px)/1.15 var(--display); margin: 6px 0; }
.takeover-copy p { font-size: 16px; font-weight: 700; }
.takeover-island { text-align: center; max-width: 620px; }
.takeover small { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper-2); padding: 3px 10px; font-size: 12px; }

/* Dialoge */
.sheet {
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  padding: 0;
  max-height: 88dvh;
  overflow: auto;
}
.sheet::backdrop { background: rgba(10, 12, 26, .62); }
.sheet-close {
  position: sticky;
  float: right;
  top: 10px;
  margin: 10px 10px 0 0;
  width: 36px;
  height: 36px;
  z-index: 3;
  background: var(--paper-2);
  border: var(--line);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
}
.sheet-close:hover { background: var(--gold); }
.sheet-note { font-size: 13px; color: var(--muted); }
.sheet-detail[open] { display: grid; grid-template-columns: minmax(240px, 370px) minmax(0, 1fr); width: min(900px, 94vw); }
.sheet-detail .sheet-close { position: absolute; top: 0; right: 0; float: none; }
.detail-card { padding: 22px; perspective: 900px; background: var(--paper); border-right: var(--line); }
.detail-card .card3d { box-shadow: 5px 7px 0 var(--ink); }
.detail-card:not(.owned) .card3d img { filter: grayscale(1) contrast(1.2) brightness(1.08); }
.detail-info { padding: 24px 26px; min-width: 0; }
.detail-info h2 { font: 400 clamp(23px, 3vw, 30px)/1.15 var(--display); margin: 4px 44px 2px 0; }
.detail-variant { font-weight: 900; color: var(--red); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 14px 0; }
.facts dt { font: 400 11px var(--mono); text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 900; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.detail-info h3 { font-size: 14px; font-weight: 900; margin: 18px 0 8px; display: flex; justify-content: space-between; }
.detail-info h3 span { font: 400 12px var(--mono); color: var(--muted); }
.print-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.print { flex: none; width: 74px; padding: 0; border: 0; background: none; font: 400 10.5px var(--mono); }
.print img { width: 100%; aspect-ratio: 600 / 838; object-fit: cover; border-radius: 4px; background: #e4decf; filter: grayscale(1) opacity(.55); margin-bottom: 3px; }
.print.owned img { filter: none; }
.print.current img { outline: 3px solid var(--red); outline-offset: 1px; }

.sheet-list[open] { display: flex; flex-direction: column; width: min(560px, 94vw); overflow: hidden; }
.sheet-list .sheet-close { position: absolute; right: 0; top: 0; }
.sheet-list header { padding: 20px 56px 12px 22px; border-bottom: var(--line); }
.sheet-list h2 { font: 400 22px/1.2 var(--display); margin: 2px 0 4px; }
.buy-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 120px; }
.buy-list li { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 7px 22px; border-bottom: 1px solid rgba(17, 17, 20, .18); }
.buy-list img { width: 38px; aspect-ratio: 600 / 838; object-fit: cover; border-radius: 3px; background: #e4decf; }
.buy-name { min-width: 0; display: flex; flex-direction: column; }
.buy-name b { font-weight: 900; }
.buy-name small { font: 400 11px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-price { font: 500 13px var(--mono); white-space: nowrap; }
.sheet-list footer { padding: 12px 22px 14px; border-top: var(--line); }
.buy-sum { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; }
.buy-sum b { font: 400 24px var(--display); color: var(--red); }

.sheet-account[open] { display: block; width: min(460px, 94vw); }
.sheet-account .sheet-close { position: absolute; top: 0; right: 0; float: none; }
.account-body { padding: 24px 26px 22px; }
.account-body h2 { font: 400 26px/1.15 var(--display); margin: 2px 44px 6px 0; overflow-wrap: anywhere; }
.account-body .field { margin-bottom: 4px; }
.account-hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.account-warning { margin: 12px 0; padding: 8px 10px; border: 2px solid var(--ink); background: var(--gold); font-size: 13px; font-weight: 700; }
.account-body form .sheet-note { margin: 10px 0; }
.account-body .t-error { margin-top: 10px; }
.account-switch { margin-top: 14px; font-size: 14px; }
.sync-line { font-weight: 700; }
.sync-line[data-state="saved"] { color: #0f6e3b; }
.sync-line[data-state="offline"], .sync-line[data-state="expired"] { color: var(--red); }
.account-danger { margin-top: 18px; padding-top: 12px; border-top: 2px solid var(--ink); }
.account-danger summary { cursor: pointer; font-weight: 700; }
.account-danger p:first-child { margin-top: 8px; font-size: 14px; }
.merge-choice { display: grid; gap: 6px; margin-top: 14px; }
.merge-choice .sheet-note { margin-bottom: 10px; }

/* Seitenköpfe */
.page-head { max-width: 760px; }
.page-head .kicker { font: 400 22px/1 var(--display); color: var(--red); text-transform: none; margin-bottom: 6px; }
.page-head h1 { font: 400 clamp(30px, 4.4vw, 50px)/1.06 var(--display); margin-bottom: 10px; text-wrap: balance; }
.page-head > p:not(.kicker) { font-size: 16px; margin-bottom: 14px; text-wrap: pretty; }

/* Crews */
.crews { padding: 26px 18px 50px; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)); gap: 14px; margin-top: 22px; }
.crew {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 14px 14px 10px;
  background: var(--paper-2);
  border: var(--line);
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
  overflow: hidden;
}
.crew:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.crew-fan { position: relative; height: 112px; }
.crew-fan img {
  position: absolute;
  left: 24px;
  top: 4px;
  width: 72px;
  aspect-ratio: 600 / 838;
  object-fit: cover;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  background: #e4decf;
  filter: grayscale(1) contrast(1.15) brightness(1.08);
  transition: transform .18s;
}
.crew-fan img.owned { filter: none; }
.fan-0 { z-index: 3; }
.fan-1 { z-index: 2; transform: translateX(-16px) rotate(-11deg); }
.fan-2 { z-index: 1; transform: translateX(16px) rotate(11deg); }
.crew:hover .fan-1 { transform: translateX(-22px) rotate(-16deg); }
.crew:hover .fan-2 { transform: translateX(22px) rotate(16deg); }
.crew-copy { min-width: 0; }
.crew-copy h2 { font: 400 17px/1.15 var(--display); margin-bottom: 4px; overflow-wrap: anywhere; }
.crew-badge { display: inline-block; font: 500 10.5px var(--mono); background: var(--red); color: #fff; padding: 1px 5px; margin-bottom: 4px; }
.crew-count { font-size: 12.5px; margin-bottom: 6px; }
.crew-count b { font: 400 15px var(--display); }
.crew-bar { height: 8px; border: 2px solid var(--ink); background: var(--paper); }
.crew-bar i { display: block; height: 100%; background: var(--gold); }

/* Steckbrief */
.poster-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 470px); gap: 34px; padding: 26px 26px 50px; align-items: start; }
.poster-stage {
  position: sticky;
  top: calc(var(--top-h) + 16px);
  display: flex;
  justify-content: center;
  padding: 10px;
  background: radial-gradient(circle at center, rgba(17, 17, 20, .3) 0 1.2px, transparent 1.5px) 0 0 / 8px 8px;
}
#poster {
  height: min(calc(100dvh - var(--top-h) - 76px), 880px);
  min-height: 460px;
  max-width: 100%;
  aspect-ratio: 900 / 1280;
  transform: rotate(-1deg);
  filter: drop-shadow(7px 9px 0 rgba(17, 17, 20, .9));
}
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.field input { width: 100%; min-height: 42px; padding: 6px 10px; border: var(--line); background: var(--paper-2); font-weight: 700; }
.portrait-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; margin-bottom: 5px; }
.portrait { padding: 0; border: 2px solid transparent; background: none; opacity: .78; transition: opacity .12s, transform .12s; cursor: pointer; }
.portrait img { width: 100%; aspect-ratio: 600 / 838; object-fit: cover; border-radius: 3px; background: #e4decf; }
.portrait:hover { opacity: 1; transform: translateY(-2px); }
.portrait.current { opacity: 1; border-color: var(--red); }
.portrait-upload { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 600 / 838; border: 2px dashed var(--ink); background: var(--paper-2); opacity: 1; }
.field .portrait-upload input { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.field > .portrait-strip .portrait-upload span { display: block; font: 400 20px/1 var(--display); margin: 0; }
.portrait-upload small { font-size: 10px; font-weight: 700; }
.portrait-upload:hover { background: var(--gold); }
.portrait-upload:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
#poster-why h2 { font: 400 19px var(--display); margin: 22px 0 8px; }
.parts { width: 100%; border-collapse: collapse; border: var(--line); background: var(--paper-2); }
.parts th, .parts td { padding: 7px 10px; border-bottom: 1.5px solid var(--ink); text-align: left; font-weight: 700; }
.parts th small { display: block; font: 400 11px var(--mono); color: var(--muted); }
.parts td { text-align: right; font: 500 14px var(--mono); white-space: nowrap; }
.parts-sum th, .parts-sum td { background: var(--ink); color: var(--gold); border-bottom: 0; font-family: var(--display); font-weight: 400; }
#poster-why .sheet-note { margin-top: 8px; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ranks li { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 10px; border: 2px solid rgba(17, 17, 20, .28); color: var(--muted); font-weight: 700; }
.ranks small { font: 400 11.5px var(--mono); }
.ranks li.reached { border-color: var(--ink); color: var(--ink); background: var(--paper-2); }
.ranks li.current { background: var(--red); color: #fff; }

/* Tausch */
.trade { padding: 26px 18px 50px; }
.trade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 18px; }
.trade-panel { padding: 18px 20px; background: var(--paper-2); border: var(--line); min-width: 0; }
.trade-panel h2 { font: 400 20px/1.2 var(--display); margin-bottom: 6px; }
.t-error { color: var(--red); font-weight: 700; }
.match { margin-top: 16px; }
.match-head p:last-child { max-width: 700px; margin-top: 4px; }
.scale { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 16px 0; font: 500 15px var(--mono); }
.scale-bar { position: relative; height: 18px; border: var(--line); background: var(--gold); }
.scale-bar i { display: block; height: 100%; background: var(--red); border-right: 3px solid var(--ink); }
.scale-bar::after { content: ""; position: absolute; left: 50%; top: -7px; bottom: -7px; width: 2px; background: var(--ink); }
.deal { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.deal h3 { font-weight: 900; margin-bottom: 8px; }
.deal h3 span { font: 400 16px var(--display); color: var(--red); margin-left: 4px; }
.deal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.deal-card { margin: 0; min-width: 0; }
.deal-card img { width: 100%; aspect-ratio: 600 / 838; object-fit: cover; border-radius: 4px; background: #e4decf; }
.deal-card figcaption { font: 400 10.5px var(--mono); display: flex; flex-direction: column; margin-top: 3px; }
.deal-card figcaption b { font-weight: 500; }

/* Schmale Fenster */
/* Der Umschalter braucht Platz: Das Logo wird erst kleiner und überlässt ihm dann die Stelle. Die Karte bleibt über „Collect“ erreichbar. */
@media (max-width: 1460px) {
  .site-switch:not([hidden]) + .logo { padding: 0 12px; }
  .site-switch:not([hidden]) + .logo .logo-word { font-size: 18px; }
}
@media (max-width: 1340px) {
  .site-switch:not([hidden]) + .logo { display: none; }
}
@media (max-width: 1100px) {
  .b-head { grid-template-columns: minmax(0, 1fr); }
  .b-facts { grid-column: 1; grid-row: auto; justify-content: flex-start; row-gap: 10px; }
  .b-facts > div:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 980px) {
  .top { height: auto; grid-template-columns: minmax(0, 1fr) auto auto; position: static; }
  .top-tools { padding-right: 26px; }
  .account-btn { max-width: 130px; }
  .nav { grid-column: 1 / -1; grid-row: 2; border-top: var(--line); }
  .nav a { flex: 1; align-items: center; padding: 7px 12px; }
  .logo { padding: 10px 14px; border-right: 0; }
  .logo-word { font-size: 21px; }
  .site-switch { border-right: 0; }
  .bounty { min-width: 0; padding: 8px 14px 8px 34px; }
  .bounty-val { font-size: 19px; }
  .bounty-val i { font-size: 18px; }
  .chart-page { height: auto; grid-template-columns: 1fr; }
  .sea-frame { margin-right: 0; clip-path: none; }
  .sea { position: relative; inset: auto; clip-path: none; }
  #chart { position: relative; inset: auto; display: block; width: 100%; height: auto; padding: 8px; }
  .log { padding: 16px; border-top: var(--line); }
  .sea-vertical { display: none; }
  .intro { position: fixed; padding: 20px; z-index: 50; }
  .poster-page { grid-template-columns: 1fr; padding: 16px; }
  .poster-stage { position: static; }
  #poster { height: auto; width: min(100%, 520px); min-height: 0; }
}
/* Unter dieser Breite bekommt das Kopfgeld eine eigene Zeile. Das innere Display des iPhone Duo bleibt darüber und spart sie. */
@media (max-width: 600px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; }
  .top-tools { padding-right: 0; }
  .bounty { grid-row: 2; grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; margin-left: 0; clip-path: none; padding: 7px 12px; }
  .nav { grid-row: 3; }
}
@media (max-width: 640px) {
  .logo { padding: 8px 12px; }
  .logo-word { font-size: 18px; }
  .site-switch { padding: 0 8px; }
  .site-switch a { gap: 5px; padding: 0 7px; font-size: 12.5px; }
  .lang-switch { padding: 0 8px; }
  .account-btn { max-width: 96px; padding: 0 10px; font-size: 13px; }
  .nav a { padding: 7px 6px; font-size: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 9px; padding: 12px; }
  .t-meta { flex-wrap: wrap; font-size: 10px; }
  .filters { padding: 10px 12px; }
  .sheet-detail[open] { grid-template-columns: 1fr; }
  .detail-card { border-right: 0; border-bottom: var(--line); padding: 14px 70px; }
  .deal { grid-template-columns: 1fr; }
  .portrait-strip { grid-template-columns: repeat(4, 1fr); }
  .b-facts > div { padding: 2px 10px; }
}
@media (max-width: 350px) {
  .switch-logo, .switch-mark { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
