/* ============================================================
   ZhenPacking — design tokens & glass system
   Style: dark moss aurora + glassmorphism, lime action accent
   ============================================================ */
:root {
  --bg: #0b100b;
  --bg-2: #10160f;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --text: #eef3ea;
  --text-dim: #9aa89a;
  --text-faint: #66755f;
  --lime: #c9f73a;
  --lime-soft: rgba(201, 247, 58, 0.14);
  --lime-glow: rgba(201, 247, 58, 0.45);
  --red: #ff4d5e;
  --red-soft: rgba(255, 77, 94, 0.13);
  --green: #57e389;
  --amber: #ffb454;
  --blue: #6ea8ff;
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-size: 14px;
}
/* ---------- aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after {
  content: ''; position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  filter: blur(120px); opacity: 0.5;
}
.aurora::before { background: radial-gradient(circle, #23421f 0%, transparent 65%); top: -20vw; left: -12vw; animation: drift 26s ease-in-out infinite alternate; }
.aurora::after { background: radial-gradient(circle, #1b3a2a 0%, transparent 65%); bottom: -25vw; right: -15vw; animation: drift 32s ease-in-out infinite alternate-reverse; }
.aurora .blob3 { position: absolute; width: 40vw; height: 40vw; border-radius: 50%; filter: blur(110px); opacity: 0.32; background: radial-gradient(circle, #3a5a1e 0%, transparent 65%); top: 30vh; left: 38vw; animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 4vh) scale(1.15); } }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"); }

/* ---------- app shell ---------- */
.app { position: relative; z-index: 2; display: flex; height: 100vh; padding: 14px; gap: 14px; }
.sidebar {
  width: 74px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  padding: 16px 0; gap: 8px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--stroke);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.brand { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 14px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 22px rgba(201,247,58,0.28); }
.nav-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid transparent;
  background: transparent; color: var(--text-dim); cursor: pointer; display: grid; place-items: center;
  transition: all 0.25s; position: relative;
}
.nav-btn svg { width: 21px; height: 21px; }
.nav-btn:hover { color: var(--text); background: var(--glass-2); }
.nav-btn.active { color: var(--lime); background: var(--lime-soft); border-color: rgba(201,247,58,0.4); box-shadow: 0 0 18px rgba(201,247,58,0.15); }
.nav-btn .tip { position: absolute; left: 60px; top: 50%; transform: translateY(-50%); background: #1a231a; border: 1px solid var(--stroke-2); padding: 5px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 50; color: var(--text); }
.nav-btn:hover .tip { opacity: 1; }
.sidebar .spacer { flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3c5a2a, #1d2c18); border: 1px solid var(--stroke-2); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; color: var(--lime); font-size: 13px; }

.main { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(24px);
}
.topbar h1 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.topbar .sub { color: var(--text-faint); font-size: 12px; margin-left: 2px; }
.topbar .spacer { flex: 1; }

/* ---------- controls ---------- */
.seg { display: flex; background: rgba(0,0,0,0.35); border: 1px solid var(--stroke); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-dim); font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 14px; height: 14px; flex-shrink: 0; }
.seg button.on { background: var(--lime); color: #10160a; box-shadow: 0 0 14px rgba(201,247,58,0.35); }
.select, .input {
  background: rgba(0,0,0,0.35); border: 1px solid var(--stroke); color: var(--text);
  border-radius: 12px; padding: 9px 12px; font-family: var(--font-body); font-size: 13px; outline: none; transition: border 0.2s;
}
.select:focus, .input:focus { border-color: rgba(201,247,58,0.5); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aa89a' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.select option { background: #141b13; }
.btn {
  border: 1px solid var(--stroke-2); background: var(--glass-2); color: var(--text);
  padding: 10px 18px; border-radius: 13px; font-family: var(--font-body); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: rgba(255,255,255,0.11); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #d8ff5c, #a8e62b); color: #10160a; border: 0; box-shadow: 0 4px 28px rgba(201,247,58,0.35); }
.btn.primary:hover { box-shadow: 0 6px 36px rgba(201,247,58,0.55); }
.btn.ghost { background: transparent; border-color: var(--stroke); color: var(--text-dim); }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--stroke); background: var(--glass-2); color: var(--text-dim); cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: rgba(201,247,58,0.5); color: var(--text); }
.chip.static { cursor: default; }
.chip.lime { background: var(--lime-soft); border-color: rgba(201,247,58,0.4); color: var(--lime); }
.chip.red { background: var(--red-soft); border-color: rgba(255,77,94,0.4); color: var(--red); }
.chip.blue { background: rgba(110,168,255,0.12); border-color: rgba(110,168,255,0.35); color: var(--blue); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.high { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.medium { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot.low { background: var(--red); box-shadow: 0 0 8px var(--red); }
.toggle { position: relative; width: 40px; height: 22px; border-radius: 999px; background: rgba(0,0,0,0.4); border: 1px solid var(--stroke); cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-dim); transition: all 0.2s; }
.toggle.on { background: var(--lime-soft); border-color: rgba(201,247,58,0.5); }
.toggle.on::after { left: 20px; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); }
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--lime) var(--fill, 50%), rgba(255,255,255,0.12) var(--fill, 50%)); outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid #10160a; box-shadow: 0 0 14px var(--lime-glow); }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.stepper { display: flex; align-items: stretch; background: rgba(0,0,0,0.35); border: 1px solid var(--stroke); border-radius: 12px; overflow: hidden; transition: border 0.2s; }
.stepper:focus-within { border-color: rgba(201,247,58,0.5); }
.stepper .input { border: 0; background: transparent; text-align: center; width: 100%; min-width: 0; border-radius: 0; padding: 9px 4px; }
.step-btn { width: 34px; flex-shrink: 0; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; display: grid; place-items: center; transition: all 0.2s; }
.step-btn:hover { color: var(--lime); background: var(--lime-soft); }
.step-btn:active { transform: scale(0.92); }
.step-btn svg { width: 14px; height: 14px; }

/* ---------- views / cards ---------- */
.views { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; display: none; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
.view.on { display: block; animation: viewIn 0.35s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); padding: 22px; }
.card h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.card .desc { color: var(--text-dim); font-size: 13px; margin-top: 6px; line-height: 1.55; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }

/* ---------- analyze ---------- */
.analyze-wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.dropzone { border: 1.5px dashed rgba(201,247,58,0.35); border-radius: var(--radius); padding: 52px 24px; text-align: center; cursor: pointer; transition: all 0.25s; background: rgba(201,247,58,0.03); }
.dropzone:hover, .dropzone.drag { background: rgba(201,247,58,0.07); border-color: rgba(201,247,58,0.7); box-shadow: inset 0 0 40px rgba(201,247,58,0.06); }
.dropzone .dz-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--lime-soft); border: 1px solid rgba(201,247,58,0.35); color: var(--lime); }
.dropzone h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.dropzone p { color: var(--text-faint); font-size: 12px; margin-top: 5px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; justify-content: center; }
.thumb { position: relative; width: 92px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--stroke-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; padding: 0; }
.hintbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--stroke); font-size: 12.5px; color: var(--text-dim); }
.hintbar .cc { width: 38px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, #2b4a8f, #16294f); border: 1px solid rgba(110,168,255,0.4); flex-shrink: 0; position: relative; }
.hintbar .cc::after { content: ''; position: absolute; left: 4px; top: 5px; width: 8px; height: 6px; border-radius: 2px; background: #d9c26a; }
.opt-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt .label { font-size: 10px; }
.opt-inline { display: flex; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.3); border: 1px solid var(--stroke); border-radius: 12px; padding: 8px 12px; }
.opts { border: 1px solid var(--stroke); border-radius: 14px; background: rgba(0,0,0,0.2); }
.opts-title { padding: 12px 16px 0; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.opts .opts-body { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- analyze overlay (hi-tech scan) ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(5,8,5,0.72); backdrop-filter: blur(14px); }
.overlay.on { display: grid; animation: viewIn 0.3s ease; }
.scan-panel { width: min(680px, 92vw); border-radius: 24px; border: 1px solid rgba(201,247,58,0.25); background: rgba(12,18,12,0.85); padding: 26px; box-shadow: 0 0 80px rgba(201,247,58,0.12); }
.scan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.scan-head .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,247,58,0.5); } 50% { box-shadow: 0 0 0 8px rgba(201,247,58,0); } }
.scan-stage { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.scan-img-wrap { position: relative; width: 240px; height: 170px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(201,247,58,0.35); }
.scan-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.scanline { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--lime), transparent); box-shadow: 0 0 18px var(--lime); animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0%,100% { top: 4%; } 50% { top: 94%; } }
.scan-img-wrap::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(201,247,58,0.05) 0 1px, transparent 1px 4px); pointer-events: none; }
.hud-corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--lime); }
.hud-corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.scan-steps { display: flex; flex-direction: column; gap: 8px; }
.scan-step { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--stroke); color: var(--text-faint); font-size: 13px; transition: all 0.3s; }
.scan-step .st-ico { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-faint); display: grid; place-items: center; font-size: 10px; flex-shrink: 0; }
.scan-step.active { color: var(--text); border-color: rgba(201,247,58,0.5); background: var(--lime-soft); }
.scan-step.active .st-ico { border-color: var(--lime); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.scan-step.done { color: var(--lime); }
.scan-step.done .st-ico { border-color: var(--lime); background: var(--lime-soft); animation: none; }
.scan-step.done .st-ico::after { content: ''; width: 10px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9f73a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E") center/contain no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes logIn { to { opacity: 1; } }

/* ---------- copilot chat ---------- */
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; min-height: 120px; scrollbar-width: thin; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 12.5px; line-height: 1.55; animation: viewIn 0.3s ease; }
.msg.ai { align-self: flex-start; background: var(--glass-2); border: 1px solid var(--stroke); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--lime-soft); border: 1px solid rgba(201,247,58,0.3); border-bottom-right-radius: 4px; }
.msg .caret { display: inline-block; width: 7px; height: 14px; background: var(--lime); animation: pulse 0.8s infinite; vertical-align: -2px; }
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 4px; border-top: 1px solid var(--stroke); margin-top: 10px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 10px; }
.chat-input-row .input { flex: 1; }
.answer-thumb { width: 56px; height: 44px; border-radius: 10px; overflow: hidden; border: 1px solid var(--stroke-2); }
.answer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm { border: 1px solid var(--stroke-2); background: transparent; color: var(--text-dim); border-radius: 6px; font-size: 10px; padding: 1px 5px; cursor: pointer; margin-left: 4px; }
.pm:hover { color: var(--lime); border-color: rgba(201,247,58,0.5); }
.scenario-line { margin-top: 12px; font-size: 12px; color: var(--text-dim); padding: 8px 12px; border-radius: 10px; background: rgba(110,168,255,0.07); border: 1px solid rgba(110,168,255,0.2); }
.box-line { margin-top: 8px; font-size: 12.5px; color: var(--text-dim); }
.box-line a { color: var(--lime); cursor: pointer; text-decoration: none; }
.detail-pop { position: fixed; z-index: 120; background: #131a12; border: 1px solid var(--stroke-2); border-radius: 14px; padding: 14px 16px; font-size: 12.5px; box-shadow: 0 12px 44px rgba(0,0,0,0.6); max-width: 300px; display: none; }
.deal-pop { width: 320px; max-width: 92vw; }
.details-pop { width: 360px; max-width: 92vw; max-height: 72vh; overflow-y: auto; scrollbar-width: thin; }
.detail-pop.on { display: block; animation: viewIn 0.2s; }
.detail-pop .label { margin-bottom: 6px; display: block; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 3px 0; color: var(--text-dim); text-align: left; align-items: baseline; }
.kv b { color: var(--text); font-family: var(--font-display); justify-self: start; font-weight: 600; }

/* ---------- simulator (unified cockpit) ---------- */
.sim-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 14px; height: 100%; max-width: 1440px; margin: 0 auto; }
.sim-viewport { position: relative; padding: 0; overflow: hidden; min-height: 540px; background: radial-gradient(ellipse at 50% 30%, rgba(35,60,30,0.5), rgba(8,12,8,0.9)); }
#simCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#simCanvas:active { cursor: grabbing; }
.sim-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 5; }
/* hero forecast number — THE one number, count-up on analyze */
.hero-stack { position: absolute; top: 64px; left: 14px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 320px; }
.hero-kg { background: rgba(10,15,10,0.72); border: 1px solid rgba(201,247,58,0.3); border-radius: 16px; padding: 12px 18px 10px; backdrop-filter: blur(12px); box-shadow: 0 0 34px rgba(201,247,58,0.08); animation: viewIn 0.4s; }
.hero-kg .label { display: block; }
.hero-kg-num { font-size: 42px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--lime); text-shadow: 0 0 26px rgba(201,247,58,0.45); }
.hero-kg-sub { font-size: 11px; color: var(--text-dim); }
/* pack-state badges: extra air / crush / right-sized */
.pack-badge { padding: 8px 14px; border-radius: 12px; font-size: 12px; font-weight: 600; backdrop-filter: blur(10px); animation: viewIn 0.3s; max-width: 300px; }
.pack-badge svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.cushion-warn svg, .oversize-warn svg, .limits-warn svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.pack-badge .num { font-size: 17px; font-weight: 700; }
.pack-badge.air, .pack-badge.crush { background: var(--red-soft); border: 1px solid rgba(255,77,94,0.5); color: var(--red); }
.pack-badge.crush { animation: viewIn 0.3s, crushPulse 1.1s ease-in-out infinite; }
@keyframes crushPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,77,94,0.35); } 50% { box-shadow: 0 0 22px 3px rgba(255,77,94,0.35); } }
.pack-badge.ok { background: rgba(87,227,137,0.09); border: 1px solid rgba(87,227,137,0.45); color: var(--green); }
.dim-scale { position: absolute; top: 64px; right: 14px; z-index: 5; width: 200px; background: rgba(10,15,10,0.75); border: 1px solid var(--stroke); border-radius: 14px; padding: 12px; backdrop-filter: blur(10px); }
.dim-scale .scale-title { display: block; margin-bottom: 8px; color: var(--text-dim); }
.dim-scale .pan .label { font-size: 9px; letter-spacing: 0.04em; }
.dim-scale .beam { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--text-dim), var(--lime)); transform-origin: center; transition: transform 0.8s cubic-bezier(0.34,1.56,0.64,1); margin-bottom: 10px; }
.dim-scale .pan { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; }
.dim-scale .pan b { font-size: 13px; }
.dim-scale .pan.right b { color: var(--red); }
.dim-scale .pan.left b { color: var(--text); }
.scale-note { font-size: 10px; color: var(--amber); margin-top: 6px; text-align: center; font-weight: 600; }
.price-tag { position: absolute; bottom: 130px; right: 14px; z-index: 5; background: rgba(10,15,10,0.8); border: 1px solid rgba(201,247,58,0.4); border-radius: 14px; padding: 10px 16px; backdrop-filter: blur(10px); }
.price-tag .num { font-size: 22px; font-weight: 700; color: var(--lime); }
.price-tag span:last-child { font-size: 11px; color: var(--text-dim); }
.sim-bottom { position: absolute; bottom: 0; left: 0; right: 0; z-index: 5; padding: 14px; background: linear-gradient(transparent, rgba(6,10,6,0.9) 40%); display: flex; flex-direction: column; gap: 10px; }
.shrink-row { display: flex; align-items: center; gap: 12px; }
.shrink-track { position: relative; flex: 1; }
.shrink-track .detent { position: absolute; left: 50%; top: -5px; width: 2px; height: 14px; background: var(--lime); opacity: 0.7; pointer-events: none; }
.cushion-warn, .limits-warn, .oversize-warn { font-size: 12px; color: var(--amber); background: rgba(255,180,84,0.09); border: 1px solid rgba(255,180,84,0.35); padding: 7px 12px; border-radius: 10px; }
.limits-warn { color: var(--red); background: var(--red-soft); border-color: rgba(255,77,94,0.4); }
.oversize-warn { color: var(--red); background: var(--red-soft); border-color: rgba(255,77,94,0.4); animation: viewIn 0.3s; }
.sim-empty { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; text-align: center; background: rgba(8,12,8,0.85); backdrop-filter: blur(8px); }
.empty-ico { width: 44px; height: 44px; color: var(--lime); margin: 0 auto; display: block; opacity: 0.9; }
/* setup gate: wireframe carton draws itself, manifest rows stamp in */
.gate { background: rgba(8,12,8,0.92); }
.gate-inner { display: flex; flex-direction: column; align-items: center; max-width: 400px; margin: 0 auto; padding: 0 20px; }
.gate-svg { width: 210px; height: 180px; overflow: visible; animation: gateFloat 7s ease-in-out infinite alternate; }
@keyframes gateFloat { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
.gate-orbit ellipse { stroke: rgba(201,247,58,0.22); stroke-width: 1; stroke-dasharray: 2 6; animation: orbitDrift 30s linear infinite; }
.gate-orbit ellipse:last-child { stroke: rgba(255,255,255,0.09); animation-duration: 44s; animation-direction: reverse; }
@keyframes orbitDrift { to { stroke-dashoffset: -240; } }
.gate-box path { stroke: var(--lime); stroke-width: 1.6; stroke-linejoin: round; }
.gate-box .draw { stroke-dasharray: 420; stroke-dashoffset: 420; animation: gateDraw 2.2s ease forwards; }
.gate-box .draw.d2 { stroke-dasharray: 220; stroke-dashoffset: 220; animation-delay: 0.9s; animation-duration: 1.6s; }
@keyframes gateDraw { to { stroke-dashoffset: 0; } }
.gate-fill path { fill: rgba(201,247,58,0.14); opacity: 0; transition: opacity 0.5s ease; }
.gate-fill path:nth-child(2) { fill: rgba(201,247,58,0.08); }
.gate-fill path:nth-child(3) { fill: rgba(201,247,58,0.04); }
.gate.release .gate-fill path { opacity: 1; }
.gate-scan { stroke: rgba(201,247,58,0.55); stroke-width: 1; animation: gateScan 3.4s ease-in-out infinite; }
@keyframes gateScan { 0%, 100% { transform: translateY(30px); opacity: 0.15; } 50% { transform: translateY(140px); opacity: 0.8; } }
.gate h2 { font-size: 22px; letter-spacing: -0.02em; margin-top: 10px; }
.gate-sub { color: var(--text-dim); font-size: 13px; margin-top: 6px; }
.gate-rows { margin-top: 20px; width: 100%; display: flex; flex-direction: column; gap: 9px; }
.gate-row { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; }
.g-idx { font-size: 10px; letter-spacing: 0.08em; color: var(--text-faint); font-variant-numeric: tabular-nums; transition: color 0.3s; }
.g-name { font-weight: 600; color: var(--text-dim); }
.g-leader { flex: 1; border-bottom: 1px dotted rgba(255,255,255,0.18); transform: translateY(-3px); }
.g-val { color: var(--text-faint); font-weight: 600; }
.gate-row.done .g-idx { color: var(--lime); }
.gate-row.done .g-val { color: var(--lime); animation: stampIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes stampIn { from { opacity: 0; transform: scale(1.18); } to { opacity: 1; transform: scale(1); } }
.gate.release .gate-inner { animation: gateOut 0.6s ease forwards; }
@keyframes gateOut { to { opacity: 0; transform: scale(1.05); } }
/* copilot rail: product header + money HUD + chat, one column */
.copilot-rail { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 0; overflow: hidden; }
.rail-head { display: flex; align-items: center; gap: 9px; }
.rail-prod { flex: 1; min-width: 0; }
.rail-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-cat { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.conf { font-size: 10.5px; padding: 4px 9px; flex-shrink: 0; }
.rail-est { align-self: flex-start; font-size: 10px; padding: 3px 9px; }
.money-hud { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mtile { background: rgba(0,0,0,0.32); border: 1px solid var(--stroke); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.mtile .label { font-size: 8.5px; letter-spacing: 0.06em; display: block; white-space: nowrap; }
.mtile .pm { font-size: 8.5px; padding: 0 3px; margin-left: 2px; }
.mtile b { display: block; font-size: 16px; margin-top: 4px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtile.lime { border-color: rgba(201,247,58,0.45); background: linear-gradient(160deg, rgba(201,247,58,0.1), rgba(201,247,58,0.02)); }
.mtile.lime b { color: var(--lime); text-shadow: 0 0 16px rgba(201,247,58,0.35); }
.rail-tools { gap: 8px; }
.copilot-rail .chat-log { border-top: 1px solid var(--stroke); padding-top: 10px; }
.copilot-rail .chat-input-row { margin-top: 0; }
.copilot-rail .chat-input-row .input { font-size: 12.5px; }
.rail-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rail-inputs .opt:last-child { grid-column: 1 / -1; }
.rail-inputs .input, .opt .input { width: 100%; min-width: 0; }
.rail-inputs .seg { width: 100%; }
.rail-inputs .seg button { flex: 1; padding: 6px 8px; }

/* ---------- routes ---------- */
.routes-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 14px; max-width: 1180px; margin: 0 auto; align-items: start; }
.route-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.route-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(0,0,0,0.25); cursor: pointer; transition: all 0.2s; }
.route-item:hover { border-color: var(--stroke-2); }
.route-item.on { border-color: rgba(201,247,58,0.5); background: var(--lime-soft); box-shadow: 0 0 20px rgba(201,247,58,0.08); }
.route-item .r-name { font-weight: 600; font-size: 13.5px; }
.route-item .r-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.route-item .r-radio { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text-faint); flex-shrink: 0; }
.route-item.on .r-radio { border-color: var(--lime); background: radial-gradient(circle, var(--lime) 45%, transparent 50%); }
.rule-block { margin-top: 16px; padding: 14px; border-radius: 14px; background: rgba(0,0,0,0.25); border: 1px solid var(--stroke); }
.rule-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rule-chips .chip.on { background: var(--lime-soft); border-color: rgba(201,247,58,0.55); color: var(--lime); }
.tier-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }

/* ---------- library ---------- */
.lib-head, .lib-row-main { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 1.1fr 150px; gap: 10px; align-items: center; padding: 10px 14px; }
.lib-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.lib-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); border-bottom: 1px solid var(--stroke); }
.lib-item { border: 1px solid var(--stroke); border-radius: 14px; margin-bottom: 8px; background: rgba(0,0,0,0.22); overflow: hidden; }
.lib-row-main { cursor: default; }
.lib-row-main:hover { background: rgba(255,255,255,0.03); }
.lib-prod { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lib-prod img { width: 44px; height: 32px; object-fit: cover; border-radius: 8px; border: 1px solid var(--stroke); }
.lib-prod .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-prod .dt { font-size: 10.5px; color: var(--text-faint); }
.lib-num { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.lib-expand { display: none; padding: 12px 16px; border-top: 1px solid var(--stroke); font-size: 12.5px; color: var(--text-dim); }
.lib-item.open .lib-expand { display: block; animation: viewIn 0.25s; }
.lib-empty { text-align: center; padding: 40px 0; }
.measure-grid { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.measure-grid .input { width: 80px; }

/* ---------- toasts / misc ---------- */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #131a12; border: 1px solid rgba(201,247,58,0.4); color: var(--text); padding: 12px 18px; border-radius: 14px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,0.5); animation: viewIn 0.3s; }
.toast.err { border-color: rgba(255,77,94,0.5); }

/* ---------- setup wizard (chat-driven, rate-card-first) ---------- */
.hero-kg-rule { display: block; font-size: 10px; color: var(--text-faint); margin-top: 3px; }
.money-hud.solo { grid-template-columns: 1fr; }
.mtile { position: relative; }
.copy-btn { position: absolute; top: 7px; right: 7px; border: 1px solid var(--stroke-2); background: transparent; color: var(--text-dim); border-radius: 7px; padding: 4px 6px; cursor: pointer; transition: all 0.2s; display: grid; place-items: center; }
.copy-btn svg { width: 13px; height: 13px; display: block; }
.copy-btn:hover { color: var(--lime); border-color: rgba(201,247,58,0.5); }
#chatSend { width: 38px; height: 38px; border-radius: 50%; padding: 0; display: grid; place-items: center; flex-shrink: 0; }
#chatSend svg { width: 16px; height: 16px; }
#chatAttach { flex-shrink: 0; display: grid; place-items: center; padding: 6px 9px; }
.wiz-row { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 96%; animation: viewIn 0.3s ease; }
.chip:disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.wiz-card { background: rgba(201,247,58,0.05); border: 1px solid rgba(201,247,58,0.3); width: 96%; max-width: 96%; }
.wiz-card .label { display: block; margin-bottom: 6px; }
.wiz-card .dot { margin-left: 4px; }
/* session 9e: no clipped auto-scroll box (read as a broken progress bar).
   Lines grow naturally; once parsed it settles to one quiet line. */
.wiz-log { font-family: var(--font-body); font-size: 11px; color: var(--text-dim); background: var(--glass-2); border: 1px solid var(--stroke); border-radius: 10px; padding: 8px 10px; align-self: flex-start; width: 96%; animation: viewIn 0.3s; }
.wiz-log.settled { background: transparent; border-color: transparent; padding: 2px 4px; color: var(--text-faint); }
.wiz-log div { padding: 1px 0; opacity: 0; animation: logIn 0.3s forwards; }
.thumb-scan { position: relative; display: block; width: 130px; margin-top: 6px; border-radius: 10px; overflow: hidden; border: 1px solid var(--stroke-2); }
.thumb-scan img { display: block; width: 100%; max-height: 100px; object-fit: cover; }
.thumb-scan::after { content: ''; position: absolute; left: 0; right: 0; height: 26%; top: -30%; background: linear-gradient(180deg, transparent, rgba(201,247,58,0.35), transparent); animation: thumbSweep 1.1s ease-in-out 2; }
@keyframes thumbSweep { to { top: 110%; } }

/* ---------- bulk import ---------- */
.bulk-stage { margin-top: 16px; }
.bulk-rail-wrap { position: relative; }
/* horizontal filmstrip: one row, scroll-snap, chevrons; never grows vertically */
.bulk-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 44px 10px; scrollbar-width: thin; }
.bulk-card { flex: 0 0 250px; scroll-snap-align: center; border: 1px solid var(--stroke); border-radius: 14px; background: rgba(0,0,0,0.22); padding: 12px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.bulk-card.active { border-color: rgba(201,247,58,0.55); box-shadow: 0 0 20px rgba(201,247,58,0.12); transform: translateY(-2px); }
.rail-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--stroke-2); background: rgba(10,15,10,0.8); color: var(--text); cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(8px); transition: all 0.2s; }
.rail-nav:hover { color: var(--lime); border-color: rgba(201,247,58,0.5); }
.rail-nav svg { width: 16px; height: 16px; }
.rail-nav.prev { left: 4px; }
.rail-nav.next { right: 4px; }
.rail-nav[disabled] { opacity: 0.25; pointer-events: none; }
.rail-count { position: absolute; top: 8px; right: 46px; font-size: 11px; color: var(--text-dim); z-index: 6; }
/* bulk contact-sheet cargo scanner: beam sweeps every product cell */
.bulk-scan { margin-top: 14px; }
.bs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bs-count { font-size: 12px; color: var(--lime); font-weight: 700; white-space: nowrap; }
.bs-progress { display: flex; gap: 4px; flex: 1; }
.bs-progress span { height: 3px; flex: 1; border-radius: 2px; background: var(--stroke); transition: background 0.3s; }
.bs-progress span.on { background: var(--lime); box-shadow: 0 0 8px rgba(201,247,58,0.5); }
.bs-sheet-wrap { position: relative; overflow: hidden; border-radius: 12px; }
.bs-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bs-cell { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; border: 1px solid var(--stroke); background: rgba(0,0,0,0.3); opacity: 0.45; filter: saturate(0.4); transition: opacity 0.3s, filter 0.3s, border-color 0.3s, box-shadow 0.3s; }
.bs-cell img { width: 100%; height: 100%; object-fit: cover; }
.bs-cell.done { opacity: 1; filter: none; border-color: rgba(201,247,58,0.55); box-shadow: 0 0 16px rgba(201,247,58,0.15); }
.bs-cell.flag { border-color: rgba(255,176,32,0.6); box-shadow: 0 0 16px rgba(255,176,32,0.18); }
.bs-cell .hud-corner { opacity: 0; transition: opacity 0.3s; }
.bs-cell.done .hud-corner { opacity: 1; }
.bs-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 7px; background: linear-gradient(transparent, rgba(5,8,5,0.92) 40%); display: flex; flex-direction: column; gap: 1px; opacity: 0; transform: translateY(6px); transition: all 0.35s; }
.bs-cell.done .bs-tag { opacity: 1; transform: none; }
.bs-tag b { font-size: 10.5px; color: var(--text); font-family: monospace; }
.bs-tag span { font-size: 9.5px; color: var(--lime); }
.bs-beam { position: absolute; top: 0; bottom: 0; width: 70px; left: -80px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(201,247,58,0.28) 45%, rgba(201,247,58,0.75) 50%, rgba(201,247,58,0.28) 55%, transparent); filter: blur(1px); opacity: 0; }
.bs-beam.sweep { opacity: 1; animation: bsSweep 2.5s cubic-bezier(0.4,0.1,0.4,0.9) forwards; }
@keyframes bsSweep { from { left: -80px; } to { left: 100%; } }
.bs-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11px; color: var(--text-dim); }
.bs-holo { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(201,247,58,0.5); border-top-color: transparent; animation: bsSpin 1s linear infinite; box-shadow: 0 0 14px rgba(201,247,58,0.25); }
@keyframes bsSpin { to { transform: rotate(360deg); } }
.bc-head { display: flex; gap: 6px; align-items: center; }
.bc-name { flex: 1; min-width: 0; font-size: 12.5px; padding: 7px 10px; }
.bc-del { width: 28px; height: 28px; flex-shrink: 0; border: 1px solid var(--stroke); background: transparent; color: var(--text-dim); border-radius: 8px; cursor: pointer; display: grid; place-items: center; transition: all 0.2s; }
.bc-del:hover { color: var(--red); border-color: rgba(255,77,94,0.4); }
.bc-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bc-slot { position: relative; height: 84px; border: 1.5px dashed var(--stroke-2); border-radius: 10px; display: grid; place-items: center; text-align: center; cursor: pointer; overflow: hidden; transition: all 0.2s; padding: 6px; }
.bc-slot:hover, .bc-slot.drag { border-color: rgba(201,247,58,0.6); background: var(--lime-soft); }
.bc-slot.filled { border-style: solid; padding: 0; }
.bc-slot img { width: 100%; height: 100%; object-fit: cover; }
.bc-slot .rm { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.bc-slot-label { font-size: 10.5px; color: var(--text-faint); font-weight: 600; }
.bc-expect { display: block; font-size: 9.5px; color: var(--amber); margin-top: 3px; word-break: break-all; }
.bc-pack { display: flex; flex-direction: column; gap: 6px; }
.bc-pack .select { font-size: 12px; padding: 7px 10px; }
/* tray pinned above the rail so drag distance stays short */
.bulk-tray { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(8,12,8,0.92); backdrop-filter: blur(10px); transition: box-shadow 0.2s, border-color 0.2s; }
.bulk-tray.drag { border-color: rgba(201,247,58,0.6); box-shadow: 0 0 22px rgba(201,247,58,0.18); }
.bulk-tray .label { font-size: 10px; }
.bulk-tray .thumb { width: 64px; height: 48px; cursor: grab; }
.bulk-review { margin-top: 14px; }
.br-head, .br-row { display: grid; grid-template-columns: 2fr 1.2fr 1.4fr 1fr 1fr 1.1fr; gap: 10px; align-items: center; padding: 9px 12px; }
.br-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); border-bottom: 1px solid var(--stroke); }
.br-row { border: 1px solid var(--stroke); border-radius: 12px; margin-bottom: 7px; background: rgba(0,0,0,0.2); }
.br-prod { display: flex; align-items: center; gap: 9px; min-width: 0; }
.br-prod img { width: 40px; height: 30px; object-fit: cover; border-radius: 7px; border: 1px solid var(--stroke); }
.br-prod .nm { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-prod .dt { font-size: 10px; color: var(--text-faint); }
.br-num { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; }
.br-num.lime { color: var(--lime); }
.br-pack { font-size: 11.5px; padding: 6px 8px; }
.br-flag { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); }

/* ---------- browse chevrons + product hologram ---------- */
.sim-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 7; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--stroke-2); background: rgba(10,15,10,0.7); color: var(--text); cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(10px); transition: all 0.2s; }
.sim-nav:hover { color: var(--lime); border-color: rgba(201,247,58,0.5); box-shadow: 0 0 18px rgba(201,247,58,0.2); }
.sim-nav svg { width: 20px; height: 20px; }
.sim-nav.prev { left: 12px; }
.sim-nav.next { right: 12px; }
.browse-pill { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(10,15,10,0.75); border: 1px solid var(--stroke); backdrop-filter: blur(10px); font-size: 12px; max-width: 60%; }
.browse-pill .num { color: var(--lime); font-weight: 700; }
.browse-pill #browseName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-dim); }
.holo { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 5; width: 92px; text-align: center; pointer-events: none; perspective: 600px; }
.holo img { width: 84px; height: 66px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(201,247,58,0.4); box-shadow: 0 0 26px rgba(201,247,58,0.25); animation: holoFloat 5s ease-in-out infinite alternate; }
.holo.spin img { animation: holoSpin 0.9s cubic-bezier(0.3,0.7,0.3,1), holoFloat 5s ease-in-out 0.9s infinite alternate; }
.holo-ring { width: 70px; height: 14px; margin: 6px auto 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(201,247,58,0.35), transparent 70%); filter: blur(2px); }
@keyframes holoFloat { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
@keyframes holoSpin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .sim-wrap { grid-template-columns: 1fr; height: auto; }
  .sim-viewport { min-height: 480px; }
  .copilot-rail { overflow: visible; }
  .copilot-rail .chat-log { max-height: 320px; }
  .routes-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar { flex-direction: row; width: 100%; padding: 8px 12px; }
  .sidebar .spacer { flex: 1; }
  .brand { margin-bottom: 0; margin-right: 8px; }
  .nav-btn .tip { display: none; }
  .views { position: static; }
  .view { position: static; }
  .view.on { display: block; }
  .opt-row { grid-template-columns: 1fr 1fr; }
  .hero-kg-num { font-size: 32px; }
  .hero-stack { top: 56px; max-width: 260px; }
  .gate-svg { width: 170px; height: 145px; }
  .gate h2 { font-size: 19px; }
  .scan-stage { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .lib-head { display: none; }
  .lib-row-main { grid-template-columns: 2fr 1fr 1fr 120px; }
  .lib-row-main > :nth-child(3), .lib-row-main > :nth-child(5) { display: none; }
  .bulk-card { flex-basis: 220px; }
  .br-head { display: none; }
  .br-row { grid-template-columns: 1.6fr 1fr 1fr; }
  .br-row > :nth-child(3), .br-row > :nth-child(4) { display: none; }
  .holo { width: 70px; top: 56px; }
  .holo img { width: 62px; height: 50px; }
  .sim-nav { width: 36px; height: 36px; }
  .browse-pill { max-width: 46%; font-size: 11px; }
}