/* The tutorial (ui.js showTutorial) in the World's new look (owner, 2026-11-13, with a shot of its card hunt page: "can
   we make this with the new style of the world ?"): full screen like the Class Hall that opens after it (ui.js .wd-modal
   and the Wardrobe's .wd-* kit in world.css), over the start screen's painting of ZAZA Town at dusk (assets/start/), the
   top bar with the pages as its tabs, the title in the plate's gold under small gold capitals, the pictures in dark glass
   panels with a thin gold edge, and the big word at the bottom like PLAY and CHOOSE WARRIOR. The pages' own rules
   (world.css .tut-*, hunt.css, faucet.css) stay for the level 10 window and Kingdom Isles' guide; here they're scoped
   under .tutx. */
.modal.wd-modal:has(.tutx) { overflow: hidden; padding-bottom: 0; }
.tutx { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100dvh; isolation: isolate; }
.tutx > .wd-top { flex: none; }
.tutx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #1c1630; }
.tutx-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.tutx-bg::after { content: ""; position: absolute; inset: 0; background:
    radial-gradient(ellipse 72% 78% at 50% 46%, rgba(6, 9, 30, 0.5), rgba(6, 9, 30, 0.8) 76%),
    linear-gradient(0deg, rgba(6, 9, 30, 0.8), rgba(6, 9, 30, 0) 34%); }
.tutx-tabs img { flex: none; width: 22px; height: 22px; image-rendering: pixelated; }
.tutx .cw-tabs button { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }

/* the page between the top bar and the word: centred, the word always on screen. A page taller than the screen scrolls
   by itself above the word, so the word never lies over its words (on phones it did: the NEXT over the last line). */
.tutx-main { flex: 1 1 0; min-height: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; padding-top: 14px; }
.tutx-page { flex: 1 1 0; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: safe center; width: 100%; padding: 0 max(20px, (100% - 1200px) / 2) 6px; color: #e2e6fa; }
.tutx-page > * { flex: none; width: 100%; box-sizing: border-box; }
.tutx .tutx-page .tut-kicker { width: fit-content; margin: 0 auto 8px !important; padding: 0; border: 0; border-radius: 0; background: none; color: var(--tan); font: 400 13px/1 var(--display) !important; letter-spacing: 0.32em; text-transform: uppercase; text-shadow: 0 1px 2px #000; }
.tutx .tutx-page h2 { width: auto; max-width: 900px; margin: 0 auto; font: 400 44px/1.08 var(--display); background: linear-gradient(180deg, #fff6c8, #ffd23f 52%, #dc9a1c); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 0 rgba(40, 20, 0, 0.75)) drop-shadow(0 0 14px rgba(0, 0, 0, 0.55)); text-wrap: balance; }
.tutx .tutx-page .wd-orn { display: block; flex: none; width: 190px; margin: 8px auto 0; }

/* the panels: dark glass, a thin gold edge */
.tutx .tut-tiles { width: 100%; max-width: 820px; margin: 18px auto 0; gap: 14px; }
.tutx .tut-tiles-4 { max-width: 1000px; }
.tutx .tut-tiles-5 { max-width: 1120px; }
.tutx .tut-tiles li, .tutx .tut-go, .tutx .tut-turn { border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(180deg, rgba(12, 16, 44, 0.9), rgba(7, 10, 30, 0.9)); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 240, 200, 0.06); backdrop-filter: blur(4px); }
.tutx .tut-tiles li { gap: 4px; padding: 8px 8px 12px; }
.tutx .tut-pic { border: 1px solid rgba(232, 196, 106, 0.3); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45); }
.tutx .tut-tiles li > b { margin-top: 6px; color: #fff3d6; font: 400 19px/1.05 var(--display); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }
.tutx .tut-tiles li > b > i { width: 22px; height: 22px; box-sizing: border-box; border: 1px solid var(--tan); background: rgba(232, 196, 106, 0.14); color: var(--gold); font: 400 13px/1 var(--display); text-shadow: none; }
.tutx .tut-tiles li > small { color: var(--soft); font-size: 15px; line-height: 1.2; }
.tutx .tut-tiles li.done { opacity: 1; border-color: rgba(95, 214, 120, 0.55); }
.tutx .tut-tiles li.done .tut-pic { filter: saturate(0.55) brightness(0.75); }
.tutx .tut-tiles li.done > b > i { border-color: var(--green); background: var(--green); color: #0b1a3a; }

/* one line under the pictures: a slim glass pill */
.tutx .tut-rule { width: fit-content; max-width: min(760px, 100%); box-sizing: border-box; margin: 16px auto 0 !important; padding: 7px 16px 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6, 10, 32, 0.8); color: #e2e6fa; font-size: 16px; line-height: 1.3; }
.tutx .tut-rule b { color: var(--gold); font-weight: 400; }

/* page 1: the packs on gold rays, no box round them */
.tutx .tut-hunt-hero { max-width: 900px; padding: 0; overflow: visible; overflow-x: clip; border: 0; border-radius: 0; background: none; box-shadow: none; }
.tutx .tut-hunt-hero::after { display: none; }
.tutx .tut-hunt-hero h2 { max-width: 900px; font-size: 44px; }
.tutx .tut-packs { height: 170px; max-width: 520px; margin-top: 20px; }
.tutx .tut-hunt-hero + .tut-tiles { max-width: 760px; }
.tutx .tut-rays { background: repeating-conic-gradient(rgba(255, 226, 140, 0.2) 0deg 6deg, transparent 6deg 15deg); }
.tutx .tut-cc-mini, .tutx .tut-hunt-status { display: inline-flex; vertical-align: middle; margin: 10px 4px 0 !important; border-color: var(--line); background: rgba(6, 10, 32, 0.8); } /* side by side under the packs */
.tutx .tut-cc-mini { height: 28px; box-sizing: border-box; }
.tutx .tut-cc-mini small { color: var(--tan); }
.tutx .tut-hunt-status { color: #e2e6fa; }
.tutx .tut-hunt-status.is-next, .tutx .tut-hunt-status.is-wait { border-color: rgba(255, 210, 63, 0.5); color: #fff0ae; }
.tutx .tut-hunt-status.is-soon, .tutx .tut-hunt-status.is-starting, .tutx .tut-hunt-status.is-dropping { border-color: rgba(127, 212, 255, 0.5); color: #d6f0ff; }

/* page 2: the phone turning sideways */
.tutx .tut-turn { max-width: 560px; margin-top: 12px; }
.tutx .tut-turn p { color: var(--soft); }
.tutx .tut-turn p b { font-family: var(--display); font-weight: 400; }

/* page 3: Pip, ➜ Go and the faucet */
.tutx .tut-pip { max-width: 760px; margin: 16px auto 0; }
.tutx .tut-pip img { border: 1px solid var(--line); border-radius: 4px; background: rgba(6, 10, 32, 0.85); }
.tutx .tut-pip p { border: 1px solid var(--line); border-radius: 6px; background: rgba(12, 16, 44, 0.94); color: #e2e6fa; }
.tutx .tut-pip p::before { border-right-color: rgba(232, 196, 106, 0.6); filter: none; }
.tutx .tut-go { padding: 10px 16px 14px; }
.tutx .tut-go p { color: var(--soft); }
.tutx .tut-free { max-width: 760px; box-sizing: border-box; border: 1px solid rgba(255, 210, 63, 0.6); border-radius: 4px;
  background: radial-gradient(90% 160% at 6% 50%, rgba(255, 210, 63, 0.16), transparent 60%), linear-gradient(180deg, rgba(12, 16, 44, 0.92), rgba(7, 10, 30, 0.92)); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 210, 63, 0.16); }
.tutx .tut-free-text > small { color: var(--tan); }
.tutx .tut-free-steps li { background: rgba(6, 10, 32, 0.85); }

.tutx-row { display: grid; gap: 14px; max-width: 760px; margin: 14px auto 0; }
.tutx .tutx-row > .tut-go, .tutx .tutx-row > .tut-free { width: auto; max-width: none; margin: 0; }
@media (min-width: 1000px) { .tutx-row:has(> .tut-free) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1120px; } }

/* the word, and Skip / Back / Don't show again under it */
.tutx .tutx-go { position: relative; z-index: 3; flex: none; width: 100%; padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(0deg, rgba(6, 9, 30, 0.9), rgba(6, 9, 30, 0.62) 58%, rgba(6, 9, 30, 0)); }
.tutx .wd-word { font-size: clamp(34px, 3.4vw, 50px); }
.tutx .wd-go > p.tutx-more { gap: 8px 10px; }
.tutx-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6, 10, 32, 0.78); color: var(--soft); font: 400 13px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.tutx-btn:hover, .tutx-btn:focus-visible { border-color: var(--tan); color: #fff3c4; }
.tutx .wd-key kbd { margin-left: 6px; }

/* a short computer screen: everything a little tighter */
@media (min-width: 761px) and (max-height: 820px) {
  .tutx-main { padding-top: 6px; }
  .tutx .tutx-page .tut-kicker { margin-bottom: 6px !important; }
  .tutx .tutx-page .wd-orn { margin-top: 6px; }
  .tutx .tut-tiles li { padding: 6px 6px 9px; }
  .tutx .tutx-page h2, .tutx .tut-hunt-hero h2 { font-size: 38px; }
  .tutx .tut-tiles { margin-top: 14px; }
  .tutx .tut-packs { height: 162px; margin-top: 16px; }
  .tutx .tutx-go { padding-top: 6px; padding-bottom: 10px; }
  .tutx .wd-go { gap: 5px; }
}
@media (min-width: 761px) and (max-height: 760px) {
  .tutx .tut-tiles .tut-pic { aspect-ratio: 16 / 9; }
  .tutx .tut-packs { zoom: 0.86; }
  .tutx .tutx-page h2, .tutx .tut-hunt-hero h2 { font-size: 34px; }
  .tutx .tut-pip { margin-top: 10px; }
  .tutx .tut-tiles, .tutx-row { margin-top: 10px; }
  .tutx .tut-free { padding-top: 7px; padding-bottom: 7px; }
}
@media (min-width: 761px) and (max-height: 680px) {
  .tutx .tut-tiles .tut-pic { aspect-ratio: 5 / 2; }
  .tutx .tut-packs { zoom: 0.74; }
}
@media (min-width: 761px) and (max-height: 620px) { .tutx .tutx-page .wd-orn { display: none; } .tutx .tut-packs { zoom: 0.62; margin-top: 10px; } }

/* phones, and tablets held upright: the tabs on their own row, three across */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .tutx .wd-top { padding-right: 10px; } /* the tabs' row runs under the ✕ */
  .tutx .cw-tabs.top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tutx .cw-tabs.top > button, .tutx .cw-tabs.top > button:nth-child(n + 5) { grid-column: auto; gap: 5px; }
  .tutx-tabs img { width: 18px; height: 18px; }
  .tutx .cw-tabs.top > button { font-size: 13px; }
  .tutx .cw-tabs.top > button { font-size: 13px; }
  .tutx-main { padding-top: 12px; }
  .tutx-page { padding: 0 12px 6px; }
  .tutx .tutx-page .tut-kicker { margin-bottom: 6px !important; font-size: 10px !important; letter-spacing: 0.24em; }
  .tutx .tutx-page h2, .tutx .tut-hunt-hero h2 { font-size: 25px; }
  .tutx .tutx-page .wd-orn { width: 150px; margin-top: 6px; }
  .tutx .tut-tiles { gap: 8px; margin-top: 12px; }
  .tutx .tut-tiles li { padding: 5px 5px 8px; }
  .tutx .tut-tiles li > b { margin-top: 4px; font-size: 14px; }
  .tutx .tut-tiles li > b > i { width: 17px; height: 17px; font-size: 10px; }
  /* the title wraps beside its number, not in a column next to it: "Win a real card" in two lines, not three */
  .tutx .tut-tiles li > b { display: block; text-align: center; text-wrap: balance; }
  .tutx .tut-tiles li > b > i { display: inline-grid; margin-right: 5px; vertical-align: 1px; }
  .tutx .tut-tiles li > small { font-size: 12px; }
  .tutx .tut-packs { height: 156px; margin-top: 14px; }
  .tutx .tut-rule { margin-top: 12px !important; padding: 6px 12px 5px; border-radius: 14px; font-size: 13px; }
  .tutx .tut-pip { margin-top: 12px; }
  .tutx .tut-go { margin-top: 10px; padding: 8px 10px 10px; }
  .tutx .tutx-go { padding: 8px 0 calc(20px + env(safe-area-inset-bottom, 0px)); }
  .tutx .wd-word { font-size: 27px; line-height: 1.2; }
  /* the word clear of Skip / Don't show again under it: Safari draws this font taller than its line (owner, 2026-11-15, an
     iPhone shot of NEXT on the buttons: "on mobile.. the next its too close to the rest of the bottom text") */
  .tutx .wd-go { gap: 7px; } /* (owner, the next day: "move the next button slightly higher looks too far now": a little closer, all of it a little higher) */
  .tutx-btn { height: 28px; padding: 0 12px; font-size: 11px; }
  .tutx-row { gap: 8px; margin-top: 10px; }
  .tutx-page:has(.tut-free) .wd-orn { display: none; }
  .tutx-page:has(.tut-free) .tut-pip, .tutx-page:has(.tut-free) .tut-tiles { margin-top: 8px; }
  .tutx-page:has(.tut-free) .tut-quest .tut-pic { aspect-ratio: 5 / 2; }
  .tutx-page:has(.tut-free) .tut-pip p { font-size: 13px; }
  /* the words a size smaller all through (owner, 2026-11-16, an iPhone shot of the card hunt page: "on mobile the text feels
     a little too big") */
  .tutx .tut-hunt-status { font-size: 13px !important; }
  .tutx .tut-cc-mini b { font-size: 13px; }
  .tutx .tut-turn p { font-size: 13px; }
  .tutx .tut-turn p b { font-size: 15px; }
  .tutx .tut-pip p { font-size: 14px; }
  .tutx .tut-go p { font-size: 13px; }
  .tutx .tut-go p b { font-size: 15px; }
  .tutx .tut-free-text > b { font-size: 17px; }
  .tutx .tut-free-text > span { font-size: 12px; }
  .tutx .tut-free-steps li { font-size: 11px; }
}
@media (max-width: 760px) and (max-height: 799px) {
  .tutx-main { padding-top: 8px; }
  .tutx .tutx-page h2, .tutx .tut-hunt-hero h2 { font-size: 22px; }
  .tutx .tutx-page .wd-orn { margin-top: 4px; }
  .tutx .tut-packs { zoom: 0.74; margin-top: 8px; }
  .tutx .tut-cc-mini, .tutx .tut-hunt-status { margin-top: 6px !important; }
  .tutx .tut-tiles .tut-pic { aspect-ratio: 2 / 1; }
  .tutx .tut-tiles-4 .tut-pic, .tutx .tut-quest .tut-pic { aspect-ratio: 5 / 2; }
  .tutx .tut-tiles-4 .tut-menu { font-size: 11.5px; line-height: 1.25; }
  .tutx .tut-tiles { margin-top: 8px; }
  .tutx .tut-turn { margin-top: 8px; }
  .tutx .tut-rule { margin-top: 8px !important; }
  .tutx .tutx-go { padding: 4px 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
  .tutx .wd-go { gap: 6px; }
  .tutx .wd-word { font-size: 24px; }
}
@media (max-width: 760px) and (max-height: 720px) {
  .tutx-main { padding-top: 6px; }
  .tutx .tutx-page .wd-orn { display: none; }
  .tutx .tut-tiles li { padding-bottom: 6px; }
  .tutx .tut-phone { zoom: 0.8; }
  .tutx .tut-packs { zoom: 0.68; }
}
@media (max-width: 380px) { .tutx .tut-rule { padding-inline: 10px; font-size: 12px; } }
/* held upright: the word right under the page, the two together in the middle of the room under the top bar. At the
   bottom it sat far under a short page (owner, 2026-11-16, an iPhone shot of the card hunt page: "the next button is too
   low"); a page taller than the room still scrolls above it, the word on screen under it. */
@media (max-width: 1100px) and (orientation: portrait) {
  .tutx-main { flex: 0 1 auto; margin-block: auto; }
  .tutx-page { flex: 0 1 auto; }
  .tutx .tutx-go { background: none; }
}

/* a phone on its side: the page scrolls between the top bar and the word */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 561px) {
  .tutx-main { padding-top: 8px; }
  .tutx-page { padding: 0 max(54px, var(--sw-r, 0px)) 6px max(14px, var(--sw-l, 0px)); }
  .tutx .tutx-page h2, .tutx .tut-hunt-hero h2 { font-size: 24px; }
  .tutx .tutx-page .tut-kicker { margin-bottom: 4px !important; font-size: 10px !important; }
  .tutx .tutx-page .wd-orn { display: none; }
  .tutx .tut-tiles { margin-top: 8px; gap: 8px; }
  .tutx .tut-packs { height: 162px; margin-top: 10px; }
  .tutx .tutx-go { padding: 6px 0 calc(6px + var(--sw-b, 0px)); border-top: 1px solid rgba(232, 196, 106, 0.22); background: #070a22; }
  .tutx .wd-go { gap: 3px; }
  .tutx .wd-word { font-size: 22px; }
  .tutx-btn { height: 26px; font-size: 11px; }
}

/* 🎙 Pip's voice (tut-voice.js; owner, 2026-11-14: "add voice to the initial tutorials, to best explain everything and get
   people excited"): his chip beside the top bar's name, and the gold ring that rests on what he's talking about (the rest of
   the page dims behind it; the top bar stays bright so the chip can stop him) */
.tutx-voice { display: inline-flex; flex: none; align-items: center; gap: 7px; box-sizing: border-box; height: 36px; padding: 0 14px 0 4px; border: 2px solid var(--gold); border-radius: 999px; background: rgba(4, 10, 40, 0.6); color: var(--gold); font: 400 15px/1 var(--display); white-space: nowrap; cursor: pointer; }
.tutx-voice img { width: 26px; height: 26px; border-radius: 50%; background: #3e7bd9; image-rendering: pixelated; object-fit: cover; object-position: 50% 0; }
.tutx-voice b { font-weight: 400; }
.tutx-voice:hover, .tutx-voice:focus-visible { background: rgba(255, 210, 63, 0.16); outline: none; }
.tutx-voice.off { border-color: rgba(255, 255, 255, 0.35); color: #b9c3e6; }
.tutx-voice.ask { animation: tutxAsk 1.1s ease-in-out infinite; }
@keyframes tutxAsk { 50% { box-shadow: 0 0 0 6px rgba(255, 210, 63, 0.35); } }
.tutx-eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.tutx-voice.talking .tutx-eq { display: inline-flex; }
.tutx-eq i { width: 3px; height: 35%; border-radius: 1px; background: currentColor; animation: tutxEq 0.5s ease-in-out infinite; }
.tutx-eq i:nth-child(2) { animation-delay: 0.15s; }
.tutx-eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tutxEq { 50% { height: 100%; } }
.tutx-ring { position: fixed; z-index: 4; left: 0; top: 0; width: 0; height: 0; border-radius: 16px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 3px var(--gold), 0 0 22px 5px rgba(255, 210, 63, 0.6), 0 0 0 100vmax rgba(4, 8, 28, 0.42);
  transition: left 0.38s cubic-bezier(0.3, 1, 0.4, 1), top 0.38s cubic-bezier(0.3, 1, 0.4, 1), width 0.38s cubic-bezier(0.3, 1, 0.4, 1), height 0.38s cubic-bezier(0.3, 1, 0.4, 1), opacity 0.25s ease; }
.tutx-ring.on { opacity: 1; }
.tutx-ring.rest { animation: tutxRing 1s ease-in-out infinite; }
@keyframes tutxRing { 50% { box-shadow: 0 0 0 5px var(--gold), 0 0 30px 9px rgba(255, 210, 63, 0.8), 0 0 0 100vmax rgba(4, 8, 28, 0.42); } }
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) { .tutx-voice { height: 32px; padding-right: 12px; font-size: 14px; } .tutx-voice img { width: 23px; height: 23px; } }
@media (prefers-reduced-motion: reduce) { .tutx-ring { transition: opacity 0.2s ease; } .tutx-ring.rest, .tutx-eq i, .tutx-voice.ask { animation: none; } }
