* { box-sizing:border-box; }
[hidden] { display:none!important; }
:root { font:16px/1.4 "Trebuchet MS",system-ui,sans-serif; color:#183f39; background:#7cc9f7; }
body { margin:0; min-height:100svh; background:#7cc9f7 url("assets/treehouse-bg.webp?v=th4") center bottom/cover no-repeat fixed; }
main { width:min(1320px,100%); margin:auto; padding:14px clamp(9px,2vw,25px) 28px; }
h1,h2,h3,p { margin:0; }
header {
  position: relative;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 165px;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.96), 0 0 4px #ffffff;
}
h1 {
  font-family: 'Manrope', "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.28rem, 2.1vw, 1.82rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #103b4d;
}
header p { font-weight:800; }
.layout { display:grid; grid-template-columns:minmax(195px,262px) minmax(0,1fr); gap:14px; align-items:start; }
.panel { padding:clamp(10px,2vw,19px); border:4px solid white; border-radius:20px; background:#fffef8; box-shadow:0 12px 30px #29463940; }
.settings { position:sticky; top:10px; }
.settings h2 { margin-bottom:9px; }
.settings label { display:grid; gap:4px; margin-bottom:9px; font-weight:750; }
.settings .tick { display:flex; align-items:center; gap:7px; font-size:.88rem; }
input,button { font:inherit; color:inherit; }
.settings input:not([type=checkbox]) { width:100%; border:1px solid #a5c5af; border-radius:8px; padding:6px; }
input[type=checkbox] { accent-color:#237459; width:17px; height:17px; }
button { border:1px solid #b4d1bd; border-radius:9px; background:#f1f8eb; padding:7px 11px; font-weight:800; cursor:pointer; }
button:disabled { opacity:.55; cursor:default; }
button:focus-visible,input:focus-visible { outline:3px solid #1c70b1; outline-offset:2px; }
.primary { background:#18624e; color:white; border-color:#18624e; }
#preview-button { width:100%; margin-top:7px; }
#selected { color:#26745b; font-weight:850; }
.banner { color:#fff8de; background:linear-gradient(120deg,#125846,#3e8256); border-radius:12px; padding:12px; }
.tools { display:flex; flex-wrap:wrap; gap:7px; margin:9px 0; }
.group { margin:12px 0; }
.group h3 { margin-bottom:6px; }
.grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.bank-card,.sheet-card { border:1px solid #caddc9; background:#f5faef; border-radius:12px; padding:10px; text-align:center; }
.include { display:flex; align-items:center; justify-content:center; gap:3px; font-size:.77rem; font-weight:750; }
.clue { display:flex; align-items:center; justify-content:center; min-height:108px; gap:8px; }
.clue img { width:100px; height:100px; object-fit:contain; }
.clue strong { font-size:1.45rem; }
.hear { padding:3px 8px; font-size:.74rem; }
.student-line { margin:5px 0; white-space:pre-wrap; }
.writing-box { display:block; width:47px; height:46px; margin:3px auto; background:#fff; border:2px solid #5f9b82; border-radius:5px; text-align:center; font-weight:900; font-size:1.45rem; }
.writing-box.correct { background:#dcf4cd; border-color:#3c8260; }
.writing-box.wrong { background:#ffe7d9; border-color:#a45941; }
.mark { display:block; color:#214f43; font-size:.73rem; }
#result { font-weight:850; }
.answer-key { margin-top:14px; border-top:1px solid #b9d6c3; }
.answer-key span { display:inline-block; padding:4px 8px; }
@media(max-width:630px) { .layout { grid-template-columns:1fr; } .settings { position:static; } .grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media print {
  :root,body { background:white!important; color:black; font:10pt/1.25 system-ui,sans-serif; }
  main { width:100%; padding:0; }
  header,#builder,.preview-tools,.hear,button.hear,.sheet-card .hear,.bank-card .hear,#result,.mark { display:none!important; }
  .hear::before { content:none!important; display:none!important; }
  #preview { padding:0; border:0; box-shadow:none; }
  .grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:4pt; }
  .group h3 { break-after:avoid; }
  .sheet-card { break-inside:avoid; border-radius:4pt; background:white; padding:3pt; }
  .clue img { width:30pt; height:30pt; }
  .clue { min-height:31pt; }
  .writing-box { width:25pt; height:25pt; }
  .answer-key { break-before:page; }
}

@media screen {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'DM Sans', "Segoe UI", system-ui, sans-serif;
    color: #163b35;
    background: #7cc9f7 url("assets/treehouse-bg.webp?v=th4") center bottom / cover no-repeat fixed;
  }
  main {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: clamp(12px, 2vh, 22px) clamp(12px, 2.2vw, 28px) clamp(24px, 4vh, 40px);
  }

  /* --- Header: Top-Left Purple 3D Back Button + Wooden/Crimson Signboard --- */
  header {
    position: relative;
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 0;
    margin-bottom: clamp(14px, 2vh, 20px);
    text-shadow: none;
  }
  .back-to-alphabet {
    grid-column: 1;
    justify-self: start;
    position: relative;
    inset: auto;
    transform: none;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 9px 20px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #9b3cf8 0%, #731de0 58%, #5711b5 100%);
    border: 1.5px solid #bc85ff;
    border-bottom: 4.5px solid #3c0982;
    color: #ffffff;
    text-decoration: none;
    font: 700 14px/1 'Fredoka', 'Manrope', sans-serif;
    letter-spacing: 0.2px;
    white-space: nowrap;
    cursor: pointer;
    text-shadow: 0 1.5px 2px rgba(0, 0, 0, 0.28);
    box-shadow: 0 7px 15px rgba(72, 14, 145, 0.32), inset 0 2px 3px rgba(255, 255, 255, 0.34);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  }
  .back-to-alphabet:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    color: #ffffff;
  }
  .back-to-alphabet:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }

  header h1 {
    grid-column: 2;
    justify-self: center;
    max-width: 100%;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px 7px;
    border-radius: 999px;
    background:
      repeating-linear-gradient(
        180deg,
        rgba(255, 232, 188, 0.14) 0px,
        rgba(255, 232, 188, 0.14) 3px,
        rgba(142, 72, 18, 0.08) 3px,
        rgba(142, 72, 18, 0.08) 6px
      ),
      linear-gradient(180deg, #f2b76e 0%, #d9873b 50%, #b46120 100%);
    border: 2px solid #9c4f16;
    border-bottom: 5px solid #78390c;
    box-shadow: inset 0 2px 2px rgba(255, 243, 214, 0.72), 0 10px 22px rgba(64, 30, 6, 0.24);
    font-size: 1rem;
    letter-spacing: 0;
  }
  header h1 span {
    position: relative;
    display: inline-block;
    padding: 6px 30px 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, #df1923 0%, #bc1019 56%, #910a11 100%);
    border: 2px solid #7d080e;
    box-shadow: inset 0 2px 4px rgba(255, 160, 160, 0.28), inset 0 -2.5px 0 rgba(78, 4, 9, 0.55);
    font: 700 clamp(1.12rem, 1.8vw, 1.55rem)/1.18 'Fredoka', 'Manrope', sans-serif;
    letter-spacing: 0.4px;
    color: #ffffff;
    text-shadow: 0 2px 3px rgba(72, 5, 8, 0.42);
  }
  header h1 span::before {
    content: "";
    position: absolute;
    inset: 3.5px;
    border-radius: 999px;
    border: 1.5px dashed rgba(253, 224, 115, 0.8);
    pointer-events: none;
  }

  /* --- Main Builder & Preview Golden-Amber 3D Panels --- */
  .layout {
    display: grid;
    grid-template-columns: minmax(235px, 280px) minmax(0, 1fr);
    gap: clamp(14px, 1.6vw, 20px);
    align-items: start;
  }
  .panel {
    min-width: 0;
    padding: clamp(14px, 1.6vw, 20px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border: 2.5px solid #f4c86a;
    border-bottom: 6px solid #df9f36;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(60, 35, 8, 0.18), inset 0 2px 4px #ffffff;
  }
  .settings {
    position: sticky;
    top: 14px;
  }
  .settings h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
  }
  .settings label {
    display: grid;
    gap: 6px;
    margin-bottom: 11px;
    font-size: .88rem;
    font-weight: 700;
    color: #334155;
  }
  .settings input:not([type=checkbox]) {
    width: 100%;
    min-height: 42px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    font: 600 .92rem/1.2 'DM Sans', sans-serif;
    color: #0f172a;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  }
  .settings input:not([type=checkbox]):focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  }
  #selected {
    display: inline-block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #bbf7d0;
    color: #14532d;
    font: 800 .86rem/1.2 'Manrope', sans-serif;
    text-align: center;
  }
  #preview-button {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 58%, #15803d 100%);
    border: 1.5px solid #86efac;
    border-bottom: 4px solid #0f5328;
    color: #ffffff;
    font: 700 .9rem/1 'Fredoka', 'Manrope', sans-serif;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 14px rgba(21, 128, 61, 0.24), inset 0 1.5px 2px rgba(255, 255, 255, 0.34);
    transition: transform 0.16s ease, filter 0.16s ease;
  }
  #preview-button:hover:not(:disabled) {
    transform: translateY(-1.5px);
    filter: brightness(1.05);
  }
  .download,
  #print {
    width: 100%;
    min-height: 43px;
    margin-top: 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fc9526 0%, #e4690c 58%, #bf4e06 100%);
    border: 1.5px solid #fdbe72;
    border-bottom: 4px solid #8c3503;
    color: #ffffff;
    font: 700 .88rem/1 'Fredoka', 'Manrope', sans-serif;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 14px rgba(155, 58, 4, 0.22), inset 0 1.5px 2px rgba(255, 255, 255, 0.34);
    transition: transform 0.16s ease, filter 0.16s ease;
  }
  .download:hover:not(:disabled),
  #print:hover:not(:disabled) {
    transform: translateY(-1.5px);
    filter: brightness(1.05);
  }

  /* --- Right Question Bank Banner, Tools & 5-Column Question Grid --- */
  .banner {
    color: #ffffff;
    background: linear-gradient(120deg, #0d6e57 0%, #159976 100%);
    border: 1.5px solid #34d399;
    border-bottom: 4.5px solid #064e3b;
    border-radius: 18px;
    padding: clamp(13px, 1.8vw, 17px) clamp(15px, 2vw, 20px);
    box-shadow: 0 8px 20px rgba(6, 78, 59, 0.15);
  }
  .banner h2 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.15rem, 1.9vw, 1.45rem);
    font-weight: 800;
    margin-bottom: 3px;
  }
  .banner p {
    font-size: clamp(.8rem, 1.05vw, .9rem);
    color: #ecfdf5;
  }
  .tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 12px 0;
  }
  #all,
  #clear {
    min-height: 38px;
    padding: 7px 16px 8px;
    border-radius: 999px;
    font: 700 .82rem/1 'DM Sans', sans-serif;
    transition: transform 0.15s ease, filter 0.15s ease;
  }
  #all {
    background: linear-gradient(180deg, #2b9bf9 0%, #0d74e7 58%, #0758bd 100%);
    border: 1.5px solid #7ec5ff;
    border-bottom: 3.5px solid #053d87;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  }
  #clear {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border: 1.5px solid #cbd5e1;
    border-bottom: 3.5px solid #94a3b8;
    color: #1e293b;
  }
  #all:hover,
  #clear:hover {
    transform: translateY(-1.5px);
    filter: brightness(1.04);
  }

  /* Preview Toolbar Buttons */
  .preview-tools {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #e2e8f0;
  }
  .preview-tools #back {
    min-height: 40px;
    padding: 8px 18px 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, #9b3cf8 0%, #731de0 58%, #5711b5 100%);
    border: 1.5px solid #bc85ff;
    border-bottom: 4px solid #3c0982;
    color: #ffffff;
    font: 700 .86rem/1 'Fredoka', 'Manrope', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
  .preview-tools #check {
    min-height: 40px;
    padding: 8px 18px 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2b9bf9 0%, #0d74e7 58%, #0758bd 100%);
    border: 1.5px solid #7ec5ff;
    border-bottom: 4px solid #053d87;
    color: #ffffff;
    font: 700 .86rem/1 'Fredoka', 'Manrope', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
  .preview-tools #print {
    width: auto;
    min-height: 40px;
    margin-top: 0;
    padding: 8px 20px 9px;
  }
  #sheet > h2 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 800;
    color: #0f172a;
  }
  .student-line {
    margin: 6px 0 10px;
    font-weight: 700;
    color: #334155;
    overflow-wrap: anywhere;
  }
  #result {
    margin-bottom: 8px;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: #15803d;
  }
  #result:empty { display: none; }

  .group {
    margin: 14px 0;
    padding-top: 12px;
    border-top: 1.5px solid #e2ece9;
  }
  .group h3 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(.95rem, 1.3vw, 1.06rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
  }
  .grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  .bank-card,
  .sheet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1.5px solid #e2ece9;
    border-bottom: 4px solid #cbdcd6;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  }
  .bank-card:hover,
  .sheet-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 8px 18px rgba(14, 116, 144, 0.09);
  }
  .sheet-card > small {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: .74rem;
    font-weight: 800;
  }
  #builder .tools,
  .bank-card .include {
    display: none !important;
  }
  .bank-card {
    justify-content: center;
    gap: 10px;
    padding: 14px 10px;
  }
  input[type=checkbox] {
    accent-color: #16a34a;
    width: 16px;
    height: 16px;
    cursor: pointer;
  }
  .clue {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    gap: 10px;
  }
  .clue img {
    width: clamp(92px, 9.2vw, 122px);
    height: clamp(92px, 9.2vw, 122px);
    object-fit: contain;
    filter: drop-shadow(0 4px 7px rgba(15, 23, 42, 0.1));
  }
  .clue strong {
    font: 700 1.65rem/1 'Fredoka', 'Manrope', sans-serif;
    color: #0f172a;
    overflow-wrap: anywhere;
  }
  .hear {
    padding: 5px 12px 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1.5px solid #93c5fd;
    border-bottom: 3px solid #3b82f6;
    color: #1e40af;
    font: 700 .75rem/1 'DM Sans', sans-serif;
    transition: transform 0.15s ease, filter 0.15s ease;
  }
  .hear::before {
    content: "🔊 ";
  }
  .hear:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
  }
  .writing-box {
    display: block;
    width: 50px;
    height: 48px;
    margin: 2px auto;
    background: #ffffff;
    border: 2px solid #94a3b8;
    border-bottom: 4px solid #64748b;
    border-radius: 11px;
    text-align: center;
    font: 700 1.45rem/1 'Fredoka', 'Manrope', sans-serif;
    color: #0f172a;
  }
  .writing-box:focus {
    outline: none;
    border-color: #3b82f6;
    border-bottom-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  }
  .writing-box.correct {
    background: #dcfce7;
    border-color: #22c55e;
    border-bottom-color: #15803d;
    color: #14532d;
  }
  .writing-box.wrong {
    background: #ffe4e6;
    border-color: #f43f5e;
    border-bottom-color: #be123c;
    color: #881337;
  }
  .mark {
    display: block;
    min-height: 1em;
    font-size: .75rem;
    font-weight: 800;
    color: #15803d;
  }
}

/* Large Desktop Monitors (1600px+) */
@media screen and (min-width: 1600px) {
  main {
    width: min(1380px, 92vw);
  }
  .layout {
    grid-template-columns: 295px minmax(0, 1fr);
    gap: 22px;
  }
  .clue img {
    width: clamp(104px, 8.2vw, 130px);
    height: clamp(104px, 8.2vw, 130px);
  }
}

/* Standard Laptops (992px - 1199.98px) */
@media screen and (min-width: 992px) and (max-width: 1199.98px) {
  main {
    padding: 12px 16px 28px;
  }
  .layout {
    grid-template-columns: 242px minmax(0, 1fr);
    gap: 14px;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .bank-card,
  .sheet-card {
    padding: 12px 8px;
  }
  .clue {
    min-height: 102px;
    gap: 8px;
  }
  .clue img {
    width: clamp(80px, 8vw, 104px);
    height: clamp(80px, 8vw, 104px);
  }
  .clue strong {
    font-size: 1.4rem;
  }
}

/* Tablets & Compact Laptops (<= 991.98px) */
@media screen and (max-width: 991.98px) {
  html, body {
    background-attachment: scroll;
  }
  main {
    width: 100%;
    padding: 12px 14px 28px;
  }
  header {
    padding: 0;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .settings {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
  }
  .settings h2,
  .settings label,
  #selected {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  #preview-button,
  .download {
    margin-top: 2px;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .clue {
    min-height: 100px;
    gap: 7px;
  }
  .clue img {
    width: clamp(76px, 10.5vw, 106px);
    height: clamp(76px, 10.5vw, 106px);
  }
  .clue strong {
    font-size: 1.4rem;
  }
}

/* All Mobile Phones (<= 680px) */
@media screen and (max-width: 680px) {
  main {
    padding: 10px 10px 24px;
  }
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin-bottom: 12px;
    min-height: 0;
    gap: 8px;
  }
  .back-to-alphabet {
    position: static;
    transform: none;
    align-self: flex-start;
    min-height: 35px;
    padding: 7px 15px 8px;
    font-size: 13px;
    border-bottom-width: 3.5px;
  }
  .back-to-alphabet:hover {
    transform: translateY(-2px);
  }
  header h1 {
    padding: 5px 10px 6px;
  }
  header h1 span {
    padding: 5px 20px 6px;
    font-size: clamp(.98rem, 4.4vw, 1.22rem);
    white-space: normal;
    text-align: center;
  }
  .panel {
    border-width: 2px;
    border-bottom-width: 5px;
    border-radius: 20px;
    padding: 12px;
  }
  .settings {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #preview-button,
  .download {
    margin-top: 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .bank-card,
  .sheet-card {
    padding: 11px 8px;
  }
  .clue {
    min-height: 94px;
    gap: 6px;
  }
  .clue img {
    width: clamp(74px, 21vw, 100px);
    height: clamp(74px, 21vw, 100px);
  }
  .clue strong {
    font-size: 1.35rem;
  }
  .preview-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .preview-tools #back {
    grid-column: 1 / -1;
  }
  .preview-tools button,
  .preview-tools #print {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-inline: 12px;
  }
}

/* Compact Phones (320px - 374px) */
@media screen and (max-width: 374px) {
  main {
    padding: 8px 8px 20px;
  }
  .panel {
    padding: 10px;
    border-radius: 16px;
  }
  header h1 span {
    padding: 5px 14px 6px;
    font-size: .92rem;
  }
  .grid {
    gap: 7px;
  }
  .bank-card,
  .sheet-card {
    padding: 9px 6px;
    border-radius: 14px;
  }
  .clue {
    min-height: 82px;
    gap: 5px;
  }
  .clue img {
    width: clamp(66px, 20vw, 84px);
    height: clamp(66px, 20vw, 84px);
  }
  .clue strong {
    font-size: 1.2rem;
  }
  .preview-tools {
    grid-template-columns: 1fr;
  }
}

/* Mobile Landscape Viewports */
@media screen and (max-height: 540px) and (orientation: landscape) {
  header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    margin-bottom: 10px;
  }
  header h1 {
    grid-column: 2;
    justify-self: center;
  }
  .settings {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
}