/* Fip's Scripture Memory Games — shared family dress.
   Academy blue #6FB7FF family, deep-blue fields #0D264C, bright gold #FFED8B,
   Fip orange #E07B2A. Bright, cheerful, phone-first, big tap targets. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Baloo 2", "Comic Sans MS", "Chalkboard SE", ui-rounded, system-ui, sans-serif;
  color: #123; background: #bfe6ff; min-height: 100vh; overflow-x: hidden;
}
#topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px;
  background: #0D264C; color: #fff; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
#topbar .home { color: #FFED8B; text-decoration: none; font-weight: 800; font-size: 15px;
  border: 2px solid #FFED8B; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
#topbar h1 { font-size: 17px; margin: 0; flex: 1; text-align: center; line-height: 1.15; }
#lanterns { font-size: 15px; font-weight: 800; color: #FFED8B; white-space: nowrap; }
#stage { max-width: 860px; margin: 0 auto; padding: 10px 10px 190px; position: relative; }
#fipbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; gap: 10px;
  align-items: flex-end; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(13,38,76,.28) 30%, rgba(13,38,76,.45));
  pointer-events: none;
}
#fipbox { width: 104px; flex: 0 0 104px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
#fipbox svg { width: 100%; height: auto; display: block; }
#bubble {
  pointer-events: auto; flex: 1; background: #fffdf5; border: 3px solid #6FB7FF; border-radius: 18px;
  padding: 10px 14px; font-size: 18px; line-height: 1.35; font-weight: 600; color: #173a5e;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); position: relative; min-height: 62px;
}
#bubble:before { content: ""; position: absolute; left: -14px; bottom: 22px; border: 8px solid transparent;
  border-right: 10px solid #6FB7FF; }
#bubble .replay { display: inline-block; margin-left: 8px; background: #6FB7FF; color: #fff; border: none;
  border-radius: 999px; font-size: 14px; font-weight: 800; padding: 3px 12px; cursor: pointer; vertical-align: middle; }
button, .chip { font-family: inherit; }
.bigbtn {
  display: inline-block; background: #37b24d; color: #fff; border: none; border-radius: 999px;
  font-size: 20px; font-weight: 800; padding: 14px 28px; cursor: pointer; box-shadow: 0 4px 0 #2b8a3e;
}
.bigbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2b8a3e; }
.goldbtn { background: #f5b921; box-shadow: 0 4px 0 #c78f0a; color: #4a2f00; }
.goldbtn:active { box-shadow: 0 1px 0 #c78f0a; }
.versebar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0 12px; }
.versebar .vchip {
  background: #0D264C; color: #FFED8B; border: 2px solid #FFED8B; border-radius: 999px;
  padding: 9px 16px; font-size: 16px; font-weight: 800; cursor: pointer; min-height: 48px;
}
.versebar .vchip.on { background: #FFED8B; color: #0D264C; }
.verseline {
  background: #fffdf5; border: 3px dashed #6FB7FF; border-radius: 16px; padding: 12px;
  min-height: 64px; font-size: 21px; line-height: 1.5; text-align: center; font-weight: 700; color: #173a5e;
}
.verseline .w { display: inline-block; margin: 0 2px; }
.verseline .blank { display: inline-block; min-width: 64px; border-bottom: 4px solid #f5b921; color: #c78f0a; margin: 0 3px; }
.verseline .blank.filled { border-bottom-color: transparent; color: #173a5e; }
.ref { text-align: center; font-weight: 800; color: #0D264C; font-size: 17px; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.wchip {
  background: #fff; border: 3px solid #6FB7FF; color: #173a5e; border-radius: 14px;
  font-size: 20px; font-weight: 800; padding: 12px 18px; cursor: pointer; min-height: 56px;
  box-shadow: 0 3px 0 #6FB7FF; transition: transform .15s;
}
.wchip:active { transform: scale(.95); }
.wchip.used { opacity: .25; pointer-events: none; }
.wchip.wobble { animation: wob .45s; border-color: #f08c00; }
@keyframes wob { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-5deg)} 75%{transform:rotate(5deg)} }
.wchip.good { border-color: #37b24d; background: #d3f9d8; }
#startveil {
  position: fixed; inset: 0; z-index: 90; background: rgba(13,38,76,.88); display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px;
}
#startveil h2 { color: #FFED8B; font-size: 30px; margin: 0; }
#startveil p { color: #fff; font-size: 18px; margin: 0; max-width: 420px; }
#startveil .fipface { width: 150px; }
#plaque {
  position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  background: rgba(13,38,76,.82); padding: 16px;
}
#plaque .card {
  background: #fffdf5; border: 4px solid #FFED8B; border-radius: 22px; max-width: 520px; width: 100%;
  padding: 22px 20px; text-align: center; box-shadow: 0 0 44px rgba(255,237,139,.55);
}
#plaque .vtext { font-size: 23px; line-height: 1.5; font-weight: 700; color: #173a5e; }
#plaque .vref { font-size: 18px; font-weight: 800; color: #c78f0a; margin: 10px 0 4px; }
#plaque .kept { font-size: 16px; font-weight: 800; color: #2b8a3e; letter-spacing: .4px; }
#plaque .lantern { font-size: 44px; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 0%,100%{ filter: drop-shadow(0 0 4px #ffe873);} 50%{ filter: drop-shadow(0 0 18px #ffe873);} }
.center { text-align: center; }
.note { text-align: center; font-weight: 700; color: #0D264C; font-size: 16px; }
@media (max-width: 480px) {
  #bubble { font-size: 16px; }
  #fipbox { width: 84px; flex-basis: 84px; }
  .verseline { font-size: 19px; }
  #topbar h1 { font-size: 15px; }
}
