:root {
  color-scheme: dark;
  --bg: #090f1b;
  --panel: #111e30;
  --panel-deep: #0d1727;
  --border: #30435c;
  --white: #f5f8ff;
  --muted: #b9c8db;
  --acid: #dafa51;
  --ink: #151d15;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--white);
  font-size: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, #1b3451, var(--bg) 72%) fixed; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #7fe0ff; outline-offset: 3px; }
h1, h2, p { margin: 0; }
.wrap { width: min(calc(100% - 52px), 1200px); margin-inline: auto; }
.masthead { background: #0b1728; border-bottom: 1px solid #334862; }
.mast-inner { min-height: 66px; display: flex; justify-content: space-between; align-items: center; padding-block: 7px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-ball { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--acid); font-size: 21px; }
h1 { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 900; line-height: 1; letter-spacing: -.06em; }
h1 em { color: var(--acid); font-style: normal; }
.sound { min-height: 44px; border: 1px solid #45607e; border-radius: 8px; padding-inline: 11px; background: #17283e; color: var(--white); font-size: .875rem; font-weight: 800; }
.sound:hover { background: #243d5b; }

.match { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 19px 15px; }
.fixture { min-width: 0; }
.fixture h2, .result h2 { font-size: clamp(1.65rem, 5.2vw, 3.8rem); font-weight: 950; letter-spacing: -.065em; line-height: 1; }
.eyebrow { color: #c1d1e5; font-size: .875rem; font-weight: 850; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .08em; }
.match-numbers { display: flex; align-items: stretch; gap: 6px; }
.match-stat { display: grid; place-items: center; min-width: 84px; padding: 6px 8px; border: 1px solid #435673; border-radius: 8px; background: #090f1c; }
.match-stat span { color: #c1d1e5; font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.match-stat strong, .match-time { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--acid); font-variant-numeric: tabular-nums; text-shadow: 0 0 13px #dafa514b; }
.match-stat strong { font-size: 2.2rem; line-height: 1; }
#streak-stat strong { color: #92dfff; text-shadow: 0 0 12px #92dfff54; }

.play { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(272px, 1fr); gap: 9px; }
.arena { align-self: stretch; min-height: 0; min-width: 0; aspect-ratio: 16 / 9; position: relative; isolation: isolate; border-radius: 15px; border: 1px solid #506884; background: #183b32 var(--stadium-backdrop, url("./stadium.webp")) center / cover; overflow: hidden; overflow: clip; }
.arena::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(180deg, #05112377, transparent 43%, transparent 69%, #081b1799); }
.arena-meta { position: absolute; inset: 11px 11px auto; z-index: 3; display: flex; align-items: start; justify-content: space-between; gap: 7px; pointer-events: none; }
.mode-badge, .chance { border: 1px solid #59738b; border-radius: 7px; background: #091729ee; color: #f7fbff; font-weight: 850; }
.mode-badge { padding: 7px 9px; color: var(--acid); font-size: .875rem; }
.chance { padding: 6px 9px; text-align: center; font-size: .8125rem; }
.match-progress { display: flex; justify-content: center; gap: 4px; margin: 4px auto 1px; }
.match-progress i { width: 10px; height: 4px; border-radius: 4px; background: #60738c; }
.match-progress .done { background: var(--acid); }
.match-progress .current { background: white; }
.targets { position: absolute; inset: 46% 22.5% 24%; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 5px 21%; margin: 0; }
.shot { min-width: 0; min-height: 44px; border: 1px solid #bed3eb; border-bottom-width: 3px; border-radius: 8px; background: #0a1b32ed; color: var(--white); padding: 3px 5px; font-weight: 850; font-size: clamp(.875rem, 1.5vw, 1.07rem); line-height: 1.1; overflow-wrap: normal; box-shadow: 0 3px 10px #031020b0; }
.shot:hover:not([aria-disabled="true"]), .var-button:hover:not([aria-disabled="true"]) { border-color: #fff; background: #23496c; }
.shot[aria-disabled="true"], .var-button[aria-disabled="true"], .stepper button[aria-disabled="true"] { cursor: default; }
.shot.incorrect, .var-button.incorrect { border-color: #e89470; background: #442123; }
.shot.correct, .var-button.correct { border-color: #fff9b4; background: #b9ec43; color: #14250b; }
.shot.correct::before { content: "✓ "; }
.shot.incorrect::before { content: "× "; }

.keeper { position: absolute; z-index: 1; filter: drop-shadow(0 2px 1px #0a101d); transform: translateX(-50%); }
.ball { position: absolute; z-index: 4; left: 50%; bottom: 4%; transform: translateX(-50%); display: grid; place-items: center; width: clamp(30px, 6vw, 62px); aspect-ratio: 1; font-size: clamp(25px, 5vw, 52px); line-height: 1; filter: drop-shadow(0 4px 3px #08151d); pointer-events: none; }
.arena:not([data-mode="shoot"]) .keeper, .arena:not([data-mode="shoot"]) .ball { visibility: hidden; }
.arena[data-mode="set"] .arena-meta, .arena[data-mode="var"] .arena-meta { z-index: 2; }
.arena[data-mode="set"]::before { background: linear-gradient(180deg, #05112355, transparent 34%, transparent 65%, #081b17b9); }
.arena[data-mode="var"]::before { background: #050f2080; }
.var-options { position: absolute; z-index: 1; inset: 26% clamp(10px, 4vw, 25px) 11%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; gap: clamp(4px, 1.4vw, 10px); }
.var-button { position: relative; display: grid; justify-items: center; gap: 3px; min-width: 0; border: 1px solid #a6c1dd; border-radius: 8px; background: #0a172aee; color: var(--white); font-weight: 850; font-size: .83rem; padding: 5px 4px; }
.var-button canvas { width: min(100%, 150px); height: auto; display: block; pointer-events: none; }
.set-label { position: absolute; inset: auto 9% 13%; color: #fff; text-align: center; text-shadow: 0 3px 6px #000; font-weight: 900; font-size: clamp(1.05rem, 2.2vw, 1.9rem); letter-spacing: -.04em; }

.reaction { position: absolute; z-index: 5; left: 50%; top: 21%; transform: translateX(-50%) rotate(-4deg); padding: 5px 13px 7px; border: 2px solid #f7f8e6; background: var(--acid); color: #18200a; font-size: clamp(1.25rem, 4vw, 3.2rem); font-weight: 950; font-style: italic; line-height: 1; letter-spacing: -.06em; white-space: nowrap; box-shadow: 0 5px 0 #172420, 0 8px 18px #0b1222; pointer-events: none; }
.reaction[data-tone="miss"] { background: #ffd3a1; }
.confetti { position: absolute; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 29%; width: 7px; height: 11px; background: var(--colour); animation: scatter .93s cubic-bezier(.15,.62,.55,1) both; }
@keyframes scatter {
  from { opacity: 1; transform: translate(0,0) rotate(0deg); }
  75% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--spin)); }
}

.clockboard { display: grid; justify-items: center; align-content: center; gap: 6px; min-width: 0; border: 1px solid #4e6381; border-radius: 15px; padding: 10px 11px; background: linear-gradient(#172944, #0e192a 70%); text-align: center; box-shadow: inset 0 1px 1px #acb9db33; }
.board-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 3px 5px; border-bottom: 1px solid #324660; color: var(--acid); text-transform: uppercase; font: 800 .875rem/1.2 ui-monospace, monospace; letter-spacing: .11em; }
.board-light { display: block; flex: none; width: 6px; height: 6px; background: #8ba2bd; border-radius: 50%; }
.dial-wrap { width: min(100%, 205px); }
#clock { display: block; width: 100%; height: auto; aspect-ratio: 1; }
#clock.setting { cursor: grab; touch-action: none; }
#clock.setting:active { cursor: grabbing; }
.match-time { width: 100%; padding: 6px 5px; border: 1px solid #4a5b49; border-radius: 7px; background: #101911; font-size: clamp(1.4rem, 4.1vw, 2.65rem); line-height: 1.08; font-weight: 900; overflow-wrap: anywhere; }
.instructions { min-width: 0; width: 100%; }
#prompt { font-size: clamp(1.13rem, 2.1vw, 1.65rem); line-height: 1.08; font-weight: 850; letter-spacing: -.035em; overflow-wrap: anywhere; }
#prompt:focus, #result-title:focus { outline: none; }
#instruction { margin-top: 5px; font-size: .9rem; line-height: 1.2; color: var(--muted); }
.legend { display: flex; justify-content: center; gap: 8px 11px; flex-wrap: wrap; color: #ecf4ff; font-size: .79rem; font-weight: 700; margin-top: 6px; }
.legend span { display: flex; align-items: center; gap: 4px; }
.legend i { display: inline-block; width: 13px; border-radius: 3px; }
.hour-mark { height: 6px; background: #9bc7f5; }
.minute-mark { height: 4px; background: #ff986f; }
.set-controls { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 6px; }
.stepper { padding: 4px 3px 5px; border: 1px solid #526782; border-radius: 8px; color: #f0f6ff; font-size: .8125rem; font-weight: 800; }
.stepper > div { display: flex; gap: 4px; margin-top: 4px; }
.stepper button { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #a8bfd8; border-bottom-width: 3px; border-radius: 6px; padding: 2px; font-size: 1.3rem; font-weight: 850; color: #0c2037; background: #e3edf8; }
.stepper button:hover:not([aria-disabled="true"]) { background: white; }
.stepper button[aria-disabled="true"] { opacity: .65; }

.coach { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 8px; min-height: 56px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-deep); }
.feedback { min-width: 0; flex: 1; padding: 2px 3px; color: var(--muted); font-size: .94rem; font-weight: 680; line-height: 1.25; }
.feedback[data-tone="clue"] { color: #ffdbac; }
.feedback[data-tone="goal"] { color: #e0fd84; }
.actions { display: flex; flex: none; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.hint { min-height: 44px; border: 1px solid #526b86; border-radius: 7px; padding: 5px 8px; background: #1a2d44; color: #eef6ff; font-size: .875rem; font-weight: 800; }
.hint:hover { background: #29435f; }
.action { min-height: 46px; border: 1px solid #202d0f; border-bottom-width: 3px; border-radius: 8px; padding: 7px 13px; background: var(--acid); color: var(--ink); font-size: 1rem; font-weight: 900; }
.action:hover { background: #e5ff80; }

.tour { margin-block: 0 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.tour summary { min-height: 44px; display: flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 800; padding: 7px 10px; }
.tour summary::-webkit-details-marker { display: none; }
.tour summary::before { content: "+"; display: grid; place-items: center; border: 1px solid #6e85a0; border-radius: 5px; width: 23px; height: 23px; color: var(--acid); }
.tour[open] summary::before { content: "−"; }
.tour summary span { margin-left: auto; color: var(--muted); font-size: .875rem; }
.levels { padding: 0 8px 8px; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; list-style: none; }
.extra-time-title { margin: 3px 8px 6px; padding-top: 7px; border-top: 1px solid var(--border); color: var(--acid); font-size: 1rem; }
.levels.extra-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.level { display: flex; width: 100%; height: 100%; text-align: left; gap: 6px; min-height: 53px; align-items: center; padding: 5px 5px; border: 1px solid #435771; border-radius: 7px; color: #e6edf7; background: #17283f; font-size: .89rem; font-weight: 800; line-height: 1.12; }
.level small { display: block; margin-top: 3px; color: #b4c8e2; font-size: .79rem; }
.level .badge { flex: none; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; color: var(--white); background: #314961; }
.level:hover { background: #233b58; }
.level[aria-current="step"] { border-color: var(--acid); }
.level[aria-current="step"] .badge { color: #142011; background: var(--acid); }
.level.complete .badge { color: #0f2033; background: #a7dcf6; }

.match-time[data-display="numeral"] { font-family: Georgia, serif; color: #ffe3a0; background: #28231b; text-shadow: none; }
.match-time[data-display="scoreboard"] { color: #ffd378; background: #1c140b; text-shadow: 0 0 12px #ffc95d4b; }

.result { position: relative; isolation: isolate; border: 1px solid #53708c; border-radius: 15px; padding: 38px 15px; background: #183b32 var(--stadium-backdrop, url("./stadium.webp")) center / cover; text-align: center; overflow: hidden; }
.result::before { position: absolute; z-index: -1; content: ""; inset: 0; background: #08172788; }
.result-inner { max-width: 575px; margin-inline: auto; border: 1px solid #6c8bab; border-radius: 13px; padding: 18px 18px 24px; background: #0c192df5; }
.result-icon { display: block; font-size: 3rem; margin-bottom: 7px; }
.result h2 { margin-block: 7px 10px; font-size: clamp(1.6rem, 4vw, 3.3rem); }
.result p { line-height: 1.4; }
.result .action { margin-top: 16px; }
.stadium-fact { margin-top: 12px; padding: 7px; background: #20334b; border-radius: 7px; }
.stadium-fact a { display: inline-block; color: var(--acid); font-weight: 800; text-underline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .wrap { width: min(calc(100% - 24px), 1200px); }
  .play { grid-template-columns: minmax(0,1.7fr) minmax(235px,1fr); }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 16px); }
  .mast-inner { min-height: 52px; }
  .brand-ball { width: 30px; height: 30px; font-size: 18px; }
  .sound { padding-inline: 7px; }
  .match { padding-block: 7px; gap: 5px; }
  .eyebrow { font-size: .78rem; letter-spacing: .025em; margin-bottom: 3px; }
  .fixture h2 { font-size: clamp(1.3rem, 6vw, 2rem); }
  .match-stat { min-width: 49px; padding: 2px 4px; }
  .match-stat span { font-size: .7rem; letter-spacing: .035em; }
  .match-stat strong { font-size: 1.57rem; }
  .play { grid-template-columns: minmax(0,1fr); gap: 5px; }
  .arena {
    grid-row: 3;
    width: 100%;
    height: 215px;
    height: clamp(190px, calc(63.7vw - 10px), 410px);
    border-radius: 9px;
    overflow: hidden;
  }
  .arena-meta { inset: 5px 5px auto; }
  .mode-badge, .chance { padding: 3px 5px; }
  .targets { inset: 38% 17% 17%; gap: 3px 18%; }
  .shot { padding: 2px 3px; min-height: 44px; font-size: .82rem; }
  .phone-choices {
    grid-row: 2;
    min-width: 0;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel);
  }
  .phone-choices .targets, .phone-choices .var-options { position: static; gap: 5px; }
  .phone-choices .targets { grid-template-rows: none; }
  .phone-choices .shot { min-height: 48px; padding: 5px; font-size: .95rem; }
  .phone-choices .var-button { min-height: 48px; }
  .reaction { top: 19%; }
  .clockboard { grid-row: 1; grid-template-columns: minmax(95px, 39%) minmax(0,1fr); grid-template-areas: "head head" "dial instructions" "dial controls"; column-gap: 6px; row-gap: 4px; padding: 5px 7px 6px; border-radius: 9px; text-align: left; align-items: center; }
  .board-head { grid-area: head; padding-block: 1px 3px; }
  .dial-wrap { grid-area: dial; width: min(100%, 132px); }
  .match-time { grid-area: dial; width: min(100%, 135px); text-align: center; letter-spacing: -.03em; }
  .instructions { grid-area: instructions; }
  .set-controls { grid-area: controls; align-self: start; }
  .stepper { text-align: center; padding: 2px; }
  .stepper > div { margin-top: 1px; gap: 2px; }
  #instruction { margin-top: 3px; font-size: .85rem; }
  .legend { justify-content: flex-start; margin-top: 3px; gap: 3px 6px; }
  .coach { grid-row: 4; align-items: flex-start; min-height: 48px; flex-wrap: wrap; padding: 4px; gap: 2px 4px; }
  .feedback { min-width: min(120px,100%); font-size: .875rem; padding: 3px 2px; align-self: center; }
  .actions { margin-left: auto; }
  .hint { padding-inline: 6px; }
  .action { min-height: 44px; padding: 5px 8px; font-size: .92rem; }
  .levels { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .result { padding-block: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}

.target-time { font-family: ui-monospace, monospace; font-size: clamp(.98rem,2.15vw,1.35rem); font-weight: 950; color: #f1ffaf; }
.target-time.correct { color: #16240b; }
.boot { position: absolute; z-index: 4; width: 19%; aspect-ratio: 1.25; left: 51.5%; bottom: -3%; pointer-events: none; }
.arena:is([data-mode="set"], [data-mode="var"]) .boot { visibility: hidden; }
.keeper { left: 50%; bottom: 23%; width: auto; height: 31%; aspect-ratio: .981; background: url("./keeper.webp") center / contain no-repeat; clip-path: polygon(43% 1%,54% 1%,57% 4%,60% 12%,62% 18%,69% 19%,75% 23%,82% 33%,87% 39%,92% 40%,94% 44%,99% 47%,98% 54%,94% 57%,88% 55%,82% 47%,76% 42%,71% 37%,64% 33%,63% 43%,68% 47%,73% 57%,76% 67%,78% 80%,84% 87%,87% 90%,92% 95%,91% 99%,85% 99%,78% 93%,73% 91%,69% 89%,69% 81%,67% 73%,62% 68%,59% 58%,53% 54%,49% 55%,42% 62%,37% 74%,32% 78%,28% 85%,23% 92%,16% 94%,12% 99%,6% 99%,4% 96%,10% 89%,13% 85%,14% 76%,20% 67%,21% 58%,26% 46%,32% 41%,33% 32%,29% 34%,25% 40%,20% 43%,17% 48%,13% 52%,8% 57%,4% 55%,1% 53%,0% 49%,2% 45%,8% 43%,13% 40%,18% 32%,24% 25%,29% 22%,39% 19%,42% 14%,41% 8%); }
.ball { background: url("./ball.webp") center / cover; border-radius: 50%; color: transparent; }
.boot { width: 19%; aspect-ratio: .926; transform-origin: 90% 100%; bottom: -15%; z-index: 4; background: url("./boot.webp") center / contain no-repeat; clip-path: polygon(19% 1%,23% 1%,29% 4%,35% 12%,42% 18%,48% 23%,51% 33%,55% 39%,58% 45%,63% 49%,71% 56%,78% 62%,83% 66%,91% 77%,98% 89%,100% 100%,54% 100%,48% 95%,45% 90%,42% 82%,38% 76%,34% 68%,29% 62%,25% 56%,15% 57%,11% 53%,11% 48%,8% 42%,6% 36%,4% 30%,2% 24%,3% 17%,8% 10%,11% 5%,15% 2%); }
@media (max-width: 660px) {
  .keeper { width: auto; height: 34%; }
  .boot { width: 21%; bottom: -12%; }
}

.tour-tools { display: flex; align-items: start; gap: 7px; margin-bottom: 9px; }
.tour-tools .tour { flex: 1; min-width: 0; margin: 0; }
.tour-tools > .action { flex: none; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; }
.result-actions #result-certificate:not([hidden]) + .action { background: #243952; border-color: #68809d; color: white; }

.certificate-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 13px;
  border: 1px solid #6b83a4;
  border-radius: 13px;
  background: var(--panel);
  color: var(--white);
}
.certificate-dialog::backdrop { background: #050b14da; }
.certificate-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; padding-bottom: 12px; align-items: end; }
.certificate-controls label { grid-column: 1 / -1; font-weight: 800; }
.certificate-controls label span { color: var(--muted); font-weight: 500; }
.certificate-controls input { width: 100%; min-height: 46px; padding: 7px 9px; font: inherit; border: 1px solid #6b83a4; border-radius: 8px; color: var(--white); background: #091427; }
.certificate-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.certificate-sheet {
  background: #fff;
  color: #142545;
  border: 2px solid #162948;
  box-shadow: inset 0 0 0 5px white, inset 0 0 0 7px #b29744;
  padding: clamp(12px, 3vw, 20px);
  text-align: center;
}
.certificate-brand { font-size: clamp(.62rem, 2vw, .85rem); letter-spacing: .09em; font-weight: 900; margin-block: 2px 8px; }
.certificate-brand span { color: #816822; padding-inline: 3px; }
.certificate-picture { height: clamp(58px, 15vw, 128px); overflow: hidden; border-block: 2px solid #a68a3a; }
.certificate-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.certificate-body { padding: clamp(8px, 2vw, 16px) 5px 3px; }
.certificate-kicker, .certificate-route { color: #6b5217; font-size: clamp(.66rem, 1.9vw, .87rem); font-weight: 900; letter-spacing: .095em; }
.certificate-body h2 { font-size: clamp(1.3rem, 4.6vw, 2.7rem); letter-spacing: -.045em; line-height: 1; margin: 4px 0 12px; }
.certificate-name { max-width: 90%; min-height: 1.45em; margin: 1px auto 8px; padding: 2px 0 4px; border-bottom: 1px solid #a78c40; font-size: clamp(1.04rem, 3.7vw, 2.1rem); font-weight: 850; line-height: 1.12; overflow-wrap: anywhere; }
.certificate-achievement { margin: 7px 0 12px; }
.certificate-date { font-size: .87rem; margin-top: 2px; }
@media (max-width: 530px) {
  .certificate-controls { grid-template-columns: minmax(0,1fr); }
  .certificate-controls label { grid-column: auto; }
}
@page { size: A4 landscape; margin: 10mm; }
@media print {
  body:has(#certificate-dialog[open]) { margin: 0; min-height: 0; color-scheme: light; background: white; }
  body:has(#certificate-dialog[open]) > :not(#certificate-dialog) { display: none !important; }
  .certificate-dialog[open] { position: static; inset: auto; width: 100%; max-width: none; height: auto; max-height: none; overflow: visible; margin: 0; padding: 0; border: 0; color: #142545; background: white; }
  .certificate-dialog::backdrop, .certificate-controls { display: none !important; }
  .certificate-sheet { break-inside: avoid; padding: 6mm; min-height: 175mm; box-shadow: none; outline: 1px solid #b29744; outline-offset: -3mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .certificate-brand { font-size: 11pt; margin: 2mm 0 4mm; }
  .certificate-picture { height: 47mm; }
  .certificate-body { padding-top: 7mm; }
  .certificate-body h2 { font-size: 30pt; margin: 2mm 0 5mm; }
  .certificate-name { font-size: 24pt; max-width: 78%; margin-bottom: 4mm; }
  .certificate-achievement { margin: 4mm 0 5mm; }
}

.learning-back { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: .875rem; font-weight: 750; text-underline-offset: 3px; }
.learning-back:hover { color: var(--acid); }
