:root {
  --primary:   #2D3C59;
  --secondary: #94A378;
  --tertiary:  #E5BA41;
  --accent:    #D1855C;
  --bg:        #F4EFE4;
  --paper:     #FAF7F0;
  --ink:       #1A2433;
  --muted:     #8A7F6E;
  --border:    #C8BFA8;
}

/* wipe browser defaults so nothing looks weird */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* stop anything from spilling past the viewport horizontally */
html {
  overflow-x: hidden;
  width: 100%;
}

/* base page - column flex so the footer always sticks to the bottom */
body {
  background-color: var(--bg);
  font-family: 'Courier Prime', monospace;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  /* faint graph paper grid in the background */
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(45,60,89,0.04) 27px, rgba(45,60,89,0.04) 28px),
    repeating-linear-gradient(90deg, transparent, transparent 27px, rgba(45,60,89,0.03) 27px, rgba(45,60,89,0.03) 28px);
}

/* make sure form controls never break out of their box */
input, select, textarea, button {
  font-family: 'Courier Prime', monospace;
  max-width: 100%;
}

/* ── header ──────────────────────────────────────────────────────────────── */
header {
  background: var(--primary);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
}

/* subtle diagonal stripe overlay just for texture */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 8px,
    rgba(255,255,255,0.02) 8px, rgba(255,255,255,0.02) 9px
  );
  pointer-events: none;
}

.header-inner {
  width: 100%;
  padding: 24px 48px 20px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  position: relative;
}

/* the gold square stamp with the S */
.logo-stamp {
  width: 62px; height: 62px;
  border: 3px solid var(--tertiary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.logo-stamp::before {
  content: 'S';
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 900;
  color: var(--tertiary);
}
/* inner border for that extra stamp look */
.logo-stamp::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(229,186,65,0.3);
}

.header-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 30px; font-weight: 900;
  color: var(--paper);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.header-text .subtitle {
  font-size: 12px;
  color: var(--secondary);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* small est. / reg. / time block on the right */
.header-meta {
  margin-left: auto;
  text-align: right;
  color: rgba(244,239,228,0.45);
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 1.9;
}

/* ── yellow divider banner ───────────────────────────────────────────────── */
.divider-banner {
  background: var(--tertiary);
  padding: 6px 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
}
.divider-banner .rule { flex: 1; height: 1px; background: rgba(45,60,89,0.25); }
.divider-banner span {
  font-size: 9px; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--primary);
  font-weight: 700; white-space: nowrap;
}

/* ── main two-column layout ──────────────────────────────────────────────── */
.layout {
  flex: 1;
  width: 100%;
  padding: 36px 48px 60px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* sidebar scrolls with you */
.sidebar {
  position: sticky;
  top: 24px;
}
.sidebar-label {
  font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px; padding-left: 2px;
}

/* ── sidebar nav list ────────────────────────────────────────────────────── */
.nav-list {
  list-style: none;
  border: 1.5px solid var(--border);
  background: var(--paper);
}
.nav-item {
  border-bottom: 1px solid var(--border);
  position: relative;
}
.nav-item:last-child { border-bottom: none; }

.nav-btn {
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.18s;
  position: relative;
}
/* section number pulled from data-num attribute */
.nav-btn::before {
  content: attr(data-num);
  font-size: 10px; color: var(--border);
  font-weight: 700; min-width: 18px;
  flex-shrink: 0;
}
.nav-btn:hover { background: rgba(45,60,89,0.04); color: var(--primary); }
/* active item gets the dark fill */
.nav-btn.active { background: var(--primary); color: var(--paper); }
.nav-btn.active::before { color: var(--tertiary); }
/* little arrow on the active item */
.nav-btn.active::after {
  content: '▶';
  position: absolute; right: 14px;
  font-size: 9px; color: var(--tertiary);
}

/* ── student count box below nav ─────────────────────────────────────────── */
.sidebar-stat {
  margin-top: 22px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  padding: 20px;
}
.stat-label {
  font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 44px; font-weight: 700;
  color: var(--primary); line-height: 1;
}
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ── panels - hidden unless .active is set ───────────────────────────────── */
.panel { display: none; animation: fadeUp 0.25s ease; }
.panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700; color: var(--primary);
}
/* small section label above the title */
.panel-title span {
  display: block;
  font-size: 11px; font-family: 'Courier Prime', monospace;
  color: var(--muted); letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 400; margin-bottom: 5px;
}
/* italic form type on the right */
.panel-stamp {
  font-family: 'Playfair Display', serif;
  font-size: 11px; font-style: italic;
  color: var(--border); letter-spacing: 0.1em;
}

/* ── form card with the gold left stripe ─────────────────────────────────── */
.form-card {
  background: var(--paper);
  border: 1.5px solid var(--border);
  padding: 32px 36px;
  position: relative;
  width: 100%;
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--tertiary);
}

/* two-column grid for form fields, collapses to one on mobile */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}

/* ── inputs and selects ──────────────────────────────────────────────────── */
input, select {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--primary);
  padding: 11px 14px;
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: all 0.18s;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  display: block;
}
/* bottom border swaps to accent on focus */
input:focus, select:focus {
  border-color: var(--primary);
  border-bottom-color: var(--accent);
  background: #fff;
  box-shadow: 0 2px 0 var(--accent);
}
input::placeholder { color: var(--border); font-style: italic; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  font-family: 'Courier Prime', monospace;
  font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 700;
  padding: 13px 32px;
  border: none; cursor: pointer;
  transition: all 0.18s;
  position: relative; border-radius: 0;
}
.btn-primary { background: var(--primary); color: var(--paper); }
.btn-primary:hover { background: var(--ink); transform: translateY(-1px); box-shadow: 3px 3px 0 var(--tertiary); }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: var(--paper); }
.btn-danger { background: transparent; color: #C0392B; border: 1.5px solid #C0392B; }
.btn-danger:hover { background: #C0392B; color: white; }

.form-actions { margin-top: 28px; display: flex; gap: 14px; align-items: center; }

/* ── toast - little pop-up at the bottom right ───────────────────────────── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--primary); color: var(--paper);
  padding: 14px 24px; font-size: 13px; letter-spacing: 0.08em;
  border-left: 4px solid var(--tertiary);
  opacity: 0; transform: translateY(12px);
  transition: all 0.3s; pointer-events: none; z-index: 999; max-width: 340px;
}
.toast.show    { opacity: 1; transform: translateY(0); }
.toast.error   { border-left-color: var(--accent); }
.toast.success { border-left-color: var(--secondary); }

/* ── table ───────────────────────────────────────────────────────────────── */
.table-wrap { background: var(--paper); border: 1.5px solid var(--border); overflow-x: auto; width: 100%; }
.search-bar {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: center;
  background: rgba(45,60,89,0.03);
}
.search-bar input { flex: 1; border-bottom-width: 1px; background: var(--paper); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--primary); color: var(--paper); }
th {
  padding: 13px 16px; text-align: left;
  font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; font-weight: 700; white-space: nowrap;
}
/* first column header pops in gold */
th:first-child { color: var(--tertiary); }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:hover { background: rgba(148,163,120,0.1); }
tbody tr:last-child { border-bottom: none; }
td { padding: 13px 16px; color: var(--ink); vertical-align: middle; }
/* student id stands out */
td:first-child { font-weight: 700; color: var(--primary); font-size: 12px; letter-spacing: 0.1em; }

/* year level pill */
.badge { display: inline-block; padding: 3px 10px; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700; border: 1px solid; }
.badge-year { border-color: var(--secondary); color: var(--secondary); background: rgba(148,163,120,0.1); }

/* edit and delete icon buttons in each row */
.action-btns { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border: 1px solid var(--border);
  background: none; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: 'Courier Prime', monospace; border-radius: 0;
}
.icon-btn:hover     { background: var(--primary); color: var(--paper); border-color: var(--primary); }
.icon-btn.del:hover { background: #C0392B; border-color: #C0392B; }

/* shown when no records match the filter */
.empty-state { padding: 60px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { font-family: 'Playfair Display', serif; font-size: 56px; color: var(--border); display: block; margin-bottom: 14px; }
.empty-state p { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }

/* ── record card shown after search or before delete ─────────────────────── */
.search-result-card {
  background: var(--paper); border: 1.5px solid var(--border);
  padding: 28px 32px; margin-top: 22px;
  position: relative; display: none; animation: fadeUp 0.2s ease;
}
.search-result-card.visible { display: block; }
/* little RECORD tab on the top right corner */
.search-result-card::after {
  content: 'RECORD'; position: absolute; top: -9px; right: 20px;
  background: var(--tertiary); color: var(--primary);
  font-size: 9px; letter-spacing: 0.3em; font-weight: 700; padding: 2px 12px;
}

.record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 18px; }
.record-field .field-label { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.record-field .field-value { font-family: 'Libre Baskerville', serif; font-size: 16px; color: var(--primary); }

/* shown when search finds nothing */
.no-result { display: none; padding: 28px 32px; border: 1.5px dashed var(--border); margin-top: 22px; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); text-align: center; }
.no-result.visible { display: block; }

/* update panel has two steps, only one visible at a time */
.update-step        { display: none; }
.update-step.active { display: block; }

/* ── confirmation modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,36,51,0.6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--paper); border: 2px solid var(--primary);
  padding: 36px; width: 460px; max-width: 90vw;
  position: relative; transform: scale(0.96); transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: scale(1); }
/* offset shadow box for depth */
.modal::before {
  content: ''; position: absolute;
  top: 6px; left: 6px; right: -6px; bottom: -6px;
  border: 1px solid var(--border); z-index: -1; pointer-events: none;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--primary); margin-bottom: 10px; }
.modal-body  { font-size: 13px; color: var(--muted); margin-bottom: 28px; line-height: 1.7; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ── footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); text-align: center; padding: 18px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); background: var(--paper); flex-shrink: 0;
}
footer strong { color: var(--primary); }

/* ── tablet - stack sidebar above content ────────────────────────────────── */
@media (max-width: 900px) {
  .layout          { grid-template-columns: 1fr; padding: 24px; }
  .form-grid       { grid-template-columns: 1fr; }
  .sidebar         { position: static; }
  .header-inner    { padding: 20px 24px; }
  .divider-banner  { padding: 6px 24px; }
  .record-grid     { grid-template-columns: 1fr 1fr; }
}


/* ── mobile header (only shown below 768px) ──────────────────────────────── */
.mobile-header { display: none; }

/* hamburger - three lines that animate into an X when open */
.hamburger {
  flex-shrink: 0;
  background: none;
  border: 2px solid var(--tertiary);
  width: 40px; height: 40px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  transition: background 0.18s;
  position: relative; z-index: 10;
  border-radius: 0;
}
.hamburger:hover { background: rgba(229,186,65,0.15); }
.hamburger span {
  display: block; width: 16px; height: 2px;
  background: var(--tertiary);
  transition: all 0.28s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ── mobile nav drawer ───────────────────────────────────────────────────────
   lives in normal document flow so it pushes content down, not over it.
   max-height trick: collapsed = 0, open = big enough for all content.
   visibility delay stops it from flashing during the close animation.
─────────────────────────────────────────────────────────────────────────── */
.mobile-nav-drawer {
  position: relative;
  z-index: 50;
  width: 100%;
  background: var(--paper);
  border-bottom: 3px solid var(--primary);
  overflow: hidden;

  /* collapsed by default */
  max-height: 0;
  opacity: 0;
  visibility: hidden;

  transition:
    max-height   0.42s cubic-bezier(0.4, 0, 0.2, 1),
    opacity      0.32s ease,
    visibility   0s   linear 0.42s; /* only hide after slide finishes */
}

/* js adds .open to slide it down */
.mobile-nav-drawer.open {
  max-height: 700px;
  opacity: 1;
  visibility: visible;
  transition:
    max-height   0.42s cubic-bezier(0.4, 0, 0.2, 1),
    opacity      0.28s ease,
    visibility   0s   linear 0s; /* show immediately */
}

/* dark header bar inside the drawer with the student count */
.mobile-stat-bar {
  background: var(--primary);
  color: var(--paper);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(229,186,65,0.25);
}
.mobile-stat-bar .stat-label-text {
  display: flex; flex-direction: column; gap: 3px;
}
.mobile-stat-bar .stat-label-text span:first-child {
  font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--secondary); font-weight: 700;
}
.mobile-stat-bar .stat-label-text span:last-child {
  font-size: 10px; color: rgba(244,239,228,0.45); letter-spacing: 0.05em;
}

/* gold badge that shows the student count */
.count-badge {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-width: 60px; height: 46px;
  padding: 0 18px;
  background: var(--tertiary);
  border: 2px solid rgba(45,60,89,0.2);
  flex-shrink: 0;
}
/* inner ring for depth */
.count-badge::before {
  content: '';
  position: absolute; inset: 4px;
  border: 1px solid rgba(255,255,255,0.45);
  pointer-events: none;
}
.count-badge .count {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--primary); line-height: 1;
  letter-spacing: -0.02em;
  position: relative; z-index: 1;
}

/* override borders on the nav list inside the drawer */
.mobile-nav-drawer .nav-list {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  background: var(--paper);
  width: 100%;
}
.mobile-nav-drawer .nav-item {
  border-bottom: 1px solid var(--border) !important;
}
.mobile-nav-drawer .nav-item:last-child {
  border-bottom: none !important;
}

/* drawer nav buttons - use ink color so they're clearly readable */
.mobile-nav-drawer .nav-btn {
  width: 100%;
  padding: 17px 20px;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--paper);
}
.mobile-nav-drawer .nav-btn:hover {
  background: rgba(45,60,89,0.06);
  color: var(--primary);
}
.mobile-nav-drawer .nav-btn.active {
  background: var(--primary);
  color: var(--paper);
}
.mobile-nav-drawer .nav-btn.active::before { color: var(--tertiary); }
.mobile-nav-drawer .nav-btn::before        { color: var(--border); }


/* ── mobile breakpoint (768px and below) ─────────────────────────────────── */
@media (max-width: 768px) {

  /* belt and suspenders - nothing escapes the viewport */
  * { max-width: 100%; }

  body {
    overflow-x: hidden;
    width: 100%;
  }

  /* hide desktop header and yellow banner */
  header .header-inner { display: none !important; }
  .divider-banner       { display: none !important; }

  /* compact mobile header */
  .mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary);
    position: relative;
    width: 100%;
  }
  /* same diagonal texture as desktop header */
  .mobile-header::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
      -45deg, transparent, transparent 8px,
      rgba(255,255,255,0.02) 8px, rgba(255,255,255,0.02) 9px
    );
    pointer-events: none;
  }

  /* small S stamp */
  .mobile-logo {
    width: 38px; height: 38px;
    border: 2.5px solid var(--tertiary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative; z-index: 1;
  }
  .mobile-logo::before {
    content: 'S';
    font-family: 'Playfair Display', serif;
    font-size: 19px; font-weight: 900; color: var(--tertiary);
  }

  .mobile-title {
    flex: 1; min-width: 0;
    position: relative; z-index: 1; overflow: hidden;
  }
  .mobile-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: 15px; font-weight: 900; color: var(--paper);
    letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mobile-title p {
    font-size: 9px; color: var(--secondary);
    letter-spacing: 0.16em; text-transform: uppercase; margin-top: 2px;
  }

  .mobile-right {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; position: relative; z-index: 1;
  }
  .mobile-clock {
    font-size: 11px; color: rgba(244,239,228,0.5);
    letter-spacing: 0.1em; font-variant-numeric: tabular-nums;
  }

  /* sidebar is hidden on mobile, replaced by the drawer */
  .sidebar { display: none !important; }

  /* full width single column */
  .layout {
    grid-template-columns: 1fr;
    padding: 20px 16px 60px;
    gap: 0;
    width: 100%;
    overflow-x: hidden;
  }

  main {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  /* panel header stacks title over stamp */
  .panel-header {
    margin-bottom: 20px; padding-bottom: 14px;
    flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .panel-title { font-size: 22px; }
  .panel-stamp { font-size: 10px; }

  /* form card contained in viewport */
  .form-card {
    padding: 20px 20px 24px 24px;
    width: 100%;
    overflow: hidden;
  }

  /* single column form */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
  }
  .form-group { width: 100%; }
  .form-group.full { grid-column: 1; }

  /* inputs fill their container, 16px stops ios safari from zooming in */
  input, select {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 16px;
    max-width: 100% !important;
  }

  /* stacked full-width buttons */
  .form-actions {
    flex-direction: column; align-items: stretch;
    gap: 10px; margin-top: 20px;
  }
  .btn {
    width: 100% !important;
    text-align: center;
    padding: 15px 20px; font-size: 12px;
  }

  /* table scrolls horizontally on its own */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
  table  { min-width: 520px; font-size: 12px; }
  td, th { padding: 10px 12px; }
  .search-bar { padding: 12px 14px; }
  .search-bar input { font-size: 16px; }

  .record-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .record-field .field-value { font-size: 14px; }

  .search-result-card { padding: 20px 16px; }
  .no-result          { padding: 20px 16px; }

  /* modal takes almost full width */
  .modal { width: 94vw; padding: 22px 18px; }
  .modal::before { display: none; }

  /* toast goes edge to edge */
  .toast {
    bottom: 16px; right: 12px; left: 12px;
    max-width: none; font-size: 12px; padding: 12px 16px;
  }

  footer { font-size: 10px; padding: 14px 16px; line-height: 1.8; }
}