/* Illustrated quick start. Header/footer stay reachable while the story scrolls. */
body.guide-open { overflow: hidden; }
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  height: var(--app-height);
  display: grid;
  place-items: center;
  padding: calc(12px + var(--app-inset-top)) calc(12px + var(--app-inset-right))
    calc(12px + var(--app-inset-bottom)) calc(12px + var(--app-inset-left));
  background: #021439dc;
}
.guide-overlay[hidden] { display: none; }
.quick-guide {
  width: min(100%, 820px);
  max-height: calc(var(--app-height) - var(--app-inset-top) - var(--app-inset-bottom) - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px;
  border: 3px solid var(--ui-ink);
  border-radius: 24px;
  background: radial-gradient(ellipse at 0 0, #119fff, transparent 55%), linear-gradient(140deg, #075af1, #0538ae);
  box-shadow: inset 0 0 0 3px #168bff, 0 5px var(--ui-ink);
}
.guide-header { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 4px 2px 12px; }
.guide-header > div { flex: 1; min-width: 0; text-align: center; }
.guide-header h2 { margin: 0; font-size: clamp(27px, 5vw, 48px); line-height: 1.1; text-transform: uppercase; -webkit-text-stroke-width: 5px; text-shadow: 0 4px var(--ui-ink); }
.guide-subtitle { display: block; margin-top: 6px; color: #8ce8ff; font-size: clamp(14px, 2.7vw, 22px); line-height: 1.2; }
.guide-close.ui-button { width: 48px; height: 48px; padding: 0; flex-shrink: 0; border-width: 3px; border-radius: 13px; background: linear-gradient(135deg, #ff7882, #ff2858 70%); box-shadow: inset 2px 2px #ffc4c8, inset -2px -4px #bb1244, 0 4px var(--ui-ink); }
.guide-close .ui-icon { width: 32px; height: 32px; stroke-width: 4px; filter: drop-shadow(0 2px 0 var(--ui-ink)); }
.guide-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 8px; scrollbar-width: thin; scrollbar-color: #56b6ff #073caa; }
.guide-content:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
.guide-intro { position: relative; display: flex; align-items: center; justify-content: center; min-height: 148px; gap: 4px; isolation: isolate; }
.guide-intro::before { content: ''; position: absolute; inset: 14px 0 10px; z-index: -1; border-radius: 24px; background: radial-gradient(ellipse at 20% 70%, #1684ff, #0747b4 70%); }
.guide-mascot { width: 52%; max-width: 245px; align-self: end; }
.guide-coach { display: block; width: 100%; height: auto; }
.guide-speech { position: relative; width: 48%; max-width: 275px; margin: 0 4px 12px 0; padding: 12px 10px; border: 3px solid var(--ui-ink); border-radius: 24px 25px 25px 6px; color: var(--ui-ink); background: linear-gradient(130deg, #fff575, #ffce35); box-shadow: inset 2px 3px #fff6b1, 0 4px var(--ui-ink); font: 900 clamp(17px, 3vw, 26px)/1.15 var(--ui-font-display); text-align: center; transform: rotate(-3deg); }
.guide-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.guide-card { --card-top: #6047ff; --card-bottom: #4135d7; position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 3px solid var(--ui-ink); border-radius: 23px; background: linear-gradient(140deg, var(--card-top), var(--card-bottom)); box-shadow: inset 3px 3px #ffffff70, inset -3px -3px #ffffff25, 0 3px #09255b; }
.guide-card-training { --card-top: #ffce57; --card-bottom: #ffb534; color: #302044; }
.guide-card-taps { --card-top: #f43489; --card-bottom: #cc195d; }
.guide-card-online { --card-top: #087cfb; --card-bottom: #0750be; }
.guide-card-gear { --card-top: #08ddc0; --card-bottom: #00b79c; color: #062d3d; }
.guide-card-rewards { --card-top: #ffe777; --card-bottom: #ffc22c; color: #302044; }
.guide-card-copy { display: flex; align-items: flex-start; gap: 10px; padding: 14px 12px 0; position: relative; z-index: 1; }
.guide-card-copy > div { min-width: 0; }
.guide-number { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 48px; margin: -3px 0 0; border: 3px solid var(--ui-ink); border-radius: 13px; background: var(--ui-face-gold); box-shadow: inset 2px 2px #fff8b1, 0 3px var(--ui-ink); font-size: 34px; line-height: 1; transform: rotate(-8deg); }
.guide-steps h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.08; text-transform: uppercase; -webkit-text-stroke-width: 4px; }
.guide-card-stake h3 { color: #fff773; }
.guide-steps p { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 700; }
.guide-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; height: 126px; margin-top: auto; padding-top: 8px; isolation: isolate; pointer-events: none; }
.guide-art::before { content: ''; position: absolute; inset: 8px 4px 0; z-index: -1; background: repeating-conic-gradient(from 10deg at 50% 110%, #ffffff18 0deg 15deg, transparent 15deg 35deg); clip-path: polygon(0 25%, 20% 40%, 14% 0, 48% 35%, 68% 0, 77% 40%, 100% 10%, 100% 100%, 0 100%); }
.guide-fighter { width: 46%; height: 145px; object-fit: contain; object-position: center top; align-self: end; margin-bottom: -15px; }
.guide-versus { flex: 0 0 auto; font-size: 34px; color: #ffec4f; transform: rotate(-8deg); z-index: 1; }
.guide-art > .ui-icon-bot { width: 100px; height: 100px; transform: rotate(8deg); }
.guide-rival { width: 46%; align-self: end; transform: scaleX(-1); }
.guide-rival .guide-fighter { width: 100%; display: block; filter: grayscale(1) sepia(1) saturate(5) hue-rotate(205deg) brightness(.7); }
.guide-art > .guide-coach { width: 47%; max-height: 130px; object-fit: contain; align-self: end; }
.guide-chest { width: 46%; height: 130px; object-fit: contain; transform: rotate(6deg); }
.guide-coins { display: flex; align-items: center; padding: 12px 30px 12px 10px; transform: rotate(-5deg); }
.guide-coins .ui-icon { width: 70px; height: 70px; margin-right: -15px; filter: drop-shadow(0 4px 0 #211969); }
.guide-coins .ui-icon:nth-child(2) { width: 85px; height: 85px; }
.guide-choice { display: grid; place-items: center; width: 56px; height: 56px; border: 3px solid var(--ui-ink); border-radius: 14px; background: var(--ui-face-gold); box-shadow: var(--ui-bevel-gold); color: var(--ui-ink); transform: rotate(8deg); }
.guide-choice .ui-icon { width: 32px; height: 32px; }
.guide-fight-label { display: flex; align-items: center; justify-content: center; gap: 8px; width: 78%; max-width: 290px; min-height: 72px; padding: 8px; border: 3px solid var(--ui-ink); border-radius: 18px; background: var(--ui-face-gold); box-shadow: var(--ui-bevel-gold); color: var(--ui-ink); font: 900 28px/1 var(--ui-font-display); text-transform: uppercase; transform: rotate(-5deg); }
.guide-fight-label .ui-icon { width: 48px; height: 48px; }
.guide-art > .ui-icon-power { width: 40px; height: 52px; margin-left: -14px; align-self: flex-start; transform: rotate(15deg); }
.guide-equipment { display: flex; align-items: center; gap: 3px; padding-right: 10px; }
.guide-equipment > span { display: grid; place-items: center; width: 45px; height: 61px; border: 3px solid var(--ui-ink); border-radius: 10px; background: var(--ui-face-blue); box-shadow: inset 2px 2px #ffffff80, 0 3px var(--ui-ink); transform: rotate(-9deg); }
.guide-equipment > span:nth-child(2) { margin-top: -20px; background: var(--ui-face-purple); transform: rotate(3deg); }
.guide-equipment > span:nth-child(3) { background: #43ed64; transform: rotate(12deg); }
.guide-equipment .ui-icon { width: 34px; height: 34px; }
.guide-tip { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 8px 4px; color: #d6edff; font: 900 15px/1.3 var(--ui-font-display); text-align: center; }
.guide-tip .ui-icon { width: 28px; height: 28px; flex-shrink: 0; }
.guide-details { margin: 12px 4px 0; color: #d6edff; font-size: 14px; line-height: 1.35; }
.guide-footer { display: flex; align-items: center; gap: 12px; padding: 12px 4px 4px; flex-shrink: 0; }
.guide-footer > .ui-button { flex: 1; min-width: 0; min-height: 56px; font-size: 25px; text-transform: uppercase; }
@media (min-width: 600px) {
  .quick-guide { padding: 16px; }
  .guide-intro { min-height: 165px; }
  .guide-mascot { max-width: 220px; }
  .guide-card-copy { padding-top: 16px; }
  .guide-art { height: 140px; }
  .guide-footer { justify-content: center; }
  .guide-footer > .ui-button { flex: 0 1 340px; }
}
@media (max-width: 370px) {
  .quick-guide { padding: 8px; border-radius: 20px; }
  .guide-header h2 { font-size: 25px; -webkit-text-stroke-width: 4px; }
  .guide-close.ui-button { width: 44px; height: 44px; }
  .guide-intro { min-height: 126px; }
  .guide-speech { padding: 10px 7px; font-size: 16px; }
  .guide-footer { gap: 8px; }
  .guide-footer > .ui-button { font-size: 22px; }
}
@media (max-width: 599px) {
  .quick-guide { padding: 8px; }
  .guide-content { padding-inline: 2px; }
  .guide-steps { gap: 8px; grid-auto-rows: 1fr; }
  .guide-card { border-width: 2px; border-radius: 16px; }
  .guide-card-copy { display: block; padding: 8px 8px 0; }
  .guide-number { float: left; width: 22px; height: 25px; margin: 0 6px 4px 0; border-width: 2px; border-radius: 7px; font-size: 19px; }
  .guide-steps h3 { min-height: 29px; display: flex; align-items: center; margin-bottom: 4px; font-size: 16px; line-height: 1.15; -webkit-text-stroke-width: 3px; letter-spacing: -.4px; }
  .guide-steps p { clear: both; }
  .guide-steps p { font-size: 14px; line-height: 1.3; }
  .guide-intro { min-height: 100px; }
  .guide-mascot { width: 40%; max-width: 120px; }
  .guide-speech { width: 60%; max-width: 220px; padding: 8px; margin-bottom: 8px; font-size: 16px; }
  .guide-art { height: 78px; padding-top: 6px; gap: 0; }
  .guide-fighter { width: 42%; height: 78px; margin-bottom: -6px; object-position: center bottom; }
  .guide-rival { width: 42%; }
  .guide-versus { font-size: 19px; }
  .guide-art > .ui-icon-bot { width: 42%; height: 57px; }
  .guide-art > .guide-coach { width: 46%; max-height: 74px; }
  .guide-chest { width: 48%; height: 74px; }
  .guide-coins { padding: 8px 4px; }
  .guide-coins .ui-icon { width: 31px; height: 38px; margin-right: -7px; }
  .guide-coins .ui-icon:nth-child(2) { width: 38px; height: 46px; }
  .guide-choice { width: 28px; height: 32px; margin-left: 6px; border-width: 2px; border-radius: 8px; }
  .guide-choice .ui-icon { width: 19px; height: 19px; }
  .guide-fight-label { gap: 2px; width: 86%; min-height: 44px; padding: 4px; border-width: 2px; border-radius: 11px; font-size: 17px; white-space: nowrap; }
  .guide-fight-label .ui-icon { width: 25px; height: 25px; }
  .guide-art > .ui-icon-power { position: absolute; top: 3px; right: 3px; width: 18px; height: 25px; }
  .guide-equipment { width: 50%; gap: 1px; padding: 0 4px 0 0; }
  .guide-equipment > span { width: 33.33%; height: 34px; border-width: 2px; border-radius: 6px; }
  .guide-equipment > span:nth-child(2) { margin-top: -10px; }
  .guide-equipment .ui-icon { width: 100%; height: 25px; }
  /* Stable Telegram usable height, including its safe insets, owns this state. */
  :root[data-compact-arena="true"] .guide-intro { display: none; }
  :root[data-compact-arena="true"] .guide-header { padding-bottom: 8px; }
  :root[data-compact-arena="true"] .guide-card-copy { padding: 6px 6px 0; }
  :root[data-compact-arena="true"] .guide-steps p { line-height: 1.2; }
  :root[data-compact-arena="true"] .guide-art { height: 40px; padding-top: 0; overflow: hidden; }
  :root[data-compact-arena="true"] .guide-art > * { zoom: .6; }
}
