/* ============================================================
   Icek Health Quest — Design System
   Palette: teal / coral / sand — soft, modern health-brand feel
   ============================================================ */

:root {
  --teal: #0e9384;
  --teal-dark: #0a6e63;
  --teal-soft: #e7f5f2;
  --coral: #f97066;
  --coral-dark: #e04f45;
  --indigo: #6172f3;
  --amber: #f79009;
  --ink: #1d2939;
  --ink-soft: #667085;
  --sand: #faf6f0;
  --card: #ffffff;
  --radius: 18px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 6px 18px -4px rgba(16, 24, 40, 0.14);
  --shadow-lg: 0 20px 45px -12px rgba(16, 24, 40, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Outfit", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, #dff1ec 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #fdeae4 0%, transparent 55%),
    var(--sand);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ============ Setup screen ============ */

.setup-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 40px 44px;
  width: min(480px, 100%);
  text-align: center;
}

.logo-badge {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--teal), #34c7b5);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}
.logo-badge.small { width: 38px; height: 38px; font-size: 19px; border-radius: 12px; margin: 0; }

h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.5px; }

.tagline { color: var(--ink-soft); margin: 8px 0 26px; line-height: 1.5; }

.setup-section { margin-bottom: 20px; text-align: left; }

.setup-label {
  display: block;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.count-picker { display: flex; gap: 10px; }

.count-btn {
  flex: 1; padding: 12px 0;
  font-family: inherit; font-size: 18px; font-weight: 700;
  border: 2px solid #e4e7ec; border-radius: 14px;
  background: #fff; color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}
.count-btn:hover { border-color: var(--teal); color: var(--teal); }
.count-btn.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.player-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}

.color-dot {
  width: 16px; height: 16px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5), var(--shadow-sm);
}

.player-name-input {
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 11px 14px;
  border: 2px solid #e4e7ec; border-radius: 12px;
  color: var(--ink);
  transition: border-color 0.18s ease;
}
.player-name-input:focus { outline: none; border-color: var(--teal); }

.cpu-toggle {
  font-family: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
  padding: 9px 14px;
  border: none; border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  background: #eef1f5; color: var(--ink-soft);
  min-width: 74px;
}
.cpu-toggle.cpu { background: var(--indigo); color: #fff; }

.btn-primary {
  font-family: inherit; font-size: 17px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #14b8a6);
  border: none; border-radius: 14px;
  padding: 15px 34px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(14, 147, 132, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px) scale(0.98); box-shadow: 0 4px 10px -4px rgba(14,147,132,0.5); }
.btn-primary:disabled { filter: grayscale(0.6) opacity(0.6); cursor: not-allowed; transform: none; }

.setup-hint { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }

/* ============ Game screen ============ */

#screen-game { justify-content: flex-start; padding: 16px 20px 28px; }

.game-header {
  width: min(1100px, 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px 14px;
}

.game-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; letter-spacing: -0.3px;
  white-space: nowrap;
}
/* Keep the game header on one line on small phones */
@media (max-width: 420px) {
  .game-title { font-size: 17px; gap: 7px; }
}
@media (max-width: 360px) {
  .game-title { font-size: 15px; }
}

.header-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px;
  border: none; border-radius: 12px;
  background: var(--card); color: var(--ink);
  font-size: 17px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.icon-btn:active { transform: scale(0.94); }

.game-layout {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.board-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px;
}

#board { display: block; width: 100%; height: auto; border-radius: 12px; margin: 0 auto; }

/* On laptops and desktops the whole board should fit without scrolling:
   cap its height to the viewport and let it shrink to keep her proportions. */
@media (min-width: 861px) {
  .board-wrap { display: flex; justify-content: center; padding: 12px; }
  #board { width: auto; max-width: 100%; max-height: calc(100vh - 168px); }
}
@media (min-width: 861px) and (max-height: 820px) {
  #screen-game { padding-top: 10px; }
  .game-header { margin-bottom: 8px; }
  #board { max-height: calc(100vh - 132px); }
}

/* ============ Side panel ============ */

.side-panel { display: flex; flex-direction: column; gap: 16px; }

.player-list { display: flex; flex-direction: column; gap: 10px; }

.player-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.player-card.active {
  border-color: var(--pc, var(--teal));
  box-shadow: var(--shadow-md);
}

.pc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
  flex-shrink: 0;
}
.player-card.active .pc-avatar { animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.pc-info { flex: 1; min-width: 0; }
.pc-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-pos { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.pc-cpu-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.6px;
  background: var(--indigo); color: #fff;
  border-radius: 6px; padding: 3px 6px;
}

/* ============ Dice ============ */

.dice-area {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.dice-stage { perspective: 420px; width: 72px; height: 72px; }

.dice {
  width: 64px; height: 64px;
  position: relative; margin: 4px;
  transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateY(18deg);
}

.face {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #ffffff, #eef1f5);
  border: 1px solid #dde2ea;
  border-radius: 12px;
  display: grid;
  padding: 9px;
  box-shadow: inset 0 0 10px rgba(16,24,40,0.05);
}

.pip {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ink);
  align-self: center; justify-self: center;
}

.face-1 { transform: translateZ(32px); grid-template-areas: "a"; }
.face-2 { transform: rotateX(90deg) translateZ(32px); grid-template-columns: 1fr 1fr; }
.face-2 .pip:nth-child(1) { justify-self: start; align-self: start; }
.face-2 .pip:nth-child(2) { justify-self: end; align-self: end; }
.face-3 { transform: rotateY(90deg) translateZ(32px); grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.face-3 .pip:nth-child(1) { grid-area: 1 / 1; }
.face-3 .pip:nth-child(2) { grid-area: 2 / 2; }
.face-3 .pip:nth-child(3) { grid-area: 3 / 3; }
.face-4 { transform: rotateY(-90deg) translateZ(32px); grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.face-4 .pip { }
.face-5 { transform: rotateX(-90deg) translateZ(32px); grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.face-5 .pip:nth-child(1) { grid-area: 1 / 1; }
.face-5 .pip:nth-child(2) { grid-area: 1 / 3; }
.face-5 .pip:nth-child(3) { grid-area: 2 / 2; }
.face-5 .pip:nth-child(4) { grid-area: 3 / 1; }
.face-5 .pip:nth-child(5) { grid-area: 3 / 3; }
.face-6 { transform: rotateY(180deg) translateZ(32px); grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }

.btn-roll { width: 100%; font-size: 16px; padding: 13px 0; }

.status-text {
  font-size: 14px; font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  min-height: 21px;
}

/* ============ Modal ============ */

.overlay {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 50;
  overflow-y: auto;
}

/* A long card never runs off screen: it scrolls inside itself,
   and the action button stays pinned at the bottom of the card. */
.modal-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 34px 32px 30px;
  width: min(420px, 100%);
  text-align: center;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: auto;
}
.modal-card #btn-continue {
  position: sticky;
  bottom: 0;
  z-index: 1;
  box-shadow: 0 -10px 14px 4px var(--card);
}

@media (max-width: 420px), (max-height: 640px) {
  .overlay { padding: 12px; }
  .modal-card { padding: 22px 18px 18px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .modal-card .modal-icon { font-size: 36px; margin-bottom: 6px; }
}

.modal-icon { font-size: 46px; margin-bottom: 10px; }

.modal-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 8px; }

.modal-text { color: var(--ink-soft); line-height: 1.55; font-size: 15.5px; margin-bottom: 18px; }

/* While a question is on screen it is the main thing on the card:
   the habit line above it steps back, the question is big, dark and bold. */
.modal-card.asking h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0;
  margin-bottom: 10px;
}
.modal-card.asking .modal-text {
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.2px;
  margin-bottom: 20px;
}
.modal-card.asking .opt-btn { font-size: 16px; padding: 13px 15px; }

@media (max-width: 380px) {
  .modal-card.asking .modal-text { font-size: 19px; }
  .modal-card.asking .opt-btn { font-size: 15px; }
}

.quiz-btns { display: flex; gap: 12px; margin-bottom: 6px; }

.btn-quiz {
  flex: 1;
  font-family: inherit; font-size: 16px; font-weight: 700;
  padding: 13px 0;
  border: 2px solid #e4e7ec; border-radius: 14px;
  background: #fff; color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-quiz:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn-quiz:active { transform: scale(0.97); }
.btn-quiz.picked-right { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.btn-quiz.picked-wrong { border-color: var(--coral); background: #fdeae8; color: var(--coral-dark); }
.btn-quiz:disabled { cursor: default; opacity: 0.75; }

.modal-result { font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.modal-result.good { color: var(--teal-dark); }
.modal-result.bad { color: var(--coral-dark); }

.win-card h2 { font-size: 28px; }

/* ============ Confetti ============ */

#confetti-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}

.confetti {
  position: absolute;
  width: 10px; height: 14px;
  border-radius: 3px;
  top: -20px;
}

/* ============ Responsive ============ */

@media (max-width: 860px) {
  .game-layout { grid-template-columns: 1fr; }
  .side-panel { flex-direction: column-reverse; }
  .player-list { display: grid; grid-template-columns: 1fr 1fr; }
  .setup-card { padding: 30px 24px; }
}

/* ============================================================
   Icek Health Quest v2 — Home map, Health Gate, challenges
   ============================================================ */

/* ---- Home / journey map ---- */
.home-card { width: min(520px, 100%); }

.stage-chips {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 22px;
}
.stage-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--teal-soft);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 64px;
  font-size: 18px;
}
.stage-chip small { font-size: 10.5px; font-weight: 700; color: var(--teal-dark); }
.stage-chip.active { border-color: var(--teal); background: #fff; box-shadow: var(--shadow-sm); }
.stage-chip.locked { filter: grayscale(1) opacity(0.55); }
.stage-chip em { font-style: normal; font-size: 9px; font-weight: 800; color: var(--ink-soft); letter-spacing: 0.06em; }

.level-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.level-btn {
  border: 2px solid #e6ebe9; border-radius: 14px;
  background: #fff; cursor: pointer;
  padding: 10px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: inherit; transition: transform 0.12s, box-shadow 0.12s;
}
.level-btn span { font-size: 18px; font-weight: 800; color: var(--ink); }
.level-btn small { font-size: 10px; letter-spacing: 0.02em; }
.level-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--teal); }
.level-btn.current { border-color: var(--teal); background: var(--teal-soft); animation: pulse 1.8s ease-in-out infinite; }
.level-btn.done { border-color: #f5b759; background: #fffaf0; }
.level-btn.locked { opacity: 0.5; cursor: not-allowed; }

/* ---- Level card + gate power ---- */
.level-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}
.lc-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lc-level { font-weight: 800; font-size: 16px; }
.lc-streak { font-weight: 800; font-size: 14px; color: var(--amber); }

.power-track {
  height: 14px; border-radius: 7px;
  background: #eef1f0;
  overflow: hidden;
}
.power-fill {
  height: 100%; width: 0%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--amber), #ffd24d);
  box-shadow: 0 0 8px rgba(247, 144, 9, 0.55);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.power-label {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
}

/* ---- Challenge modal ---- */
.modal-kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.09em;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 10px;
}
.modal-kicker.bad { color: var(--coral-dark); background: #fdeae8; }
.modal-kicker.rematch { color: #b54708; background: #fef0c7; }

.opts { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.opt-btn {
  border: 2px solid #e6ebe9; border-radius: 13px;
  background: #fff; cursor: pointer;
  padding: 11px 14px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--ink);
  text-align: left; line-height: 1.35;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.opt-btn:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.opt-btn:active { transform: scale(0.985); }
.opt-btn.picked-right { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.opt-btn.picked-wrong { border-color: var(--coral); background: #fdeae8; color: var(--coral-dark); }
.opt-btn:disabled { cursor: default; opacity: 0.85; }

.tip-box {
  display: flex; gap: 9px; align-items: flex-start;
  background: #fffaeb; border: 1.5px solid #fedf89;
  border-radius: 13px;
  padding: 11px 13px;
  margin-bottom: 14px;
  text-align: left;
  font-size: 14px; line-height: 1.45; color: #7a5000; font-weight: 600;
}
.tip-bulb { font-size: 17px; }

.win-stars { font-size: 34px; letter-spacing: 6px; margin: 2px 0 10px; }

/* Gate glow */
#gate-layer.gate:not(.open) rect { filter: drop-shadow(0 0 4px rgba(224, 79, 69, 0.5)); }

/* ---- Snake Strike timer ---- */
.timer { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; }
.timer-track { flex: 1; height: 10px; border-radius: 5px; background: #eef1f0; overflow: hidden; }
.timer-fill {
  height: 100%; width: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #12b76a, #f79009);
  transition: width 0.1s linear;
}
.timer-num { font-weight: 800; font-size: 16px; min-width: 22px; text-align: right; color: var(--ink); }
.timer.urgent .timer-fill { background: linear-gradient(90deg, #e04f45, #f97066); }
.timer.urgent .timer-num { color: var(--coral-dark); animation: pulse 0.6s ease-in-out infinite; }

/* ---- Phone layout: roll button and gate power both visible under the board ---- */
@media (max-width: 860px) {
  .side-panel { flex-direction: column; gap: 10px; }
  .level-card { padding: 12px 16px; }
  .dice-area { flex-direction: row; justify-content: space-between; padding: 12px 16px; gap: 12px; }
  .dice-stage { flex-shrink: 0; }
  .btn-roll { flex: 1; }
  .dice-area { flex-wrap: wrap; }
  .status-text { width: 100%; font-size: 13px; min-height: 18px; margin-top: -2px; }
  #screen-game { padding: 10px 12px 18px; }
  .game-header { margin-bottom: 8px; }
}

/* ---- Shields + boss battle ---- */
.lc-badges { display: flex; gap: 10px; align-items: center; }
.lc-shield { font-weight: 800; font-size: 14px; color: var(--indigo); }

.battle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #1d2939; color: #fff;
  border-radius: 14px; padding: 10px 14px; margin: 0 0 12px;
}
.battle-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.battle-side small { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; opacity: 0.75; }
.battle-side span { font-size: 20px; letter-spacing: 2px; }
.battle-vs { font-weight: 800; font-size: 13px; color: #f5b759; }

/* ---- Pit Pass marker, toast ---- */
.power-track { position: relative; overflow: visible; }
.power-fill { position: relative; z-index: 1; }
.pass-mark {
  position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px;
  background: #6941c6; border-radius: 2px; z-index: 2;
}
.pass-label { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #6941c6; }
.pass-label.ready { color: var(--teal-dark); }

.toast {
  position: fixed; top: 18px; left: 0; right: 0; margin: 0 auto;
  width: max-content; max-width: calc(100% - 32px); text-align: center;
  background: #1d2939; color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 800; font-size: 14.5px;
  box-shadow: var(--shadow-lg);
  z-index: 80;
}

/* Stage chips are buttons for playable stages */
button.stage-chip { font: inherit; color: inherit; cursor: pointer; }
button.stage-chip:not(.active):hover { border-color: var(--teal-soft); background: #fff; }

/* ---- Her key and credit (HEALTH STATUS LADDER GAME, AW0601) ---- */
.board-key {
  margin: 14px 0 4px; text-align: center;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.key-red { color: #dc2626; }
.key-green { color: #15803d; }
.credit {
  margin-top: 14px; text-align: center;
  font-size: 10.5px; line-height: 1.5; color: var(--ink-soft); opacity: 0.85;
}
.credit strong { font-weight: 800; }
.credit-small { margin-top: 10px; font-size: 9.5px; }

/* ============ About page (her story, aims and ownership) ============ */
.about-link {
  margin-top: 12px; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--teal-dark);
  text-decoration: underline; text-underline-offset: 3px;
}
.about-link:hover { color: var(--teal); }
.about-card { width: min(600px, 100%); text-align: left; }
.about-card > .logo-badge { display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.about-card > h2 { text-align: center; }
.about-owner { text-align: center; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.about-owner strong { color: var(--ink); font-size: 16px; }
.about-motto {
  margin: 14px 0 18px; padding: 12px 14px; border-radius: 14px;
  background: var(--teal-soft); color: var(--teal-dark);
  text-align: center; font-weight: 800; font-size: 13.5px; letter-spacing: 0.04em; line-height: 1.5;
}
.about-section {
  border: 1px solid #eaecf0; border-radius: 14px; margin-bottom: 10px; background: #fff;
}
.about-section summary {
  list-style: none; cursor: pointer; padding: 13px 16px;
  font-weight: 800; font-size: 15.5px; display: flex; align-items: center; gap: 10px;
}
.about-section summary::-webkit-details-marker { display: none; }
.about-section summary::after { content: "＋"; margin-left: auto; color: var(--teal); font-weight: 800; }
.about-section[open] summary::after { content: "－"; }
.about-section[open] summary { border-bottom: 1px solid #f2f4f7; }
.about-sec-icon { font-size: 19px; }
.about-body { padding: 12px 16px 14px; font-size: 14.5px; line-height: 1.62; color: var(--ink); }
.about-body p { margin-bottom: 10px; }
.about-body p:last-child { margin-bottom: 0; }
.about-body ol { padding-left: 22px; margin-bottom: 10px; }
.about-body li { margin-bottom: 6px; }
.about-body h4 { font-size: 14.5px; margin: 6px 0 6px; color: var(--teal-dark); }
.about-body blockquote {
  margin: 4px 0 12px; padding: 10px 14px; border-left: 4px solid var(--teal);
  background: var(--sand); border-radius: 0 10px 10px 0; font-style: italic;
}
.about-body .about-areas { list-style: none; padding-left: 0; }
.about-body .about-areas li {
  padding: 7px 10px; border-radius: 10px; background: var(--sand); font-weight: 600;
}
.about-note { color: var(--ink-soft); font-size: 13px; }
.about-chant { display: flex; flex-direction: column; gap: 6px; text-align: center; font-weight: 700; color: var(--teal-dark); }
.about-chant span:nth-child(even) { color: #15803d; }
.about-author { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.about-author strong { display: block; font-size: 16px; }
.about-author span { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.about-avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--teal), #15803d);
}
/* Author photo (background removed) sits on the teal circle */
.about-avatar.author-photo {
  width: 84px; height: 84px; object-fit: cover; object-position: center top;
  display: block; padding: 0;
}
.about-rights {
  margin: 16px 0 14px; padding: 14px 16px; border-radius: 14px;
  background: #fef3f2; font-size: 12.5px; line-height: 1.55; color: #7a271a;
}
.about-rights h4 { font-size: 14px; margin-bottom: 6px; color: #b42318; }
.about-rights p { margin-bottom: 6px; }
.about-card #btn-about-close { position: sticky; bottom: 0; box-shadow: 0 -10px 14px 4px var(--card); }

/* ============ Splash: her ownership, the first thing you see ============ */
.splash {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  background:
    radial-gradient(900px 500px at 85% -10%, #c9ece4 0%, transparent 60%),
    radial-gradient(800px 500px at -10% 110%, #fbe0d8 0%, transparent 55%),
    var(--sand);
  transition: opacity 0.45s ease;
}
.splash.leaving { opacity: 0; pointer-events: none; }
.splash-card {
  background: var(--card); border-radius: 26px; box-shadow: var(--shadow-lg);
  padding: 34px 32px 24px; width: min(480px, 100%); text-align: center; margin: auto;
  animation: splashIn 0.6s ease both;
}
@keyframes splashIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.splash-logo { animation: splashBob 1.6s ease-in-out infinite; }
@keyframes splashBob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-8deg); } }
.splash-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.splash-sub { margin-top: 2px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: #15803d; }
.splash-owner {
  display: flex; gap: 14px; align-items: center; text-align: left;
  margin: 20px 0 14px; padding: 14px; border-radius: 16px; background: var(--teal-soft);
}
.splash-owner small { display: block; font-size: 11.5px; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; letter-spacing: 0.06em; }
.splash-owner strong { display: block; font-size: 17px; line-height: 1.3; margin: 2px 0 3px; }
.splash-owner span { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.splash-summary { font-size: 14.5px; line-height: 1.6; color: var(--ink); text-align: left; }
.splash-load { margin: 18px 0 6px; }
.splash-track { height: 10px; border-radius: 99px; background: #eef2f6; overflow: hidden; }
.splash-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #15803d, var(--teal), #14b8a6);
  transition: width 0.25s linear;
}
.splash-chant { margin-top: 10px; min-height: 22px; font-weight: 800; color: var(--teal-dark); transition: opacity 0.3s ease; }
.splash-actions { display: none; margin-top: 10px; }
.splash-actions.ready { display: block; animation: splashIn 0.4s ease both; }
.splash-rights { margin-top: 14px; font-size: 11px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 420px) {
  .splash { padding: 12px; }
  .splash-card { padding: 24px 18px 18px; }
  .splash-card h1 { font-size: 26px; }
}
#about-overlay { z-index: 90; }

/* Install-as-app button (shown only when the phone allows installing) */
.btn-install {
  display: block; width: 100%; margin-top: 12px; padding: 12px 16px;
  border: 2px solid var(--teal); border-radius: 14px; background: #fff;
  color: var(--teal-dark); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn-install:hover { background: var(--teal-soft); }
.btn-install.hidden { display: none; }

/* iPhone install tip (home screen) */
.ios-install {
  position: relative; margin-top: 12px; padding: 12px 40px 12px 14px;
  border-radius: 14px; background: var(--teal-soft); color: var(--teal-dark);
  font-size: 14px; line-height: 1.5; text-align: left;
}
.ios-install strong:first-child { display: block; margin-bottom: 2px; }
.ios-install.hidden { display: none; }
.ios-install-close {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: transparent; color: var(--teal-dark);
  font-size: 15px; cursor: pointer;
}
/* Install steps on the About page */
.install-steps { margin: 4px 0 12px 20px; }
.install-steps li { margin-bottom: 4px; }

/* App logo (die with a beating heart) inside the logo badges */
.logo-badge:has(img) { background: none; padding: 0; overflow: hidden; }
.logo-badge img { width: 100%; height: 100%; display: block; }

/* ---------- Participation & feedback ---------- */
.profile-card {
  margin: 14px 0 4px; padding: 14px; border-radius: 16px; text-align: left;
  background: var(--teal-soft);
}
.profile-card.hidden { display: none; }
.profile-title { font-weight: 700; color: var(--teal-dark); margin-bottom: 8px; }
.profile-title span { font-weight: 500; opacity: .8; }
.profile-card input, .feedback-card textarea {
  width: 100%; box-sizing: border-box; margin-bottom: 8px; padding: 11px 12px;
  border: 1.5px solid #cfe5e0; border-radius: 12px; font: inherit; font-size: 15px; background: #fff;
}
.profile-card input:focus, .feedback-card textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.profile-note { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; }
.profile-thanks { font-weight: 700; color: var(--teal-dark); text-align: center; margin: 4px 0; }
.profile-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-small { width: auto; padding: 10px 22px; font-size: 15px; margin: 0; }
.btn-ghost {
  padding: 10px 18px; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink-soft); font: inherit; font-weight: 600; cursor: pointer;
}
.btn-feedback {
  display: block; width: 100%; margin-top: 12px; padding: 12px 16px;
  border: 2px solid #f5b400; border-radius: 14px; background: #fffbea;
  color: #8a5a00; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn-feedback.hidden, .icon-btn.hidden { display: none; }
.feedback-card { text-align: center; }
.feedback-card h2 { margin-bottom: 6px; }
.fb-stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0 12px; }
.fb-stars button {
  border: 0; background: none; font-size: 40px; line-height: 1; cursor: pointer; color: #c7ccd4; padding: 2px;
}
.fb-stars button.on { color: #f5b400; }
.feedback-card textarea { resize: vertical; min-height: 90px; text-align: left; }
.fb-error { color: #b42318; font-size: 13px; min-height: 18px; margin: 0 0 6px; }
