/* =========================================================
   NORSU CAMPUS MARKETPLACE — ABOUT, CAMPUS MAP, TERMS
   Same page shell as Favorites / Messages.
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1457d9;
  --blue-dark: #0e43ad;
  --blue-light: #edf4ff;
  --text: #101828;
  --muted: #667085;
  --border: #e4e7ec;
  --surface: #f8fafc;
  --nav: 76px;
}

body {
  min-height: 100vh;
  background: #eef1f6;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
a { color: var(--blue); }

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: #fff;
  padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 16px);
}

.page-header {
  padding: 0 16px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.content { padding: 8px 16px 16px; }


/* ---------- Text pages (About, Terms) ---------- */

.info-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.info-card {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.info-card h2 {
  margin-bottom: 8px;
  font-size: 17px;
  letter-spacing: -.2px;
}

.info-card p,
.info-card li {
  color: #475467;
  font-size: 14px;
  line-height: 1.65;
}

.info-card p + p { margin-top: 8px; }

.info-card ul,
.info-card ol {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-left: 20px;
}

.info-steps {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.info-step {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
}

.info-step-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-light);
  color: var(--blue);
}

.info-step-icon svg,
.info-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-step-icon svg { display: block; }

/* Scoped to the text so it can't restyle the icon tile (also a <span>). */
.info-step-text { min-width: 0; }
.info-step-text strong { display: block; font-size: 14px; line-height: 1.35; }
.info-step-text p { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.info-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #f3d9a4;
  border-radius: 14px;
  background: #fff8eb;
  color: #7a4b00;
  font-size: 13px;
  line-height: 1.55;
}

.info-updated { margin-top: 6px; color: var(--muted); font-size: 12px; }

/* Phones: full-width buttons stacked; desktop: side by side (see below). */
.info-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.info-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.info-button.primary { background: var(--blue); color: #fff; }
.info-button:hover { background: var(--blue-light); }
.info-button.primary:hover { background: var(--blue-dark); }


/* ---------- Campus Tour (map only) ----------
   The map comes from norsu.top. info.js shifts their own sidebar
   (wide screens) or top bar (phones) outside this frame. */

.map-frame {
  position: relative;
  height: calc(100vh - 64px - var(--nav) - 56px);
  height: calc(100dvh - 64px - var(--nav) - 56px);
  min-height: 380px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.map-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.map-credit {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}


/* ---------- Desktop ---------- */

@media (min-width: 769px) {
  body { background: #f4f6fa; }

  .app {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 40px 40px 284px !important;
  }

  .page-header { padding: 0; }
  .content { padding: 8px 0 0; }
  .info-card { padding: 26px 28px; }
  .info-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-actions { display: flex; flex-wrap: wrap; }

  .map-frame {
    height: calc(100vh - 72px - 64px);
    min-height: 480px;
  }
}


/* ===== DARK THEME (generated by tools/dark-theme.py — do not edit by hand) ===== */
:root[data-theme="dark"] { --blue: #1457d9; --blue--fg: #6796f1; --blue--bd: #1457d9; --blue-dark: #0e43ad; --blue-dark--fg: #6b98f3; --blue-dark--bd: #2052b6; --blue-light: #1a273b; --blue-light--fg: #edf4ff; --blue-light--bd: #213657; --text: #2d3a54; --text--fg: #ced5e2; --text--bd: #3d5c99; --muted: #4f5767; --muted--fg: #9ba3b2; --muted--bd: #9ba3b2; --border: #2a3242; --border--fg: #e4e7ec; --border--bd: #2b3240; --surface: #1d232e; --surface--fg: #f8fafc; --surface--bd: #1c212b; }
:root[data-theme="dark"] body { background-color: #0e1118; background-image: none; color: var(--text--fg); }
:root[data-theme="dark"] button { border-color: currentColor; background-color: transparent; background-image: none; color: inherit; }
:root[data-theme="dark"] a { color: var(--blue--fg); }
:root[data-theme="dark"] .app { background-color: #171b24; background-image: none; }
:root[data-theme="dark"] .page-header { background-color: #171b24; background-image: none; }
:root[data-theme="dark"] .info-lead { color: var(--muted--fg); }
:root[data-theme="dark"] .info-card { border-color: var(--border--bd); background-color: #171b24; background-image: none; }
:root[data-theme="dark"] .info-card p, :root[data-theme="dark"] .info-card li { color: #adb7c6; }
:root[data-theme="dark"] .info-step { background-color: var(--surface); background-image: none; }
:root[data-theme="dark"] .info-step-icon { background-color: var(--blue-light); background-image: none; color: var(--blue--fg); }
:root[data-theme="dark"] .info-step-icon svg, :root[data-theme="dark"] .info-button svg { fill: none; stroke: currentColor; }
:root[data-theme="dark"] .info-step-text p { color: var(--muted--fg); }
:root[data-theme="dark"] .info-note { border-color: #6f582a; background-color: #3c301b; background-image: none; color: #f3c171; }
:root[data-theme="dark"] .info-updated { color: var(--muted--fg); }
:root[data-theme="dark"] .info-button { border-color: var(--blue--bd); background-color: #171b24; background-image: none; color: var(--blue--fg); }
:root[data-theme="dark"] .info-button.primary { background-color: var(--blue); background-image: none; color: #ffffff; }
:root[data-theme="dark"] .info-button:hover { background-color: var(--blue-light); background-image: none; }
:root[data-theme="dark"] .info-button.primary:hover { background-color: var(--blue-dark); background-image: none; }
:root[data-theme="dark"] .map-frame { border-color: var(--border--bd); background-color: var(--surface); background-image: none; }
:root[data-theme="dark"] .map-frame iframe { border-color: currentColor; }
:root[data-theme="dark"] .map-credit { color: var(--muted--fg); }
@media (min-width: 769px) {
  :root[data-theme="dark"] body { background-color: #0e1118; background-image: none; }
}
/* ===== END DARK THEME ===== */
