:root {
  --bg: #0b0805;
  --bg-spot: radial-gradient(110% 75% at 50% 0%, #1c140a 0%, #0b0805 62%, #080604 100%);
  --surface: #15100a;
  --surface-alt: #1c150d;
  --input-bg: #1f1810;
  --nav-bg: #080604;
  --nav-text: #f1e0ab;
  --text: #f7f2e7;
  --muted: #d8c8a2;
  --gold-bright: #fbefc4;
  --gold-light: #f1e0ab;
  --gold-mid: #e7c97e;
  --gold-base: #c7a14a;
  --gold-deep: #9a7330;
  --accent: #c7a14a;
  --accent-dark: #9a7330;
  --primary: #e7c97e;
  --primary-text: #0b0805;
  --link-color: #f1e0ab;
  --border: rgba(199, 161, 74, 0.28);
  --border-strong: rgba(199, 161, 74, 0.52);
  --green-bg: #0c2e1c;
  --green-fg: #a7f3d0;
  --green-border: #10b981;
  --amber-bg: #2e2007;
  --amber-fg: #fde68a;
  --amber-border: #d97706;
  --red-bg: #351015;
  --red-fg: #fecaca;
  --red-border: #ef4444;
  --blue-bg: #11223b;
  --blue-fg: #bfdbfe;
  --blue-border: #3b82f6;
  --radius: 4px;
}

body.theme-light {
  --bg: #f8f4eb;
  --bg-spot: linear-gradient(180deg, #faf7f0 0%, #f1eadb 100%);
  --surface: #ffffff;
  --surface-alt: #f5efe1;
  --input-bg: #ffffff;
  --nav-bg: #080604;
  --nav-text: #f1e0ab;
  --text: #16110b;
  --muted: #5e4e36;
  --link-color: #8a5f17;
  --border: #dfd2b5;
  --border-strong: #c2a055;
  --green-bg: #dcfce7;
  --green-fg: #14532d;
  --green-border: #86efac;
  --amber-bg: #fef3c7;
  --amber-fg: #78350f;
  --amber-border: #f59e0b;
  --red-bg: #fee2e2;
  --red-fg: #7f1d1d;
  --red-border: #fca5a5;
  --blue-bg: #dbeafe;
  --blue-fg: #1e3a8a;
  --blue-border: #93c5fd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  background: var(--bg);
  background-image: var(--bg-spot);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--gold-base);
  color: #0b0805;
}

a { color: var(--link-color); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; }
body.theme-light a:hover { color: #5b3d0a; }

.hidden { display: none !important; }

.topbar {
  background: var(--nav-bg);
  color: var(--nav-text);
  border-bottom: 1px solid rgba(199, 161, 74, 0.32);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 58px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-light);
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--gold-bright); }

.brand-crest {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #080604;
  border: 1px solid rgba(199, 161, 74, 0.7);
  box-shadow: inset 0 0 0 2px rgba(199, 161, 74, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-light);
}

.brand-wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.brand-urdu {
  font-family: "Amiri", Georgia, serif;
  font-size: 0.98rem;
  color: var(--gold-mid);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.12rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  color: rgba(241, 224, 171, 0.82);
  padding: 0.42rem 0.52rem;
  border-radius: 2px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link:hover {
  color: var(--gold-bright);
  border-bottom-color: rgba(199, 161, 74, 0.55);
  text-decoration: none;
}
.nav-link.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-mid);
  font-weight: 600;
}
.nav-link.stage-pill {
  margin: 0 0.2rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(231, 201, 126, 0.58);
  color: var(--gold-bright);
}
.nav-link.stage-pill:hover,
.nav-link.stage-pill.active {
  background: linear-gradient(176deg, #fbefc4, #c49a4a);
  color: #0b0805;
  border-color: #c7a14a;
}

.user-pill {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.42rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-user {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  padding: 0.32rem 0.48rem;
}

.btn-nav-signout {
  min-height: 30px;
  padding: 0.2rem 0.58rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: #e7d7b0;
  border: 1px solid rgba(199, 161, 74, 0.42);
}
.btn-nav-signout:hover {
  background: rgba(199, 161, 74, 0.16);
  color: var(--gold-bright);
}

.container {
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.75rem;
  flex: 1 0 auto;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}
body.theme-light h1,
body.theme-light h2,
body.theme-light h3 {
  color: #14100a;
}

h1 { font-size: 1.85rem; font-weight: 600; margin: 0 0 0.2rem; line-height: 1.15; }
h2 { font-size: 1.32rem; font-weight: 600; margin: 0 0 0.55rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.4rem; }

.eyebrow {
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--gold-mid);
  margin-bottom: 0.3rem;
}
body.theme-light .eyebrow { color: #8a5f17; }

.diamond-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.55rem 0 0.9rem;
}
.diamond-divider::before,
.diamond-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 161, 74, 0.55), transparent);
}
.diamond-gem {
  width: 6px;
  height: 6px;
  background: var(--gold-mid);
  transform: rotate(45deg);
}

.muted { color: var(--muted); font-size: 0.92rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.grid-2 > *,
.grid-3 > *,
.form-grid > * {
  min-width: 0;
  max-width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
body.theme-light .card { box-shadow: 0 2px 10px rgba(20, 16, 10, 0.06); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.stat-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
}
.stat-value {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.18rem;
  color: var(--gold-bright);
}
body.theme-light .stat-value { color: #14100a; }

.alert {
  padding: 0.78rem 1rem;
  border-radius: 3px;
  margin-bottom: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-ok { background: var(--green-bg); color: var(--green-fg); border-color: var(--green-border); }
.alert-err { background: var(--red-bg); color: var(--red-fg); border-color: var(--red-border); }
.alert-warn { background: var(--amber-bg); color: var(--amber-fg); border-color: var(--amber-border); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.56rem;
  border-radius: 2px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.badge-green { background: var(--green-bg); color: var(--green-fg); border-color: var(--green-border); }
.badge-amber { background: var(--amber-bg); color: var(--amber-fg); border-color: var(--amber-border); }
.badge-red { background: var(--red-bg); color: var(--red-fg); border-color: var(--red-border); }
.badge-blue { background: var(--blue-bg); color: var(--blue-fg); border-color: var(--blue-border); }
.badge-muted { background: var(--surface-alt); color: var(--muted); border-color: var(--border); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.45rem 0.92rem;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--gold-mid);
  background: rgba(199, 161, 74, 0.16);
  color: var(--gold-bright);
  text-decoration: none;
}
body.theme-light .btn:hover { background: #efe4cb; color: #14100a; }

.btn-sm { min-height: 34px; padding: 0.28rem 0.68rem; font-size: 0.82rem; }

.btn-primary,
.btn-accent {
  background: linear-gradient(176deg, #f1e0ab, #c49a4a);
  color: #0b0805;
  border-color: #c7a14a;
  font-weight: 600;
}
.btn-primary:hover,
.btn-accent:hover {
  background: linear-gradient(176deg, #fbefc4, #d9b978);
  color: #0b0805;
}

.btn-danger {
  background: #7f1d1d;
  color: #fef2f2;
  border-color: #dc2626;
}
.btn-danger:hover { background: #991b1b; color: #ffffff; }

.btn-yes { background: #15803d; color: #ffffff; border-color: #22c55e; font-weight: 600; }
.btn-yes:hover { background: #166534; color: #ffffff; }
.btn-maybe { background: #b45309; color: #ffffff; border-color: #f59e0b; font-weight: 600; }
.btn-maybe:hover { background: #92400e; color: #ffffff; }
.btn-no { background: #b91c1c; color: #ffffff; border-color: #ef4444; font-weight: 600; }
.btn-no:hover { background: #991b1b; color: #ffffff; }

.btn-outline-active {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
body.theme-light .btn-outline-active { outline-color: #14100a; }

.btn-nav-theme {
  min-height: 30px;
  padding: 0.2rem 0.56rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #1a130a;
  color: #f1e0ab;
  border-color: rgba(199, 161, 74, 0.48);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }

.gear-edit-fields {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(180px, 1fr);
  gap: 0.55rem;
}

.gear-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.6rem;
  align-items: center;
}

.slot-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1.05rem;
  margin-bottom: 0.85rem;
}

.slot-header {
  margin-bottom: 0.45rem;
}

.slot-meta {
  margin-top: 0.25rem;
  line-height: 1.45;
}

.slot-actions {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
}

.song-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.song-edit-panel {
  margin-top: 0.7rem;
}

.song-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 240px;
  margin-bottom: 0;
}

form.inline-form { display: inline-block; margin: 0; max-width: 100%; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.72rem;
  min-width: 0;
  max-width: 100%;
}
.field label {
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--gold-light);
}
body.theme-light .field label { color: #3a2e1d; font-weight: 600; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.54rem 0.68rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text);
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-height: 40px;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
  text-align: left;
}

.inline-compact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.8rem auto;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.inline-compact-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.ms-pos-num { font-weight: 700; }

.saved-hint { margin: -0.2rem 0 0.75rem; font-size: 0.84rem; }

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(231, 201, 126, 0.55);
  border-color: var(--gold-mid);
}

select option {
  background: #0b0805;
  color: #f7f2e7;
}
body.theme-light select option {
  background: #ffffff;
  color: #14100a;
}

textarea { min-height: 78px; resize: vertical; }
textarea.copy-box { min-height: 92px; background: var(--surface-alt); font-size: 0.88rem; }

.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { padding: 0.6rem 0.65rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th {
  background: var(--surface-alt);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
}
body.theme-light th { color: #3a2e1d; }

.auth-shell { max-width: 500px; margin: 2rem auto; }
.auth-brand-header { text-align: center; margin-bottom: 0.75rem; }
.auth-urdu {
  font-family: "Amiri", Georgia, serif;
  font-size: 2.1rem;
  line-height: 1.3;
  color: var(--gold-mid);
}
.auth-wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
body.theme-light .auth-wordmark { color: #14100a; }

.divider { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

.mobile-header-actions,
.mobile-drawer,
.mobile-bottom-nav {
  display: none;
}

.mobile-stage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  border: 1px solid rgba(231, 201, 126, 0.65);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-stage-btn.active {
  background: linear-gradient(176deg, #fbefc4, #c49a4a);
  color: #0b0805;
}

.btn-mobile-menu {
  min-height: 38px;
  padding: 0.3rem 0.78rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(176deg, #f1e0ab, #c49a4a);
  color: #0b0805;
  border-color: #c7a14a;
  font-weight: 600;
}

.mobile-drawer {
  background: #0d0905;
  border-top: 1px solid rgba(199, 161, 74, 0.25);
  padding: 0.85rem 1rem 1rem;
}

.mobile-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(199, 161, 74, 0.28);
  border-radius: 3px;
  background: #17110a;
  color: #f1e0ab;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.mobile-drawer-link.active {
  background: linear-gradient(176deg, #f1e0ab, #c49a4a);
  color: #0b0805;
  font-weight: 600;
}

.mobile-drawer-footer {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(199, 161, 74, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.mobile-drawer-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: #080604;
  border-top: 1px solid rgba(199, 161, 74, 0.35);
  padding: 0.3rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
}

.mobile-tab {
  flex: 1 1 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(241, 224, 171, 0.84);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  text-decoration: none;
}
.mobile-tab.active {
  color: #0b0805;
  background: linear-gradient(176deg, #f1e0ab, #c49a4a);
}
.mobile-tab-stage {
  border: 1px solid rgba(231, 201, 126, 0.45);
}

@media (max-width: 1023px) {
  .nav-links,
  .user-pill:not(.auth-top-actions) {
    display: none;
  }
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
  }
  .mobile-drawer:not(.hidden) {
    display: block;
  }
}

@media (max-width: 768px) {
  html, body { overflow-x: clip; max-width: 100%; }
  .topbar-inner { padding: 0 0.7rem; min-height: 52px; }
  .brand-wordmark { font-size: 0.98rem; letter-spacing: 0.18em; }
  .container { padding: 0.7rem 0.65rem 2rem; }
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.18rem; }
  h3 { font-size: 1.04rem; }
  .page-header { gap: 0.5rem; margin-bottom: 0.72rem; }
  .card { padding: 0.85rem 0.9rem; margin-bottom: 0.78rem; }
  .field { margin-bottom: 0.55rem; }
  .label-spacer { display: none; }
  .grid-2,
  .grid-3,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }
  .grid-3.stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .stat-card { padding: 0.68rem 0.75rem; }
  .stat-value { font-size: 1.38rem; }
  .form-grid.form-grid-2-mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .form-grid-2-mobile .field-span-2 { grid-column: 1 / -1; }
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"] {
    padding: 0.48rem 0.5rem;
    font-size: 0.9rem;
    text-align: left;
  }
  .btn-row { gap: 0.42rem; }
  .btn-row > * { max-width: 100%; }
  .mono, .muted, p, td { overflow-wrap: anywhere; }
  .gear-edit-fields { grid-template-columns: minmax(0, 1fr); }
  .song-edit-form { min-width: 0; width: 100%; }
  .mobile-cards-wrap { overflow-x: visible; }
  .card.mobile-cards-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .mobile-card-table,
  .mobile-card-table tbody {
    display: block;
    width: 100%;
  }
  .mobile-card-table thead {
    display: none;
  }
  .mobile-card-table .mobile-card-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.45rem 0.55rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.78rem 0.84rem;
    margin-bottom: 0.65rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  }
  body.theme-light .mobile-card-table .mobile-card-row {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(20, 16, 10, 0.06);
  }
  .mobile-card-nested .mobile-card-row {
    background: var(--surface-alt);
    box-shadow: none;
  }
  body.theme-light .mobile-card-nested .mobile-card-row {
    background: var(--surface-alt);
  }
  .mobile-card-table td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    overflow-wrap: anywhere;
  }
  .mobile-card-table .mc-head {
    grid-column: 1 / 5;
    grid-row: 1;
    font-size: 0.96rem;
    line-height: 1.32;
  }
  .mobile-card-table .mc-head strong {
    font-size: 1rem;
    color: var(--gold-bright);
  }
  body.theme-light .mobile-card-table .mc-head strong {
    color: #14100a;
  }
  .mobile-card-table .mc-head-full {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 0.96rem;
    line-height: 1.32;
  }
  .mobile-card-table .mc-aside {
    grid-column: 5 / 7;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }
  .mobile-card-table .ms-pos {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: var(--gold-mid);
  }
  body.theme-light .mobile-card-table .ms-pos {
    color: #8a5f17;
  }
  .mobile-card-table .ms-pos-num::before {
    content: "#";
    opacity: 0.75;
  }
  .mobile-card-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gold-mid);
    margin-bottom: 0.14rem;
  }
  body.theme-light .mobile-card-table td[data-label]::before {
    color: #7a5c22;
  }
  .mobile-card-table .mc-chip {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.32rem 0.48rem;
    font-size: 0.85rem;
  }
  .mobile-card-nested .mc-chip {
    background: var(--surface);
  }
  .mobile-card-table .mc-half { grid-column: span 3; }
  .mobile-card-table .mc-third { grid-column: span 2; }
  .mobile-card-table .mc-span4 { grid-column: span 4; }
  .mobile-card-table .mc-full {
    grid-column: 1 / -1;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
  }
  .mobile-card-table .mc-full.mc-chip {
    padding: 0.35rem 0.5rem;
    border-top: 1px solid var(--border);
  }
  .mobile-card-table .mc-full.mc-plain {
    padding-top: 0;
    border-top: none;
  }
  .mobile-card-table .mc-empty {
    grid-column: 1 / -1;
    padding: 0.5rem 0;
  }
  .mobile-card-table .ms-note-copy {
    margin-top: 0.24rem;
    line-height: 1.42;
  }
  .mobile-card-table .mc-actions .form-grid {
    margin-top: 0.5rem;
    gap: 0.4rem;
  }
  .mobile-bottom-nav { display: flex; gap: 0.2rem; }
  .container.has-mobile-bar { padding-bottom: 4.65rem; }
}
