/* ============================================================
   Ryanna's little corner — shared design system
   Used by every page. Page-specific styles live inline
   in each .html file (e.g. the birthday cake / party).
   ============================================================ */

:root {
  --midnight: #140d26;
  --plum: #2a1b4d;
  --gold: #ffc96b;
  --pink: #ff9ec4;
  --lavender: #b79cff;
  --cream: #fff6ec;
  --mint: #7de2d1;

  --rail: 244px;          /* sidebar width on desktop */
  --card-bg: rgba(255, 246, 236, 0.06);
  --card-border: rgba(255, 246, 236, 0.14);
}

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

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

body {
  font-family: "Quicksand", system-ui, sans-serif;
  color: var(--cream);
  background: var(--midnight);   /* solid fallback — never a bare band */
  min-height: 100vh;
}

/* fixed gradient + warm bloom layer that always covers the viewport
   (avoids background-attachment:fixed, which is buggy on iOS Safari) */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 45% at 50% 6%, rgba(255, 201, 107, 0.20), transparent 70%),
    radial-gradient(50% 40% at 12% 92%, rgba(255, 158, 196, 0.16), transparent 70%),
    radial-gradient(50% 40% at 88% 88%, rgba(183, 156, 255, 0.15), transparent 70%),
    radial-gradient(120% 90% at 50% 0%, var(--plum) 0%, #1b1136 45%, var(--midnight) 100%);
  pointer-events: none;
}

a { color: inherit; }

/* ---------------- ambient (injected by app.js) ---------------- */

.blossom, .spark {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
.spark {
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(255, 201, 107, 0.5);
  animation: drift ease-in-out infinite;
}
@keyframes drift {
  0%   { opacity: 0; transform: translateY(12px); }
  25%  { opacity: 0.8; }
  50%  { opacity: 0.3; }
  75%  { opacity: 0.75; }
  100% { opacity: 0; transform: translateY(-46px); }
}
.blossom { animation: petal-drift ease-in-out infinite; }
.blossom svg { width: 100%; height: 100%; display: block; }
@keyframes petal-drift {
  0%   { opacity: 0; transform: translate(0, -24px) rotate(0deg); }
  20%  { opacity: 0.8; }
  50%  { opacity: 0.6; transform: translate(16px, 34px) rotate(70deg); }
  80%  { opacity: 0.75; }
  100% { opacity: 0; transform: translate(-8px, 88px) rotate(140deg); }
}

/* ---------------- sidebar / left tab (injected by app.js) ---------------- */

.rn-shell { position: relative; z-index: 1; }

.rn-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail);
  padding: 26px 18px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background: rgba(16, 10, 32, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255, 246, 236, 0.10);
  z-index: 900;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}
.rn-bottom { margin-top: auto; padding-top: 12px; }

.rn-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 8px 20px;
}
.rn-brand .dot {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
  background: radial-gradient(circle at 32% 28%, var(--gold), var(--pink) 70%);
  box-shadow: 0 6px 18px rgba(255, 158, 196, 0.35);
}
.rn-brand .who { line-height: 1.15; }
.rn-brand .who b {
  font-family: "Caveat", cursive;
  font-weight: 700; font-size: 26px;
  color: var(--cream);
}
.rn-brand .who span {
  display: block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lavender);
}

.rn-nav { display: flex; flex-direction: column; gap: 6px; }

.rn-link {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px; font-weight: 600;
  color: rgba(255, 246, 236, 0.82);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.rn-link .ico { font-size: 19px; width: 22px; text-align: center; flex: none; }
.rn-link:hover { background: rgba(255, 246, 236, 0.07); transform: translateX(2px); }
.rn-link.active {
  color: #3a2b5e; font-weight: 700;
  background: linear-gradient(120deg, var(--gold), var(--pink));
  box-shadow: 0 8px 22px rgba(255, 158, 196, 0.28);
}
.rn-link:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.rn-foot {
  padding: 12px 10px 2px;
  font-family: "Caveat", cursive;
  font-size: 17px;
  color: rgba(255, 246, 236, 0.5);
}

/* ---------------- mini music player (sidebar bottom) ---------------- */
.rn-player {
  padding: 13px 13px 12px;
  border-radius: 18px;
  background: rgba(255, 246, 236, 0.05);
  border: 1px solid rgba(255, 246, 236, 0.10);
}
.rn-player-top { display: flex; align-items: center; gap: 12px; }

/* the spinning vinyl record */
.rn-disc {
  width: 54px; height: 54px; flex: none;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #17102b 0 1.6px, #241a3e 1.6px 3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  animation: rn-spin 3.4s linear infinite;
  animation-play-state: paused;
}
.rn-player.playing .rn-disc { animation-play-state: running; }
.rn-disc::before {           /* heart in the center */
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 52%; height: 52%;
  transform: translate(-50%, -50%);
  background: linear-gradient(150deg, var(--gold), var(--pink));
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%2021.35l-1.45-1.32C5.4%2015.36%202%2012.28%202%208.5%202%205.42%204.42%203%207.5%203c1.74%200%203.41.81%204.5%202.09C13.09%203.81%2014.76%203%2016.5%203%2019.58%203%2022%205.42%2022%208.5c0%203.78-3.4%206.86-8.55%2011.54L12%2021.35z'%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%2021.35l-1.45-1.32C5.4%2015.36%202%2012.28%202%208.5%202%205.42%204.42%203%207.5%203c1.74%200%203.41.81%204.5%202.09C13.09%203.81%2014.76%203%2016.5%203%2019.58%203%2022%205.42%2022%208.5c0%203.78-3.4%206.86-8.55%2011.54L12%2021.35z'%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
@keyframes rn-spin { to { transform: rotate(360deg); } }

.rn-np { min-width: 0; }
.rn-np .t {
  font-size: 13.5px; font-weight: 700; color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rn-np .a {
  font-size: 11px; font-weight: 600; color: var(--lavender);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}

.rn-ctrls { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 11px; }
.rn-ctrls button {
  background: none; border: none; cursor: pointer; color: var(--cream);
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  transition: background 0.2s ease, transform 0.15s ease;
}
.rn-ctrls button:hover { background: rgba(255, 246, 236, 0.10); }
.rn-ctrls button:active { transform: scale(0.9); }
.rn-ctrls button:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.rn-ctrls svg { width: 15px; height: 15px; display: block; fill: currentColor; }
.rn-ctrls .pp {
  width: 40px; height: 40px; color: #3a2b5e;
  background: linear-gradient(120deg, var(--gold), var(--pink));
  box-shadow: 0 6px 16px rgba(255, 158, 196, 0.3);
}
.rn-ctrls .pp:hover { background: linear-gradient(120deg, var(--gold), var(--pink)); filter: brightness(1.06); }
.rn-ctrls .pp svg { width: 18px; height: 18px; }

.rn-vol { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.rn-vol .ic { font-size: 13px; flex: none; opacity: 0.7; }
.rn-vol input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: rgba(255, 246, 236, 0.18); cursor: pointer;
}
.rn-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 107, 0.22);
}
.rn-vol input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%; background: var(--gold);
}

/* hamburger (mobile only) */
.rn-burger {
  position: fixed;
  top: max(14px, env(safe-area-inset-top)); left: 14px;
  z-index: 950;
  width: 46px; height: 46px;
  display: none;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255, 246, 236, 0.16);
  border-radius: 13px;
  background: rgba(16, 10, 32, 0.8);
  backdrop-filter: blur(10px);
  color: var(--cream);
  cursor: pointer;
  font-size: 20px;
}
.rn-burger:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.rn-scrim {
  position: fixed; inset: 0;
  background: rgba(6, 4, 14, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 880;
}

/* ---------------- main content column ---------------- */

.rn-main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 60px) 72px;
}

.rn-page { max-width: 980px; margin: 0 auto; }

.rn-eyebrow {
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--lavender);
}
.rn-h1 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(46px, 9vw, 78px);
  line-height: 1.02;
  margin-top: 6px;
  background: linear-gradient(180deg, var(--cream) 30%, var(--gold) 80%, var(--pink) 115%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rn-sub {
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 600;
  color: rgba(255, 246, 236, 0.78);
  margin-top: 10px;
  max-width: 46ch;
}

/* generic entrance */
.rn-rise { opacity: 0; transform: translateY(16px); animation: rn-rise 0.7s ease forwards; }
@keyframes rn-rise { to { opacity: 1; transform: translateY(0); } }

/* ---------------- hover-to-translate ----------------
   Any element with data-tl="english" gets wrapped by app.js:
   hovering (or tapping, on touch screens) magically melts the
   Tagalog into its English translation, and back again.
   Both layers share one grid cell so the layout never jumps. */
.tl-swap { display: inline-grid; }
/* Gradient headlines: WebKit mispaints when children transition inside a
   background-clip:text ancestor, so a swap-containing .rn-h1 gets the
   class "no-ink" (gradient off) and each swap layer clips its own. */
.rn-h1.no-ink { background: none; }
.rn-h1.no-ink .tl0, .rn-h1.no-ink .tlen {
  background: linear-gradient(180deg, var(--cream) 30%, var(--gold) 80%, var(--pink) 115%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* script glyphs (the Caveat "?" flourish) overhang their box; pad so the
     clipped background still covers the ink, else the glyph tip vanishes */
  padding-right: 0.16em;
  margin-right: -0.06em;
}
.tl-swap > span { grid-area: 1 / 1; transition: opacity 0.45s ease, filter 0.45s ease; }
.tl-swap .tl0 {
  text-decoration: underline dotted rgba(255, 201, 107, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.tl-swap .tlen { opacity: 0; filter: blur(7px); pointer-events: none; }
.tl-swap:hover .tl0, .tl-swap.flipped .tl0 { opacity: 0; filter: blur(7px); }
.tl-swap:hover .tlen, .tl-swap.flipped .tlen { opacity: 1; filter: blur(0); }

/* ---------------- responsive: collapse rail to a drawer ---------------- */

@media (max-width: 820px) {
  .rn-main { margin-left: 0; padding-top: max(74px, env(safe-area-inset-top) + 60px); }
  .rn-burger { display: flex; }
  .rn-sidebar { transform: translateX(-104%); box-shadow: 0 0 60px rgba(0,0,0,0.5); }
  body.rn-drawer-open .rn-sidebar { transform: translateX(0); }
  body.rn-drawer-open .rn-scrim { opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    animation-delay: 0s !important;
    transition-duration: 0.15s !important;
  }
  .rn-rise { opacity: 1; transform: none; }
}

/* ============================================================
   MATRIX LOGIN GATE (injected by app.js)
   ============================================================ */

#gate {
  position: fixed; inset: 0;
  z-index: 9999;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  font-family: "Courier New", ui-monospace, "SFMono-Regular", monospace;
  overflow: hidden;
  transition: opacity 0.8s ease;
}
#gate.hide { opacity: 0; pointer-events: none; }

#matrix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.85; }

.terminal {
  position: relative; z-index: 1;
  width: min(92vw, 600px);
  padding: 26px 22px 22px;
  background: rgba(0, 12, 2, 0.74);
  border: 1px solid rgba(0, 255, 90, 0.4);
  border-radius: 8px;
  box-shadow: 0 0 26px rgba(0, 255, 90, 0.22), inset 0 0 44px rgba(0, 255, 90, 0.05);
  color: #35ff77;
  text-shadow: 0 0 6px rgba(0, 255, 90, 0.55);
  font-size: clamp(13px, 3.4vw, 16px);
  line-height: 1.65;
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.err { color: #ff5252; text-shadow: 0 0 6px rgba(255, 70, 70, 0.6); }

.prompt-row { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.prompt-row .caret-label { color: #35ff77; flex: none; }
#pass {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: #8dffb0; caret-color: #35ff77;
  font-family: inherit; font-size: inherit; text-shadow: inherit;
  letter-spacing: 3px; padding: 0;
}
.gate-shake { animation: gate-shake 0.4s ease; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ============================================================
   Reusable cute card (feature tiles, quote cards, etc.)
   ============================================================ */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.tile {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--cream);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 26px 24px 24px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 70% at 50% -10%, rgba(255, 201, 107, 0.16), transparent 70%);
  opacity: 0; transition: opacity 0.25s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 201, 107, 0.5);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  outline: none;
}
.tile:hover::after { opacity: 1; }
.tile .emoji {
  font-size: 40px;
  display: inline-block;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
}
.tile h3 {
  font-family: "Shrikhand", cursive; font-weight: 400;
  font-size: 23px; margin-top: 14px;
  background: linear-gradient(180deg, var(--cream), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tile p {
  font-size: 14.5px; font-weight: 500;
  color: rgba(255, 246, 236, 0.72);
  margin-top: 7px; line-height: 1.4;
}
.tile .go {
  margin-top: 16px;
  font-size: 13px; font-weight: 700;
  color: var(--pink);
  display: inline-flex; align-items: center; gap: 6px;
}
