.with-quick-guide:has(#screen-home:not(.hidden)) > :has(#screen-home) {
  min-height: auto;
  padding-block: clamp(1.25rem, 5vh, 3rem) 0;
}

.quick-guide {
  display: none;
  --ink: #2c1d28;
  --muted: #57434c;
  --paper: #fff7e9;
  --accent-ink: color-mix(in srgb, var(--game-accent) 46%, #32202d);
  width: min(42rem, calc(100% - 2rem));
  margin: clamp(1.25rem, 4vw, 2.25rem) auto clamp(2.25rem, 6vw, 4rem);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--game-accent) 42%, #8b725e);
  border-radius: 1.5rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 48px #100b1940;
}

.with-quick-guide:has(#screen-home:not(.hidden)) > .quick-guide { display: block; }

.quick-guide-hero {
  position: relative;
  min-height: clamp(12rem, 48vw, 19rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  background: var(--accent-ink);
  color: #fff8ee;
}

.quick-guide-hero img,
.quick-guide-hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.quick-guide-hero img { object-fit: cover; object-position: center 44%; }
.quick-guide-hero::after {
  content: "";
  background: linear-gradient(0deg, #231421 5%, #231421e5 24%, #23142135 72%, transparent);
}

.quick-guide-hero-content { width: 100%; padding: 1.1rem clamp(1rem, 4vw, 1.75rem) 1.8rem; }
.quick-guide-labels { display: flex; flex-wrap: wrap; gap: .4rem; }
.quick-guide-labels span {
  border: 1px solid #fff8ee80;
  border-radius: 999px;
  padding: .18rem .65rem;
  background: #261621de;
  font-size: .73rem;
  font-weight: 800;
}
.quick-guide-labels span:first-child { border-color: transparent; background: #fff7e9; color: var(--ink); }
.quick-guide-hero h2 {
  margin-top: .45rem;
  color: #fff8ee;
  font-size: clamp(1.65rem, 7vw, 3rem);
  font-weight: 900;
  line-height: 1.35;
}
.quick-guide-hero p { color: #fff8ee; font-size: clamp(.87rem, 3vw, 1.05rem); line-height: 1.7; }

.quick-guide-paper {
  position: relative;
  margin-top: -.8rem;
  padding: clamp(.65rem, 2.8vw, 1.1rem);
  border-radius: 1.1rem 1.1rem 0 0;
  background: var(--paper);
}

.quick-guide-steps {
  display: grid;
  direction: rtl;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.5rem, 2vw, .85rem);
  list-style: none;
  padding: 0;
}

.quick-guide-step {
  min-width: 0;
  padding: clamp(.6rem, 2vw, 1rem);
  border-radius: .95rem;
  border: 1px solid color-mix(in srgb, var(--game-accent) 18%, #ecd9c9);
  background: linear-gradient(145deg, #fffaf3, color-mix(in srgb, var(--game-accent) 11%, #fff2e5));
}
.quick-guide-step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; }
.quick-guide-number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-ink);
  color: #fffaf3;
  font-size: 1.05rem;
  font-weight: 900;
}
.quick-guide-step svg, .quick-guide-tip svg {
  width: clamp(2.5rem, 9vw, 3.5rem);
  height: auto;
  flex: none;
  color: var(--accent-ink);
}
.quick-guide-step h3, .quick-guide-tip h3 { color: var(--ink); font-size: clamp(.89rem, 2.8vw, 1.12rem); font-weight: 900; line-height: 1.6; }
.quick-guide-step p, .quick-guide-tip p { margin-top: .18rem; color: var(--muted); font-size: clamp(.8rem, 2.5vw, .95rem); line-height: 1.78; }
.quick-guide-tip {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-top: .75rem;
  padding: .8rem;
  border-radius: .95rem;
  border: 1px solid color-mix(in srgb, var(--game-accent) 34%, #ecd9c9);
  background: color-mix(in srgb, var(--game-accent) 15%, #fff1e6);
}
.quick-guide-footer {
  display: flex;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .8rem .2rem .15rem;
  color: var(--accent-ink);
  font-weight: 900;
}
.quick-guide-footer a { color: inherit; text-decoration: underline; text-underline-offset: .24em; font-size: .86rem; }
.quick-guide-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: .25rem; }

@media (max-width: 319px) {
  .quick-guide-steps { grid-template-columns: minmax(0, 1fr); }
}
