/* =========================
   SHARED SITE STYLES
   - themes live here (edit once)
   - shared layout + card styling
   - mode switch styling
   ========================= */

/* Optional: put a font import here so ALL pages get it */
/* @import url('https://fonts.googleapis.com/css2?family=...&display=swap'); */

:root {
  /* --- THEME: day (☀) --- */
  --bg: #ffffff;
  --bg-soft: #fef0ef;

  --text: #b86f68;
  --text-soft: #d99a93;
  --accent: #fbc3bc;

  --box-bg: var(--bg-soft);
  --overlay: rgba(0,0,0,0.22);

  /* --- Typography (edit once) --- */
  --font: Georgia, serif;

  /* --- Layout constants (edit once) --- */
  --page-pad: 28px;
  --card-radius: 26px;
  --card-shadow: 0 18px 60px rgba(0,0,0,0.12);
  --card-border: 1px solid var(--accent);
  --max-width: 980px;
  --card-width: min(860px, 100%);
  --top-pad: 54px; /* space below mode switch */
}

/* night (☾) */
body.night {
  --bg: #22223b;
  --bg-soft: #4a4e69;
  --text: #f2e9e4;
  --text-soft: #c9ada7;
  --accent: #9a8c98;
  --box-bg: var(--bg-soft);
  --overlay: rgba(0,0,0,0.55);
}

/* red (♥) */
body.red {
  --bg: #2f0000;
  --bg-soft: #490000;
  --text: #ffe6e6;
  --text-soft: #ffb3b3;
  --accent: #650000;
  --box-bg: var(--bg-soft);
  --overlay: rgba(0,0,0,0.62);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  padding: var(--page-pad);
  transition: background 0.6s ease, color 0.6s ease;
}

/* ---- Mode Switch (injected by theme.js) ---- */
.mode-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 10px;
  z-index: 10;
}
.mode-switch button {
  width: 45px;
  height: 45px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  background: transparent;
  color: var(--text);
  font: inherit;
  transition: transform 0.12s ease, background 0.2s ease;
}
.mode-switch button:hover { background: rgba(228, 177, 171, 0.15); }
.mode-switch button:active { transform: translateY(1px); }
.mode-switch button:focus-visible {
  outline: 2px solid rgba(0,0,0,0);
  box-shadow: 0 0 0 3px rgba(251, 195, 188, 0.35);
}

/* ---- Page / Card layout ---- */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: calc(100vh - var(--page-pad) * 2);
  padding-top: var(--top-pad);
  display: grid;
  place-items: center;
}

.card {
  width: var(--card-width);
  background: var(--box-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 56px 34px;
  text-align: center;
}

/* simple text hierarchy helpers */
.kicker {
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  margin-bottom: 10px;
}
.title {
  font-size: 34px;
  letter-spacing: 0.02em;
  margin: 0;
}
.sub {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.45;
}

/* shared button style (optional) */
.ghost {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
/* =========================
   Shared micro-components
   ========================= */

.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.spacer { flex: 1; }

.small {
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-align: center;
}

/* segmented / pill buttons (used on breathe and can be reused elsewhere) */
.mode-pills {
  flex: 1;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--text-soft);
  padding: 10px 14px;
  border-radius: 999px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
}
.pill:hover { background: rgba(228,177,171,0.12); }
.pill:active { transform: translateY(1px); }
.pill.active {
  background: rgba(255,255,255,0.26);
  color: var(--text);
}
body.night .pill:hover { background: rgba(255,255,255,0.10); }
body.red .pill:hover { background: rgba(255,255,255,0.10); }
.ghost:hover { background: rgba(228,177,171,0.15); }
.ghost:active { transform: translateY(1px); }

@media (max-width: 520px) {
  :root { --page-pad: 18px; --top-pad: 64px; }
  .card { padding: 44px 22px; }
  .title { font-size: 28px; }
}


/* =========================
   iOS polish
   ========================= */

button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
