/* ============ TAG SIMULATION — Command Center theme ============ */
:root {
  --bg: #0d1220;
  --bg-2: #121a2c;
  --panel: #161f33;
  --panel-2: #1c2740;
  --line: #27334f;
  --line-2: #33415f;
  --text: #e6ebf5;
  --muted: #8d9ab5;
  --accent: #2ec4b6;
  --accent-2: #1f9d92;
  --warn: #f5b400;
  --danger: #e5484d;
  --ok: #30a46c;
  --info: #3e7bfa;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }

/* ---------- controls ---------- */
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  padding: 8px 14px; border-radius: 8px; transition: background .15s, border-color .15s, opacity .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  white-space: nowrap;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); }
button:disabled { opacity: .4; filter: grayscale(.85); cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #06231f; }
button.primary:hover:not(:disabled) { background: #43d6c8; }
button.danger { background: transparent; border-color: rgba(229, 72, 77, .55); color: #ff8a8d; }
button.danger:hover:not(:disabled) { background: rgba(229, 72, 77, .15); border-color: var(--danger); }
button.ghost { background: transparent; }
button.sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
button.icon { padding: 6px 9px; min-width: 34px; }
button.active { border-color: var(--accent); background: rgba(46, 196, 182, .15); color: var(--accent); }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(46, 196, 182, .45); border-color: var(--accent); }
input[type=color] { padding: 2px; height: 38px; width: 52px; }
input[type=checkbox] { width: auto; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; letter-spacing: .02em; }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin: 10px 0; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted);
}
.badge.st-setup, .badge.st-lobby { color: var(--info); border-color: rgba(62, 123, 250, .5); }
.badge.st-running { color: var(--ok); border-color: rgba(48, 164, 108, .6); }
.badge.st-running::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1.2s infinite; }
.badge.st-paused { color: var(--warn); border-color: rgba(245, 180, 0, .5); }
.badge.st-ended { color: var(--danger); border-color: rgba(229, 72, 77, .5); }
@keyframes blink { 50% { opacity: .25; } }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; border: 2px solid rgba(255,255,255,.7); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #56607a; display: inline-block; }
.online-dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }

/* ---------- landing / join ---------- */
.hero { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 48px 16px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #3e7bfa); color: #06131c; font-weight: 900; font-size: 18px; letter-spacing: .05em;
}
.brand h1 { font-size: 28px; margin: 0; letter-spacing: .06em; }
.hero .tagline { color: var(--muted); margin: 0 0 32px; text-align: center; max-width: 560px; }
.landing-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; width: 100%; max-width: 980px; }
@media (max-width: 820px) { .landing-grid { grid-template-columns: 1fr; } }
.map-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 6px; }
.map-card {
  border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 10px; padding: 10px; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.map-card:hover { border-color: var(--accent); }
.map-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(46, 196, 182, .3); }
.map-card svg { width: 100%; height: 96px; display: block; border-radius: 6px; background: #e8efe2; margin-bottom: 8px; }
.map-card h4 { margin: 0 0 2px; font-size: 14px; }
.map-card p { margin: 0; font-size: 12px; color: var(--muted); }
.key-input { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.error-msg { color: #ff8a8d; font-size: 13px; min-height: 18px; margin-top: 8px; }
.steps { color: var(--muted); font-size: 13px; padding-left: 18px; margin: 8px 0 0; }
.steps li { margin: 3px 0; }

/* ---------- app shell (host & play) ---------- */
.app { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--bg-2);
  border-bottom: 1px solid var(--line); min-height: 56px;
}
.topbar .brand-logo { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }
.topbar .title { font-weight: 800; letter-spacing: .08em; }
.topbar .session-name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .key-chip {
  font-family: var(--mono); font-weight: 700; letter-spacing: .15em; background: var(--panel-2);
  padding: 5px 10px; border-radius: 7px; border: 1px dashed var(--line-2); cursor: pointer;
}
.conn { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

.main { display: grid; grid-template-columns: 340px 1fr; min-height: 0; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; border: 0; border-radius: 0; background: transparent; padding: 11px 6px; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: 13px;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }
.tab-body { padding: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 16px 0 8px; }
.section-title:first-child { margin-top: 0; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.copy-box { display: flex; gap: 6px; }
.copy-box input { font-family: var(--mono); font-size: 12px; }

.controls-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.controls-grid button { padding: 10px 4px; font-size: 12px; }
.controls-grid .start { grid-column: span 3; }

/* tabel pemain */
.player-list { display: flex; flex-direction: column; gap: 6px; }
.player-item {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; cursor: pointer;
}
.player-item.selected { border-color: var(--accent); }
.player-item .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-item .meta { grid-column: 2 / 4; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-actions { grid-column: 1 / 4; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.player-actions select { padding: 4px 6px; font-size: 12px; width: auto; flex: 1; min-width: 100px; }
table.ptable { width: 100%; border-collapse: collapse; font-size: 12px; }
table.ptable th, table.ptable td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); }
table.ptable th { color: var(--muted); font-weight: 600; }

/* role */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.role-card {
  border: 2px solid var(--line-2); border-radius: 12px; padding: 14px; background: var(--bg-2); cursor: pointer;
  position: relative; transition: transform .12s, border-color .12s; text-align: left; color: var(--text);
  display: block; width: 100%; font-weight: 400;
}
.role-card:hover:not(:disabled) { transform: translateY(-2px); }
.role-card .swatch { width: 34px; height: 34px; border-radius: 50%; margin-bottom: 8px; border: 3px solid rgba(255, 255, 255, .8); }
.role-card h4 { margin: 0 0 3px; font-size: 15px; }
.role-card p { margin: 0; font-size: 12px; color: var(--muted); }
.role-card .count { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.role-card.mine { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 196, 182, .25); }
.role-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); margin-bottom: 6px; }
.role-row .grow small { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-form { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }

/* ---------- map ---------- */
.map-wrap { position: relative; min-height: 0; min-width: 0; background: #0a0f1b; overflow: hidden; }
.map-svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: grab; }
.map-svg.dragging { cursor: grabbing; }
.map-svg.placing { cursor: crosshair; }
.map-toolbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; align-items: flex-start; pointer-events: none; }
.map-toolbar > * { pointer-events: auto; }
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px; background: rgba(13, 18, 32, .88);
  backdrop-filter: blur(6px); border: 1px solid var(--line-2); border-radius: 9px; padding: 5px 8px; font-size: 13px;
}
.breadcrumb button { background: none; border: 0; padding: 3px 6px; color: var(--muted); font-weight: 600; }
.breadcrumb button:hover { color: var(--accent); }
.breadcrumb button.current, .breadcrumb span.crumb.current { color: var(--text); cursor: default; }
.breadcrumb span.crumb { padding: 3px 6px; color: var(--muted); font-weight: 600; }
.breadcrumb .sep { color: var(--line-2); }
.level-chip { font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--accent); color: #06231f; margin-right: 4px; font-weight: 800; }
.zoom-ctrl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.zoom-ctrl button { background: rgba(13, 18, 32, .88); width: 38px; height: 38px; padding: 0; font-size: 18px; }
.map-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: rgba(13, 18, 32, .9); border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 999px;
  font-size: 12px; color: var(--muted); pointer-events: none; white-space: nowrap; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis;
}
.map-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 12, 22, .72);
  backdrop-filter: blur(3px); z-index: 5; text-align: center; padding: 20px;
}
.map-overlay .card { max-width: 420px; }
.map-overlay h2 { font-size: 22px; }

/* svg styles */
.shape-label { font: 600 13px var(--font); fill: #2b3445; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; pointer-events: none; text-anchor: middle; dominant-baseline: middle; }
.shape-label.big { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.shape-label.small { font-size: 11px; font-weight: 600; fill: #4a5568; }
.shape.enterable { cursor: pointer; }
.shape.enterable:hover { filter: brightness(1.06); stroke: var(--accent) !important; stroke-width: 4px !important; }
.shape.here { stroke: var(--accent) !important; stroke-width: 4px !important; stroke-dasharray: 10 6; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.enter-icon { pointer-events: none; }
.marker { transition: transform .45s cubic-bezier(.25, .8, .3, 1); cursor: pointer; }
.marker .ring { fill: none; stroke-width: 2.5; animation: pulse 1.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.9); } }
.marker text { font: 800 10px var(--font); fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.marker .mlabel { font: 700 11px var(--font); fill: #1a2233; paint-order: stroke; stroke: #fff; stroke-width: 3px; dominant-baseline: hanging; }
.marker.offline { opacity: .45; }
.marker.selected circle.body { stroke: var(--accent); stroke-width: 4; }
.count-badge circle { fill: #0d1220; stroke: #fff; stroke-width: 2; }
.count-badge text { font: 800 12px var(--font); fill: #fff; text-anchor: middle; dominant-baseline: central; }
.poi text, .obj text { font: 600 10px var(--font); fill: #2b3445; paint-order: stroke; stroke: #fff; stroke-width: 3px; text-anchor: middle; }
.obj { cursor: pointer; }

/* ---------- bottom bar & log ---------- */
.bottombar { background: var(--bg-2); border-top: 1px solid var(--line); display: grid; grid-template-columns: 340px 1fr; min-height: 0; }
.statusline { padding: 10px 16px; display: flex; gap: 18px; align-items: center; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); flex-wrap: wrap; }
.statusline b { color: var(--text); font-size: 15px; display: block; }
.log { height: 150px; overflow-y: auto; padding: 8px 14px; font: 12px/1.6 var(--mono); }
.log-row { display: flex; gap: 10px; white-space: nowrap; }
.log-row .t { color: #5d6a86; flex: none; }
.log-row .m { overflow: hidden; text-overflow: ellipsis; }
.log-row .who { font-weight: 700; }
.log-row.sys .m { color: var(--accent); }
.log-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- player hud ---------- */
.hud { background: var(--bg-2); border-top: 1px solid var(--line); padding: 10px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.hud .role-pill { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.hud .where { font-size: 13px; overflow: hidden; }
.hud .where b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.drawer { position: absolute; right: 10px; top: 58px; width: 290px; max-height: calc(100% - 120px); display: flex; flex-direction: column; background: rgba(22, 31, 51, .96); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); z-index: 4; }
.drawer .log { height: auto; flex: 1; }
.lobby { padding: 24px 16px; overflow-y: auto; }
.lobby-inner { max-width: 900px; margin: 0 auto; }
.lobby-players { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }

/* ---------- toast ---------- */
#toasts { position: fixed; top: 66px; right: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 4px solid var(--info); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; animation: slidein .25s ease; width: 100%; }
.toast.success { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--danger); }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .main.host-main { grid-template-rows: 55vh auto; }
  .main.host-main .side { order: 2; border-right: 0; border-top: 1px solid var(--line); max-height: none; }
  .main.host-main .map-wrap { order: 1; }
  .app.host-app { height: auto; min-height: 100dvh; }
  .bottombar { grid-template-columns: 1fr; }
  .statusline { border-right: 0; border-bottom: 1px solid var(--line); }
  .topbar .session-name { display: none; }
  .hud { grid-template-columns: 1fr; gap: 8px; }
  .hud .actions { justify-content: flex-start; }
  .drawer { left: 10px; right: 10px; width: auto; }
}
@media (max-width: 520px) {
  #toasts { right: 50%; transform: translateX(50%); }
  .topbar { padding: 8px 10px; gap: 8px; }
  .topbar .title { display: none; }
  .map-hint { display: none; }
}

/* ================================================================= LEAFLET MAP (v2) */
.mapview { position: absolute; inset: 0; }
.lmap { position: absolute; inset: 0; background: #dfe6ec; font-family: var(--font); }
.lmap.placing, .lmap.placing .leaflet-interactive { cursor: crosshair !important; }
.mapview.drop-target::after { content: "Lepaskan untuk menaruh unit di sini"; position: absolute; inset: 8px; border: 3px dashed var(--accent); border-radius: 12px; z-index: 900; pointer-events: none; display: grid; place-items: center; color: #fff; font-weight: 800; background: rgba(46,196,182,.12); text-shadow: 0 1px 4px #000; }
.leaflet-container a { color: #1a73e8; }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-marker-icon.pm-wrap { transition: transform .45s cubic-bezier(.25,.8,.3,1); }
.lmap.zooming .leaflet-marker-icon { transition: none !important; }

/* marker pemain */
.pm-wrap, .um-wrap, .obj-wrap { background: none; border: 0; }
.pm { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 3px solid #fff; color: #fff; font: 800 12px var(--font); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.45); position: relative; }
.pm.self::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid var(--c); animation: pulse2 1.6s ease-out infinite; }
.pm.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.pm-wrap.offline { opacity: .5; }
@keyframes pulse2 { 0% { opacity: .9; transform: scale(.75); } 100% { opacity: 0; transform: scale(1.7); } }
.pm-label { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); white-space: nowrap; font: 700 11px var(--font); color: #1a2233; background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none; }

/* marker unit (tools) */
.um { width: 34px; height: 34px; border-radius: 9px; background: var(--c); border: 2.5px solid #fff; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0,0,0,.45); position: relative; }
.um.can { cursor: grab; }
.um.selected { outline: 3px solid #1a73e8; outline-offset: 2px; }
.um.playing::after { content: ""; position: absolute; inset: -6px; border-radius: 12px; border: 2.5px solid var(--c); animation: pulse2 1.2s ease-out infinite; }
.um.paused { filter: saturate(.6); }
.obj-ic { font-size: 22px; line-height: 30px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.count-badge { background: #0d1220; color: #fff; border: 2px solid #fff; border-radius: 50%; font: 800 12px/22px var(--font); text-align: center; }
.wp { background: #1a73e8; color: #fff; border: 2px solid #fff; border-radius: 50%; font: 800 10px/16px var(--font); text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* search (gaya Google Maps) */
.map-top { position: absolute; top: 12px; left: 12px; bottom: 34px; z-index: 1000; width: min(380px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.searchbox { position: relative; display: flex; align-items: center; background: #fff; border-radius: 24px; box-shadow: 0 2px 6px rgba(0,0,0,.3); padding: 0 6px 0 14px; height: 46px; }
.searchbox .s-ic { color: #5f6368; font-size: 16px; }
.searchbox input { border: 0; background: transparent; color: #202124; font-size: 15px; padding: 0 8px; height: 100%; outline: none; box-shadow: none; }
.searchbox input:focus { outline: none; }
.searchbox button { background: none; border: 0; color: #5f6368; padding: 6px 10px; border-radius: 50%; }
.search-list { position: absolute; top: 52px; left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.3); list-style: none; margin: 0; padding: 6px 0; max-height: 360px; overflow-y: auto; }
.search-list li { display: flex; gap: 12px; align-items: center; padding: 8px 14px; cursor: pointer; color: #202124; }
.search-list li.active, .search-list li:hover { background: #f1f3f4; }
.search-list .sr-ic { font-size: 18px; width: 22px; text-align: center; }
.search-list .sr-tx b { display: block; font-weight: 600; font-size: 14px; }
.search-list .sr-tx small { color: #5f6368; font-size: 12px; }
.search-list li.sr-online { border-top: 1px solid #e8eaed; }
.crumbbar { align-self: flex-start; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; background: rgba(255,255,255,.95); color: #3c4043; border-radius: 16px; padding: 4px 10px 4px 5px; font-size: 12.5px; box-shadow: 0 1px 4px rgba(0,0,0,.25); max-width: 100%; }
.crumbbar .level-chip { margin-right: 2px; }
.crumbbar .lvl-name { color: #5f6368; margin-right: 6px; font-weight: 600; }
.crumbbar button, .crumbbar span.crumb { background: none; border: 0; padding: 2px 4px; color: #1a73e8; font-weight: 600; font-size: 12.5px; }
.crumbbar span.crumb.current, .crumbbar button.current { color: #202124; }
.crumbbar .sep { color: #9aa0a6; }
.place-card { background: #fff; color: #202124; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.3); padding: 12px 14px; }
.place-card h4 { margin: 0 0 2px; font-size: 16px; }
.place-card p { margin: 0 0 8px; color: #5f6368; font-size: 12.5px; }
.place-card .row button { background: #fff; color: #1a73e8; border: 1px solid #dadce0; border-radius: 18px; font-size: 12.5px; padding: 6px 12px; }
.place-card .row button.primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* layer switch */
.layer-switch { position: absolute; top: 12px; right: 12px; z-index: 1000; display: flex; background: #fff; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.3); overflow: hidden; }
.layer-switch button { background: #fff; color: #3c4043; border: 0; border-radius: 0; padding: 8px 12px; font-size: 12.5px; }
.layer-switch button.active { background: #e8f0fe; color: #1a73e8; }
.map-right-tools { position: absolute; top: 12px; right: 12px; z-index: 1000; display: flex; gap: 8px; align-items: flex-start; }
.map-right-tools .layer-switch { position: static; }
.map-right-tools > button { background: #fff; color: #3c4043; border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* tools palette */
.tools-palette { position: relative; flex: 0 1 auto; min-height: 0; align-self: flex-start; width: 214px; background: rgba(255,255,255,.97); color: #202124; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; }
.tools-palette.collapsed { width: auto; }
.tools-palette.collapsed .tools-body { display: none; }
.tools-palette.disabled .tools-body { opacity: .45; pointer-events: none; }
.tools-toggle { background: #fff; color: #202124; border: 0; border-bottom: 1px solid #e8eaed; border-radius: 0; justify-content: flex-start; padding: 9px 12px; font-weight: 800; }
.tools-body { overflow-y: auto; padding: 4px 8px 10px; }
.tools-hint { font-size: 11.5px; color: #5f6368; margin: 6px 2px; }
.tools-gt { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5f6368; margin: 8px 2px 4px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tool { flex-direction: column; gap: 3px; padding: 6px 2px; background: #f8f9fa; color: #202124; border: 1px solid #e8eaed; border-radius: 9px; font-weight: 600; cursor: grab; white-space: normal; }
.tool:hover { border-color: #1a73e8; background: #e8f0fe; }
.tool.armed { border-color: #1a73e8; background: #d2e3fc; box-shadow: inset 0 0 0 1px #1a73e8; }
.tool-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--c); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tool-nm { font-size: 10.5px; line-height: 1.15; text-align: center; }

/* unit panel */
.unit-panel { position: absolute; right: 64px; bottom: 14px; z-index: 1001; width: min(340px, calc(100% - 80px)); background: #fff; color: #202124; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.35); padding: 12px 14px; }
.unit-panel button { background: #fff; color: #3c4043; border: 1px solid #dadce0; }
.unit-panel button.primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.unit-panel button.danger { color: #d93025; border-color: #f4c7c3; }
.unit-panel input, .unit-panel select { background: #fff; color: #202124; border: 1px solid #dadce0; padding: 5px 7px; font-size: 13px; border-radius: 6px; }
.up-head { display: flex; gap: 10px; align-items: center; }
.up-head small { display: block; color: #5f6368; font-size: 11.5px; }
.up-head .up-label { font-weight: 700; font-size: 14px; padding: 3px 6px; }
.up-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--c); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); flex: none; }
.up-x { border: 0 !important; padding: 4px 8px; }
.up-status { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: #5f6368; gap: 8px; }
.up-state { font-weight: 800; color: #3c4043; }
.up-state.st-playing { color: #188038; }
.up-state.st-paused { color: #e37400; }
.up-bar { height: 5px; background: #e8eaed; border-radius: 3px; margin: 6px 0 8px; overflow: hidden; }
.up-bar > div { height: 100%; background: #1a73e8; width: 0; transition: width .3s linear; }
.up-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.up-row label { margin: 0; color: #5f6368; font-size: 11px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.up-row label em { position: absolute; right: 6px; bottom: 6px; font-style: normal; color: #9aa0a6; font-size: 11px; }
.up-row input[type=number] { width: 96px; padding-right: 30px; }
.up-row input[type=color] { width: 44px; height: 30px; padding: 1px; }
.up-row .up-chk { flex-direction: row; align-items: center; gap: 4px; font-size: 12px; color: #3c4043; padding-bottom: 6px; }
.up-route { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0; font-size: 12.5px; color: #3c4043; }
.up-draft { width: 100%; background: #e8f0fe; border-radius: 8px; padding: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.up-play { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 6px; }

.zoom-ctrl { z-index: 1000; }
.zoom-ctrl button { background: #fff; color: #3c4043; border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.map-hint { z-index: 1000; background: rgba(32,33,36,.88); color: #fff; border: 0; }
.map-overlay { z-index: 1100; }
.drawer { z-index: 1050; top: 64px; }
.unit-list .role-row { cursor: pointer; }
.unit-list .tool-ic { width: 28px; height: 28px; border-radius: 7px; }

@media (max-width: 900px) {
  .tools-palette:not(.collapsed) { width: 100%; max-height: 50vh; }
  .unit-panel { right: 12px; left: 12px; width: auto; bottom: 12px; }
  .layer-switch button { padding: 7px 8px; }
  .map-top { width: calc(100% - 24px); top: 62px; bottom: 90px; }
  .map-right-tools { top: 10px; }
}
.map-top .searchbox { z-index: 3; }
.map-top .tools-palette { z-index: 1; }
.map-top .place-card { z-index: 2; position: relative; }
.crumbbar span.crumb { color: #5f6368; }
#toasts { top: auto; bottom: 86px; right: 50%; left: auto; transform: translateX(50%); }

/* ================================================================= V2: peran sendiri, alur & arah */
.lobby-grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; margin-top: 12px; }
@media (max-width: 860px) { .lobby-grid { grid-template-columns: 1fr; } }
.role-maker h3 { margin-bottom: 4px; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.swatch-btn { aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; padding: 0; min-width: 0; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); position: relative; }
.swatch-btn.on { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.swatch-btn.used { opacity: .25; cursor: not-allowed; }
.swatch-btn.used::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; }
.rm-preview { display: flex; gap: 6px; flex-wrap: wrap; background: #f1f3f4; border-radius: 10px; padding: 8px; }
.rm-preview .tool-ic { width: 36px; height: 36px; }
.role-card .by { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.my-units { gap: 6px; padding-right: 8px; margin-right: 4px; border-right: 1px solid var(--line); }
.hud .actions { align-items: center; }

/* arah unit & panah alur */
.um-dir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--hd, 0deg)); pointer-events: none; z-index: 3; }
.um-dir::before { content: ""; position: absolute; left: 20px; top: -9px; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.um-dir::after { content: ""; position: absolute; left: 21px; top: -6px; border-left: 10px solid var(--c); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.um-wrap.no-dir .um-dir { display: none; }
.route-arrow { background: none; border: 0; }
.route-arrow span { display: block; width: 0; height: 0; margin: 3px 0 0 3px; border-left: 12px solid var(--c); border-top: 7px solid transparent; border-bottom: 7px solid transparent; transform: rotate(var(--hd)); transform-origin: 6px 7px; filter: drop-shadow(0 0 1.5px #fff); }
.route-end { background: none; border: 0; font-size: 18px; line-height: 20px; text-align: center; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.up-route button.pulse { animation: pulsebtn 1.2s ease-in-out infinite; border-color: #1a73e8 !important; color: #1a73e8; font-weight: 800; }
@keyframes pulsebtn { 50% { box-shadow: 0 0 0 5px rgba(26,115,232,.25); } }
.up-help { font-size: 11.5px; color: #5f6368; margin: 4px 0 0; }
.planning-banner { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 1001; background: #fef7e0; color: #7a5200; border: 1px solid #f9d77e; border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.25); max-width: calc(100% - 820px); min-width: 260px; text-align: center; }
@media (max-width: 1200px) { .planning-banner { top: auto; bottom: 52px; max-width: calc(100% - 24px); } }

/* ================================================================= KOMUNIKASI (chat 2 arah + suara) */
.chat { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--panel); }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.chat-tabs { display: flex; gap: 4px; flex: 1; }
.chat-tabs button { flex: 1; padding: 6px 4px; font-size: 12px; border-radius: 7px; background: transparent; }
.chat-tabs button.active { background: rgba(46,196,182,.15); border-color: var(--accent); color: var(--accent); }
.chat-view { flex: 1; padding: 6px 8px; font-size: 12.5px; }
.chat-auto { margin: 0; display: flex; align-items: center; gap: 3px; font-size: 11px; white-space: nowrap; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto 10px; }
.chat-day { align-self: center; font-size: 11px; color: var(--muted); background: var(--bg-2); border-radius: 10px; padding: 2px 10px; }
.msg { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 7px 10px 4px; max-width: 92%; align-self: flex-start; }
.msg.mine { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: #17323a; border-color: #23525a; }
.msg.announce { max-width: 100%; align-self: stretch; background: #3a2f10; border-color: #8a6d16; border-radius: 10px; }
.msg.flash { outline: 2px solid var(--accent); }
.msg .mh { display: flex; align-items: center; gap: 5px; font-size: 11.5px; flex-wrap: wrap; }
.msg .mh .dot { width: 9px; height: 9px; border-width: 1px; }
.msg .mrole { color: var(--muted); }
.msg .mann { font-weight: 800; color: #f5c542; font-size: 10.5px; letter-spacing: .04em; }
.msg .mch { color: var(--muted); }
.msg .mtime { margin-left: auto; color: #6c7894; font-family: var(--mono); font-size: 10.5px; }
.msg .mt { margin-top: 3px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.msg .ma { display: flex; gap: 2px; justify-content: flex-end; margin-top: 2px; }
.msg .ma button { padding: 1px 6px; font-size: 11px; color: var(--muted); border: 0; }
.msg .ma button:hover { color: var(--accent); }
.rq { border-left: 3px solid var(--c); background: rgba(255,255,255,.05); border-radius: 6px; padding: 3px 8px; margin-top: 4px; font-size: 12px; cursor: pointer; overflow: hidden; }
.rq b { display: block; color: var(--c); font-size: 11.5px; }
.rq span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.voice audio { height: 34px; max-width: 220px; min-width: 0; flex: 1; }
.voice .vdur { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chat-reply { display: flex; align-items: center; gap: 6px; padding: 6px 10px 0; }
.chat-reply .rq { flex: 1; margin: 0; cursor: default; }
.chat-compose { display: flex; gap: 6px; padding: 8px 10px; align-items: flex-end; }
.chat-compose textarea { resize: none; min-height: 38px; max-height: 110px; padding: 8px 10px; line-height: 1.35; }
.chat-compose button { height: 38px; min-width: 40px; padding: 0 10px; }
.chat-mic { font-size: 17px; }
.chat-rec { display: flex; align-items: center; gap: 8px; padding: 10px; background: rgba(229,72,77,.12); border-top: 1px solid rgba(229,72,77,.4); }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.rec-time { font-family: var(--mono); }
.rec-max { font-size: 11px; }
.rec-level { flex: 1; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.rec-level i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .08s; }
.chat-foot { padding: 0 10px 8px; font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.chat-foot b { color: var(--text); }
.chat-ann { margin: 0; display: flex; gap: 5px; align-items: center; color: #f5c542; font-size: 12px; font-weight: 600; }
.chat-ann.off { opacity: .4; }
/* pemain: drawer pesan */
.chat-btn { position: relative; }
.chat-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font: 800 11px/18px var(--font); text-align: center; }
.chat-drawer { position: fixed; right: 12px; top: 64px; bottom: 12px; width: min(380px, calc(100% - 24px)); z-index: 1200; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.tab-body.chat-tab { padding: 0; display: flex; flex-direction: column; }
.tab-body.chat-tab.hidden { display: none; }
.tabs .tab-badge { background: var(--danger); color: #fff; border-radius: 8px; padding: 0 5px; font-size: 10px; margin-left: 3px; }
@media (max-width: 900px) { .chat-drawer { top: 58px; bottom: 8px; right: 8px; left: 8px; width: auto; } }
.chat.chat-drawer { height: auto; }
.chat-drawer.hidden { display: none; }
.voice { background: rgba(255,255,255,.06); border-radius: 18px; padding: 4px 10px 4px 4px; min-width: 200px; }
.voice .vplay { width: 32px; height: 32px; min-width: 32px; padding: 0; border-radius: 50%; background: var(--accent); color: #06231f; border: 0; font-size: 13px; }
.voice.playing .vplay { background: #f5c542; }
.voice .vbar { flex: 1; height: 5px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; cursor: pointer; }
.voice .vbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.voice .vdl { color: var(--muted); text-decoration: none; font-size: 14px; }

/* ================================================================= v3.1: pencarian target & wilayah operasi */
.search-list li.sr-head { cursor: default; font-size: 11px; font-weight: 700; color: #5f6368; text-transform: uppercase; letter-spacing: .05em; padding: 8px 14px 4px; border-top: 1px solid #e8eaed; background: #fff !important; }
.search-pin { background: none; border: 0; }
.search-pin .pm-label { top: 42px; }
.place-card .pc-coord { font-family: var(--mono); font-size: 11.5px; color: #3c4043; background: #f1f3f4; border-radius: 6px; padding: 4px 8px; margin: 4px 0 8px; cursor: pointer; word-break: break-all; }
.place-card .pc-radius { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #5f6368; margin: 0; }
.place-card .pc-radius input { width: 70px; padding: 4px 6px; background: #fff; color: #202124; border: 1px solid #dadce0; }
.place-card .row { gap: 6px; }
.ops-box { margin-top: 16px; }
.ops-applied small { white-space: normal !important; }
.ops-editor { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.ops-editor[open] { padding-bottom: 12px; }
.ops-editor summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--accent); }
.ops-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.ops-item { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 12.5px; }
.ops-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-item small { color: var(--muted); }
.ops-item button { padding: 1px 6px; font-size: 11px; }
.ops-tip { font-size: 11.5px; margin: 6px 0; }
.ops-r { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; }
.ops-r input { width: 64px; padding: 4px 6px; }
.ops-drawing { margin-top: 8px; background: rgba(247,107,21,.12); border: 1px solid rgba(247,107,21,.5); border-radius: 8px; padding: 6px 8px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ================================================================= v4: TEMA GELAP / TERANG + POLES UI/UX */
/* Variabel panel di atas peta (search, tools, kartu tempat, panel unit, dll). */
:root {
  --m-bg: #1e2635; --m-bg-2: #283143; --m-bg-3: #313b50; --m-text: #e8eaed; --m-sub: #a5afc2; --m-line: #3a4559; --m-line-2: #323c50;
  --m-blue: #8ab4f8; --m-blue-strong: #4f8ff0; --m-blue-soft: rgba(138, 180, 248, .16); --m-blue-soft-2: rgba(138, 180, 248, .28);
  --m-shadow: 0 3px 14px rgba(0, 0, 0, .55); --m-glass: rgba(30, 38, 53, .94);
  --danger-text: #ff8a8d; --gold: #f5c542; --mine-bg: #17323a; --mine-line: #23525a; --ann-bg: #3a2f10; --ann-line: #8a6d16;
  --overlay: rgba(8, 12, 22, .72); --glass: rgba(13, 18, 32, .88); --drawer: rgba(22, 31, 51, .96); --soft: rgba(255, 255, 255, .06);
  --map-bg: #0a0f1b; --leaflet-bg: #1b2230; --planning-bg: #3a2f10; --planning-text: #f8d77a; --planning-line: #8a6d16;
  --on-accent: #06231f; --ring: rgba(46, 196, 182, .45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5f9; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #eef1f6; --line: #e2e7ef; --line-2: #cdd5e1;
  --text: #182033; --muted: #5a6680; --accent: #0e9384; --accent-2: #0b7a6e; --warn: #b7791f; --danger: #d92d33; --ok: #1f8a55; --info: #2563eb;
  --shadow: 0 8px 26px rgba(23, 32, 51, .12);
  --m-bg: #ffffff; --m-bg-2: #f1f3f4; --m-bg-3: #e8eaed; --m-text: #202124; --m-sub: #5f6368; --m-line: #dadce0; --m-line-2: #e8eaed;
  --m-blue: #1a73e8; --m-blue-strong: #1a73e8; --m-blue-soft: #e8f0fe; --m-blue-soft-2: #d2e3fc;
  --m-shadow: 0 2px 8px rgba(60, 64, 67, .28); --m-glass: rgba(255, 255, 255, .96);
  --danger-text: #c62a2f; --gold: #9a6b00; --mine-bg: #e3f6f3; --mine-line: #a8e0d8; --ann-bg: #fff6dc; --ann-line: #f0cf6b;
  --overlay: rgba(236, 240, 246, .78); --glass: rgba(255, 255, 255, .92); --drawer: rgba(255, 255, 255, .97); --soft: rgba(15, 23, 42, .05);
  --map-bg: #e5e9ef; --leaflet-bg: #dfe6ec; --planning-bg: #fef7e0; --planning-text: #7a5200; --planning-line: #f9d77e;
  --on-accent: #ffffff; --ring: rgba(14, 147, 132, .35);
  color-scheme: light;
}

/* transisi halus saat ganti tema */
body, .topbar, .side, .card, .bottombar, .hud, .tabs button, input, select, textarea, button, .btn,
.searchbox, .search-list, .place-card, .tools-palette, .unit-panel, .crumbbar, .layer-switch, .msg, .chat {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
::selection { background: rgba(46, 196, 182, .35); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }

/* fokus keyboard yang jelas */
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input:focus, select:focus, textarea:focus { outline: 0; box-shadow: 0 0 0 3px var(--ring); border-color: var(--accent); }

/* scrollbar tipis */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }
::-webkit-scrollbar-track { background: transparent; }

/* kontrol dasar */
button, .btn { border-radius: 9px; }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button.primary { color: var(--on-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
button.primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); filter: brightness(1.08); }
button.danger { color: var(--danger-text); }
button.active { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.error-msg { color: var(--danger-text); }
.card { box-shadow: var(--shadow); }
:root[data-theme="dark"] .card { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .25); }
.card h3 { font-size: 17px; }
label { letter-spacing: .03em; }
select { cursor: pointer; }

/* beranda & join */
.hero { background:
  radial-gradient(900px 420px at 15% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
  radial-gradient(700px 380px at 100% 0%, color-mix(in srgb, var(--info) 14%, transparent), transparent 70%); }
.brand-logo { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.map-card { background: var(--bg-2); }
.map-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.steps li::marker { color: var(--accent); font-weight: 700; }

/* app shell */
.topbar { box-shadow: 0 1px 0 var(--line); }
.topbar .key-chip:hover { border-color: var(--accent); color: var(--accent); }
.tabs { background: var(--panel); }
.tabs button:hover { color: var(--text); background: var(--soft); }
.tabs button.active { background: transparent; }
.player-item, .role-row, .map-card { transition: border-color .15s, background-color .15s, transform .15s; }
.player-item:hover, .role-row:hover { border-color: var(--line-2); }
.log-row .t { color: var(--muted); opacity: .75; }
.log-row:hover { background: var(--soft); }
.map-wrap { background: var(--map-bg); }
.breadcrumb { background: var(--glass); }
.map-overlay { background: var(--overlay); }
.drawer { background: var(--drawer); }
.toast { color: var(--text); background: var(--panel); }

/* chat */
.msg.mine { background: var(--mine-bg); border-color: var(--mine-line); }
.msg.announce { background: var(--ann-bg); border-color: var(--ann-line); }
.msg .mann, .chat-ann { color: var(--gold); }
.msg .mtime { color: var(--muted); }
.rq, .voice { background: var(--soft); }
.voice .vbar { background: color-mix(in srgb, var(--text) 15%, transparent); }
.voice .vplay { color: var(--on-accent); }

/* ---------- panel di atas peta: pakai variabel --m-* (terang = gaya Google Maps, gelap = mode malam) */
.lmap { background: var(--leaflet-bg); }
.searchbox { background: var(--m-bg); box-shadow: var(--m-shadow); }
.searchbox:focus-within { box-shadow: var(--m-shadow), 0 0 0 2px var(--m-blue-soft-2); }
.searchbox .s-ic, .searchbox button { color: var(--m-sub); }
.searchbox button:hover { background: var(--m-bg-2); }
.searchbox input { color: var(--m-text); }
.searchbox input:focus { box-shadow: none; }
.search-list { background: var(--m-bg); box-shadow: var(--m-shadow); }
.search-list li { color: var(--m-text); }
.search-list li.active, .search-list li:hover { background: var(--m-bg-2); }
.search-list .sr-tx small { color: var(--m-sub); }
.search-list li.sr-online, .search-list li.sr-head { border-top-color: var(--m-line-2); }
.search-list li.sr-head { background: var(--m-bg) !important; color: var(--m-sub); }
.crumbbar { background: var(--m-glass); color: var(--m-text); box-shadow: var(--m-shadow); }
.crumbbar .lvl-name, .crumbbar span.crumb { color: var(--m-sub); }
.crumbbar button { color: var(--m-blue); }
.crumbbar span.crumb.current, .crumbbar button.current { color: var(--m-text); }
.place-card { background: var(--m-bg); color: var(--m-text); box-shadow: var(--m-shadow); }
.place-card p, .place-card .pc-radius { color: var(--m-sub); }
.place-card .row button { background: var(--m-bg); color: var(--m-blue); border-color: var(--m-line); }
.place-card .row button:hover:not(:disabled) { background: var(--m-blue-soft); border-color: var(--m-blue); }
.place-card .row button.primary { background: var(--m-blue-strong); color: #fff; border-color: var(--m-blue-strong); }
.place-card .pc-coord { background: var(--m-bg-2); color: var(--m-text); }
.place-card .pc-radius input { background: var(--m-bg); color: var(--m-text); border-color: var(--m-line); }
.layer-switch, .layer-switch button { background: var(--m-bg); color: var(--m-text); }
.layer-switch { box-shadow: var(--m-shadow); }
.layer-switch button:hover:not(.active) { background: var(--m-bg-2); }
.layer-switch button.active { background: var(--m-blue-soft); color: var(--m-blue); }
.map-right-tools > button, .zoom-ctrl button { background: var(--m-bg); color: var(--m-text); box-shadow: var(--m-shadow); }
.map-right-tools > button:hover:not(:disabled), .zoom-ctrl button:hover:not(:disabled) { background: var(--m-bg-2); }
.map-select { width: auto; max-width: 200px; background: var(--m-bg); color: var(--m-text); border: 0; box-shadow: var(--m-shadow); }
.tools-palette { background: var(--m-glass); color: var(--m-text); box-shadow: var(--m-shadow); }
.tools-toggle { background: var(--m-bg); color: var(--m-text); border-bottom-color: var(--m-line-2); }
.tools-toggle:hover:not(:disabled) { background: var(--m-bg-2); }
.tools-hint, .tools-gt { color: var(--m-sub); }
.tool { background: var(--m-bg-2); color: var(--m-text); border-color: var(--m-line-2); }
.tool:hover { border-color: var(--m-blue); background: var(--m-blue-soft); }
.tool.armed { border-color: var(--m-blue); background: var(--m-blue-soft-2); box-shadow: inset 0 0 0 1px var(--m-blue); }
.unit-panel { background: var(--m-bg); color: var(--m-text); box-shadow: var(--m-shadow); }
.unit-panel button { background: var(--m-bg); color: var(--m-text); border-color: var(--m-line); }
.unit-panel button:hover:not(:disabled) { background: var(--m-bg-2); }
.unit-panel button.primary { background: var(--m-blue-strong); color: #fff; border-color: var(--m-blue-strong); }
.unit-panel button.danger { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.unit-panel input, .unit-panel select { background: var(--m-bg); color: var(--m-text); border-color: var(--m-line); }
.up-head small, .up-status, .up-row label, .up-help { color: var(--m-sub); }
.up-state, .up-row .up-chk, .up-route { color: var(--m-text); }
.up-bar { background: var(--m-bg-3); }
.up-bar > div { background: var(--m-blue-strong); }
.up-draft { background: var(--m-blue-soft); }
.up-route button.pulse { border-color: var(--m-blue) !important; color: var(--m-blue); }
:root[data-theme="dark"] .up-state.st-playing { color: #5fd38d; }
:root[data-theme="dark"] .up-state.st-paused { color: #f6b04d; }
.rm-preview { background: var(--m-bg-2); }
.planning-banner { background: var(--planning-bg); color: var(--planning-text); border-color: var(--planning-line); }
.map-hint { background: rgba(32, 33, 36, .88); color: #fff; }

/* Leaflet: kontrol & atribusi ikut tema; peta jalan digelapkan di mode gelap */
:root[data-theme="dark"] .lmap[data-base="peta"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.75); }
:root[data-theme="dark"] .lmap[data-base="topo"] .leaflet-tile-pane { filter: brightness(.78) contrast(1.05); }
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(30, 38, 53, .8) !important; color: #a5afc2; }
:root[data-theme="dark"] .leaflet-control-attribution a { color: #8ab4f8; }
:root[data-theme="dark"] .leaflet-control-scale-line { background: rgba(30, 38, 53, .75); color: #e8eaed; border-color: #a5afc2; }

/* ---------- kontrol preferensi (bahasa + tema) */
.prefs { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.prefs .seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 2px; }
.prefs .seg button { border: 0; background: transparent; color: var(--muted); padding: 4px 9px; font-size: 12px; font-weight: 800; letter-spacing: .04em; border-radius: 7px; min-width: 0; }
.prefs .seg button.on { background: var(--accent); color: var(--on-accent); }
.prefs .seg button:hover:not(.on) { color: var(--text); }
.prefs .theme-btn { width: 32px; height: 30px; padding: 0; font-size: 16px; line-height: 1; border-radius: 9px; background: var(--panel-2); }
.prefs.floating { position: fixed; top: 14px; right: 14px; z-index: 1400; background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; padding: 5px; box-shadow: var(--shadow); }
@media (max-width: 520px) {
  .prefs .seg button { padding: 4px 6px; }
  .prefs.floating { top: 8px; right: 8px; }
}
/* tab samping: muat label panjang (EN) tanpa terpotong */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; padding: 11px 9px; font-size: 12.5px; }

/* peran yang warnanya sudah dipakai pemain lain */
.role-card.taken { opacity: .55; cursor: not-allowed; }
.role-card .taken-by { color: var(--danger-text); margin-top: 6px !important; font-weight: 600; }

/* ================================================================= ukuran ikon mengikuti zoom (anti-tumpuk) */
/* l = penuh (zoom ≥ 11) · m = 78% (8–10) · s = 58% (6–7) · xs = 42% (≤ 5). Unit terpilih & posisi sendiri tetap penuh. */
.lmap { --us: 1; }
.lmap[data-zs="m"] { --us: .78; }
.lmap[data-zs="s"] { --us: .58; }
.lmap[data-zs="xs"] { --us: .42; }
.um-wrap .um, .pm-wrap .pm { transform: scale(var(--us)); transition: transform .2s ease; }
.um-wrap .um-dir { transform: rotate(var(--hd, 0deg)) scale(var(--us)); }
.um-wrap.sel .um, .um-wrap.sel .um-dir, .pm-wrap.self .pm, .pm-wrap.sel .pm { transform: none; }
.um-wrap.sel .um-dir { transform: rotate(var(--hd, 0deg)); }
/* label: hanya di zoom dekat; di zoom jauh muncul saat disorot / terpilih / milik sendiri */
.lmap:not([data-zs="l"]) .um-wrap .pm-label, .lmap:not([data-zs="l"]) .pm-wrap .pm-label { display: none; }
.lmap:not([data-zs="l"]) .um-wrap:hover .pm-label, .lmap:not([data-zs="l"]) .um-wrap.sel .pm-label,
.lmap:not([data-zs="l"]) .pm-wrap:hover .pm-label, .lmap:not([data-zs="l"]) .pm-wrap.self .pm-label { display: block; }
.lmap[data-zs="xs"] .um-wrap:not(.sel) .um-dir { display: none; }
.lmap:not([data-zs="l"]) .um { border-width: 2px; }
.lmap[data-zs="s"] .pm.self::before, .lmap[data-zs="xs"] .pm.self::before { inset: -5px; }
.um-wrap:hover, .pm-wrap:hover { z-index: 10000 !important; }
.um-wrap.sel { z-index: 9999 !important; }
/* kelompok unit yang menumpuk saat zoom jauh */
.uc-wrap { background: none; border: 0; }
.uc-badge { position: absolute; left: calc(17px * var(--us, 1) - 8px); top: calc(-17px * var(--us, 1) - 12px); min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #202124; color: #fff; border: 2px solid #fff; font: 800 11px/16px var(--font); text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.45); cursor: zoom-in; white-space: nowrap; }
.uc-badge:hover { background: #1a73e8; }

/* ================================================================= v4: IKON UNIT 3D REALISTIS */
/* .u3d = sprite 16 arah. Lapisan bawah: warna peran dipotong topeng bodi; lapisan atas: detail & bayangan. */
.u3d { position: relative; display: block; width: var(--s, 44px); height: var(--s, 44px); flex: none; pointer-events: none; }
.u3d > i { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 1600% 100%; background-position: var(--fx, 6.6667%) 0; }
.u3d .u3d-b { background-color: var(--c);
  -webkit-mask-image: var(--m); -webkit-mask-size: 1600% 100%; -webkit-mask-position: var(--fx, 6.6667%) 0; -webkit-mask-repeat: no-repeat;
  mask-image: var(--m); mask-size: 1600% 100%; mask-position: var(--fx, 6.6667%) 0; mask-repeat: no-repeat; }
.u3d .u3d-o { background-image: var(--o); }

/* wadah ikon: tanpa kotak warna, model 3D langsung tampil */
.tool-ic, .up-ic { width: 46px; height: 46px; background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.tool-ic .u3d { --s: 46px !important; }
.up-ic { width: 54px; height: 54px; background: var(--m-bg-2); border-radius: 12px; }
.up-ic .u3d { --s: 54px !important; }
.unit-list .tool-ic { width: 38px; height: 38px; }
.unit-list .tool-ic .u3d { --s: 38px !important; }
.rm-preview .tool-ic { width: 52px; height: 52px; }
.rm-preview .tool-ic .u3d { --s: 52px !important; }
.tool { padding: 4px 2px 6px; }
.tool:hover .u3d { transform: translateY(-2px) scale(1.06); transition: transform .15s; }

/* marker unit di peta */
.um { width: 34px; height: 34px; background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; display: block; }
.um .u3d { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; z-index: 1;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .85)); }
.um.selected { outline: 0; }
.um.selected::before { content: ""; position: absolute; left: 50%; top: 58%; width: 50px; height: 26px; transform: translate(-50%, -50%);
  border: 3px solid #1a73e8; border-radius: 50%; background: rgba(26, 115, 232, .18); z-index: 0; }
.um.playing::after { inset: auto; left: 50%; top: 58%; width: 44px; height: 22px; border-radius: 50%; transform: translate(-50%, -50%);
  border: 2.5px solid var(--c); animation: pulse3d 1.2s ease-out infinite; z-index: 0; }
@keyframes pulse3d { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.8); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } }
.um.paused .u3d { filter: saturate(.55) drop-shadow(0 0 1px rgba(255, 255, 255, .85)); }
.um-wrap .um-dir { display: none !important; }        /* arah ditunjukkan oleh model yang berputar */
.um-wrap .pm-label { top: calc(100% + 8px); }

/* ================================================================= v4.1: SNAPSHOT */
.snap-btn.busy { pointer-events: none; opacity: .6; }
.snap-btn.busy::after { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.snap-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(8, 12, 22, .66); display: grid; place-items: center; padding: 16px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.snap-card { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.snap-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.snap-head .muted { font-size: 12px; font-family: var(--mono); }
.snap-x { margin-left: auto; }
.snap-img { flex: 1; min-height: 0; overflow: auto; background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; padding: 10px; }
.snap-img img { max-width: 100%; max-height: 62vh; height: auto; border-radius: 6px; box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
  -webkit-touch-callout: default; user-select: auto; }
.snap-tip { margin: 0; padding: 0 16px; font-size: 12px; }
.snap-tip:empty { display: none; }
.snap-actions { display: flex; gap: 8px; padding: 12px 16px 14px; flex-wrap: wrap; }
.snap-actions button { flex: 1 1 140px; }

/* ================================================================= v4.1: HP & TABLET (responsif + sentuh) */
/* chip mode "ketuk peta" dengan tombol Batal/Selesai (pengganti Esc/Enter) */
.mode-chip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1150; display: flex; align-items: center; gap: 8px;
  background: rgba(32, 33, 36, .94); color: #fff; padding: 6px 6px 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  font-size: 13px; max-width: calc(100% - 24px); }
.mode-chip .mc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mode-chip button { flex: none; border-radius: 999px; background: #fff; color: #202124; border: 0; }
.mode-chip button.primary { background: var(--accent); color: var(--on-accent); }
body.mode-active .map-hint, body.mode-active .planning-banner { display: none !important; }

/* topbar tidak boleh melebar keluar layar */
.topbar { min-width: 0; overflow: hidden; }
.topbar > * { flex-shrink: 0; }
.topbar .session-name, .topbar .role-pill { flex-shrink: 1; min-width: 0; }
.topbar .role-pill { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hud { padding-bottom: calc(10px + env(safe-area-inset-bottom)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
.topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* perangkat sentuh: target sentuh lebih besar, input 16px (iOS tidak auto-zoom) */
.touch input:not([type=checkbox]):not([type=color]), .touch select, .touch textarea { font-size: 16px; }
.touch button.sm { min-height: 34px; }
.touch .tool { min-height: 72px; }
.touch .leaflet-container { -webkit-tap-highlight-color: transparent; }
.touch .lmap:not([data-zs="l"]) .um-wrap .pm-label { display: none; }

/* tablet & HP (≤ 900px) */
@media (max-width: 900px) {
  .tools-palette:not(.collapsed) { width: min(100%, 440px); max-height: 52vh; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .planning-banner { left: 12px; right: 12px; transform: none; max-width: none; min-width: 0; bottom: 12px; top: auto; font-size: 12px; padding: 6px 10px; }
  .unit-panel { max-height: 60vh; overflow-y: auto; }
  .snap-actions button { flex-basis: 120px; }
}

/* HP (≤ 640px) */
@media (max-width: 640px) {
  .topbar { gap: 6px; min-height: 50px; padding-top: 6px; padding-bottom: 6px; }
  .topbar .brand-logo { width: 30px; height: 30px; font-size: 11px; }
  .topbar .title, .topbar .session-name, .topbar .sess-lbl, .topbar .lbl, #connText { display: none; }
  .topbar .key-chip { padding: 4px 7px; letter-spacing: .08em; font-size: 13px; }
  .topbar .badge { padding: 2px 6px; font-size: 10px; }
  .topbar button.sm { padding: 5px 9px; }
  .topbar .role-pill { font-size: 13px; max-width: 34vw; }
  .prefs .theme-btn { width: 30px; height: 28px; }
  .map-top { top: 56px; left: 8px; width: calc(100% - 16px); gap: 6px; bottom: 70px; }
  .map-right-tools { top: 8px; right: 8px; gap: 6px; }
  .layer-switch button { padding: 6px 8px; font-size: 12px; }
  .map-right-tools > button { padding: 6px 8px; min-width: 34px; }
  .searchbox { height: 42px; }
  .searchbox input { font-size: 16px; }
  .crumbbar { font-size: 12px; }
  .zoom-ctrl { right: 8px; bottom: 8px; }
  .zoom-ctrl button { width: 36px; height: 36px; font-size: 16px; }
  .touch .zoom-ctrl #zIn, .touch .zoom-ctrl #zOut { display: none; }   /* pakai cubit (pinch) */
  .tools-palette:not(.collapsed) { width: 100%; max-height: 48vh; }
  .unit-panel { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; border-radius: 12px; }
  .up-play { grid-template-columns: 1fr 1fr 1fr auto; }
  .up-row input[type=number] { width: 84px; }
  .place-card { max-height: 40vh; overflow-y: auto; }
  .hud { gap: 6px; padding-top: 8px; }
  .hud .where { font-size: 12px; }
  .hud .where b { font-size: 14px; }
  .hud .actions { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .hud .actions::-webkit-scrollbar { display: none; }
  .hud .actions > * { flex: none; }
  #actSelect { min-width: 120px !important; }
  .my-units { border-right: 0; }
  .chat-drawer { top: 54px; left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; border-width: 1px 0 0; }
  .drawer { top: 56px; }
  .lobby { padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); }
  .lobby h2 { font-size: 20px; }
  .swatches { grid-template-columns: repeat(8, 1fr); gap: 5px; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .main.host-main { grid-template-rows: 62vh auto; grid-template-rows: 62dvh auto; }
  .bottombar .log { height: 120px; }
  .statusline { gap: 12px; }
  .hero { padding: 28px 12px; }
  .brand h1 { font-size: 22px; }
  .card { padding: 14px; }
  .mode-chip { bottom: 10px; font-size: 12px; }
  .snap-modal { padding: 0; place-items: end stretch; }
  .snap-card { border-radius: 14px 14px 0 0; max-height: 92vh; }
  .snap-img img { max-height: 55vh; }
}
@media (max-width: 380px) {
  .topbar .badge { display: none; }
  .layer-switch button { padding: 6px 6px; font-size: 11.5px; }
}
@media (max-width: 900px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .side, .tabs, .tab-body, .bottombar, .bottombar > * { min-width: 0; }
  .bottombar { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================= v5: HP — panel bawah bisa dikecilkan, Tools ringkas */
.hud { position: relative; z-index: 1190; }
.hud-toggle { display: none; }
.planning-banner { display: flex; align-items: center; gap: 8px; }
.planning-banner > span { flex: 1; min-width: 0; }
.planning-banner .pb-x { flex: none; background: transparent; border: 0; color: inherit; padding: 2px 6px; font-size: 13px; opacity: .75; min-height: 0 !important; }
.planning-banner .pb-x:hover { opacity: 1; }
.planning-banner.dismissed { display: none !important; }

@media (max-width: 900px) {
  .hud-toggle { display: grid; place-items: center; position: absolute; right: max(10px, env(safe-area-inset-right)); top: -15px; z-index: 5;
    width: 44px; height: 26px; padding: 0; border-radius: 13px 13px 0 0; border: 1px solid var(--line); border-bottom: 0;
    background: var(--bg-2); color: var(--muted); font-size: 13px; box-shadow: 0 -2px 6px rgba(0, 0, 0, .12); }
  .hud.min { padding-top: 7px; padding-bottom: calc(7px + env(safe-area-inset-bottom)); gap: 0; grid-template-columns: 1fr; }
  .hud.min .actions, .hud.min .where .muted { display: none; }
  .hud.min .where b { font-size: 13px; padding-right: 50px; }
  .hud.min .where b::before { content: "📍 "; }
}

@media (max-width: 640px) {
  /* Tools: kotak pilihan lebih kecil, 4–5 per baris */
  .tools-palette:not(.collapsed) { max-height: 42vh; }
  .tools-body { padding: 2px 6px 8px; }
  .tools-hint { display: none; }
  .tools-gt { font-size: 9.5px; margin: 6px 2px 3px; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 3px; }
  .tool, .touch .tool { min-height: 0; padding: 2px 1px 4px; gap: 1px; border-radius: 8px; }
  .tool-ic { width: 36px; height: 36px; }
  .tool-ic .u3d { --s: 36px !important; }
  .tool-nm { font-size: 9px; line-height: 1.1; }
  .tools-toggle { padding: 7px 10px; }
  /* banner persiapan lebih ringkas */
  .planning-banner { font-size: 11.5px; padding: 5px 4px 5px 10px; text-align: left; bottom: 10px; }
}
@media (max-width: 640px) {
  .planning-banner { right: 56px; bottom: 18px; }
  .zoom-ctrl { bottom: 18px; }
  .mode-chip { bottom: 18px; }
}

/* ================================================================= v2.1-baru: panel unit transparan & bisa digeser, lokasi & tujuan otomatis */
:root { --m-panel: rgba(30, 38, 53, .80); }
:root[data-theme="light"] { --m-panel: rgba(255, 255, 255, .80); }
.unit-panel { background: var(--m-panel); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid color-mix(in srgb, var(--m-line) 70%, transparent); padding-top: 16px; transition: background-color .2s, box-shadow .2s; }
.unit-panel:hover, .unit-panel:focus-within { background: color-mix(in srgb, var(--m-bg) 92%, transparent); }
.unit-panel.dragging { background: color-mix(in srgb, var(--m-bg) 62%, transparent); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); user-select: none; }
.unit-panel.moved { right: auto; bottom: auto; }
.up-grip { position: absolute; left: 50%; top: 5px; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--m-sub) 55%, transparent); cursor: grab; }
.up-grip::before { content: ""; position: absolute; inset: -8px -20px; }
.up-head { cursor: grab; touch-action: none; }
.unit-panel.dragging .up-head, .unit-panel.dragging .up-grip { cursor: grabbing; }
.up-head input, .up-head button { cursor: auto; }
.unit-panel input, .unit-panel select { background: color-mix(in srgb, var(--m-bg) 85%, transparent); }
.up-ic { background: color-mix(in srgb, var(--m-bg-2) 75%, transparent); }

.up-loc { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 12.5px; color: var(--m-text); line-height: 1.35; }
.up-loc span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.up-goal { margin-top: 4px; }
.up-goal b { font-weight: 700; }

.up-dest { position: relative; margin: 10px 0 2px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--m-blue-soft) 80%, transparent); }
.up-dest-l { margin: 0 0 5px; color: var(--m-text); font-size: 11.5px; }
.up-dest-row { display: flex; gap: 6px; }
.up-dest-in { flex: 1; min-width: 0; }
.up-dest-mode { width: auto !important; max-width: 46%; font-size: 12px !important; }
.up-dest-list { top: auto; bottom: calc(100% - 4px); z-index: 20; max-height: 260px; }
.unit-panel.moved .up-dest-list.flip, .up-dest-list.below { bottom: auto; top: 58px; }
.up-dest-msg { font-size: 12px; margin-top: 6px; color: var(--m-sub); }
.up-dest-msg:empty { display: none; }
.up-dest-msg.ok { color: #188038; }
.up-dest-msg.warn { color: #b06000; }
:root[data-theme="dark"] .up-dest-msg.ok { color: #5fd38d; }
:root[data-theme="dark"] .up-dest-msg.warn { color: #f6b04d; }
@media (max-width: 640px) {
  .up-dest-row { flex-wrap: wrap; }
  .up-dest-mode { max-width: none; flex: 1 1 100%; }
}

/* ================================================================= lck-v1: RUANG SUARA LANGSUNG */
.vc-btn { position: relative; }
.vc-btn.live::after { content: attr(data-count); position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--ok); color: #fff; font: 800 10.5px/17px var(--font); text-align: center; }
.vc-btn.active { border-color: var(--accent); color: var(--accent); }

.vc-dock { position: fixed; top: 64px; right: 12px; z-index: 1300; width: 310px; max-height: calc(100vh - 90px); display: flex; flex-direction: column;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.vc-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.vc-head .vc-count { font-size: 12px; }
.vc-close { margin-left: auto; }
.vc-hint { margin: 8px 14px 0; font-size: 12px; }
.vc-list { list-style: none; margin: 6px 0; padding: 0 8px; overflow-y: auto; flex: 1; min-height: 40px; }
.vc-list li { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 10px; transition: background-color .15s; }
.vc-list li.speaking { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.vc-empty { justify-content: center; font-size: 13px; padding: 14px !important; }
.vc-av { width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.vc-list li.speaking .vc-av { box-shadow: 0 0 0 3px var(--ok), 0 0 12px var(--ok); animation: vcpulse 1s ease-in-out infinite; }
@keyframes vcpulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 60%, transparent), 0 0 16px var(--ok); } }
.vc-nm { flex: 1; min-width: 0; }
.vc-nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.vc-nm small { color: var(--muted); font-size: 11.5px; }
.vc-st { font-size: 16px; }
.vc-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.vc-actions button { flex: 1 1 120px; }

.vc-pill { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 1120; display: flex; align-items: center; gap: 6px;
  background: rgba(20, 24, 32, .92); color: #fff; border-radius: 999px; padding: 5px 6px 5px 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); font-size: 12.5px; white-space: nowrap; }
.vc-pill .vc-live { color: #5fd38d; font-weight: 700; }
.vc-pill button { background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; min-height: 0; }
.vc-pill .vc-mic { background: #c62a2f; }
.vc-pill .vc-mic.on { background: #188038; }
.vc-pill .vc-mic.talking { box-shadow: 0 0 0 3px rgba(95, 211, 141, .55); }
.vc-pill .vc-hang { background: #c62a2f; padding: 5px 10px; }

.vc-talk { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1250; display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 640px); background: rgba(24, 128, 56, .95); color: #fff; padding: 8px 14px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  font-size: 13.5px; animation: slidein .2s ease; pointer-events: auto; }
.vc-talk b { font-weight: 800; }
.vc-talk small { opacity: .85; font-size: 11.5px; }
.vc-talk button { margin-left: 6px; }
.host-app ~ .vc-talk { left: calc(50% + 170px); }
.vc-pill ~ .vc-talk { top: 64px; }
.vc-wave { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.vc-wave i { width: 3px; background: #fff; border-radius: 2px; animation: vcwave .9s ease-in-out infinite; }
.vc-wave i:nth-child(2) { animation-delay: .15s; } .vc-wave i:nth-child(3) { animation-delay: .3s; }
@keyframes vcwave { 0%, 100% { height: 4px; } 50% { height: 14px; } }
/* jangan menutupi kotak pencarian: notifikasi turun sedikit bila pill tampil */
@media (max-width: 900px) {
  .host-app ~ .vc-talk { left: 50%; }
}
@media (max-width: 640px) {
  .vc-dock { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 70vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .vc-pill { top: auto; bottom: 64px; }
  .vc-pill .vc-live { display: none; }
  .vc-talk { top: 58px; font-size: 12.5px; }
}
body.vc-in-call .vc-talk { top: 108px; }
@media (max-width: 640px) {
  body.vc-in-call .vc-talk { top: 58px; }
  .vc-pill { bottom: 88px; }
}

/* ================================================================= lck-v2: login Host & dashboard */
.land-top { position: fixed; top: 14px; right: 64px; z-index: 1401; }
.land-top .btn { padding: 7px 12px; border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.landing-join { width: 100%; max-width: 440px; }
.host-note { text-align: center; font-size: 13px; margin-top: 14px; }
.auth-card { width: 100%; max-width: 400px; }
.pw-row { display: flex; gap: 6px; }
.pw-row input { flex: 1; }
.dash-app { grid-template-rows: auto 1fr; }
.dash { display: grid; grid-template-columns: minmax(320px, 1.1fr) 1fr; gap: 18px; padding: 18px; overflow-y: auto; align-content: start; max-width: 1280px; width: 100%; margin: 0 auto; }
.dash #accCard { grid-column: 2; }
.dash-user { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.dash-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.dash-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.dash-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row small { color: var(--muted); font-size: 11.5px; }
.dash-row .key-chip { font-family: var(--mono); font-weight: 700; letter-spacing: .12em; background: var(--panel-2); padding: 4px 8px; border-radius: 7px; border: 1px dashed var(--line-2); cursor: pointer; font-size: 12px; }
.acc-form { margin-top: 12px; }
.acc-form input { width: auto; min-width: 140px; }
.up-preview { color: var(--m-blue); }
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; padding: 12px; }
  .dash #accCard { grid-column: auto; }
  .dash-row { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .land-top { top: 8px; right: 52px; }
  .dash-user .muted { display: none; }
}

/* ================================================================= lck-v3: MUSIK */
.mz { position: fixed; left: 12px; bottom: 12px; z-index: 1150; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px;
  background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-width: min(380px, calc(100vw - 24px)); }
.mz.hidden { display: none; }
.mz-video { width: 128px; height: 72px; flex: none; border-radius: 8px; overflow: hidden; background: #000; }
.mz-video iframe { width: 100%; height: 100%; display: block; border: 0; }
.mz.big .mz-video { width: 240px; height: 135px; }
.mz-art { width: 100%; height: 100%; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, var(--accent), var(--info)); }
.mz-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mz-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mz-title b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-note { color: var(--muted); font-size: 11px; line-height: 1.25; }
.mz-note:empty { display: none; }
.mz-ctl { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mz-ctl button { padding: 3px 8px; }
.mz-vol { width: 80px; padding: 0; height: 18px; }
.mz-size { position: absolute; top: 2px; right: 2px; padding: 0 5px !important; min-height: 0 !important; font-size: 11px; opacity: .6; }
.mz-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; width: 13px; flex: none; }
.mz-bars i { width: 3px; height: 3px; background: var(--accent); border-radius: 1px; }
.mz.playing .mz-bars i { animation: vcwave .9s ease-in-out infinite; }
.mz.playing .mz-bars i:nth-child(2) { animation-delay: .2s; } .mz.playing .mz-bars i:nth-child(3) { animation-delay: .4s; }
/* host: pemutar di dalam peta (kiri bawah), panel Tools tidak menutupinya */
.map-wrap > .mz { position: absolute; bottom: 30px; left: 10px; z-index: 1001; }
body.mz-on .map-wrap .map-top { bottom: 132px; }
/* pemain: di atas panel bawah saat peta tampil */
body:has(#mapArea:not(.hidden)) > .mz-session { bottom: 128px; }
body:has(#hud.min) > .mz-session { bottom: 52px; }
@media (max-width: 640px) {
  .mz { left: 8px; bottom: 8px; gap: 8px; max-width: calc(100vw - 16px); }
  .mz-video { width: 96px; height: 54px; }
  .mz.big .mz-video { width: 200px; height: 113px; }
  .mz-landing { bottom: calc(8px + env(safe-area-inset-bottom)); }
  body:has(#mapArea:not(.hidden)) > .mz-session { bottom: 150px; }
  body:has(#hud.min) > .mz-session { bottom: 76px; }
  .mz-session:not(.big) .mz-note { display: none; }
}
@media (max-width: 640px) {
  body:has(#mapArea:not(.hidden)) > .mz-session { bottom: 210px; }
  body:has(#hud.min) > .mz-session { bottom: 132px; }
}

/* lck-v3.1: pemutar musik ringkas — tanpa gambar & judul (judul/status tampil saat kursor diarahkan) */
.mz { padding: 4px 6px; gap: 6px; border-radius: 999px; }
.mz-video, .mz.big .mz-video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; left: 0; top: 0; }
.mz-title b, .mz-note, .mz-size { display: none !important; }
.mz-body { flex-direction: row; align-items: center; gap: 6px; }
.mz-title { flex: none; padding-left: 4px; }
.mz-title::before { content: "🎵"; font-size: 14px; }
.mz-bars { margin-left: 2px; }
.mz-ctl button { padding: 3px 9px; min-height: 0; border-radius: 999px; }
.mz-vol { width: 64px; }
.mz.blocked .mz-mute, .mz.blocked .mz-pp { animation: pulsebtn 1.2s ease-in-out infinite; border-color: var(--accent); }
@media (max-width: 640px) { .mz-video { width: 1px; height: 1px; } .mz-vol { width: 54px; } }
body.mz-on .map-wrap .map-top { bottom: 76px; }

/* ================================================================= logo aplikasi (lck-v3) */
.brand-logo { background: #000 url("/static/img/logo.png") center / cover no-repeat !important; color: transparent !important; font-size: 0 !important;
  border: 1px solid rgba(212, 165, 55, .55); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); overflow: hidden; }
.brand .brand-logo { width: 56px; height: 56px; border-radius: 14px; }

/* nama aplikasi: SriwijayaLand */
.brand h1 { letter-spacing: .02em; display: flex; flex-direction: column; line-height: 1.05; }
.brand h1 > span { display: none; }
.brand-sub { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin-top: 4px; }
.topbar .title { letter-spacing: .02em; }
@media (max-width: 640px) { .brand h1 { font-size: 24px; } .brand-sub { font-size: 11px; } }

/* ---------------------------------------------------------------- lck-v4: kamera otomatis */
.cam-chip {
  position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%); z-index: 1000;
  height: 34px; padding: 0 14px; border: 0; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer;
  background: var(--m-bg, #fff); color: var(--m-text, #3c4043); box-shadow: var(--m-shadow, 0 2px 6px rgba(0,0,0,.3));
}
.cam-chip:hover { background: var(--m-bg-2, #f1f3f4); }
.cam-chip.hidden { display: none; }
.cam-chip .cc-ic { font-size: 15px; line-height: 1; }
.cam-chip.on { box-shadow: var(--m-shadow, 0 2px 6px rgba(0,0,0,.3)), inset 0 0 0 2px #30a46c; }
.cam-chip.on .cc-ic { animation: camPulse 2s ease-in-out infinite; }
.cam-chip.manual, .cam-chip.free { box-shadow: var(--m-shadow, 0 2px 6px rgba(0,0,0,.3)), inset 0 0 0 2px #f5b400; }
.cam-chip .cc-act { background: var(--m-blue-strong, #1a73e8); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; margin-right: -8px; }
@keyframes camPulse { 50% { opacity: .5; } }
@media (max-width: 900px) { .cam-chip { bottom: 24px; } }
@media (max-width: 640px) {
  .cam-chip { height: 32px; padding: 0 12px; font-size: 11.5px; bottom: 22px; }
  .cam-chip.free .cc-t, .cam-chip.manual .cc-t { display: none; }
}

/* ================================================================= lck-v5: SriwijayaLand — halaman awal bercorak militer */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.land {
  --gold: #d4a537; --gold-2: #f1d27a; --olive: #4b5320; --olive-2: #6b7a34; --merah: #c8102e;
  background: #0a0f08; min-height: 100%; overflow-x: hidden;
}
body.land .land-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.land-bg > div { position: absolute; inset: 0; }
.lb-camo { background: url("/static/img/camo.svg") 0 0 / 192px 192px; opacity: .55;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, transparent 22%, #000 78%); mask-image: radial-gradient(120% 90% at 50% 40%, transparent 22%, #000 78%); }
.lb-topo { background: url("/static/img/topo.svg") center / cover no-repeat; opacity: .13; }
.lb-grid { background-image: linear-gradient(rgba(212,165,55,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(212,165,55,.07) 1px, transparent 1px);
  background-size: 64px 64px; -webkit-mask-image: linear-gradient(#000, transparent 85%); mask-image: linear-gradient(#000, transparent 85%); }
.lb-glow { background:
  radial-gradient(700px 420px at 28% 34%, rgba(47, 107, 47, .38), transparent 70%),
  radial-gradient(520px 360px at 80% 70%, rgba(212, 165, 55, .14), transparent 70%),
  linear-gradient(180deg, rgba(10,15,8,.2), rgba(10,15,8,.85)); }
.flag-stripe { position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 1402;
  background: linear-gradient(var(--merah) 0 50%, #fff 50% 100%); box-shadow: 0 1px 8px rgba(0,0,0,.4); }

body.land .hero.land-hero { position: relative; z-index: 1; background: none; min-height: calc(100vh - 34px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px); align-items: center; gap: 48px;
  max-width: 1180px; margin: 0 auto; padding: 72px 28px 40px; }
body.land .hero.land-narrow { display: flex; flex-direction: column; align-items: center; gap: 0; padding-top: 56px; max-width: 560px; }

.land-intro { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.land-logo { position: relative; width: min(640px, 100%); aspect-ratio: 3 / 2; margin: -10px 0 4px -18px; }
.land-logo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block;
  -webkit-mask-image: radial-gradient(closest-side, #000 74%, transparent 100%); mask-image: radial-gradient(closest-side, #000 74%, transparent 100%);
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); animation: landIn .9s cubic-bezier(.2,.8,.2,1) both; }
.land-logo .radar { position: absolute; left: 50%; top: 47%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, rgba(120, 220, 120, .0) 0 300deg, rgba(120, 220, 120, .22) 350deg, rgba(160, 255, 160, .45) 360deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 96%, transparent 100%); mask-image: radial-gradient(closest-side, #000 96%, transparent 100%);
  animation: radarSpin 6s linear infinite; opacity: .55; }
.land-logo .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 15%, rgba(212,165,55,.18) 15% 15.6%); }
.land-logo.sm { width: min(420px, 92vw); margin: 0 0 2px; }
@keyframes radarSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes landIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.land-kicker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.land-kicker span { font: 700 11px/1 var(--font); letter-spacing: .18em; color: var(--gold-2); padding: 6px 10px; border-radius: 6px;
  background: rgba(212,165,55,.10); border: 1px solid rgba(212,165,55,.35); }
body.land .tagline { color: #c9d1bd; font-size: 16px; line-height: 1.6; text-align: left; max-width: 560px; margin: 0 0 22px; }
body.land .land-narrow .tagline { text-align: center; margin-bottom: 18px; }

.land-feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 580px; }
.land-feats li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(43,59,31,.72), rgba(18,26,15,.72)); border: 1px solid rgba(212,165,55,.22);
  backdrop-filter: blur(6px); transition: transform .2s, border-color .2s; }
.land-feats li:hover { transform: translateY(-2px); border-color: rgba(212,165,55,.6); }
.land-feats svg { width: 34px; height: 34px; flex: none; padding: 7px; border-radius: 10px; background: rgba(212,165,55,.14);
  fill: none; stroke: var(--gold-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.land-feats b { display: block; color: #f3f0e2; font-size: 13.5px; }
.land-feats small { color: #9fab8d; font-size: 12px; }

/* kartu ber-sudut HUD */
body.land .landing-join { position: relative; z-index: 1; max-width: 420px; width: 100%; justify-self: end; }
.hud-card { position: relative; border-radius: 18px; padding: 22px 22px 18px; border: 1px solid rgba(212,165,55,.35) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.2) !important; animation: landIn .7s .15s cubic-bezier(.2,.8,.2,1) both; }
.hud-card::before, .hud-card::after { content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none; border: 2.5px solid var(--gold); }
.hud-card::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.hud-card::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.hud-head { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.hud-tag { font: 800 11px/1 var(--mono); letter-spacing: .16em; color: var(--olive-2); }
:root[data-theme="dark"] .hud-tag { color: var(--gold-2); }
.hud-live { display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--mono); letter-spacing: .14em; color: #30a46c; }
.hud-live i { width: 7px; height: 7px; border-radius: 50%; background: #30a46c; box-shadow: 0 0 0 0 rgba(48,164,108,.6); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(48,164,108,0); } 100% { box-shadow: 0 0 0 0 rgba(48,164,108,0); } }
.hud-card h3 { font-size: 22px; font-weight: 800; letter-spacing: .01em; margin-bottom: 10px; }
.hud-card input { height: 46px; border-radius: 11px; font-size: 15px; }
.hud-card .key-input { letter-spacing: .3em; font-weight: 800; text-transform: uppercase; text-align: center; font-family: var(--mono); font-size: 20px; }
button.btn-gold, .btn-gold { height: 48px; border-radius: 12px !important; border: 0 !important; font-weight: 800; font-size: 15px; letter-spacing: .03em; margin-top: 6px;
  color: #1b1503 !important; background: linear-gradient(180deg, #f1d27a, #d4a537 55%, #b8891f) !important;
  box-shadow: 0 8px 22px rgba(212,165,55,.35), inset 0 1px 0 rgba(255,255,255,.5) !important; transition: transform .15s, filter .15s; }
button.btn-gold:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
button.btn-gold:active { transform: translateY(1px); }
body.land .host-note { color: #b4bea4; }
body.land .host-note a { color: var(--gold-2); font-weight: 700; }
body.land .land-top .btn { background: rgba(18,26,15,.8); color: #f3f0e2; border: 1px solid rgba(212,165,55,.45); backdrop-filter: blur(8px); }
body.land .land-top .btn:hover { border-color: var(--gold); }
body.land .land-top { top: 18px; }
body.land .prefs.floating { top: 18px; }
.land-foot { position: relative; z-index: 1; text-align: center; font: 600 11px/1 var(--mono); letter-spacing: .14em; color: #7f8a6e; padding: 12px 16px 18px; text-transform: uppercase; }
.lf-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--merah); margin-right: 8px; vertical-align: middle; box-shadow: 8px 0 0 #fff; margin-right: 18px; }
body.land.mz-on .land-foot { padding-bottom: 76px; }

@media (max-width: 960px) {
  body.land .hero.land-hero { grid-template-columns: 1fr; gap: 22px; padding: 64px 16px 24px; justify-items: center; }
  .land-intro { display: contents; }               /* HP/tablet: form gabung tampil sebelum fitur */
  .land-hero:not(.land-narrow) .land-logo { order: 1; } .land-kicker { order: 2; }
  .land-hero:not(.land-narrow) .tagline { order: 3; max-width: 640px; }
  body.land .landing-join { order: 4; } .land-feats { order: 5; text-align: left; }
  .land-logo { margin: -6px auto 0; width: min(560px, 100%); }
  body.land .tagline { text-align: center; }
  .land-kicker { justify-content: center; }
  body.land .landing-join { justify-self: center; }
}
@media (max-width: 640px) {
  body.land .hero.land-hero { padding: 58px 12px 18px; gap: 12px; }
  .land-logo, .land-logo.sm { width: 100%; margin: -4px 0 -6px; }
  body.land .tagline { font-size: 14px; margin-bottom: 14px; }
  .land-kicker span { font-size: 9.5px; padding: 5px 7px; letter-spacing: .12em; }
  .land-feats { gap: 8px; }
  .land-feats li { padding: 9px 10px; gap: 9px; border-radius: 12px; }
  .land-feats svg { width: 28px; height: 28px; padding: 5px; }
  .land-feats b { font-size: 12.5px; } .land-feats small { font-size: 11px; }
  .hud-card { padding: 18px 16px 14px; }
  body.land .land-top { top: 12px; } body.land .prefs.floating { top: 12px; }
}
/* tema gelap: kartu bernuansa hijau loreng, bukan biru */
:root[data-theme="dark"] body.land { --panel: #141c11; --panel-2: #1b2616; --bg-2: #10170d; --line: #2c3a22; --line-2: #3d4d2c; --muted: #9fab8d; }
:root[data-theme="dark"] body.land .card { background: linear-gradient(180deg, rgba(27,38,22,.94), rgba(16,23,13,.94)); backdrop-filter: blur(10px); }
:root[data-theme="dark"] body.land input { background: #0d130b; border-color: #34452a; }
:root[data-theme="dark"] body.land input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,165,55,.18); }
body.land .landing-join, body.land .land-narrow { padding-bottom: 8px; }
@media (max-width: 640px) { body.land .land-foot { padding-bottom: 72px; } }
@media (prefers-reduced-motion: reduce) { .land-logo .radar, .hud-live i { animation: none; } }

/* ---------------------------------------------------------------- daftar pemain: ringkasan tools milik pemain */
.pu-box { grid-column: 1 / 4; margin-top: 8px; padding: 9px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; }
.pu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pu-head b { font-size: 15px; }
.pu-st { display: inline-flex; gap: 6px; margin-left: auto; font-size: 11px; color: var(--muted); }
.pu-st span { padding: 1px 6px; border-radius: 999px; background: var(--panel-2); }
.pu-st .on { color: var(--ok); }
.pu-types { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pu-type { cursor: pointer; color: inherit; font: inherit; line-height: 1.3; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 11.5px; }
.pu-type .tool-ic { width: 30px; height: 24px; flex: none; display: inline-grid; place-items: center; overflow: visible; }
.pu-type .tool-ic .u3d { --s: 30px !important; }
.pu-type .tool-ic svg { width: 18px; height: 18px; }
.pu-type:hover { border-color: var(--accent); }
.pu-type small.on { color: var(--ok); font-weight: 700; }

/* form gabung terkunci (IP diblokir sementara) */
form.locked button[type="submit"] { filter: grayscale(.85); opacity: .75; cursor: not-allowed; }
form.locked .error-msg { font-weight: 600; }

/* ================================================================= lck-v6: simbol taktis OMP */
svg.tac { display: block; overflow: visible; filter: drop-shadow(0 0 1.2px #fff) drop-shadow(0 0 1.2px #fff) drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.um svg.tac { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; z-index: 1; }
.tool-ic svg.tac { width: 36px; height: 36px; }
.unit-list .tool-ic svg.tac, .pu-type .tool-ic svg.tac { width: 24px; height: 24px; }
.up-ic svg.tac { width: 36px; height: 36px; }
.tools-group:has(.tool-tac) .tools-gt { color: #c8102e; }

/* ================================================================= lck-v6: pilihan jenis operasi OMP / OMSP */
.mode-pill { display: inline-block; font: 800 11px/1 var(--mono); letter-spacing: .12em; padding: 4px 8px; border-radius: 6px;
  background: color-mix(in srgb, #30a46c 16%, transparent); color: #1f8a57; border: 1px solid color-mix(in srgb, #30a46c 45%, transparent); vertical-align: middle; }
.mode-pill.omp, body[data-mode="omp"] .mode-pill { background: color-mix(in srgb, #c8102e 14%, transparent); color: #c8102e; border-color: color-mix(in srgb, #c8102e 45%, transparent); }
.topbar .mode-pill { margin-right: 8px; flex: none; }
.mode-main { padding: 28px 18px 40px; max-width: 1040px; width: 100%; margin: 0 auto; overflow-y: auto; }
.mode-head { text-align: center; margin-bottom: 22px; }
.mode-head h2 { font-size: 26px; margin: 0 0 6px; }
.mode-head p { margin: 0; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 20px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; }
.mode-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--mc); }
.mode-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--mc) 16%, transparent), transparent 70%); pointer-events: none; }
.mode-card:hover { transform: translateY(-3px); border-color: var(--mc); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.mode-card.omp { --mc: #c8102e; }
.mode-card.omsp { --mc: #30a46c; }
.mode-tag { font: 900 34px/1 var(--mono); letter-spacing: .08em; color: var(--mc); }
.mode-ic { position: absolute; right: 22px; top: 22px; width: 54px; height: 54px; color: var(--mc); opacity: .9; }
.mode-card h3 { font-size: 18px; margin: 0; }
.mode-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.mode-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.mode-count { font-size: 12.5px; color: var(--muted); }
.mode-go { font-weight: 800; color: #fff; background: var(--mc); padding: 8px 14px; border-radius: 10px; font-size: 13.5px; }
@media (max-width: 760px) {
  .mode-grid { grid-template-columns: 1fr; gap: 14px; }
  .mode-main { padding: 18px 12px 28px; }
  .mode-head h2 { font-size: 21px; }
  .mode-card { padding: 20px 18px 16px; }
  .mode-tag { font-size: 28px; }
  .mode-ic { width: 44px; height: 44px; }
  .topbar #modeSwitch .lbl { display: none; }
}
@media (max-width: 640px) { .topbar .mode-pill { font-size: 9.5px; padding: 3px 5px; margin-right: 4px; letter-spacing: .06em; } }
@media (max-width: 480px) { body:has(#lobby) .topbar .mode-pill { display: none; } }

/* lck-v6: simbol taktis lengkap — arah hadap, tingkat satuan, label garis/area, palet bisa dicari & dilipat */
.um.tacm svg.tac { transform: rotate(var(--rot, 0deg)); }
.um.tacm .ech { position: absolute; left: 50%; bottom: calc(50% + 15px); transform: translateX(-50%); z-index: 2; white-space: nowrap;
  font: 900 13px/1 Arial, Helvetica, sans-serif; letter-spacing: 1.5px; color: var(--c);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.um.tacm .ech i { font-style: normal; display: inline-block; min-width: 13px; height: 13px; line-height: 11px; text-align: center;
  border: 1.6px solid var(--c); border-radius: 50%; margin: 0 1px; font-size: 8.5px; background: rgba(255,255,255,.75); box-shadow: 0 0 2px #fff; }
.um.tacm.selected::before { top: 50%; width: 46px; height: 46px; border-radius: 50%; }
.tac-lbl span { position: absolute; transform: translate(-50%, -50%); font: 900 12px/1 Arial, Helvetica, sans-serif; color: var(--c);
  background: rgba(255,255,255,.92); padding: 2px 5px; border-radius: 5px; box-shadow: 0 1px 3px rgba(0,0,0,.35); white-space: nowrap; pointer-events: none; }
.up-tac { align-items: center; }
.up-rot { flex: 1 1 100%; min-width: 150px; display: flex !important; align-items: center; gap: 8px; }
.up-rot em { min-width: 34px; text-align: right; font-style: normal; }
.up-rot input[type=range] { flex: 1; width: auto; min-width: 0; }
.tools-search { width: calc(100% - 16px); margin: 0 8px 6px; height: 32px; font-size: 12.5px; border-radius: 8px; }
.tools-fold { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; width: 100%; font: inherit; color: inherit; }
.tools-fold small { opacity: .6; font-weight: 600; }
.tools-fold span { margin-left: auto; transition: transform .15s; }
.tools-group.folded .tools-grid { display: none; }
.tools-group.folded .tools-fold span { transform: rotate(-90deg); }
.tools-palette.searching .tools-group.folded .tools-grid { display: grid; }
.tools-palette.searching .tool.nomatch, .tools-palette.searching .tools-group.empty { display: none; }
.shape-handle { width: 16px !important; height: 16px !important; background: #fff; border: 2.5px solid #1a73e8; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.45); cursor: nwse-resize; }

/* ================================================================= lck-v6: halaman pilihan OMP / OMSP bergaya pangkalan taktis */
.mode-main { max-width: none; margin: 0; padding: 34px 22px 44px; color: #e8eef7;
  background:
    radial-gradient(900px 420px at 22% 18%, rgba(46, 200, 120, .12), transparent 70%),
    radial-gradient(900px 420px at 78% 18%, rgba(240, 180, 60, .12), transparent 70%),
    linear-gradient(rgba(120, 170, 220, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(120, 170, 220, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    #0f1724; }
.mode-main .mode-head h2 { color: #fff; font-size: 28px; letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.mode-main .mode-head p, .mode-main .mode-head p b { color: #a9b7cc; }
.mode-main .mode-grid { max-width: 1320px; margin: 0 auto; gap: 26px; }
.mode-card { padding: 0; gap: 0; border-radius: 20px; background: #111a28; border: 1.5px solid rgba(255,255,255,.08); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.mode-card::before, .mode-card::after { display: none; }
.mode-card.omp { --mc: #3ddc84; --mg: rgba(61, 220, 132, .45); }
.mode-card.omsp { --mc: #f2b84b; --mg: rgba(242, 184, 75, .45); }
.mode-art { display: block; width: 100%; height: auto; aspect-ratio: 800 / 547; object-fit: cover; transition: transform .35s ease, filter .35s ease; filter: saturate(.92); }
.mode-card:hover { transform: translateY(-4px); border-color: var(--mc); box-shadow: 0 0 0 1px var(--mc), 0 0 36px var(--mg), 0 22px 60px rgba(0,0,0,.6); }
.mode-card:hover .mode-art { transform: scale(1.025); filter: saturate(1.08) brightness(1.06); }
.mode-card .mode-foot { position: relative; z-index: 1; margin: 0; padding: 14px 18px; gap: 12px; justify-content: flex-start; border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(17,26,40,.96), #0c131e); }
.mode-card .mode-count { color: #c3cedd; font-size: 13px; }
.mode-feat { margin-left: auto; font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mc);
  border: 1px solid color-mix(in srgb, var(--mc) 55%, transparent); background: color-mix(in srgb, var(--mc) 12%, transparent); padding: 6px 9px; border-radius: 7px; }
.mode-card .mode-go { color: #08110c; background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 80%, #fff), var(--mc)); box-shadow: 0 0 18px var(--mg); }
.mode-card.omsp .mode-go { color: #1d1300; }
@media (max-width: 760px) {
  .mode-main { padding: 20px 12px 30px; }
  .mode-main .mode-head h2 { font-size: 22px; }
  .mode-feat { display: none; }
  .mode-card .mode-foot { padding: 12px 14px; }
}

/* lck-v6: latar halaman pilihan OMP/OMSP = latar halaman awal (loreng, kontur topografi, grid, pendar) */
.mode-main { position: relative; isolation: isolate; background: #0a0f08 !important; }
.mode-main .mode-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.mode-main .mode-bg > div { position: absolute; inset: 0; }
.mode-main .mode-head p, .mode-main .mode-head p b { color: #c9d1bd; }
.mode-card .mode-foot { display: flex; align-items: center; justify-content: flex-start; }
.mode-card .mode-count { order: 1; }
.mode-card .mode-feat { order: 2; margin-left: auto; }
.mode-card .mode-go { order: 3; margin-left: 10px; }
@media (max-width: 760px) { .mode-card .mode-go { margin-left: auto; } }

/* ================================================================= lck-v6: menu kiri Host bisa diminimalkan / peta penuh */
.host-app .main.host-main, .host-app .bottombar { transition: grid-template-columns .25s ease; }
.side-min-btn { flex: 0 0 auto !important; padding: 8px 12px !important; font-size: 16px !important; font-weight: 800; color: var(--muted); border-left: 1px solid var(--line) !important; }
.side-min-btn:hover { color: var(--accent) !important; }
.side-open-btn { display: none; position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 1001; border-radius: 0 12px 12px 0 !important;
  padding: 14px 10px 14px 8px; writing-mode: vertical-rl; font-weight: 800; letter-spacing: .08em;
  background: var(--m-bg, #fff); color: var(--m-text, #222); border: 0; box-shadow: var(--m-shadow, 0 2px 8px rgba(0,0,0,.3)); }
.side-open-btn span { font-size: 12px; text-transform: uppercase; }
.side-open-btn:hover { color: var(--accent); }
.host-app.side-min .main.host-main { grid-template-columns: 0 1fr; }
.host-app.side-min .main.host-main > .side { visibility: hidden; overflow: hidden; border-right: 0; }
.host-app.side-min .side-open-btn { display: block; }
.host-app.side-min .map-wrap .map-top { left: 52px; }
.host-app.map-full .bottombar { display: none; }
.zoom-ctrl #zFull.active { background: var(--accent); color: var(--on-accent, #fff); }
@media (max-width: 900px) {
  .host-app.side-min .main.host-main { grid-template-rows: calc(100dvh - 120px) 0; }
  .host-app.side-min .side-open-btn { top: auto; bottom: 90px; transform: none; }
}

/* ================================================================= LP-V7: halaman awal minimal (logo + form gabung), tombol kunci Host */
.land-top .lock-btn { width: 44px; height: 40px; padding: 0 !important; display: grid; place-items: center; font-size: 19px; }
body.land .hero.land-min { padding-top: 40px; gap: 6px; max-width: 600px; }
body.land .land-min .land-logo { width: min(560px, 100%); margin: 0 auto -6px; }
body.land .land-min .landing-join { width: 100%; max-width: 420px; justify-self: center; }
@media (max-width: 640px) { body.land .hero.land-min { padding-top: 54px; } }

/* LP-V7: konvoi */
.cv-wrap { background: none; border: 0; pointer-events: none; }
.cv-m { position: relative; width: 26px; height: 26px; display: grid; place-items: center; }
.cv-m .u3d { --s: 34px !important; }
.um-wrap .cv-n { position: absolute; right: -10px; top: -8px; z-index: 4; background: #0d1220; color: #fff; font: 800 10.5px/1 var(--font);
  padding: 3px 5px; border-radius: 999px; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.up-convoy { margin-top: 8px; padding: 9px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.up-cv-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.up-cv-head span { font-weight: 600; font-size: 12px; color: var(--muted); }
.up-convoy .up-row { margin: 0 0 6px; }
.esc-row { display: grid; grid-template-columns: 1fr 58px 92px 30px; gap: 5px; margin-bottom: 5px; }
.esc-row select, .esc-row input { height: 32px; font-size: 12.5px; padding: 0 6px; min-width: 0; }
.esc-row button { height: 32px; padding: 0; }
.up-convoy .row { gap: 6px; flex-wrap: wrap; }

/* LP-V7: logo halaman awal ditonjolkan — lebih besar dari form */
body.land .hero.land-min { max-width: 1100px; padding-top: 18px; gap: 0; justify-content: center; }
body.land .land-min .land-logo-xl { width: min(940px, 96vw, 88vh); margin: 0 auto -34px; z-index: 0; }
.land-logo-xl img { animation: landIn .9s cubic-bezier(.2,.8,.2,1) both, logoFloat 7s ease-in-out 1s infinite;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)) drop-shadow(0 0 26px rgba(232,182,64,.28)) saturate(1.08) contrast(1.04); }
.land-logo-xl .lg-glow { position: absolute; left: 50%; top: 48%; width: 78%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, rgba(242,196,80,.34), rgba(212,160,50,.14) 45%, rgba(60,140,60,.10) 70%, transparent 100%);
  filter: blur(10px); animation: logoPulse 4.5s ease-in-out infinite; pointer-events: none; }
.land-logo-xl .lg-rays { position: absolute; left: 50%; top: 48%; width: 112%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; z-index: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,110,.13) 0 3deg, transparent 3deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, rgba(0,0,0,.5) 48%, transparent 72%); mask-image: radial-gradient(closest-side, #000 20%, rgba(0,0,0,.5) 48%, transparent 72%);
  animation: raysSpin 60s linear infinite; pointer-events: none; }
.land-logo-xl .lg-ring { position: absolute; left: 50%; top: 48%; width: 74%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; z-index: 0;
  border: 1px dashed rgba(232,182,64,.35); box-shadow: 0 0 0 14px rgba(232,182,64,.04), inset 0 0 60px rgba(232,182,64,.10);
  animation: raysSpin 90s linear infinite reverse; pointer-events: none; }
.land-logo-xl .radar { width: 64%; opacity: .45; }
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes logoPulse { 0%,100% { opacity: .75; transform: translate(-50%,-50%) scale(.96); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.04); } }
@keyframes raysSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }
body.land .land-min .landing-join { max-width: 380px; position: relative; z-index: 2; }
body.land .land-min #joinForm { padding: 16px 20px 18px; }
body.land .land-min #joinForm h3 { font-size: 19px; margin: 6px 0 8px; }
body.land .land-min #joinForm input { height: 44px; }
@media (max-width: 640px) {
  body.land .hero.land-min { padding-top: 46px; }
  body.land .land-min .land-logo-xl { width: 104vw; margin: 0 -2vw -18px; }
}
@media (prefers-reduced-motion: reduce) { .land-logo-xl img, .land-logo-xl .lg-glow, .land-logo-xl .lg-rays, .land-logo-xl .lg-ring { animation: none; } }
/* layar lebar: logo besar di kiri, form di samping kanan */
@media (min-width: 900px) {
  body.land .hero.land-min { flex-direction: row; align-items: center; justify-content: center; gap: 12px; max-width: 1500px; min-height: calc(100vh - 34px); padding: 40px 28px 30px; }
  body.land .land-min .land-logo-xl { width: min(1000px, 60vw, 118vh); margin: 0 -6px 0 0; flex: none; }
  body.land .land-min .landing-join { flex: 0 0 370px; max-width: 370px; }
}

/* LP-V7: status akun Host (ditangguhkan / dilindungi) */
.acc-tag { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; font: 700 10px/1.4 var(--font); letter-spacing: .06em; vertical-align: 1px; }
.acc-tag.susp { background: rgba(220, 60, 60, .14); color: #d23c3c; border: 1px solid rgba(220, 60, 60, .35); }
.acc-tag.lock { background: rgba(212, 165, 55, .14); color: #b08420; border: 1px solid rgba(212, 165, 55, .4); }
.dash-row.acc-susp .grow b, .dash-row.acc-susp .grow small { opacity: .6; }
.dash-row .acc-warn { color: #b26a00; border-color: rgba(230, 150, 30, .5) !important; }
.dash-row .acc-act { color: #1d8a4a; border-color: rgba(30, 150, 80, .5) !important; }
