:root {
  --ink: #234f49;
  --muted: #71847f;
  --paper: #fffdf7;
  --line: #ded5b6;
  --green: #4ca37c;
  --green-dark: #2f7d61;
  --gold: #f0b63d;
  --coral: #df6d61;
  --blue: #66abc8;
  --shadow: 0 24px 54px rgba(54, 76, 68, .14);
  --soft-shadow: 0 12px 24px rgba(54, 76, 68, .1);
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  background: #f7f6e9;
}

* { box-sizing: border-box; }
html { min-width: 0; overflow-x: hidden; scroll-behavior: smooth; }
body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 6% 10%, rgba(247, 205, 99, .27) 0 120px, transparent 122px),
    radial-gradient(circle at 96% 17%, rgba(111, 186, 168, .2) 0 165px, transparent 167px),
    linear-gradient(135deg, #f8f8ed, #fff9ec 52%, #eff7ee);
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .16;
  background-image: radial-gradient(#76998d 1px, transparent 1px);
  background-size: 26px 26px;
}

button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible { outline: 4px solid rgba(240, 182, 61, .7); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0 52px;
}

.loading-card {
  display: grid;
  width: min(410px, 100%);
  min-height: 250px;
  margin: 20vh auto 0;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
}
.loading-card span { color: var(--green); font-family: Georgia, serif; font-size: 66px; }
.loading-card p { margin: 0; font-size: 19px; font-weight: 900; }

.topbar,
.topbar-actions,
.brand,
.brand-mark,
.album-button,
.sound-button,
.hero-actions,
.keyboard-note,
.section-heading,
.puzzle-card-top,
.puzzle-card-footer,
.selected-strip,
.steps-grid article,
.game-heading,
.panel-heading,
.typing-heading,
.typing-tools,
.feedback-card,
.result-stats,
.result-actions,
.album-heading,
.album-actions {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  z-index: 20;
  min-height: 68px;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.brand {
  min-width: 0;
  gap: 12px;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
}
.brand-mark {
  flex: 0 0 auto;
  width: 69px;
  height: 57px;
  justify-content: center;
  gap: 2px;
  background: #fff7d9;
  border: 3px solid #d9cda8;
  border-radius: 19px;
  box-shadow: 0 7px 16px rgba(67, 87, 78, .12);
  transform: rotate(-3deg);
}
.brand-mark i,
.brand-mark b {
  display: grid;
  width: 28px;
  height: 37px;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 1000;
  border-radius: 9px;
}
.brand-mark i { background: var(--coral); transform: rotate(-5deg); }
.brand-mark b { background: var(--blue); transform: rotate(5deg); }
.brand strong,
.brand small,
.album-button strong,
.album-button small { display: block; }
.brand strong {
  overflow: hidden;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.topbar-actions { flex: 0 0 auto; gap: 8px; }
.top-spark { color: var(--gold); font-size: 27px; }
.album-button,
.sound-button,
.back-button {
  min-height: 49px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 253, 247, .94);
  border: 2px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 7px 16px rgba(65, 83, 76, .08);
}
.album-button { gap: 8px; padding: 5px 12px; text-align: left; }
.album-button strong { font-size: 12px; }
.album-button small { color: var(--muted); font-size: 9px; }
.sound-button { gap: 7px; padding: 0 13px; font-size: 11px; }
.back-button { width: 49px; padding: 0; font-size: 23px; }

.primary-button,
.secondary-button,
.hint-button,
.tool-button {
  min-height: 50px;
  padding: 0 20px;
  font-weight: 1000;
  border-radius: 16px;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.primary-button {
  color: #fff;
  background: var(--green);
  border: 0;
  box-shadow: 0 7px 0 var(--green-dark), 0 14px 22px rgba(49, 123, 91, .19);
}
.secondary-button,
.tool-button {
  background: #fffdf8;
  border: 2px solid var(--line);
  box-shadow: 0 6px 0 #d7d0b6;
}
.hint-button {
  color: #765913;
  background: #fff2ba;
  border: 2px solid #e4bc45;
  box-shadow: 0 6px 0 #d4a72e;
}
.primary-button:not(:disabled):hover,
.secondary-button:not(:disabled):hover,
.hint-button:not(:disabled):hover,
.tool-button:not(:disabled):hover { filter: brightness(1.02); transform: translateY(-2px); }
.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active,
.hint-button:not(:disabled):active,
.tool-button:not(:disabled):active { box-shadow: none; transform: translateY(5px); }
.compact { min-height: 45px; padding-inline: 17px; font-size: 12px; }

.eyebrow,
.panel-label {
  margin: 0 0 9px;
  color: #367963;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: grid;
  min-height: 430px;
  grid-template-columns: .98fr 1.02fr;
  overflow: hidden;
  padding: 46px 48px;
  background: linear-gradient(125deg, #fffaf0, #eff9ef 55%, #f4efff);
  border: 3px solid var(--line);
  border-radius: 42px;
  box-shadow: var(--shadow);
}
.hero::before {
  position: absolute;
  width: 240px;
  height: 240px;
  top: -110px;
  left: 42%;
  content: "";
  background: rgba(246, 194, 82, .16);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 3; align-self: center; }
.hero h1 {
  max-width: 530px;
  margin-bottom: 19px;
  font-size: clamp(43px, 5vw, 58px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -.045em;
}
.hero-copy > p:not(.eyebrow) {
  max-width: 490px;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
}
.hero-actions { flex-wrap: wrap; gap: 11px; }
.keyboard-note {
  max-width: 450px;
  gap: 12px;
  margin-top: 27px;
  padding-top: 19px;
  border-top: 1px dashed #cfc7ac;
}
.keyboard-note > span {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 23px;
  background: #fff;
  border: 2px solid #d8d1bb;
  border-radius: 13px;
}
.keyboard-note p { margin: 0; }
.keyboard-note strong,
.keyboard-note small { display: block; }
.keyboard-note strong { font-size: 12px; }
.keyboard-note small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.hero-scene { position: relative; min-width: 0; }
.hero-board {
  position: absolute;
  inset: 20px 0 12px 28px;
  overflow: hidden;
  background:
    linear-gradient(rgba(101, 166, 149, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 166, 149, .12) 1px, transparent 1px),
    #fffdf8;
  background-size: 31px 31px;
  border: 8px solid #fff;
  border-radius: 38px;
  box-shadow: 0 20px 35px rgba(47, 67, 61, .17);
  transform: rotate(1.2deg);
}
.hero-cell {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 63px;
  height: 63px;
  place-items: center;
  color: var(--ink);
  font-size: 31px;
  font-weight: 1000;
  background: #fff;
  border: 4px solid #8cc8b5;
  border-radius: 15px;
  box-shadow: 0 7px 0 #6aa58f;
}
.hero-cell.c-one { left: 73px; top: 160px; }
.hero-cell.c-two { left: 139px; top: 160px; }
.hero-cell.c-three { left: 205px; top: 160px; }
.hero-cell.c-four { left: 205px; top: 94px; background: #fff4c5; border-color: #e2bc55; box-shadow: 0 7px 0 #cba140; }
.hero-cell.c-five { left: 205px; top: 226px; background: #fff4c5; border-color: #e2bc55; box-shadow: 0 7px 0 #cba140; }
.hero-cell.c-six { left: 205px; top: 292px; background: #fff4c5; border-color: #e2bc55; box-shadow: 0 7px 0 #cba140; }
.hero-picture {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  font-size: 47px;
  background: #fff;
  border: 3px solid #d7cfb5;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}
.hero-picture.p-one { left: 55px; top: 48px; transform: rotate(-6deg); }
.hero-picture.p-two { right: 38px; bottom: 37px; transform: rotate(5deg); }
.hero-pencil {
  position: absolute;
  right: 45px;
  top: 58px;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 72px;
  font-weight: 900;
  transform: rotate(-17deg);
}

.how-section,
.puzzles-section,
.album-shell { margin-top: 34px; }
.section-heading {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.section-heading h2 { margin: 0; font-size: 31px; line-height: 1.1; }
.section-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: right;
}
.steps-grid { align-items: stretch; gap: 14px; }
.steps-grid article {
  flex: 1;
  gap: 13px;
  padding: 19px;
  background: rgba(255, 253, 247, .92);
  border: 2px solid var(--line);
  border-radius: 23px;
  box-shadow: 0 7px 0 #d9d2ba;
}
.steps-grid article > span {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 1000;
  background: var(--green);
  border-radius: 14px;
}
.steps-grid p { margin: 0; }
.steps-grid strong,
.steps-grid small { display: block; }
.steps-grid strong { font-size: 14px; }
.steps-grid small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.puzzles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.puzzle-card {
  min-width: 0;
  padding: 20px;
  text-align: left;
  background: linear-gradient(145deg, var(--soft), #fffdf8);
  border: 3px solid #ded4b6;
  border-radius: 28px;
  box-shadow: 0 9px 0 #d9d0b6;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.puzzle-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.puzzle-card.selected { border-color: var(--accent); box-shadow: 0 9px 0 color-mix(in srgb, var(--accent) 50%, #c9c1aa); }
.puzzle-card-top { justify-content: space-between; gap: 12px; }
.puzzle-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  font-size: 31px;
  background: #fff;
  border: 3px solid color-mix(in srgb, var(--accent) 38%, #fff);
  border-radius: 18px;
}
.puzzle-best { color: #a78332; font-size: 13px; font-weight: 1000; }
.puzzle-card > strong { display: block; margin-top: 17px; font-size: 23px; }
.puzzle-card > small { display: block; min-height: 35px; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.45; }
.picture-row { display: flex; gap: 6px; margin: 17px 0; }
.picture-row i {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 23px;
  font-style: normal;
  background: rgba(255, 255, 255, .82);
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 13px;
}
.puzzle-card-footer {
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  font-size: 11px;
  font-weight: 900;
  border-top: 1px dashed #ccc2a6;
}
.puzzle-card-footer b { color: var(--accent); }
.selected-strip {
  gap: 13px;
  margin-top: 18px;
  padding: 16px 19px;
  background: #f0f8ef;
  border: 2px solid color-mix(in srgb, var(--accent) 44%, #d9d2ba);
  border-radius: 23px;
}
.selected-strip > span { font-size: 31px; }
.selected-strip p { flex: 1; margin: 0; }
.selected-strip strong,
.selected-strip small { display: block; }
.selected-strip small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.game-shell {
  padding: 36px;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 38px;
  box-shadow: var(--shadow);
}
.game-heading { justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.game-heading h1 { margin: 0 0 7px; font-size: 43px; line-height: 1; }
.game-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; font-weight: 800; }
.round-badge {
  display: grid;
  flex: 0 0 auto;
  width: 92px;
  height: 82px;
  place-items: center;
  align-content: center;
  background: var(--soft);
  border: 3px solid color-mix(in srgb, var(--accent) 40%, #d7d0b6);
  border-radius: 24px;
}
.round-badge strong { font-size: 31px; line-height: 1; }
.round-badge span { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 900; }
.progress-track {
  height: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #e4e1d5;
  border-radius: 99px;
}
.progress-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 250ms ease; }

.crossword-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr);
  gap: 18px;
}
.grid-panel,
.clues-panel,
.typing-panel {
  min-width: 0;
  background: linear-gradient(145deg, #fffdf8, var(--soft));
  border: 3px solid #ddd4b7;
  border-radius: 30px;
}
.grid-panel,
.clues-panel { padding: 21px; }
.panel-heading { justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-heading h2,
.typing-heading h2 { margin: 0; font-size: 22px; line-height: 1.1; }
.panel-heading > span:not(.active-picture) { color: var(--accent); font-size: 13px; font-weight: 1000; }
.active-picture {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  font-size: 34px;
  background: #fff;
  border: 3px solid color-mix(in srgb, var(--accent) 40%, #fff);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}
.grid-wrap {
  display: grid;
  min-height: 475px;
  place-items: center;
  overflow: auto;
  padding: 14px;
  background: rgba(255, 255, 255, .78);
  border: 2px dashed color-mix(in srgb, var(--accent) 42%, #d8d2bd);
  border-radius: 23px;
}
.crossword-grid {
  --cell: 56px;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  grid-template-rows: repeat(var(--rows), var(--cell));
  gap: 4px;
  width: max-content;
}
.crossword-gap { width: var(--cell); height: var(--cell); }
.crossword-cell {
  position: relative;
  display: grid;
  width: var(--cell);
  height: var(--cell);
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 3px solid #cfcab8;
  border-radius: 13px;
  box-shadow: 0 5px 0 #c6c0ad;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.crossword-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.crossword-cell.active { background: #fff9d9; border-color: color-mix(in srgb, var(--accent) 72%, #e5bc4a); }
.crossword-cell.selected { outline: 5px solid color-mix(in srgb, var(--accent) 32%, transparent); transform: translateY(-3px); }
.crossword-cell.locked { color: #fff; background: var(--accent); border-color: color-mix(in srgb, var(--accent) 72%, #234f49); box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 62%, #315f55); }
.crossword-cell.wrong { color: #9b3c35; background: #fff0ed; border-color: #df7b70; }
.crossword-cell strong { font-size: 27px; font-weight: 1000; }
.crossword-cell strong:only-child { line-height: 1; }
.crossword-cell:not(.locked) strong { color: inherit; }
.crossword-cell strong:is(:empty) { color: transparent; }
.crossword-cell strong { line-height: 1; }
.crossword-cell strong:not(:empty) { opacity: 1; }
.crossword-cell .cell-number {
  position: absolute;
  top: 3px;
  left: 5px;
  color: color-mix(in srgb, var(--ink) 72%, #fff);
  font-size: 8px;
  font-weight: 1000;
}
.crossword-cell.locked .cell-number { color: rgba(255, 255, 255, .8); }

.clues-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.picture-clue {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 138px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 4px 8px;
  padding: 12px;
  text-align: left;
  background: #fff;
  border: 3px solid #d7d1bc;
  border-radius: 20px;
  box-shadow: 0 6px 0 #d0cab6;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.picture-clue:hover { transform: translateY(-2px); border-color: var(--accent); }
.picture-clue.active { border-color: var(--accent); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 48%, #cac3ae); }
.picture-clue.solved { background: #eef8ee; border-color: #79b58f; }
.clue-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 1000;
  background: var(--accent);
  border-radius: 9px;
}
.clue-emoji {
  grid-column: 1 / -1;
  justify-self: center;
  font-size: 45px;
  line-height: 1;
}
.clue-copy { min-width: 0; align-self: end; }
.clue-copy strong,
.clue-copy small { display: block; }
.clue-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.clue-copy small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.clue-state { align-self: end; color: var(--accent); font-size: 18px; font-weight: 1000; }

.typing-panel { margin-top: 18px; padding: 21px; }
.typing-heading { justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.typing-tools { gap: 9px; }
.typing-tools button { min-height: 44px; padding-inline: 14px; font-size: 11px; }
.screen-keyboard { display: grid; gap: 7px; }
.keyboard-row { display: flex; justify-content: center; gap: 5px; }
.keyboard-row button {
  min-width: 43px;
  height: 47px;
  padding: 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
  background: #fff;
  border: 2px solid #d6d0bc;
  border-radius: 11px;
  box-shadow: 0 4px 0 #ccc6b3;
}
.keyboard-row button:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.keyboard-row button:active { box-shadow: none; transform: translateY(4px); }
.keyboard-tools { margin-top: 3px; }
.keyboard-tools button { min-width: 150px; font-size: 12px; }
.keyboard-tools [data-check] { color: #fff; background: var(--green); border-color: var(--green-dark); box-shadow: 0 4px 0 var(--green-dark); }

.feedback-card {
  min-height: 105px;
  gap: 15px;
  margin-top: 18px;
  padding: 18px 20px;
  background: #f2f6ef;
  border: 3px solid #d4dfd3;
  border-radius: 25px;
}
.feedback-card > span {
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  place-items: center;
  font-size: 29px;
  background: #fff;
  border-radius: 17px;
}
.feedback-card p { flex: 1; margin: 0; }
.feedback-card strong,
.feedback-card small { display: block; }
.feedback-card strong { font-size: 17px; }
.feedback-card small { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.45; }
.feedback-card.correct,
.feedback-card.complete { background: #eaf7ed; border-color: #82bd94; }
.feedback-card.wrong { background: #fff0ed; border-color: #e09389; }
.feedback-card.hint { background: #fff7d8; border-color: #e4c260; }

.result-card {
  padding: 48px;
  text-align: center;
  background: linear-gradient(145deg, #fffdf8, var(--soft));
  border: 3px solid var(--line);
  border-radius: 40px;
  box-shadow: var(--shadow);
}
.result-mark {
  display: grid;
  width: 100px;
  height: 100px;
  margin: 10px auto 20px;
  place-items: center;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 58px;
  background: var(--accent);
  border: 7px solid #fff;
  border-radius: 31px;
  box-shadow: 0 12px 0 color-mix(in srgb, var(--accent) 58%, #315f55);
  transform: rotate(-4deg);
}
.result-card h1 { margin-bottom: 12px; font-size: 51px; line-height: 1; }
.result-card > p:not(.eyebrow) { max-width: 680px; margin: 0 auto 19px; color: var(--muted); font-size: 15px; font-weight: 800; line-height: 1.5; }
.result-stars { color: var(--gold); font-size: 47px; letter-spacing: 4px; }
.result-stats {
  max-width: 710px;
  justify-content: center;
  gap: 12px;
  margin: 23px auto;
}
.result-stats article {
  flex: 1;
  padding: 15px;
  background: rgba(255, 255, 255, .78);
  border: 2px solid #d9d2bb;
  border-radius: 20px;
}
.result-stats strong,
.result-stats span { display: block; }
.result-stats strong { font-size: 25px; }
.result-stats span { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 900; }
.result-words {
  display: grid;
  max-width: 780px;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 0 auto 25px;
}
.result-words > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  text-align: left;
  background: #fff;
  border: 2px solid #ded7c2;
  border-radius: 15px;
}
.result-words i { font-size: 25px; font-style: normal; }
.result-words b { font-size: 12px; }
.result-actions { flex-wrap: wrap; justify-content: center; gap: 11px; }

.album-shell {
  padding: 36px;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 38px;
  box-shadow: var(--shadow);
}
.album-heading { justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.album-heading h1 { margin: 0 0 7px; font-size: 45px; line-height: 1; }
.album-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; font-weight: 900; }
.album-heading > span { font-size: 62px; }
.album-group + .album-group { margin-top: 31px; padding-top: 29px; border-top: 1px dashed #cec6ac; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.album-card {
  display: grid;
  min-height: 205px;
  place-items: center;
  align-content: center;
  padding: 17px;
  text-align: center;
  background: #f2f2ec;
  border: 2px solid #d8dccf;
  border-radius: 23px;
}
.album-card.opened { background: linear-gradient(145deg, var(--soft), #fff); border-color: color-mix(in srgb, var(--accent) 45%, #d8d2bd); }
.album-card > span { font-size: 49px; }
.album-card strong { margin-top: 11px; font-size: 17px; }
.album-card small { margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.45; }
.album-actions { justify-content: space-between; gap: 16px; margin-top: 32px; }
.reset-progress-button {
  min-height: 50px;
  padding: 0 20px;
  color: #9a4e46;
  font-weight: 900;
  background: #fff5f2;
  border: 2px solid #e2aaa3;
  border-radius: 16px;
}

@media (max-width: 1040px) {
  .hero { min-height: 405px; padding: 38px 34px; }
  .hero-board { left: 8px; }
  .crossword-layout { grid-template-columns: 1fr; }
  .grid-wrap { min-height: 420px; }
  .clues-list { grid-template-columns: repeat(3, 1fr); }
  .picture-clue { min-height: 130px; }
  .keyboard-row button { min-width: 37px; height: 44px; padding-inline: 6px; font-size: 14px; }
}

@media (max-width: 760px) {
  .app { width: min(100% - 20px, 1120px); padding-top: 12px; }
  .topbar { align-items: flex-start; margin-bottom: 14px; }
  .brand-mark { width: 51px; height: 48px; }
  .brand-mark i, .brand-mark b { width: 21px; height: 31px; font-size: 14px; }
  .brand strong { max-width: 310px; font-size: 18px; }
  .album-button span:last-child,
  .sound-button span:last-child { display: none; }
  .album-button,
  .sound-button,
  .back-button { width: 47px; min-height: 47px; justify-content: center; padding: 0; }
  .hero { min-height: 0; grid-template-columns: 1fr; padding: 32px 27px; }
  .hero h1 { max-width: 610px; font-size: 44px; }
  .hero-scene { min-height: 330px; margin-top: 24px; }
  .hero-board { inset: 0; }
  .how-section,
  .puzzles-section,
  .album-shell { margin-top: 26px; }
  .steps-grid { display: grid; grid-template-columns: 1fr; }
  .puzzles-grid { grid-template-columns: 1fr; }
  .puzzle-card > small { min-height: 0; }
  .game-shell,
  .album-shell { padding: 25px; border-radius: 31px; }
  .game-heading h1 { font-size: 36px; }
  .clues-list { grid-template-columns: repeat(2, 1fr); }
  .typing-heading { align-items: flex-start; flex-direction: column; }
  .typing-tools { width: 100%; }
  .typing-tools button { flex: 1; }
  .keyboard-row { gap: 3px; }
  .keyboard-row button { min-width: 0; width: 7.3%; height: 42px; padding: 0; font-size: 13px; }
  .keyboard-row:nth-child(2) button { width: 7.8%; }
  .keyboard-row:nth-child(3) button { width: 9%; }
  .keyboard-row:nth-child(4) button { width: 46px; }
  .keyboard-tools button { width: auto; min-width: 0; flex: 1; padding-inline: 10px; }
  .result-card { padding: 37px 25px; }
  .result-card h1 { font-size: 43px; }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .app { width: calc(100% - 16px); }
  .topbar { gap: 8px; }
  .brand { gap: 8px; }
  .brand strong { max-width: 174px; font-size: 15px; white-space: normal; }
  .brand small { font-size: 8px; }
  .top-spark { display: none; }
  .topbar-actions { gap: 5px; }
  .hero { padding: 25px 20px; border-radius: 29px; }
  .hero h1 { font-size: 36px; }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions button { width: 100%; }
  .hero-scene { min-height: 292px; }
  .hero-cell { width: 48px; height: 48px; font-size: 23px; border-radius: 12px; }
  .hero-cell.c-one { left: 31px; top: 130px; }
  .hero-cell.c-two { left: 82px; top: 130px; }
  .hero-cell.c-three { left: 133px; top: 130px; }
  .hero-cell.c-four { left: 133px; top: 79px; }
  .hero-cell.c-five { left: 133px; top: 181px; }
  .hero-cell.c-six { left: 133px; top: 232px; }
  .hero-picture { width: 62px; height: 62px; font-size: 36px; }
  .hero-picture.p-one { left: 22px; top: 28px; }
  .hero-picture.p-two { right: 21px; bottom: 22px; }
  .hero-pencil { right: 29px; top: 38px; font-size: 54px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-heading h2 { font-size: 27px; }
  .section-heading > p { max-width: none; text-align: left; }
  .selected-strip { align-items: flex-start; flex-wrap: wrap; }
  .selected-strip p { min-width: 190px; }
  .selected-strip button { width: 100%; }
  .game-shell,
  .album-shell { padding: 18px 13px; border-radius: 26px; }
  .game-heading { align-items: flex-start; }
  .game-heading h1 { font-size: 31px; }
  .game-heading > div > p:last-child { font-size: 12px; }
  .round-badge { width: 70px; height: 67px; border-radius: 19px; }
  .round-badge strong { font-size: 25px; }
  .grid-panel,
  .clues-panel,
  .typing-panel { padding: 14px; border-radius: 23px; }
  .panel-heading h2,
  .typing-heading h2 { font-size: 19px; }
  .grid-wrap { min-height: 365px; padding: 8px; }
  .crossword-grid { --cell: 31px; gap: 3px; }
  .crossword-cell { border-width: 2px; border-radius: 10px; box-shadow: 0 3px 0 #c6c0ad; }
  .crossword-cell strong { font-size: 21px; }
  .clues-list { gap: 7px; }
  .picture-clue { min-height: 122px; padding: 9px; border-radius: 16px; }
  .clue-emoji { font-size: 38px; }
  .clue-copy strong { font-size: 10px; }
  .typing-tools { flex-direction: column; }
  .keyboard-row button { height: 38px; font-size: 11px; border-radius: 8px; }
  .keyboard-tools { flex-direction: row; }
  .feedback-card { align-items: flex-start; flex-wrap: wrap; min-height: 0; padding: 15px; }
  .feedback-card > span { width: 47px; height: 47px; font-size: 24px; }
  .feedback-card p { min-width: 190px; }
  .feedback-card button { width: 100%; }
  .result-mark { width: 84px; height: 84px; font-size: 48px; }
  .result-card h1 { font-size: 36px; }
  .result-stats { align-items: stretch; }
  .result-stats article { padding: 11px 7px; }
  .result-words { grid-template-columns: repeat(2, 1fr); }
  .result-actions { align-items: stretch; flex-direction: column; }
  .album-heading h1 { font-size: 34px; }
  .album-heading > span { font-size: 47px; }
  .album-grid { grid-template-columns: 1fr; }
  .album-card { min-height: 180px; }
  .album-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
