@font-face {
  font-family: 'Aptos';
  src: local('Aptos'), url('/fonts/aptos.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* light, warm "paper" + zinc neutrals (BugsVille-inspired, but bright) */
  --bg: #f4f2ec; --bg-soft: #eae6dc; --surface: #ffffff; --surface-2: #faf8f3; --surface-3: #f0ece2;
  --border: #e4ded1; --border-soft: #efebe1; --text: #20242c; --text-dim: #5d6470; --text-faint: #969ca6;
  --accent: #ff6b35; --accent-2: #f7931e; --blue: #2f6fed; --green: #16a34a; --red: #e5484d; --amber: #e8910c;
  --blurple: #5865f2;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 14px 38px rgba(40,34,24,.12); --shadow-sm: 0 2px 10px rgba(40,34,24,.06);
  --serif: 'Aptos Display', 'Aptos', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Aptos Display', 'Aptos', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Courier Prime', ui-monospace, 'SF Mono', monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font: 14.5px/1.55 var(--sans); color: var(--text);
  background:
    radial-gradient(1100px 540px at 88% -10%, rgba(255,107,53,.12), transparent 60%),
    radial-gradient(820px 480px at -5% 2%, rgba(88,101,242,.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h3 { margin: 0; font-weight: 700; letter-spacing: -0.005em; }
::selection { background: rgba(255,107,53,.26); }
.brand-logo { font-family: var(--serif); font-weight: 700; letter-spacing: .5px; font-size: 23px; }
.brand-logo .r { color: #e11d2a; }
.brand-logo .k { color: #15171c; }
.brand-sub { font-size: 11px; color: var(--text-faint); letter-spacing: .04em; }

/* ── Tablet shell ── */
.tablet { display: flex; flex-direction: column; min-height: 100vh; }
.statusbar { display: flex; align-items: center; gap: 14px; padding: 11px 22px; background: rgba(255,255,255,.78); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; font-size: 13px; box-shadow: 0 1px 0 rgba(255,255,255,.6); }
.sb-left { display: flex; align-items: center; }
.sb-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-dim); font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.sb-sep { color: var(--border); }
.sb-right { display: flex; align-items: center; gap: 14px; }
.clock { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text-dim); font-weight: 700; }
.srv-status { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-dim); }
.srv-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); flex: none; }
.srv-status.on .dot { background: var(--green); animation: pulse 2s infinite; }
.srv-status.off .dot { background: var(--red); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.userarea { display: flex; align-items: center; }
.user-chip { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 5px 3px 12px; box-shadow: var(--shadow-sm); }
.user-chip img { width: 26px; height: 26px; border-radius: 50%; }
.user-chip .un { font-size: 13px; font-weight: 600; }
.tag-admin { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: #3a1500; background: linear-gradient(95deg, var(--accent), var(--accent-2)); }
.tablet-body { flex: 1; }

/* ── Home screen (app tiles) ── */
.home { padding: 36px 24px; }
.home.hidden { display: none; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; }
.app-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #ffffff, var(--surface-2)); border: 1px solid var(--border); border-radius: 24px; color: var(--text); cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s; box-shadow: var(--shadow-sm); }
.app-tile:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 34px rgba(255,107,53,.20); }
.app-tile .ic { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 31px; line-height: 1; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 24%, transparent); transition: transform .16s; }
.app-tile:hover .ic { transform: scale(1.06); }
.app-tile .lbl { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }

/* ── App view (one app full-screen) ── */
.appview { display: none; flex-direction: column; }
.appview.active { display: flex; }
.app-header { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 46px; background: rgba(244,242,236,.8); backdrop-filter: saturate(1.4) blur(10px); z-index: 20; }
.app-header h2 { font-size: 26px; flex: 1; line-height: 1.1; }
.home-btn { font-weight: 600; }
.app-content { padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.hint { color: var(--text-faint); font-size: 12.5px; }
.muted { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }

/* ── Buttons ── */
.btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 600; transition: all .15s; box-shadow: var(--shadow-sm); }
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-2); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(95deg, var(--accent), var(--accent-2)); color: #fff; border: 0; font-weight: 700; box-shadow: 0 6px 18px rgba(255,107,53,.32); }
.btn-primary:hover { filter: brightness(1.05); color: #fff; }
.btn-danger { background: rgba(229,72,77,.10); color: var(--red); border-color: rgba(229,72,77,.3); }
.btn-danger:hover { background: rgba(229,72,77,.16); border-color: var(--red); color: var(--red); }
.btn.refresh { padding: 6px 11px; }
.btn-icon { padding: 6px 9px; font-size: 12px; }

/* ── Cards (players) ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; box-shadow: 0 4px 12px rgba(255,107,53,.28); }
.card .nm { font-weight: 700; font-size: 15px; }
.card .sid { color: var(--text-faint); font-size: 11px; font-family: var(--mono); cursor: pointer; }
.card .sid:hover { color: var(--blue); }
.card .meta { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; color: var(--text-dim); }
.card .acts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.pill { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-dim); letter-spacing: .02em; }
.pill.afk { background: rgba(232,145,12,.16); color: var(--amber); }
.pill.veh { background: rgba(47,111,237,.14); color: var(--blue); }

/* ── Tables ── */
.data { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data h3 { padding: 15px 16px 5px; font-size: 13px; color: var(--text-dim); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border-soft); }
thead th { color: var(--text-faint); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; background: var(--bg-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
.mono, td.mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }

/* ── Map (Leaflet) ── */
.map-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
#leafmap { height: 74vh; min-height: 460px; border: 1px solid var(--border); border-radius: var(--radius); background: #5b81a1; box-shadow: var(--shadow); overflow: hidden; }
.leaflet-container { background: #5b81a1; font: inherit; }
.leaflet-image-layer { filter: saturate(1.06) contrast(1.02); }
.leaflet-interactive { filter: drop-shadow(0 1px 2px rgba(20,16,10,.45)); }
.leaflet-control-zoom a { background: var(--surface); color: var(--text); border-color: var(--border) !important; box-shadow: var(--shadow-sm); }
.leaflet-control-zoom a:hover { background: var(--surface-2); color: var(--accent); }
.map-lbl { background: rgba(255,255,255,.92); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 1px 8px; font-family: var(--sans); font-size: 11px; font-weight: 700; box-shadow: var(--shadow-sm); }
.map-lbl::before { display: none !important; }

/* ── Forms ── */
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; max-width: 580px; box-shadow: var(--shadow-sm); }
.form textarea, .form input, .form select { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; transition: border-color .15s, box-shadow .15s; }
.form textarea:focus, .form input:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,53,.14); }
.form .row { display: flex; gap: 9px; margin-top: 10px; align-items: center; }
.form .row select, .form .row input { width: auto; flex: 1; }
.result { font-size: 12.5px; color: var(--text-dim); min-height: 18px; margin: 10px 0 0; }
.result.ok { color: var(--green); }
.result.err { color: var(--red); }

/* ── States ── */
.empty { color: var(--text-dim); padding: 44px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); background: rgba(255,255,255,.55); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 44px; color: var(--text-dim); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login overlay ── */
.login-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 520px at 70% -12%, rgba(255,107,53,.18), transparent 60%),
  radial-gradient(700px 460px at 10% 110%, rgba(88,101,242,.12), transparent 55%), var(--bg); }
.login-card { text-align: center; max-width: 440px; }
.login-card .brand-logo { font-size: 64px; letter-spacing: 1px; }
.login-card .brand-sub { font-size: 14px; margin: 6px 0 22px; }
.login-card p { color: var(--text-dim); margin: 0 0 24px; font-size: 15px; }
.login-btn { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(95deg, #1b2838, #2a475e); color: #fff; border: 0; border-radius: 12px; padding: 13px 24px; cursor: pointer; font-size: 15px; font-weight: 700; text-decoration: none; transition: all .15s; box-shadow: 0 8px 22px rgba(27,40,56,.25); }
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(27,40,56,.32); }

/* ── Proximity voice ── */
.voice-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.ptt-toggle { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 13px; }
#pttBtn { user-select: none; min-width: 280px; padding: 14px; font-size: 14px; }
#pttBtn.talking { background: linear-gradient(95deg, var(--green), #34c97b); color: #fff; border: 0; box-shadow: 0 0 0 4px rgba(22,163,74,.22), 0 8px 22px rgba(22,163,74,.3); }
.voice-peers { display: flex; flex-direction: column; gap: 9px; max-width: 640px; }
.peer { display: grid; grid-template-columns: minmax(72px,1fr) 48px 1fr auto 96px; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; box-shadow: var(--shadow-sm); }
.peer-nm { font-weight: 600; }
.peer-d { color: var(--text-faint); font-size: 12px; font-family: var(--mono); }
.peer-bar { height: 9px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.peer-bar > div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); transition: width .18s ease; width: 0; }
.peer-mute { padding: 5px 10px; }
.peer-mute.on, #selfMuteBtn.on { background: rgba(229,72,77,.12); color: var(--red); border-color: rgba(229,72,77,.35); }
.peer-vol, #masterVol { width: 96px; accent-color: var(--accent); cursor: pointer; }
.vmaster { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13px; }
.vmaster #masterVol { width: 120px; }
.ingame-help { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); max-width: 640px; }
.ingame-help h3 { font-size: 15px; margin-bottom: 6px; }
.ingame-help a { color: var(--blue); font-weight: 600; }
.ingame-help .hint { display: block; margin-bottom: 12px; line-height: 1.65; }
.ingame-help code { font-family: var(--mono); background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* ── Toast ── */
#toast { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 11px; padding: 12px 16px; font-size: 13px; box-shadow: var(--shadow); animation: slidein .2s ease; max-width: 320px; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ── Responsive ── */
@media (max-width: 560px) {
  .sb-center { display: none; }
  .home-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
  .app-tile .ic { width: 52px; height: 52px; font-size: 25px; }
  .app-header h2 { font-size: 22px; }
  .app-content, .home { padding: 16px; }
}

/* ── Character sheet (VAST server-side RP profile) ── */
.char-sheet { max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.char-hero { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.char-badge { flex: none; min-width: 58px; height: 58px; padding: 0 10px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-family: var(--serif); font-weight: 700; font-size: 18px; color: #3a1500; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 16px rgba(255,107,53,.28); }
.char-name { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.char-sub { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.char-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.char-stats .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.char-stats .stat span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 3px; }
.char-stats .stat b { font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--text); }
.char-rows { display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }
.char-row { display: flex; gap: 12px; align-items: baseline; }
.char-row > span { flex: none; width: 120px; color: var(--text-dim); font-size: 12.5px; }
.fld { display: block; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: .01em; }
.fld input, .fld textarea { display: block; margin-top: 5px; }
.char-edit h3, .char-editor h3 { margin-bottom: 2px; }
.char-editor { max-width: 680px; }
.char-editor h3 .sid { font-weight: 400; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
@media (max-width: 560px) { .char-stats { grid-template-columns: repeat(2, 1fr); } .ed-grid { grid-template-columns: 1fr; } }

/* ── RP: jobs & licenses ── */
.rp-head { color: var(--text-dim); font-size: 13.5px; margin-bottom: 14px; line-height: 1.6; }
.rp-head b { color: var(--text); font-weight: 700; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.rp-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,107,53,.14); }
.rp-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rp-card-h b { font-size: 16px; font-weight: 700; }
.rp-card .pay { font-family: var(--mono); font-weight: 700; color: var(--accent); font-size: 14px; white-space: nowrap; }
.rp-reqs { display: flex; flex-wrap: wrap; gap: 6px; }
.ok-pill { background: rgba(22,163,74,.14) !important; color: var(--green) !important; }
.rp-card .row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pol-law { width: 100%; margin: 0 0 8px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pol-law:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,53,.14); }
.inv-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.inv-label { font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.inv-chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-dim); }
.inv-chip b { color: var(--text); }
.shop-prices { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-dim); }
.shop-prices b { color: var(--text); font-family: var(--mono); }
.bm-warn { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: linear-gradient(180deg, rgba(124,58,237,.10), rgba(229,72,77,.06)); border: 1px solid rgba(124,58,237,.28); color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.bm-warn b { color: var(--text); }
.bm-h { margin: 22px 0 10px; font-size: 14px; color: var(--text); font-weight: 700; }
.bm-h:first-of-type { margin-top: 6px; }
.akte { margin-bottom: 16px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.akte-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.akte-h b { font-size: 14px; }
.akte-h .btn { margin-left: auto; }
.akte-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.akte-off { font-weight: 600; color: var(--text); }
.akte-fine { font-family: var(--mono); color: var(--red); font-weight: 700; }
.akte-meta { color: var(--text-faint); font-size: 11.5px; white-space: nowrap; }
.jail-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); background: linear-gradient(180deg, rgba(124,58,237,.12), rgba(124,58,237,.05)); border: 1px solid rgba(124,58,237,.32); color: #7c3aed; font-size: 14px; }
.jail-banner b { color: #7c3aed; }
.jail-banner .btn { margin-left: auto; }

/* ── Ausweis (ID card) & Führerschein (driver's license) ── */
.idcard { max-width: 440px; border-radius: 16px; overflow: hidden; background:
  linear-gradient(160deg, #ffffff 0%, var(--surface-2) 60%, var(--surface-3) 100%);
  border: 1px solid var(--border); box-shadow: 0 14px 40px rgba(20,24,34,.14); position: relative; }
.idcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(47,111,237,.10), transparent 70%); pointer-events: none; }
.idcard.fs::after { background: radial-gradient(circle, rgba(22,163,74,.12), transparent 70%); }
.idcard-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: #fff; background: linear-gradient(95deg, var(--blue), #1f4fb0); }
.idcard.fs .idcard-hd { background: linear-gradient(95deg, var(--green), #0c7a45); }
.idcard-hd span:last-child { font-size: 18px; }
.idcard-body { display: flex; gap: 16px; padding: 18px 16px 14px; }
.idcard-photo { width: 88px; height: 108px; border-radius: 10px; object-fit: cover; flex: none;
  border: 2px solid #fff; box-shadow: 0 4px 14px rgba(20,24,34,.20); background: var(--surface-3); }
.idcard-nophoto { display: grid; place-items: center; font-family: var(--serif); font-weight: 800;
  font-size: 44px; color: #fff; background: linear-gradient(135deg, var(--blue), #1f4fb0); }
.idcard.fs .idcard-nophoto { background: linear-gradient(135deg, var(--green), #0c7a45); }
.idcard-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.idcard-fields > div { display: flex; flex-direction: column; gap: 1px; }
.idcard-fields label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); font-weight: 700; }
.idcard-fields b, .idcard-fields span, .idcard-fields div > :not(label) { font-size: 14px; color: var(--text); }
.idcard-fields b { font-weight: 700; }
.idcard-mrz { padding: 9px 16px 12px; font-size: 11px; letter-spacing: .12em; color: var(--text-faint);
  border-top: 1px dashed var(--border); background: rgba(0,0,0,.015); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fs-classes { padding: 0 16px 16px; }
.fs-classes > label { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); font-weight: 700; margin-bottom: 7px; }
.fs-classes > div { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-class { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; color: var(--text-faint);
  background: var(--surface-3); border: 1px solid var(--border); opacity: .55; }
.fs-class.has { color: #0c7a45; background: rgba(22,163,74,.12); border-color: rgba(22,163,74,.3); opacity: 1; }
