/* The revision games for Parts 1 to 5. The shared look (buttons, cards, Mr Reyy's
   bubble, stars) comes from ../email-room/css/style.css; this file adds what
   each game needs. */

.rv { max-width: 760px; }
.rv h1 { font-size: clamp(26px, 6vw, 36px); margin: 6px 0 4px; }
.rv .lead { color: var(--muted); margin-bottom: 14px; }
.years { display: flex; gap: 8px; margin: 0 0 14px; }
.years button { flex: 1; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; }
.years button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.group { font-family: var(--display); font-size: 20px; margin: 16px 0 8px; }
.set-row { display: flex; gap: 8px; align-items: stretch; }
.set-row .level { flex: 1; }
.share-btn { flex: 0 0 auto; border: 0; border-radius: 14px; padding: 0 14px; background: #fff; color: var(--blue); font-weight: 700; box-shadow: 0 5px 0 var(--line); }
.share-box { margin: 8px 0 4px; display: grid; gap: 8px; }
.share-box .link { word-break: break-all; font-size: 15px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.part-list { display: grid; gap: 12px; }

.play-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; }
.play-top .count { margin-left: auto; color: var(--muted); }
.hearts { font-size: 22px; letter-spacing: 2px; }
.hearts .off { opacity: .25; }
.track { position: relative; height: 14px; border-radius: 999px; background: #d5deeb; margin: 26px 0 16px; }
.track-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--good); transition: width .5s; }
.runner { position: absolute; top: -26px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: var(--sky); overflow: hidden; transition: left .5s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 3px 0 var(--blue); }
.runner svg { width: 100%; height: 100%; display: block; }

.opts { display: grid; gap: 10px; margin-top: 12px; }
.opt { text-align: left; background: #fff; border: 0; border-radius: 14px; padding: 12px 16px; min-height: 52px; font-weight: 700; box-shadow: 0 4px 0 var(--line); }
.opt:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.opt.right { background: var(--good-bg); box-shadow: 0 4px 0 #56c08d; }
.opt.wrong { background: var(--fix-bg); box-shadow: 0 4px 0 #f0a640; }
.opts.row { grid-template-columns: repeat(3, 1fr); }
.opts.row .opt { text-align: center; }
.q { font-family: var(--display); font-size: 21px; line-height: 1.3; margin-top: 14px; }
.next { margin-top: 14px; }

/* Part 1: the texts look like the real thing */
.doc { border-radius: 14px; padding: 16px; line-height: 1.6; }
.doc h3 { font-family: var(--display); font-size: 20px; margin: 0 0 6px; }
.doc .chunk { border-radius: 6px; padding: 1px 2px; }
.doc.hunt .chunk { cursor: pointer; box-shadow: inset 0 -2px 0 var(--sky); }
.doc .chunk.found { background: #bdebd0; box-shadow: inset 0 -2px 0 var(--good); }
.doc .chunk.miss { background: #ffd591; }
.doc.note { background: #fff7b8; box-shadow: 0 6px 0 #e6d98a; transform: rotate(-.6deg); }
.doc.notice { background: #fff; border: 3px solid var(--navy-2); }
.doc.notice h3 { background: var(--navy-2); color: #fff; margin: -16px -16px 10px; padding: 8px 16px; border-radius: 10px 10px 0 0; }
.doc.poster { background: linear-gradient(160deg, #ffe3a3, #ffc1a6); text-align: center; border: 3px dashed #c9742c; }
.doc.label { background: #fff; border: 2px solid var(--ink); border-radius: 6px; font-size: 16px; }
.doc.label h3 { border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.doc.chat { background: #e5ddd5; display: grid; gap: 8px; }
.doc.chat p { background: #fff; border-radius: 12px; padding: 6px 12px; max-width: 88%; }
.doc.chat p.me { background: #d9fdd3; justify-self: end; }
.doc.chat b { display: block; font-size: 14px; color: var(--blue); }
.doc.message { background: #fff; border-left: 6px solid var(--blue); }

/* Part 2: the story with gaps */
.story { line-height: 2; }
.story h3 { font-family: var(--display); font-size: 21px; margin: 0 0 4px; }
.gap { display: inline-block; min-width: 86px; text-align: center; border-bottom: 3px solid var(--line); font-weight: 700; padding: 0 6px; color: var(--muted); }
.gap.now { border-color: var(--blue); background: #dbe9fb; border-radius: 6px 6px 0 0; color: var(--blue); }
.gap.done { border-color: var(--good); background: var(--good-bg); color: var(--ink); }
.gap.slip { border-color: #e08a1e; background: var(--fix-bg); color: var(--ink); }

/* Part 3: the passage and the keys */
.passage p { margin-bottom: 10px; border-radius: 10px; padding: 2px 6px; transition: background .3s; }
.passage p.lit { background: #fff1b8; }
.passage h3 { font-family: var(--display); font-size: 21px; margin: 0 0 6px; }
.keys { display: flex; gap: 6px; font-size: 24px; }
.keys span { opacity: .22; filter: grayscale(1); }
.keys span.on { opacity: 1; filter: none; }
.life { margin-top: 10px; border: 0; background: none; color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }

/* Part 4: three texts and three mailboxes */
.tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tabs button { flex: 1; min-height: 44px; border-radius: 12px 12px 0 0; border: 0; background: #d5deeb; font-weight: 700; }
.tabs button.on { background: #fff; box-shadow: inset 0 4px 0 var(--blue); }
.texts .t { display: none; }
.texts .t.on { display: block; }
.texts .t h3 { font-family: var(--display); font-size: 20px; margin: 0 0 4px; }
.letter { background: #fff; border-radius: 14px; padding: 14px 16px; margin-top: 14px; border: 2px dashed var(--blue); font-weight: 700; position: relative; }
.letter::before { content: "✉"; position: absolute; top: -16px; left: 12px; font-size: 24px; background: var(--bg); padding: 0 6px; }
.letter.fly { animation: fly .45s ease forwards; }
@keyframes fly { to { transform: translateY(40px) scale(.6); opacity: 0; } }
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.box { border: 0; border-radius: 14px 14px 6px 6px; padding: 10px 6px; min-height: 76px; background: var(--navy-2); color: #fff; font-weight: 700; box-shadow: 0 5px 0 var(--navy); display: grid; gap: 2px; justify-items: center; }
.box b { font-family: var(--display); font-size: 24px; line-height: 1; }
.box small { font-size: 13px; font-weight: 400; }
.box.right { background: var(--good); }
.box.wrong { background: #b25a00; }
@media (min-width: 860px) {
  .tabs { display: none; }
  .texts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .texts .t { display: block; background: #fff; border-radius: 14px; padding: 14px; }
  .texts.card { background: none; box-shadow: none; padding: 0; }
}

/* Part 5: the safe */
.safe { text-align: center; }
.meaning { font-family: var(--display); font-size: 22px; line-height: 1.3; }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px 0; }
.slot { width: 42px; height: 50px; border-radius: 10px; border: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-family: var(--display); font-size: 26px; font-weight: 800; text-transform: lowercase; }
.slot.fixed { background: var(--navy-2); color: #fff; box-shadow: none; }
.slot.open { background: var(--good-bg); box-shadow: inset 0 0 0 2px var(--good); }
.slots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 54px; }
.tile { width: 46px; height: 50px; border: 0; border-radius: 10px; background: var(--star); box-shadow: 0 4px 0 #c98f00; font-family: var(--display); font-size: 26px; font-weight: 800; text-transform: lowercase; }
.tile:disabled { visibility: hidden; }
.type-in { max-width: 320px; margin: 0 auto; text-align: center; font-size: 24px; letter-spacing: 2px; text-transform: lowercase; }
.dial { font-size: 54px; line-height: 1; margin-bottom: 6px; }
.modes { display: grid; gap: 10px; margin-top: 14px; }

/* the result */
.done-top { background: var(--navy-2); color: #fff; border-radius: 18px; padding: 18px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.done-top .face { flex: 0 0 84px; height: 84px; border-radius: 50%; background: var(--sky); overflow: hidden; }
.done-top .face svg { width: 100%; height: 100%; display: block; }
.done-top h1 { color: #fff; margin: 0; }
.done-top .stars { font-size: 30px; }
.review { display: grid; gap: 8px; }
.review li { background: var(--fix-bg); border-radius: 12px; padding: 8px 12px; }
.review li b { color: var(--good); }
.sent-line { color: var(--good); font-weight: 700; margin-top: 4px; }
.done-top .sent-line { color: #a9e3c5; }
.start-form { display: grid; gap: 12px; }

/* a teacher's own word set */
.own-row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
@media (max-width: 480px) { .own-row { grid-template-columns: 1fr; margin-bottom: 6px; } }
