/* freyja.lagrue.ca — loaded only by the "freyja" layout. Made for an iPad held by a child: pink, unicorns,
   rainbows, rounded type, huge touch targets, no zoom or text selection getting in the way. */

:root {
  --pink: #ff5fa8;
  --pink-soft: #ffd3e8;
  --violet: #a066ff;
  --sky: #7cc8ff;
  --ink: #4a2350;
  --ink-soft: rgba(74, 35, 80, 0.62);
  --card: rgba(255, 255, 255, 0.86);
  --rainbow: linear-gradient(90deg, #ff6b9a, #ffa45c, #ffd84d, #7ddf8a, #6cc6ff, #a87bff);
  --shadow: 0 18px 40px -16px rgba(200, 60, 140, 0.45), 0 3px 8px rgba(120, 40, 100, 0.08);
  --radius: 32px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(40rem 26rem at 105% -5%, rgba(160, 102, 255, 0.28), transparent 60%),
    radial-gradient(36rem 24rem at -10% 105%, rgba(124, 200, 255, 0.3), transparent 60%),
    linear-gradient(160deg, #ffe3f1 0%, #ffeefa 45%, #f1e6ff 100%);
  background-attachment: fixed;
  color: var(--ink);
  font: 600 20px/1.3 ui-rounded, "SF Pro Rounded", -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.screen {
  max-width: 64rem;
  min-height: 100%;
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

[hidden] { display: none !important; }

button { font: inherit; color: inherit; cursor: pointer; }

/* Home: the list of mini apps */

.home-header { text-align: center; margin: 2rem 0 2.5rem; }
.home-emoji { font-size: 6rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.home-title {
  display: inline-block;
  margin: 0.5rem 0 0;
  font-size: 4rem;
  font-weight: 800;
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-subtitle { margin: 0.25rem 0 0; font-size: 1.5rem; color: var(--ink-soft); }

.apps { list-style: none; margin: 0 auto; padding: 0; width: 100%; max-width: 40rem; display: grid; gap: 1.25rem; }

.app-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  border: 3px solid #fff;
  transition: transform 0.12s;
}
.app-card:active { transform: scale(0.97); }
.app-emoji {
  flex: none;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  font-size: 3.4rem;
  font-weight: 800;
}
.app-text { flex: 1; display: grid; gap: 0.2rem; }
.app-name { font-size: 1.75rem; font-weight: 800; }
.app-hint { font-size: 1.1rem; color: var(--ink-soft); }
.app-chevron { font-size: 3rem; color: var(--pink); }

.sparkles { margin: auto 0 0; padding-top: 2rem; text-align: center; font-size: 2rem; letter-spacing: 0.3rem; }

/* The game */

.game { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; position: relative; }

.game-bar { display: flex; align-items: center; gap: 0.75rem; }
.back {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--pink);
  margin-right: auto;
}
.pill { padding: 0.6rem 1.2rem; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 1.4rem; font-weight: 800; }

.panel {
  margin: auto;
  width: 100%;
  max-width: 36rem;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  text-align: center;
}
.big-emoji { font-size: 7rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.panel-title { margin: 1rem 0 0.5rem; font-size: 2.6rem; font-weight: 800; }
.panel-text { margin: 0 0 2rem; font-size: 1.4rem; color: var(--ink-soft); }

.big-button {
  border: 0;
  padding: 1.25rem 4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 14px 30px -10px rgba(220, 60, 150, 0.7);
  transition: transform 0.12s;
}
.big-button:active { transform: scale(0.95); }

.play { flex: 1; display: grid; gap: 1.5rem; align-content: center; }

.question-card {
  padding: 1.5rem 1.5rem 2rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  text-align: center;
}

.timer { height: 1.4rem; border-radius: 999px; background: var(--pink-soft); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; border-radius: 999px; background: var(--rainbow); background-size: 100vw 100%; }

.question { margin: 1.5rem 0 1rem; font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.15; }
.question.is-long { font-size: clamp(2rem, 4.6vw, 3.4rem); }

.answer {
  display: inline-block;
  min-width: 9rem;
  margin: 0;
  padding: 0.4rem 1.5rem;
  border-radius: 24px;
  background: #fff;
  border: 4px solid var(--pink);
  color: var(--pink);
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1.1;
}
.answer.is-empty { color: var(--pink-soft); border-style: dashed; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; width: 100%; max-width: 30rem; margin: 0 auto; }

.key {
  height: clamp(5rem, 11vh, 7rem);
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 6px 0 #f3b8d6, var(--shadow);
  font-size: 2.8rem;
  font-weight: 800;
  transition: transform 0.06s, box-shadow 0.06s;
}
.key:active { transform: translateY(5px); box-shadow: 0 1px 0 #f3b8d6, var(--shadow); }
.key-erase { background: var(--pink-soft); color: var(--pink); }
.key-ok { background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; box-shadow: 0 6px 0 #b8459a, var(--shadow); }
.key-ok:active { box-shadow: 0 1px 0 #b8459a, var(--shadow); }

/* iPad held sideways: question on the left, keypad on the right */
@media (orientation: landscape) and (min-width: 900px) {
  .play { grid-template-columns: 1.15fr 1fr; align-items: center; }
  .keypad { max-width: none; }
  .question.is-long { font-size: 2.6rem; }
}

/* Right or wrong: a full-screen card over the game */

.feedback {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  animation: pop 0.25s ease-out;
}
.feedback-good { background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 211, 232, 0.97)); }
.feedback-bad { background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(214, 222, 240, 0.97)); }
.feedback-title { margin: 0; font-size: 4rem; font-weight: 800; }
.feedback-good .feedback-title {
  display: inline-block; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feedback-text { margin: 0; font-size: 3rem; font-weight: 800; color: var(--pink); }

/* Dad cut out like a sticker, in a square with the theme's gradient (the photo stops at its bottom edge). */
.papa {
  width: min(22rem, 60vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 44px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 0 0 8px #fff, 0 0 0 16px var(--pink-soft), var(--shadow);
  animation: bounce 0.6s ease-out;
}
.papa-sad {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(135deg, #b9a4ff, var(--sky));
  box-shadow: 0 0 0 8px #fff, 0 0 0 16px #d6def0, var(--shadow);
  animation: shake 0.5s ease-in-out;
}

@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } }
@keyframes bounce { 40% { transform: scale(1.12) rotate(4deg); } 70% { transform: scale(0.96); } }
@keyframes shake { 20%, 60% { transform: rotate(-10deg); } 40%, 80% { transform: rotate(10deg); } }

/* Recipes */

.app-emoji-recipes { background: linear-gradient(135deg, #ffb35c, var(--pink)); }

.recipe {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 3px solid #fff;
}
.recipe-title { margin: 0; font-size: 1.9rem; font-weight: 800; }
.recipe-hint { margin: 0.25rem 0 1.25rem; font-size: 1.1rem; color: var(--ink-soft); }

.ingredients { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.ingredient {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 4px 0 #f3b8d6;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: left;
  transition: transform 0.08s;
}
.ingredient:active { transform: translateY(3px); }
.ingredient-box {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  border: 3px solid var(--pink);
  color: #fff;
  font-size: 1.5rem;
}
.ingredient[aria-pressed="true"] { background: #fff4fa; color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--pink); }
.ingredient[aria-pressed="true"] .ingredient-box { background: var(--pink); }
.ingredient[aria-pressed="true"] .ingredient-box::after { content: "✓"; }

.steps { margin: 0.75rem 0 0; padding-left: 1.75rem; font-size: 1.4rem; display: grid; gap: 0.75rem; }

.app-photo { object-fit: cover; padding: 0; }
.recipe-photo {
  display: block;
  width: min(30rem, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 0 0 6px #fff, var(--shadow);
}

/* Radio */

.app-emoji-radio { background: linear-gradient(135deg, var(--sky), var(--violet)); }

.radio { flex: 1; display: grid; place-items: center; }
.radio-card {
  width: 100%;
  max-width: 34rem;
  padding: 2.5rem 2rem 3rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  text-align: center;
}
.radio-emoji { font-size: 6.5rem; line-height: 1; }
.radio.is-playing .radio-emoji { animation: float 1.6s ease-in-out infinite; }

.equalizer { display: flex; justify-content: center; align-items: flex-end; gap: 0.5rem; height: 3.5rem; margin: 0 0 1.75rem; }
.equalizer span { width: 0.9rem; height: 0.9rem; border-radius: 999px; background: var(--rainbow); background-size: 6rem 100%; }
.equalizer span:nth-child(2) { background-position: -1.2rem 0; }
.equalizer span:nth-child(3) { background-position: -2.4rem 0; }
.equalizer span:nth-child(4) { background-position: -3.6rem 0; }
.equalizer span:nth-child(5) { background-position: -4.8rem 0; }
.radio.is-playing .equalizer span { animation: bars 0.9s ease-in-out infinite alternate; }
.radio.is-playing .equalizer span:nth-child(2) { animation-delay: -0.3s; }
.radio.is-playing .equalizer span:nth-child(3) { animation-delay: -0.6s; }
.radio.is-playing .equalizer span:nth-child(4) { animation-delay: -0.15s; }
.radio.is-playing .equalizer span:nth-child(5) { animation-delay: -0.45s; }

.radio-button {
  display: grid;
  place-items: center;
  width: 9rem;
  height: 9rem;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  box-shadow: 0 0 0 10px var(--pink-soft), 0 18px 36px -12px rgba(220, 60, 150, 0.7);
  transition: transform 0.12s;
}
.radio-button:active { transform: scale(0.94); }
.radio-button svg { width: 4.5rem; height: 4.5rem; }
.radio-button .icon-pause { display: none; }
.radio.is-playing .radio-button .icon-play { display: none; }
.radio.is-playing .radio-button .icon-pause { display: block; }
.radio.is-loading .radio-button { animation: pulse 1s ease-in-out infinite; }

@keyframes bars { from { height: 0.9rem; } to { height: 3.5rem; } }
@keyframes pulse { 50% { transform: scale(0.94); opacity: 0.8; } }
