/* THE 78: black, fine gold lines and thin capitals, with the cards as the only colour.
   Loaded after tarot.css and deco.css; everything is scoped to body.t78. */
body.t78 {
  --hair78: rgba(233, 189, 78, 0.26);
  --label78: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
  --back78: url("assets/tarot-jacket-200.jpg?v=20261202");
}
/* the background is the Tarot Room's own plain dark, from tarot.css */
:root body.t78::after { display: none; }
.t78 main { padding-bottom: 40px; }
.t78 [hidden] { display: none !important; }
:root body.t78 .t-view { max-width: 1120px; margin: 0 auto; padding: 0; background: none; }
.t78 [tabindex="-1"]:focus { outline: none; }
:root.t-locked { overflow: hidden; }

/* ---------- type ---------- */
:root body.t78 h1, :root body.t78 h2 { margin: 0; text-align: center; }
:root body.t78 .t-home h1 { font-size: clamp(3.8rem, 1.5rem + 11vw, 9rem); letter-spacing: 0.12em; line-height: 1; margin-top: 6px; }
:root body.t78 .t-view > h2 { font-size: clamp(1.7rem, 1rem + 2.8vw, 3rem); }
:root body.t78 h2::after, :root body.t78 h3::after { display: none; }
.t-sub { margin: 14px 0 0; font-family: var(--label78); font-size: clamp(0.72rem, 0.6rem + 0.5vw, 0.95rem); font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); text-wrap: balance; }
.t-line { margin: 14px auto 0; max-width: 34em; font-size: 1.28rem; font-style: italic; color: var(--ink); text-wrap: balance; }
.t-quiet { margin: 18px 0 0; font-size: 1rem; color: rgba(243, 234, 210, 0.68); }
.t-warn { max-width: 40em; margin: 0 auto 18px; padding: 10px 14px; border-block: 1px solid var(--gold); }

/* ---------- buttons: a fine gold frame; the one main action is solid gold ---------- */
:root body.t78 .t-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 14px 28px 12px;
  font-family: var(--label78); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.2;
  color: var(--gold-hot); background: rgba(0, 0, 0, 0.5); border: 1px solid var(--gold); border-radius: 0; cursor: pointer; text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
:root body.t78 .t-btn:hover { background: rgba(233, 189, 78, 0.16); }
:root body.t78 .t-btn-main { background: var(--gold); color: #0b0804; border-color: var(--gold); }
:root body.t78 .t-btn-main:hover { background: var(--gold-hot); }
.t-btn small { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; opacity: 0.8; }
.t78 .t-link { display: inline-block; padding: 12px 4px 10px; font: inherit; font-size: 1.1rem; font-style: italic; color: var(--gold); background: none; border: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--hair78); text-underline-offset: 6px; }
.t78 .t-link:hover { color: var(--gold-hot); text-decoration-color: var(--gold-hot); }
.t-actions, .t-after { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; margin-top: 26px; }
:root body.t78 :is(button, a, summary, input, [tabindex="0"]):focus-visible { outline: 2px solid var(--gold-hot); outline-offset: 3px; }

/* ---------- a small card: back, glimpse, partial colour, full colour ---------- */
.t-tile { position: relative; display: block; width: 100%; aspect-ratio: 200 / 346; overflow: hidden; background: #050403; }
.t-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t-s0 { background: #050403 var(--back78) center / 100% 100% no-repeat; filter: brightness(0.62) saturate(0.8); }
.t-s1 img { filter: grayscale(calc(1 - var(--f, 0) * 0.55)) brightness(calc(0.36 + var(--f, 0) * 0.2)) contrast(1.12); }
.t-s2 img { filter: saturate(calc(0.46 + var(--f, 0) * 0.24)) brightness(calc(0.7 + var(--f, 0) * 0.1)); }
.t-shown img { filter: none; }
.t-s2::after, .t-s3::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--gold); pointer-events: none; }
.t-s3 { box-shadow: 0 0 18px rgba(233, 189, 78, 0.38); }
.t-s3::after { box-shadow: inset 0 0 0 2px var(--gold-hot), inset 0 0 0 4px #0b0905, inset 0 0 0 5px var(--gold); }
/* the stage as shape, not only colour: none, one, two or three diamonds filled */
.t-pips { display: flex; justify-content: center; gap: 6px; padding: 8px 0 2px; }
.t-pips i { width: 6px; height: 6px; rotate: 45deg; box-shadow: inset 0 0 0 1px rgba(233, 189, 78, 0.7); }
.t-p1 i:nth-child(-n+1), .t-p2 i:nth-child(-n+2), .t-p3 i { background: var(--gold-hot); box-shadow: none; }
.t-p0 i { box-shadow: inset 0 0 0 1px rgba(233, 189, 78, 0.34); }

/* ---------- the entrance: the whole deck at a glance, thirteen by six ---------- */
.t-mosaic { display: grid; grid-template-columns: repeat(13, 1fr); gap: clamp(3px, 0.7vw, 8px); width: min(780px, 100%); margin: 30px auto 0; padding: 2px; }
.t-tally { margin: 18px 0 0; font-family: var(--label78); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); white-space: pre-wrap; }
/* wide screens: three long rows of twenty-six, so the way in stays in view */
@media (min-width: 761px) { .t-mosaic { grid-template-columns: repeat(26, 1fr); width: min(1080px, 100%); gap: 6px; }
  :root body.t78 .t-home h1 { font-size: clamp(3.8rem, min(9vw, 13svh), 7.4rem); } }
@media (min-width: 761px) and (max-height: 800px) { :root body.t78 .t-home h1 { margin-top: 0; font-size: 4.2rem; } .t-home .t-line { margin-top: 8px; } .t-home .t-mosaic { margin-top: 16px; width: min(900px, 100%); } .t-home .t-actions { margin-top: 16px; } .t-home .t-tally { margin-top: 12px; } }

/* ---------- choosing a practice ---------- */
.t-setup form { max-width: 760px; margin: 8px auto 0; }
.t78 fieldset { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.t78 legend { width: 100%; padding: 0 0 6px; text-align: center; font-family: var(--label78); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(233, 189, 78, 0.85); }
.t-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.t-choices label { position: relative; cursor: pointer; }
.t-choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.t-choices span { display: block; min-height: 44px; padding: 9px 14px 8px; font-size: 1.16rem; line-height: 1.3; border: 1px solid transparent; border-bottom-color: var(--hair78); }
.t-choices input:checked + span { color: #0b0804; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.t-choices input:focus-visible + span { outline: 2px solid var(--gold-hot); outline-offset: 2px; }
.t-choices input:disabled + span { opacity: 0.4; cursor: default; }
.t-off { opacity: 0.35; pointer-events: none; }
.t-check { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 34em; margin: 26px auto 0; text-align: left; font-size: 1.05rem; cursor: pointer; }
.t-check input { flex: none; width: 20px; height: 20px; accent-color: var(--gold); }
.t-hint { min-height: 1.5em; margin: 14px auto 0; max-width: 34em; font-style: italic; color: var(--gold); }
.t-hint:empty { min-height: 0; margin: 0; }

/* ---------- a question: the room empties, the card takes the height of the window ---------- */
.t-practising .topbar, .t-practising .tsub, .t-practising footer { display: none; }
.t78.t-practising main { padding: 0 var(--gutter) 24px; }
.t-practising .t-practice { max-width: 1180px; }
.t-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair78); }
.t-count { margin: 0; text-align: left; font-family: var(--display, "Poiret One"), sans-serif; font-size: 1.5rem; letter-spacing: 0.12em; color: var(--gold-hot); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-cat { margin: 0; font-family: var(--label78); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.t-bar-end { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
:root body.t78 .t-bar .mutebtn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--gold); background: none; border: 0; cursor: pointer; }

.t-stage { display: grid; grid-template-columns: auto minmax(0, 560px); justify-content: center; align-items: center; column-gap: clamp(28px, 5vw, 76px); min-height: calc(100svh - 90px); padding-top: 16px; }
.t-stage.t-no-art { grid-template-columns: minmax(0, 640px); }
.t-no-art .t-art { display: none; }
.t-art { --h: min(calc(100svh - 178px), 800px); width: calc(var(--h) * 0.563); max-width: 44vw; justify-self: end; }
.t-frame { display: block; width: 100%; padding: 0; background: #050403; border: 0; cursor: zoom-in; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8); }
.t-frame .t-canvas { aspect-ratio: 921 / 1636; }
.t-canvas { display: block; width: 100%; height: auto; opacity: 0; transition: opacity 0.25s; }
.t-canvas.t-drawn { opacity: 1; }
.t-frame-detail { cursor: default; padding: 8px; border: 1px solid var(--hair78); }
.t-frame-detail:disabled { opacity: 1; }
.t-frame-detail .t-canvas { aspect-ratio: auto; max-height: 60svh; width: 100%; object-fit: contain; }
.t-tap { margin: 8px 0 0; font-size: 0.92rem; font-style: italic; color: rgba(243, 234, 210, 0.6); }
.t-missing { padding: 30px 14px; border: 1px solid var(--hair78); }
.t-describe { margin-top: 4px; text-align: left; font-size: 1rem; }
.t-describe summary { padding: 8px 0; text-align: center; font-size: 0.95rem; font-style: italic; color: var(--gold); cursor: pointer; }
.t-describe p { margin: 0; padding: 10px 0; border-top: 1px solid var(--hair78); }

.t-ask { text-align: left; align-self: center; }
:root body.t78 .t-question { text-align: left; font-family: var(--serif); font-size: clamp(1.55rem, 1.1rem + 1.4vw, 2.3rem); font-weight: 600; font-style: normal; text-transform: none; letter-spacing: 0; line-height: 1.2; background: none; -webkit-text-stroke: 0; color: var(--ink); -webkit-text-fill-color: currentColor; filter: none; text-wrap: balance; }
:root body.t78 .t-no-art .t-question { text-align: center; }
.t-passage { margin: 18px 0 0; padding: 18px 0; border-block: 1px solid var(--gold); text-align: center; font-size: 1.42rem; font-style: italic; line-height: 1.35; color: var(--gold-hot); text-wrap: balance; }
.t-passage.t-desc { text-align: left; font-style: normal; font-size: 1.2rem; color: var(--ink); text-wrap: pretty; }
.t-options { margin-top: 22px; border-top: 1px solid var(--hair78); }
:root body.t78 .t-option {
  position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 8px; width: 100%; min-height: 58px; padding: 11px 10px 10px 4px;
  text-align: left; font: inherit; font-size: 1.22rem; line-height: 1.28; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--hair78); border-radius: 0; cursor: pointer;
  transition: background-color 0.18s, color 0.18s, opacity 0.18s;
}
@media (hover: hover) { :root body.t78 .t-option:not([aria-disabled]):hover { background: rgba(233, 189, 78, 0.12); } }
.t-key { font-family: var(--label78); font-size: 0.72rem; font-weight: 700; color: var(--gold); text-align: center; }
.t-mark { grid-column: 2; font-family: var(--label78); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.t-mark:empty { display: none; }
:root body.t78 .t-option[aria-disabled] { cursor: default; }
:root body.t78 .t-option.t-right { background: linear-gradient(90deg, rgba(233, 189, 78, 0.3), rgba(233, 189, 78, 0.07)); box-shadow: inset 3px 0 0 var(--gold-hot); }
.t-right .t-mark { color: var(--gold-hot); }
:root body.t78 .t-option.t-chosen { outline: 1px dashed rgba(243, 234, 210, 0.6); outline-offset: -3px; }
.t-chosen .t-mark { color: rgba(243, 234, 210, 0.8); }
:root body.t78 .t-option.t-rest { opacity: 0.58; }

/* four pictures to choose between */
.t-stage.t-picking { grid-template-columns: minmax(0, 1000px); align-content: center; }
.t-picking .t-ask { text-align: center; }
:root body.t78 .t-picking .t-question { text-align: center; }
.t-picking .t-passage { max-width: 30em; margin-inline: auto; padding: 10px 0; }
:root body.t78 .t-options.t-pictures { display: grid; align-items: start; grid-template-columns: repeat(4, minmax(0, calc((100svh - 300px) * 0.563))); justify-content: center; gap: 14px 18px; border: 0; }
:root body.t78 .t-pictures .t-option { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 0 0 6px; text-align: center; border: 0; }
.t-pictures .t-canvas { aspect-ratio: 921 / 1636; }
.t-pictures .t-key { order: 2; }
.t-pictures .t-option-name { order: 3; font-size: 1.05rem; }
.t-pictures .t-option-name:empty { display: none; }
.t-pictures .t-mark { order: 4; }
:root body.t78 .t-pictures .t-option.t-right { background: none; box-shadow: 0 0 0 2px var(--gold-hot), 0 0 34px rgba(233, 189, 78, 0.45); }

.t-feedback { margin-top: 20px; }
.t-verdict { margin: 0; font-family: var(--label78); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-hot); }
.t-why { margin: 8px 0 0; font-size: 1.22rem; line-height: 1.4; }
.t-note { margin: 8px 0 0; font-size: 0.95rem; font-style: italic; color: rgba(243, 234, 210, 0.66); }
.t-detail { width: min(240px, 60%); margin-top: 12px; }
.t-detail:empty { display: none; }
.t-detail .t-canvas { max-height: 190px; width: auto; max-width: 100%; border: 1px solid var(--gold); }
.t-feedback .t-after { justify-content: flex-start; margin-top: 18px; }
.t-picking .t-feedback { max-width: 40em; margin-inline: auto; }
.t-picking .t-feedback .t-after { justify-content: center; }

/* a card comes into view; a right answer lets light across it */
.t-enter .t-art, .t-enter .t-ask { animation: t-in 0.28s ease backwards; }   /* nothing is left on them afterwards, so the phone's Next bar stays fixed to the window */
@keyframes t-in { from { opacity: 0; translate: 0 8px; } }
.t-lit { animation: t-lit 1.3s ease-out; }
@keyframes t-lit { 0% { box-shadow: 0 0 0 rgba(255, 223, 138, 0); filter: brightness(1); } 28% { box-shadow: 0 0 0 2px var(--gold-hot), 0 0 70px rgba(255, 223, 138, 0.7); filter: brightness(1.12); } 100% { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8); filter: brightness(1); } }

/* ---------- the end of a session ---------- */
.t-score { margin: 14px 0 0; font-family: var(--label78); font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.t78 .t-gain { margin-top: 34px; }
:root body.t78 :is(.t-gain h3, .t-group h3) { margin: 0; font-family: var(--label78); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-hot); }
.t-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; margin-top: 14px; }
.t-mini { width: 96px; padding: 0; font: inherit; font-size: 0.98rem; line-height: 1.2; color: var(--ink); background: none; border: 0; cursor: pointer; }
.t-mini > span:last-child { display: block; margin-top: 8px; }
.t-gain-large .t-mini { width: min(190px, 42vw); }
.t-gain .t-tile { animation: t-rise 0.7s ease backwards; }
@keyframes t-rise { from { opacity: 0; filter: grayscale(1) brightness(0.3); translate: 0 10px; } }

/* ---------- the collection ---------- */
.t-legend { display: flex; justify-content: center; gap: clamp(12px, 4vw, 44px); margin: 26px 0 0; padding: 0; list-style: none; }
.t-legend li { display: flex; flex-direction: column; align-items: center; width: 74px; }
.t-legend .t-tile { width: 46px; }
.t-legend b { margin-top: 4px; font-family: var(--display, "Poiret One"), sans-serif; font-size: 1.6rem; font-weight: 400; color: var(--gold-hot); line-height: 1.1; }
.t-legend li > span:last-child { font-family: var(--label78); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; }
.t-knowledge { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 26px; max-width: 920px; margin: 30px auto 0; text-align: left; }
.t-knowledge dt { font-family: var(--label78); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.t-knowledge dd { margin: 4px 0 8px; font-size: 1rem; }
.t-hair { display: block; height: 2px; background: linear-gradient(90deg, var(--gold-hot) var(--b), rgba(233, 189, 78, 0.55) var(--b) var(--a), rgba(233, 189, 78, 0.18) var(--a)); }
:root body.t78 .t-group { margin: 40px 0 0; padding: 0; background: none; }
.t-group-head p { margin: 6px 0 0; font-size: 1.02rem; font-style: italic; color: rgba(243, 234, 210, 0.76); }
.t-arcana { padding-top: 26px !important; border-top: 1px solid var(--hair78); }
.t-arcana + .t-group { margin-top: 24px !important; }
@media (max-width: 480px) { .t-legend { gap: 6px !important; } .t-legend li { width: 80px !important; } .t-legend li > span:last-child { font-size: 0.5rem !important; letter-spacing: 0.1em !important; } }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 14px; margin: 18px 0 0; padding: 0; list-style: none; }
@media (min-width: 1000px) { .t-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 22px 22px; max-width: 980px; margin-inline: auto; } .t-group:first-child .t-grid { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 20px 14px; max-width: none; } }
.t-cell { display: block; width: 100%; padding: 0; font: inherit; color: var(--ink); background: none; border: 0; cursor: pointer; }
.t-cell .t-tile { transition: translate 0.2s; }
@media (hover: hover) { .t-cell:hover .t-tile { translate: 0 -4px; } .t-cell:hover .t-s0 { filter: brightness(0.9); } }
.t-name { display: block; font-size: 0.95rem; line-height: 1.18; text-wrap: balance; }
.t-flag { display: block; font-family: var(--label78); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-hot); }
.t-flag:empty { display: none; }
.t-only li:not(.t-needs) { opacity: 0.18; }
.t-filter { margin-top: 28px; }
.t-more { max-width: 720px; margin: 26px auto 0; text-align: left; border-top: 1px solid var(--hair78); }
.t-more summary { padding: 16px 0 8px; text-align: center; font-family: var(--label78); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); cursor: pointer; }
.t-more p { margin: 12px 0 0; }
.t-rules { margin: 6px 0 0; }
.t-rules div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair78); }
.t-rules dt { color: var(--gold-hot); font-weight: 600; }
.t-rules dd { margin: 0; }
.t-data { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; }
.t-file { position: relative; overflow: hidden; }
.t-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.t-file:focus-within { outline: 2px solid var(--gold-hot); outline-offset: 3px; }

/* ---------- dialogs ---------- */
.t-dialog { padding: 0; color: var(--ink); background: #060504; border: 1px solid var(--gold); }
.t-dialog::backdrop { background: rgba(0, 0, 0, 0.9); }
.t-card { width: min(940px, calc(100vw - 20px)); max-width: none; max-height: calc(100svh - 20px); overflow: hidden; }
.t-card[open] { display: flex; flex-direction: column; }
.t-close { position: absolute; top: 4px; right: 6px; z-index: 2; width: 44px; height: 44px; font: inherit; font-size: 2rem; line-height: 1; color: var(--gold-hot); background: rgba(0, 0, 0, 0.75); border: 0; cursor: pointer; }
.t-card-in { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 30px; align-items: start; padding: 26px; overflow-y: auto; overscroll-behavior: contain; }
.t-card-pic { position: sticky; top: 0; display: block; width: 100%; padding: 0; background: none; border: 0; cursor: zoom-in; }
.t-card-pic .t-canvas { aspect-ratio: 921 / 1636; }
.t-card-text { text-align: left; }
.t-kicker { margin: 0; font-family: var(--label78); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
:root body.t78 .t-card h2 { margin: 8px 0 0; text-align: left; font-size: clamp(1.7rem, 1rem + 2.4vw, 2.6rem); }
.t-card-stage { margin: 10px 0 0; font-style: italic; color: var(--gold-hot); }
.t-card-know { margin: 10px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hair78); }
.t-card-know li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0 4px; font-size: 1rem; border-bottom: 1px solid var(--hair78); }
.t-card-know b { font-weight: 600; color: var(--gold); text-align: right; }
:root body.t78 .t-card h3 { margin: 22px 0 6px; font-family: var(--label78); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.t-card-text div p { margin: 0 0 0.7em; font-size: 1.14rem; line-height: 1.45; }
.t-card-text .t-after { justify-content: flex-start; }

.t-zoom { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; border: 0; background: #000; }
.t-zoom[open] { display: flex; flex-direction: column; }
.t-zoom-bar { display: flex; justify-content: center; gap: 12px; padding: 10px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.t-zoom-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; text-align: center; padding: 0 8px 12px; }
.t-zoom-scroll .t-canvas { height: 100%; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; cursor: zoom-in; }
.t-closer .t-zoom-scroll .t-canvas { height: auto; width: max(180%, 720px); max-width: none; cursor: zoom-out; }
@media (min-width: 900px) { .t-closer .t-zoom-scroll .t-canvas { width: min(921px, 86vw); } }

.t-confirm { width: min(460px, calc(100vw - 28px)); padding: 26px 22px; text-align: center; }
:root body.t78 .t-confirm h2 { font-size: 1.4rem; }
.t-confirm p { margin: 14px 0 0; }

/* ---------- phones, upright: the card first and large, answers under the thumb ---------- */
@media (max-width: 760px) {
  .t78.t-practising main { padding-inline: 16px; }
  .t-knowledge { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 12px 9px; }
  .t-name { display: none; }                      /* the name is still read aloud, and shown on opening the card */
  .t-pips { gap: 5px; padding-top: 6px; }
  .t-pips i { width: 5px; height: 5px; }
  .t-flag { font-size: 0.5rem; letter-spacing: 0.1em; }
  .t-card-in { display: block; padding: 18px 16px; }
  .t-card-pic { position: static; width: min(300px, 78%); margin: 0 auto 20px; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .t-bar { grid-template-columns: auto 1fr auto; gap: 8px; }
  .t-count { font-size: 1.15rem; }
  .t-cat { font-size: 0.56rem; letter-spacing: 0.14em; }
  .t-bar-end { gap: 6px; }
  .t-stage, .t-stage.t-no-art, .t-stage.t-picking { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; min-height: 0; padding-top: 10px; }
  .t-art { --h: clamp(250px, calc(100svh - 440px), 560px); width: calc(var(--h) * 0.563); max-width: 100%; align-self: center; }
  .t-art .t-frame-detail { width: min(100vw - 32px, 360px); margin-left: 50%; translate: -50% 0; }
  .t-frame-detail .t-canvas { max-height: 38svh; }
  .t-tap { display: none; }
  .t-describe summary { padding: 4px 0; font-size: 0.88rem; }
  .t-ask { align-self: stretch; }
  :root body.t78 .t-question { margin-top: 4px; text-align: center; font-size: 1.36rem; }
  .t-passage { margin-top: 8px; padding: 12px 0; font-size: 1.24rem; }
  .t-passage.t-desc { font-size: 1.1rem; }
  .t-options { margin-top: 10px; }
  :root body.t78 .t-option { min-height: 52px; padding-block: 8px 7px; font-size: 1.1rem; line-height: 1.22; }
  :root body.t78 .t-options.t-pictures { grid-template-columns: repeat(2, minmax(0, calc((100svh - 330px) * 0.2815))); gap: 8px 14px; }
  :root body.t78 .t-pictures .t-option { min-height: 0; }
  .t-pictures .t-option-name { font-size: 0.92rem; }
  .t-feedback { padding-bottom: 84px; }
  /* Next stays under the thumb however long the explanation is */
  .t-feedback .t-after { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; flex-wrap: nowrap; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(4, 3, 2, 0.97); border-top: 1px solid var(--gold); }
  :root body.t78 .t-feedback .t-btn-main { flex: 1; padding-inline: 12px; }
  .t-feedback .t-link { font-size: 1rem; white-space: nowrap; }
}
@media (max-width: 760px) and (orientation: portrait) and (min-height: 700px) {
  .t-art { --h: clamp(290px, calc(100svh - 414px), 560px); }
}
@media (min-width: 761px) and (min-height: 521px) { .t-art:has(.t-frame-detail) { width: min(44vw, 540px); } }
@media (max-width: 480px) {
  :root body.t78 .t-home h1 { font-size: 4rem; letter-spacing: 0.08em; }
  .t-mosaic { margin-top: 22px; gap: 3px; }
  .t-actions { gap: 10px; }
  .t-home .t-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
  .t-legend li { width: 68px; }
  .t-rules div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
/* phones on their side: card on the left, the question beside it */
@media (orientation: landscape) and (max-height: 520px) {
  .t-bar { padding: 2px 0; }
  .t-count { font-size: 1.1rem; }
  .t-stage { align-items: start; min-height: 0; column-gap: 22px; padding-top: 8px; grid-template-columns: auto minmax(0, 1fr); }
  .t-art { --h: calc(100svh - 80px); position: sticky; top: 6px; max-width: 34vw; }
  .t-tap, .t-describe summary { font-size: 0.8rem; }
  .t-tap { display: none; }
  .t-ask { align-self: start; }
  :root body.t78 .t-question { font-size: 1.18rem; }
  .t-passage { margin-top: 6px; padding: 7px 0; font-size: 1.05rem; }
  .t-options { margin-top: 8px; }
  :root body.t78 .t-option { min-height: 44px; padding-block: 5px 4px; font-size: 1.02rem; line-height: 1.18; }
  .t-stage.t-no-art { grid-template-columns: minmax(0, 640px); }
  .t-stage.t-picking { grid-template-columns: minmax(0, 1fr); }
  :root body.t78 .t-options.t-pictures { grid-template-columns: repeat(4, minmax(0, calc((100svh - 196px) * 0.563))); gap: 6px 10px; }
  .t-pictures .t-option-name { font-size: 0.82rem; line-height: 1.1; }
}

/* the smallest phones: a smaller card and closer answers (the card still opens full size with a touch) */
@media (max-width: 760px) and (orientation: portrait) and (max-height: 620px) {
  .t-art { --h: 190px; }
  .t-describe summary { padding: 2px 0; font-size: 0.8rem; }
  :root body.t78 .t-question { font-size: 1.12rem; }
  .t-passage { margin-top: 4px; padding: 6px 0; font-size: 1.04rem; }
  .t-options { margin-top: 6px; }
  :root body.t78 .t-option { min-height: 46px; padding-block: 4px 3px; font-size: 0.98rem; line-height: 1.16; }
}

@media (prefers-reduced-motion: reduce) {
  .t-enter .t-art, .t-enter .t-ask, .t-lit, .t-gain .t-tile { animation: none; }
  .t-canvas, .t-cell .t-tile, :root body.t78 .t-option, :root body.t78 .t-btn { transition: none; }
}
@media (forced-colors: active) {
  .t-pips i { forced-color-adjust: none; }
  :root body.t78 .t-option.t-right { outline: 3px solid Highlight; outline-offset: -3px; }
}

/* ---------- the entrance, tightened: the way in should be on the first screen ---------- */
.t-mosaic .t-s0 { filter: brightness(1.05) saturate(1.05); box-shadow: inset 0 0 0 1px rgba(233, 189, 78, 0.28); }
.t-mosaic .t-tile::after { box-shadow: inset 0 0 0 1px var(--gold); }
.t-legend .t-s0 { filter: brightness(1); }
@media (max-width: 760px) and (orientation: portrait) {
  :root body.t78 .t-home h1 { font-size: clamp(3rem, 15vw, 4rem); margin-top: 0; }
  .t-home .t-sub { margin-top: 8px; }
  .t-home .t-line { margin-top: 8px; font-size: 1.12rem; }
  .t-home .t-mosaic { width: min(100%, calc((100svh - 560px) * 1.35), 440px); min-width: 224px; margin-top: 14px; gap: 3px; }
  .t-home .t-tally { margin-top: 10px; font-size: 0.64rem; }
  .t-home .t-actions { margin-top: 14px; gap: 6px; }
  :root body.t78 .t-home .t-btn { min-height: 48px; padding-block: 11px 10px; }
}

/* short phones: the way in comes before the little deck */
@media (orientation: portrait) and (max-width: 760px) and (max-height: 700px) {
  .t-home:not([hidden]) { display: flex; flex-direction: column; align-items: center; }
  .t-home .t-actions { order: 1; width: 100%; }
  .t-home .t-mosaic { order: 2; width: 100%; max-width: 330px; margin-top: 22px; }
  .t-home .t-tally { order: 3; }
  .t-home .t-quiet { order: 4; }
}

/* ---------- headings stand well clear of the line under the menu ---------- */
:root body.t78 .t-view:not(.t-home):not(.t-practice) { padding-top: 18px; }
/* the title, set like "The journey" in the Library */
:root body.t78 .t-view.t-home h1 { font-family: "Poiret One", "Josefin Sans", "Futura", sans-serif; font-weight: 700; letter-spacing: 0.08em; line-height: 1.12; color: var(--gold); background: none; -webkit-text-fill-color: currentColor; -webkit-text-stroke: 0.6px var(--gold); filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.65)); font-size: clamp(1.7rem, 1rem + 2vw, 2.6rem); }
@media (min-width: 821px) { :root body.t78 .t-view.t-home h1 { letter-spacing: 0.14em; } }
