/* =====================================================================
   ROYAL RAJASTHAN ODYSSEY 2027 · Master Stylesheet
   ===================================================================== */
:root {
  --bg: #fff6ea;
  --bg2: #ffe9d2;
  --card: #ffffff;
  --line: #f2dfc6;
  --ink: #3d2a1a;
  --muted: #a58b70;
  --sun: #ff9a3c;
  --coral: #ff6b6b;
  --rose: #ee5a9c;
  --teal: #17a89a;
  --sky: #3aa0e0;
  --gold: #e0a02e;
  --success: #2ec4b6;
  --danger: #e71d36;
  --leaf: #4caf7d;
  --navy: #0b2f64;
  --r: 16px;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea, .pill, .chip, .btn {
  touch-action: manipulation;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(900px 500px at 15% 0%, #fff2d8 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 5%, #ffe0e6 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: calc(78px + var(--sab));
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: .2px;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--coral);
  text-decoration: none;
}

/* =====================================================================
   AUTH MODAL
   ===================================================================== */
#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #fff1d6, #ffe0e8 55%, #e8f7f5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 26px 22px;
  width: 100%;
  max-width: 390px;
  box-shadow: 0 12px 36px rgba(180, 110, 30, .22);
  text-align: center;
}

.login-crest {
  font-size: 46px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 10px rgba(200, 120, 40, .25));
}

.login-card h2 {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  color: #4a2408;
  margin-bottom: 4px;
}

.login-card p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

/* =====================================================================
   HEADER & ACTIONS
   ===================================================================== */
header.app {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, #ffd98e 0%, #ffb26b 45%, #ff9a9a 100%);
  color: #4a2408;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  padding: calc(var(--sat) + 10px) 12px 10px;
  box-shadow: 0 4px 20px rgba(255, 154, 60, .25);
}

.hrow {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}

.crest {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
  box-shadow: 0 3px 10px rgba(120, 60, 0, .18);
}

.htitle {
  flex: 1;
  min-width: 0;
}

.htitle h1 {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #4a2408;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #7a4418;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .9);
  color: #7a4418;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: transform .12s;
  cursor: pointer;
}

.btn-icon:active {
  transform: scale(.94);
}

/* =====================================================================
   CONTAINER & CARDS
   ===================================================================== */
main {
  padding: 14px 14px 26px;
  max-width: 760px;
  margin: 0 auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fade .18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

@keyframes fade {
  from { opacity: 0; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  margin-bottom: 13px;
  box-shadow: 0 3px 14px rgba(190, 150, 100, .10);
}

.card h3 {
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--gold);
  margin-bottom: 11px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.row {
  display: flex;
  gap: 9px;
  align-items: center;
}

.grow {
  flex: 1;
  min-width: 0;
}

/* =====================================================================
   BUTTONS & FORMS
   ===================================================================== */
.btn {
  background: #fff6ea;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  transition: transform .12s, background .15s, border-color .15s;
  text-decoration: none;
}

.btn:active {
  transform: scale(.96);
}

.btn.gold {
  background: linear-gradient(135deg, #ffb85c, #ff8a3d);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 138, 61, .35);
}

.btn.ghost {
  background: transparent;
}

.btn.sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: .45;
  pointer-events: none;
}

input[type=text],
input[type=number],
input[type=url],
input[type=password],
select,
textarea {
  width: 100%;
  background: #fffdf9;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sun);
  background: #fff;
}

label.fld {
  display: block;
  margin-bottom: 10px;
  text-align: left;
}

label.fld > span {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 700;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.chip.on {
  background: linear-gradient(135deg, #ffb85c, #ff8a3d);
  color: #fff;
  border-color: transparent;
}

.sync-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}

.status-green {
  background: rgba(76, 175, 125, .15);
  color: #2a8a54;
  border: 1px solid #7fd39b;
}

.status-red {
  background: rgba(255, 107, 107, .15);
  color: #c53c3c;
  border: 1px solid #ffa5a5;
}

.status-gold {
  background: rgba(230, 183, 86, .18);
  color: #a5701a;
  border: 1px solid #ffc06a;
}

/* =====================================================================
   ITINERARY & COUNTDOWN
   ===================================================================== */
.sunset-card {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  color: #fff;
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(254, 126, 95, .35);
  text-align: center;
}

.sunset-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: .95;
}

.sunset-timer {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 6px 0;
}

.sunset-note {
  font-size: 11.5px;
  opacity: .9;
}

.timeline-node {
  position: relative;
  padding-left: 22px;
  margin-bottom: 16px;
  border-left: 2px solid #ffe0c0;
}

.timeline-node:last-child {
  margin-bottom: 0;
  border-left-color: transparent;
}

.timeline-node::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 8px rgba(255, 154, 60, .55);
}

.time-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--coral);
  letter-spacing: .3px;
}

.time-badge.gold { color: var(--gold); }
.time-badge.red  { color: var(--danger); }

.event-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 4px;
}

.event-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* =====================================================================
   FLIGHT TRACKER CARD
   ===================================================================== */
.flight-card {
  border-left: 4px solid var(--sky);
}

.flight-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-tracker-google {
  background: #ffffff;
  border: 1.5px solid var(--sky) !important;
  color: var(--sky) !important;
  font-weight: 700;
  text-align: center;
}

.btn-tracker-fa {
  background: var(--navy) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700;
  text-align: center;
}

/* =====================================================================
   STAYS & ROSTER
   ===================================================================== */
.hotel-room-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fff2df;
  color: #9b5a18;
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
}

.id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 480px) {
  .id-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   BAGS
   ===================================================================== */
.alert-box {
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  background: rgba(231, 29, 54, .10);
  border: 1.5px solid rgba(231, 29, 54, .4);
  color: #b71529;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
}

.hero {
  background: linear-gradient(135deg, #fff1d6, #ffe0e8 55%, #e8f7f5);
  border: 1px solid #ffe0c0;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.hero-num {
  font-family: 'Cinzel', serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: #e07a1f;
  letter-spacing: -1px;
}

.hero-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #a5703a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
}

.hero-emoji {
  font-size: 36px;
  margin-left: auto;
  filter: drop-shadow(0 4px 6px rgba(200, 120, 40, .25));
}

.progbar {
  height: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid #ffe0c0;
  overflow: hidden;
  margin: 2px 0 12px;
}

.progbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffd86b, #ff9a3c, #ff6b6b);
  transition: width .4s cubic-bezier(.2, .8, .3, 1);
  border-radius: 20px;
}

.stagelegend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.sleg {
  background: #fff;
  border: 1.5px solid #ffe6c9;
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
}

.sleg .ic {
  font-size: 16px;
  line-height: 1;
}

.sleg .n {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 900;
  color: #e07a1f;
  margin-top: 3px;
  line-height: 1;
}

.sleg .l {
  font-size: 8.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 3px;
  font-weight: 800;
}

.roomcard {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(190, 150, 100, .09);
  transition: border-color .2s, box-shadow .2s;
}

.roomcard.my-room {
  border: 2px solid var(--sun);
  background: #fffdf9;
  box-shadow: 0 4px 18px rgba(255, 154, 60, .18);
}

.roomcard.all-done {
  border-color: rgba(76, 175, 125, .55);
  box-shadow: 0 3px 16px rgba(76, 175, 125, .18);
}

.roomhead {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.rname {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rname .rem {
  font-size: 16px;
  margin-right: 5px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff6ea;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 2px;
}

.stepper button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 800;
  color: #e07a1f;
  display: grid;
  place-items: center;
  line-height: 1;
}

.stepper button:active { background: #ffe6c9; }
.stepper button:disabled { opacity: .3; }

.stepper .cnt {
  font-size: 14px;
  font-weight: 900;
  min-width: 24px;
  text-align: center;
  color: #8a5a20;
}

.stepper .cnt small {
  font-size: 8.5px;
  display: block;
  line-height: 1;
  letter-spacing: .5px;
  font-weight: 800;
  color: var(--muted);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
  align-items: center;
}

.pill {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 17px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  background: #fffdf8;
  transition: transform .15s, background .2s, border-color .2s;
  position: relative;
}

.pill:active { transform: scale(.88); }
.pill.s0 { opacity: .55; color: #c3b09a; }
.pill.s1 { background: #e6f4fd; border-color: #8fd0f2; }
.pill.s2 { background: #fff0d8; border-color: #ffc06a; }
.pill.s3 { background: #e0f7f4; border-color: #6fd3c7; }
.pill.s4 { background: #e4f7ea; border-color: #7fd39b; }

.pill.s4::after {
  content: "✓";
  position: absolute;
  right: -3px;
  top: -3px;
  background: var(--leaf);
  color: #fff;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 9px;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
}

.nobags {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 8px 2px;
}

/* =====================================================================
   KHATA
   ===================================================================== */
.khata-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.khata-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(190, 150, 100, .09);
}

.khata-box span {
  font-size: 10.5px;
  color: var(--muted);
  display: block;
  letter-spacing: .5px;
  font-weight: 700;
}

.khata-box strong {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  color: #e07a1f;
  display: block;
  margin-top: 4px;
}

.item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: #fffdf9;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 11px 12px;
  margin-bottom: 8px;
  position: relative;
}

.item .ic {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #fff3e0;
  font-size: 16px;
}

.item .body {
  flex: 1;
  min-width: 0;
}

.item .t1 {
  font-size: 13.5px;
  font-weight: 700;
}

.item .t2 {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-word;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.amt {
  font-weight: 900;
  color: #e07a1f;
  font-size: 14px;
  white-space: nowrap;
  text-align: right;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 28px 10px;
}

.empty .big {
  font-size: 34px;
  display: block;
  margin-bottom: 9px;
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.btn-icon-sm:hover { background: #fff6ea; }

/* =====================================================================
   MEDIA & JUKEBOX
   ===================================================================== */
.vinyl-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #fff6ea;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  margin-bottom: 12px;
}

.vinyl-disc {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: repeating-radial-gradient(#1a1a1a, #1a1a1a 4px, #333 5px, #1a1a1a 6px);
  border: 2px solid #3a3a3a;
  position: relative;
  flex-shrink: 0;
  animation: spin 3.5s linear infinite paused;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.vinyl-disc.spinning {
  animation-play-state: running;
}

.vinyl-center {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb85c, #ff8a3d);
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.player-frame {
  margin-top: 12px;
  border-radius: 13px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: #000;
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
}

#ytPlayerHost, .player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.player-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.player-controls .btn {
  padding: 8px 3px;
  font-size: 11px;
  gap: 2px;
  flex-direction: column;
}

.player-controls .btn .pc-icon {
  font-size: 15px;
  line-height: 1;
}

.player-controls .btn .pc-label {
  font-size: 8.5px;
  letter-spacing: .3px;
  font-weight: 800;
  text-transform: uppercase;
}

.mode-btn.active {
  background: linear-gradient(135deg, #ffb85c, #ff8a3d);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 138, 61, .35);
}

.mode-btn.mode-one {
  background: linear-gradient(135deg, #5ec2f0, #3aa0e0);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(58, 160, 224, .35);
}

.random-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.random-btns .btn {
  padding: 11px;
  font-size: 12px;
}

.queue-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  background: #fffdf9;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}

.qitem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}

.qitem:hover { background: #fff6ea; }

.qitem.active {
  background: #fff0d8;
  font-weight: 700;
  color: #8a5a20;
}

.qitem.active::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffb85c, #ff8a3d);
}

.qitem .qicon {
  font-size: 14px;
  flex-shrink: 0;
}

.qitem .qlabel {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qitem .qplay {
  font-size: 11px;
  color: #e07a1f;
  font-weight: 900;
}

.qitem .qremove {
  padding: 4px 6px;
  font-size: 14px;
  color: #c3b09a;
  flex-shrink: 0;
  border-radius: 6px;
}

.qitem .qremove:hover {
  background: #fff;
  color: var(--coral);
}

.qhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.qcount {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .4px;
}

.plbtn {
  font-size: 11.5px;
  padding: 8px 12px;
  background: #fffdf9;
  border: 1.5px solid var(--line);
  color: #c07a1a;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  margin: 3px 3px 3px 0;
  transition: transform .12s, background .15s;
  max-width: 100%;
}

.plbtn:active {
  transform: scale(.95);
  background: #fff6ea;
}

.plbtn.searching {
  background: #fff6ea;
  border-color: var(--sun);
  opacity: .7;
}

.plbtn .btn-label {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#autocompleteBox {
  display: none;
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: #fffdf8;
  border: 1.5px solid var(--sun);
  border-radius: 12px;
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 12px 28px rgba(160, 100, 30, .22);
}

#autocompleteBox .ac-item {
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#autocompleteBox .ac-item:last-child {
  border-bottom: none;
}

#autocompleteBox .ac-item:hover {
  background: #fff6ea;
}

#autocompleteBox .ac-item .play-tag {
  font-size: 10px;
  color: var(--sun);
  font-weight: 900;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(224, 122, 31, .25);
  border-top-color: #e07a1f;
  border-radius: 50%;
  animation: spin360 .8s linear infinite;
  vertical-align: middle;
}

@keyframes spin360 {
  100% { transform: rotate(360deg); }
}

/* =====================================================================
   OFFLINE VAULT
   ===================================================================== */
.vault-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px;
}

.meter {
  height: 9px;
  border-radius: 20px;
  background: #fff6ea;
  border: 1.5px solid var(--line);
  overflow: hidden;
  margin-top: 8px;
}

.meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5ec2f0, #3aa0e0);
  transition: width .3s;
}

#filePick {
  display: none;
}

/* =====================================================================
   DOCK & BOTTOM NAVIGATION
   ===================================================================== */
.dock-container {
  position: fixed;
  bottom: calc(72px + var(--sab));
  left: 0;
  right: 0;
  padding: 8px 14px;
  display: flex;
  gap: 8px;
  z-index: 30;
  pointer-events: none;
  max-width: 760px;
  margin: 0 auto;
}

.dock-btn {
  flex: 1;
  padding: 11px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(160, 100, 30, .28);
}

.btn-driver {
  background: linear-gradient(135deg, #5a6d94, #3f5174);
  color: #fff;
}

.btn-wa {
  background: linear-gradient(135deg, #3ddc84, #25b866);
  color: #fff;
}

nav.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 253, 248, .98);
  backdrop-filter: blur(18px);
  border-top: 1.5px solid var(--line);
  padding-bottom: var(--sab);
  box-shadow: 0 -3px 18px rgba(190, 150, 100, .14);
}

nav.tabs button {
  padding: 10px 2px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #b9a68f;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .3px;
  position: relative;
  transition: color .15s;
}

nav.tabs button .ti {
  font-size: 19px;
  line-height: 1;
}

nav.tabs button.on {
  color: #e07a1f;
}

nav.tabs button.on::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24%;
  right: 24%;
  height: 3px;
  background: linear-gradient(90deg, #ffb85c, #ff8a3d);
  border-radius: 0 0 5px 5px;
}

/* =====================================================================
   TOAST
   ===================================================================== */
#toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  bottom: calc(140px + var(--sab));
  z-index: 120;
  background: #fff;
  border: 2px solid var(--sun);
  color: #4a2408;
  padding: 11px 18px;
  border-radius: 24px;
  font-size: 12.5px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  max-width: 88vw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(160, 100, 30, .28);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.bad {
  border-color: var(--coral);
  color: #8a2a1a;
}

#toast.ok {
  border-color: var(--leaf);
  color: #1a6a3a;
}