@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #0a0a0a; color: #fff; font-family: 'DM Sans', sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

:root {
  --green: #3ddc84; --green-dark: #2ab86a; --green-dim: #0d2b1a; --green-mid: #1a4a2e;
  --red: #e05a4e; --red-dim: #2b0d0d;
  --bg: #0a0a0a; --card: #131313; --card2: #1a1a1a; --border: #1e1e1e; --border2: #2a2a2a;
  --t1: #ffffff; --t2: #888888; --t3: #444444;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* SCREENS */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: fadeUp 0.3s ease; }
#screen-drive { display: none; flex-direction: column; }
#screen-drive.active { display: flex; }

/* NAV */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 200; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 32px; height: 32px; background: var(--green); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; color: #000; font-size: 15px; flex-shrink: 0; }
.logo-text { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; }

/* TYPE */
h1 { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; line-height: 1.1; }
.text-green { color: var(--green); }
.text-muted { color: var(--t3); font-size: 13px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: var(--green); font-family: 'Syne', sans-serif; margin-bottom: 14px; }

/* BADGE */
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; font-family: 'Syne', sans-serif; white-space: nowrap; }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid var(--green-mid); }
.badge-red { background: var(--red-dim); color: var(--red); border: 1px solid #4a1a1a; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: all 0.15s; border-radius: 10px; font-size: 15px; padding: 13px 20px; }
.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: #000; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: var(--card2); color: var(--t1); border: 1px solid var(--border2); }
.btn-ghost { background: transparent; color: var(--green); border: 1px solid var(--green-mid); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-text { background: none; border: none; color: var(--t2); font-size: 13px; cursor: pointer; font-family: 'DM Sans', sans-serif; }

/* LANDING HERO */
.hero { padding: 52px 20px 44px; max-width: 500px; margin: 0 auto; }
.hero h1 { margin-bottom: 18px; }
.hero-sub { color: var(--t2); font-size: 16px; line-height: 1.65; margin-bottom: 32px; }

/* SECTIONS */
.section { padding: 12px 20px 48px; max-width: 500px; margin: 0 auto; }
.section-title { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; margin-bottom: 22px; line-height: 1.2; }

/* PROBLEM CARDS */
.problem-card { background: var(--card); border: 1px solid var(--border2); border-radius: 14px; padding: 20px; margin-bottom: 12px; }
.problem-card-red { border-color: #4a1a1a; box-shadow: 0 0 0 1px #e05a4e18; }
.problem-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.problem-title { font-weight: 600; font-size: 15px; }
.problem-num { font-size: 28px; font-weight: 800; color: var(--border2); font-family: 'Syne', sans-serif; line-height: 1; }
.problem-num-red { color: var(--red); font-size: 22px; }
.problem-body { color: var(--t2); font-size: 14px; line-height: 1.65; }

/* STEPS */
.step { display: flex; gap: 18px; align-items: flex-start; padding: 20px 0; }
.step-num { font-size: 26px; font-weight: 800; color: var(--green); font-family: 'Syne', sans-serif; min-width: 42px; line-height: 1; }
.step-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.step-body { color: var(--t2); font-size: 14px; line-height: 1.65; }
.step-divider { border-top: 1px solid var(--border); }

/* DEMO TABLE */
.demo-table { background: var(--card); border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; }
.demo-header { display: grid; grid-template-columns: 1fr 1fr 2fr; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--t3); font-family: 'Syne', sans-serif; }
.demo-row { display: grid; grid-template-columns: 1fr 1fr 2fr; padding: 12px 18px; border-bottom: 1px solid var(--border); align-items: center; }
.demo-row:last-child { border-bottom: none; }
.demo-addr { font-size: 13px; color: var(--t2); }

/* CTA */
.cta-section { text-align: center; }
.cta-title { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.cta-sub { color: var(--t2); font-size: 15px; line-height: 1.65; margin-bottom: 28px; }
.footer-credit { margin-top: 32px; font-size: 12px; color: var(--t3); }

/* PAGE CONTENT */
.page-content { padding: 24px 20px 40px; max-width: 500px; margin: 0 auto; }
.page-title { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.page-sub { color: var(--t2); font-size: 14px; margin-bottom: 20px; }

/* TABS */
.tabs { display: flex; background: var(--card); border-radius: 10px; padding: 4px; margin-bottom: 16px; gap: 4px; }
.tab { flex: 1; padding: 9px 8px; border: none; background: transparent; color: var(--t2); font-size: 13px; font-weight: 500; border-radius: 7px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.tab.active { background: var(--green); color: #000; font-weight: 700; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* TEXTAREA */
.textarea { width: 100%; min-height: 200px; background: var(--card); border: 1px solid var(--border2); border-radius: 12px; padding: 14px 16px; color: var(--t1); font-size: 14px; font-family: 'DM Sans', sans-serif; line-height: 1.6; resize: vertical; outline: none; }
.textarea:focus { border-color: var(--green-mid); }
.textarea::placeholder { color: var(--t3); }
.input-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* INPUT FIELD */
.input-field { width: 100%; background: var(--card); border: 1px solid var(--border2); border-radius: 10px; padding: 12px 14px; color: var(--t1); font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.15s; }
.input-field:focus { border-color: var(--green-mid); }
.input-field::placeholder { color: var(--t3); }

/* UPLOAD ZONE */
.upload-zone { border: 2px dashed var(--border2); border-radius: 14px; padding: 40px 20px; text-align: center; cursor: pointer; transition: all 0.15s; background: var(--card); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--green-mid); background: var(--green-dim); }
.upload-icon { font-size: 32px; margin-bottom: 12px; }
.upload-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.upload-sub { color: var(--t2); font-size: 13px; }
.file-preview { background: var(--card); border: 1px solid var(--border2); border-radius: 10px; padding: 14px; margin-top: 12px; font-size: 13px; color: var(--t2); max-height: 150px; overflow-y: auto; white-space: pre-wrap; }
.img-preview { width: 100%; border-radius: 10px; margin-top: 12px; max-height: 200px; object-fit: contain; background: var(--card); }
.ocr-status { margin-top: 10px; font-size: 13px; color: var(--t2); min-height: 20px; }

/* API KEY BOX */
.api-key-box { background: var(--card); border: 1px solid var(--border2); border-radius: 12px; padding: 16px; margin-top: 16px; }
.api-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.api-hint { font-size: 12px; color: var(--t3); margin-top: 8px; line-height: 1.5; }

/* ERROR BOX */
.error-box { background: var(--red-dim); border: 1px solid #4a1a1a; border-radius: 10px; padding: 12px 16px; color: var(--red); font-size: 14px; margin-top: 12px; }

/* STOP LIST */
.confirm-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.stop-list { margin-bottom: 14px; }
.stop-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; margin-bottom: 8px; }
.stop-num-badge { width: 32px; height: 32px; border-radius: 8px; background: var(--green-dim); color: var(--green); font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stop-addr { flex: 1; font-size: 14px; line-height: 1.4; }
.stop-remove { background: none; border: none; color: var(--t3); font-size: 18px; cursor: pointer; padding: 4px; flex-shrink: 0; line-height: 1; }
.stop-remove:hover { color: var(--red); }
.add-stop-row { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.add-stop-row .input-field { flex: 1; }

/* LOADING */
.center-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 20px; text-align: center; }
.spinner { width: 44px; height: 44px; border: 3px solid #1e1e1e; border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 24px; }
.loading-title { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.loading-sub { color: var(--t2); font-size: 14px; margin-bottom: 24px; }
.progress-wrap { width: 240px; height: 4px; background: var(--border2); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.3s ease; }

/* RESULT */
.result-check { width: 60px; height: 60px; background: var(--green-dim); border: 1px solid var(--green-mid); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 24px auto 20px; color: var(--green); }
.result-stats { background: var(--card); border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; margin-top: 20px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.stat-label { font-size: 14px; color: var(--t2); }
.stat-value { font-size: 14px; font-weight: 600; }
.stat-divider { border-top: 1px solid var(--border); }

/* DRIVE NAV */
.drive-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; }
.drive-stats-bar { display: flex; align-items: center; justify-content: space-around; padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.drive-stat { text-align: center; flex: 1; }
.drive-stat-val { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; line-height: 1; }
.drive-stat-label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: var(--t3); margin-top: 4px; font-family: 'Syne', sans-serif; }
.drive-stat-sep { width: 1px; height: 36px; background: var(--border2); }
.drive-progress-wrap { height: 3px; background: var(--border); flex-shrink: 0; }
.drive-progress-fill { height: 100%; background: var(--green); transition: width 0.4s ease; }

/* MAP PANEL */
.map-panel { background: var(--bg); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.map-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.map-panel-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; }
.map-legend { display: flex; gap: 16px; padding: 0 16px 10px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t2); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-line-sample { width: 20px; height: 2px; background: var(--green); opacity: 0.7; }
.map-container { height: 320px; width: 100%; background: #111; z-index: 1; }

/* Leaflet fix - ensure map tiles load correctly */
.leaflet-container { background: #1a1a1a; }
.leaflet-tile { filter: brightness(0.85) saturate(0.7); }

/* DRIVE MAIN */
.drive-main { padding: 20px 16px; user-select: none; -webkit-user-select: none; }

/* CURRENT STOP CARD */
.current-stop-card { background: var(--card); border: 1px solid var(--green-mid); border-radius: 16px; padding: 20px; margin-bottom: 14px; box-shadow: 0 0 0 1px #3ddc8411; }
.pkg-badge-large { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 20px; background: var(--green-dim); color: var(--green); font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.05em; margin-bottom: 14px; }
.current-address { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.open-maps-btn { background: var(--green-dim); color: var(--green); border: 1px solid var(--green-mid); font-size: 14px; padding: 13px; border-radius: 10px; }

/* NEXT STOP CARD */
.next-stop-card { background: var(--card); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.next-stop-left { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.next-arrow { width: 36px; height: 36px; background: var(--card2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.next-dist { font-size: 11px; color: var(--t3); white-space: nowrap; }
.next-stop-right { flex: 1; min-width: 0; }
.next-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.next-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--t3); font-family: 'Syne', sans-serif; }
.next-address { font-size: 14px; color: var(--t2); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swipe-hint { text-align: center; font-size: 12px; color: var(--t3); padding-bottom: 8px; }

/* DELIVERED BTN */
.delivered-btn { width: calc(100% - 32px); margin: 0 16px 24px; background: var(--green); color: #000; border: none; border-radius: 14px; padding: 18px; font-size: 16px; font-weight: 800; font-family: 'Syne', sans-serif; cursor: pointer; letter-spacing: 0.04em; flex-shrink: 0; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.delivered-btn:active { transform: scale(0.98); }

/* MODAL */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 500; display: flex; align-items: flex-end; }
.modal-content { background: var(--bg); border-radius: 20px 20px 0 0; width: 100%; max-height: 80vh; display: flex; flex-direction: column; animation: fadeUp 0.25s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; }
.all-stops-list { overflow-y: auto; padding: 12px 16px 32px; }
.all-stop-item { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--border); background: var(--card); cursor: pointer; transition: background 0.1s; }
.all-stop-item.current { background: var(--green-dim); border-color: var(--green-mid); }
.all-stop-item.delivered { opacity: 0.4; }
.all-stop-num { width: 34px; height: 34px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.all-stop-item.current .all-stop-num { background: var(--green); color: #000; }
.all-stop-info { flex: 1; min-width: 0; }
.all-stop-mapping { font-size: 11px; color: var(--t2); margin-bottom: 3px; }
.all-stop-addr { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.current-label { font-size: 11px; color: var(--green); font-weight: 600; margin-top: 2px; }

/* ── MAP PIN STYLES ───────────────────────────────────────────────────────── */
.dm-pin {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 10px;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s;
}
.dm-pin:hover { transform: scale(1.2); }
.dm-pin span { line-height: 1; pointer-events: none; }

/* Red = original PKG number */
.dm-pin-red {
  background: #e05a4e;
  border-color: #ff8070;
  color: #fff;
  font-size: 9px;
}

/* Green = optimized drive order */
.dm-pin-green {
  background: #1a4a2e;
  border-color: #3ddc84;
  color: #3ddc84;
  font-size: 9px;
}
.dm-pin-current {
  background: #3ddc84 !important;
  border-color: #fff !important;
  color: #000 !important;
  font-size: 11px !important;
  box-shadow: 0 0 0 3px rgba(61,220,132,0.35), 0 2px 8px rgba(0,0,0,0.6) !important;
}
.dm-pin-done {
  background: #111 !important;
  border-color: #2a2a2a !important;
  color: #444 !important;
  opacity: 0.5;
}
.dm-pin-hub {
  background: #3ddc84 !important;
  border-color: #fff !important;
  color: #000 !important;
}

/* Leaflet popup dark theme */
.leaflet-popup-content-wrapper {
  background: #1a1a1a !important;
  color: #fff !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
}
.leaflet-popup-tip { background: #1a1a1a !important; }
.leaflet-popup-close-button { color: #888 !important; font-size: 18px !important; }

/* ── REORDER UI ───────────────────────────────────────────────────────────── */
.reorder-btn {
  background: none;
  border: none;
  color: var(--t3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.12s;
}
.reorder-btn:hover { background: var(--card2); color: var(--t1); }
.reorder-btn:disabled { opacity: 0.2; cursor: default; }
.reorder-controls { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.modal-subtext { font-size: 12px; color: var(--t3); padding: 0 20px 10px; }

/* ── STREET VIEW ──────────────────────────────────── */
.street-view-wrap { border-radius: 10px; overflow: hidden; margin-bottom: 14px; position: relative; background: #111; }
.street-view-img { width: 100%; height: 180px; object-fit: cover; display: block; transition: opacity 0.3s; }
.street-view-label { position: absolute; bottom: 6px; right: 8px; font-size: 10px; color: rgba(255,255,255,0.5); background: rgba(0,0,0,0.4); padding: 2px 6px; border-radius: 4px; }

/* ── SUMMARY SCREEN ───────────────────────────────── */
.sum-stop-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sum-stop-item { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.sum-stop-num { width: 28px; height: 28px; border-radius: 50%; background: var(--green-dim); color: var(--green); font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sum-stop-info { flex: 1; min-width: 0; }
.sum-stop-addr { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-stop-meta { font-size: 11px; color: var(--t3); line-height: 1.5; }

/* ── API KEY INPUT IN INPUT SCREEN ────────────────── */
#gm-api-key { margin-bottom: 0 !important; }




/* ── DIRECTIONS v7 ─────────────────────────────────────────────────────────── */

/* From location banner */
.dir-from-location {
  background: #1a3d2a;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-bottom: 1px solid var(--green-mid);
}

/* Panel container */
.directions-panel {
  background: #0a1f10;
  border-bottom: 3px solid var(--green);
  flex-shrink: 0;
}

/* Main instruction row */
.dir-current {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
  align-items: stretch;
  min-height: 120px;
}

/* Big green arrow block — left side */
.dir-arrow-big {
  width: 100px !important;
  min-width: 100px !important;
  background: var(--green) !important;
  color: #000 !important;
  font-size: 60px !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-align-items: center;
  align-items: center !important;
  -webkit-justify-content: center;
  justify-content: center !important;
  -webkit-flex-shrink: 0;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

/* Text block — right side */
.dir-current-text {
  -webkit-flex: 1;
  flex: 1;
  padding: 16px 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
  min-width: 0;
}

.dir-dist-big {
  font-family: 'Syne', sans-serif !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  color: var(--green) !important;
  line-height: 1 !important;
  margin-bottom: 8px !important;
}

.dir-instruction-big {
  font-family: 'Syne', sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #fff !important;
}

/* Arrival callout */
.dir-arrival {
  background: #0d2a18;
  border-top: 1px solid var(--green-mid);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
}
.dir-pkg {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid #4a1a1a;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}
.dir-hub {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-mid);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Next turn bar */
.dir-next-bar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #111e14;
  border-top: 1px solid #1e3a22;
}
.dir-next-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--t3);
  font-family: 'Syne', sans-serif;
  flex-shrink: 0;
}
.dir-next-arrow-sm { font-size: 22px; color: var(--t2); flex-shrink: 0; }
.dir-next-text-sm {
  font-size: 14px;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer */
.dir-footer {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 8px 14px;
  background: #0a1a10;
  border-top: 1px solid #1a3320;
}
.dir-counter { font-size: 12px; color: var(--t3); font-family: 'Syne', sans-serif; }
.dir-btn-sm {
  background: #1a3020;
  border: 1px solid #2a4a2a;
  color: var(--green);
  border-radius: 8px;
  width: 48px;
  height: 36px;
  font-size: 22px;
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
}
.dir-btn-sm:active { background: var(--green-mid); }
