/* Finishing pass: preserve DragonHaven illustrations and working interactions. */
/* Mobile home: keep related artwork, title and action together. */
@media (max-width:700px) {
  .collection-links .expertise-teaser {
    display:grid;
    grid-template-columns:90px minmax(0,1fr);
    gap:18px;
    align-items:center;
  }
  .collection-links .expertise-teaser .teaser-art {
    width:90px;
    height:112px;
    object-fit:cover;
  }
  .collection-links .expertise-teaser h2 {
    font-size:clamp(23px,6.4vw,27px);
    line-height:1.2;
    overflow-wrap:normal;
  }
  .collection-links .expertise-teaser .button {
    line-height:1.5;
    padding-block:8px;
    min-height:44px;
  }
  .trials .trial-path {
    border:0;
    padding-bottom:0;
    margin-bottom:10px;
  }
  .trials .journey { gap:28px; }
  .trials .step + .step {
    border-top:1px solid var(--line);
    padding-top:28px;
  }
}

/* Agent 2: desktop home — keep the illustrated world, improve its reading rhythm. */
@media (min-width:1001px) {
  body:has(.hero) .event-teaser::before {
    aspect-ratio:1 / 1.08;
  }
  body:has(.hero) .event-teaser p:not(.eyebrow) {
    font-size:20px;
    line-height:1.65;
    max-width:37ch;
  }
  body:has(.hero) .event-teaser > a {
    margin-top:8px;
  }
  body:has(.hero) #faq .faq-grid {
    grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
    gap:64px;
  }
  body:has(.hero) #faq h2 {
    font-size:clamp(42px,3.65vw,52px);
    line-height:1.12;
    max-width:100%;
  }
  body:has(.hero) #faq .faq {
    display:grid;
    gap:12px;
    border:0;
  }
  body:has(.hero) #faq .faq details {
    border:0;
    background:#122333;
    padding:0 24px;
  }
  body:has(.hero) #faq .faq summary {
    padding-block:23px;
  }
  body:has(.hero) #faq .faq details > p {
    padding:0 30px 24px 0;
    color:var(--muted);
  }
  body:has(.hero) #download .download {
    background:#142638;
    border:0;
    padding:56px 40px;
  }
}


/* Expertise guide: calm reference layout and legible interactive capacity lab. */
.expertise-page .focus-demo .eyebrow {
  font-size:16px;
  letter-spacing:0;
  text-transform:none;
}
.expertise-page .focus-example {
  min-height:68px;
  gap:14px;
  font-size:17px;
}
.expertise-page .focus-example strong {
  font-variant-numeric:tabular-nums;
}
.expertise-page .focus-example:focus-visible {
  outline:3px solid var(--gold);
  outline-offset:3px;
}
.expertise-page .capacity-result .eyebrow {
  font-size:16px;
  font-weight:500;
  line-height:1.5;
  letter-spacing:0;
  text-transform:none;
}
.expertise-page .capacity-result>strong {
  margin-top:8px;
  font-size:clamp(56px,7vw,88px);
  line-height:1.15;
}
.expertise-page #capacity-formula {
  margin-top:12px;
  font-variant-numeric:tabular-nums;
}
.expertise-page .capacity-form label[for="capacity-spark"] {
  display:flex;
  justify-content:space-between;
}
.expertise-page .capacity-form select {
  min-height:52px;
  padding-right:32px;
}
.expertise-page .capacity-form input[type="range"] {
  min-height:44px;
}
.expertise-page .expertise-numbers>summary,
.expertise-page .spark-secret>summary {
  min-height:44px;
  align-content:center;
}
@media(max-width:700px) {
  .expertise-page .focus-demo { padding:22px 20px; }
  .expertise-page .focus-demo .fine { font-size:15px; }
  .expertise-page .ascension-card {
    background:none;
    padding:18px 0;
    column-gap:18px;
  }
  .expertise-page .ascension-card.mastery {
    background:var(--panel);
    padding:22px 20px;
  }
  .expertise-page .ascension-grid { gap:6px; }
  .expertise-page .ascension-card .ascension-gift {
    font-size:16px;
    line-height:1.6;
  }
  .expertise-page .capacity-form { gap:18px; }
  .expertise-page .capacity-form select { width:100%;max-width:100%; }
  .expertise-page .capacity-result { padding:28px 20px; }
  .expertise-page .expertise-numbers .capacity-lab { margin-top:28px; }
}

/* Egg reference: keep the chest label visible while comparing distant rarity columns. */
.egg-page .egg-table-scroll {
  scrollbar-width:thin;
  scrollbar-color:var(--gold) var(--panel);
  scroll-padding-inline:132px 16px;
}
.egg-page .egg-table {
  font-variant-numeric:tabular-nums;
}
.egg-page .egg-table th:first-child {
  position:sticky;
  left:0;
  z-index:1;
  background:#102234;
  box-shadow:1px 0 0 var(--line);
}
.egg-page .egg-table thead th:first-child {
  background:#182638;
}
.egg-page .egg-tab:focus-visible,
.egg-page .egg-hint-select:focus-visible,
.egg-page .egg-odds summary:focus-visible {
  outline:2px solid var(--gold);
  outline-offset:4px;
}
.egg-page .egg-odds {
  scroll-margin-top:110px;
}
@media (max-width:700px) {
  .egg-page .egg-table {
    font-size:14px;
  }
  .egg-page .egg-table th:first-child {
    min-width:110px;
    max-width:132px;
    white-space:normal;
    line-height:1.45;
  }
  .egg-page .egg-table th,
  .egg-page .egg-table td {
    padding:14px 12px;
  }
  .egg-page .egg-odds {
    scroll-margin-top:138px;
  }
  .egg-page .egg-hint-count {
    font-variant-numeric:tabular-nums;
    font-size:14px;
  }
}

/* Event guide: a readable annual calendar with the next date clearly marked. */
.events-page .event-feature-copy { min-width:0; }
.events-page .event-feature-copy > p { max-width:49ch; }
.events-page .event-spotlight { padding-top:22px;border-top:1px solid var(--line); }
.events-page .event-spotlight h2 { line-height:1.18;text-wrap:balance; }
.events-page .event-spotlight [data-spotlight-dates] { color:var(--gold);font-variant-numeric:tabular-nums; }
.events-page .event-spotlight .button { display:inline-flex;align-items:center;justify-content:space-between;gap:20px;font-family:inherit;font-size:16px;line-height:1.4;max-width:100%; }
.events-page .event-card { display:flex;flex-direction:column;gap:14px; }
.events-page .event-card h3 { margin:0;text-wrap:balance; }
.events-page .event-card .event-dates { margin-top:auto;padding-top:4px;font-size:16px;line-height:1.5; }
.events-page .event-card:target { outline:2px solid var(--gold);outline-offset:4px; }
html[data-next-event="newyear"] .events-page [data-calendar-event="newyear"],
html[data-next-event="valentine"] .events-page [data-calendar-event="valentine"],
html[data-next-event="birthday"] .events-page [data-calendar-event="birthday"],
html[data-next-event="pride"] .events-page [data-calendar-event="pride"],
html[data-next-event="sunwake"] .events-page [data-calendar-event="sunwake"],
html[data-next-event="harvestmoon"] .events-page [data-calendar-event="harvestmoon"],
html[data-next-event="halloween"] .events-page [data-calendar-event="halloween"],
html[data-next-event="christmas"] .events-page [data-calendar-event="christmas"] {
 box-shadow:inset 3px 0 var(--gold);
}
.events-page .event-note { max-width:70ch;line-height:1.7;color:var(--muted); }
@media (max-width:700px) {
 .events-page .event-calendar { padding-top:28px; }
 .events-page .event-feature { gap:24px; }
 .events-page .event-feature-copy h1 { font-size:clamp(32px,9.1vw,40px);text-wrap:balance; }
 .events-page .event-spotlight { margin-top:24px;padding-top:20px; }
 .events-page .event-spotlight h2 { font-size:clamp(26px,7.4vw,32px); }
 .events-page .event-spotlight .button { width:100%; }
 .events-page .event-grid { gap:10px; }
 .events-page .event-card { display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px 14px;padding:20px 16px; }
 .events-page .event-card .event-motif { grid-column:1;grid-row:1 / 3;font-size:28px; }
 .events-page .event-card h3 { grid-column:2;font-size:22px;line-height:1.25;text-wrap:initial; }
 .events-page .event-card .event-dates { grid-column:2;margin:0;padding:0;font-size:15px; }
 .events-page .event-note { font-size:14px;margin-top:22px; }
}
@media (forced-colors:active) {
 .events-page .event-card { border:1px solid CanvasText; }
}

/* Account journeys: readable status messages and comfortable form controls. */
.confirmation-main {background-attachment:scroll}
.confirmation-card {background:#0c1a29f5}
.confirmation-card h1 {text-wrap:balance}
.confirmation-card [role=status]>p {line-height:1.75}
.confirmation-card .confirmation-hint {line-height:1.75;color:#b7c9d7}
.confirmation-card .button {font-family:'Segoe UI',Arial,sans-serif;font-size:16px;line-height:1.4;text-align:center}
.deletion-card .deletion-notice {background:#152739;border:0;padding:24px}
.deletion-card .deletion-notice h2 {font-size:25px;line-height:1.2}
.deletion-card .deletion-notice p {font-size:15px;line-height:1.8}
.deletion-card .deletion-status {line-height:1.75;background:#182839}
.deletion-card .fine {line-height:1.75;color:#b7c9d7}
.reset-card {max-width:540px}
.reset-card #language {max-width:240px;background:#152739;border-color:#4b6072;color:var(--text);font-size:16px}
.reset-card #status {margin:24px 0;padding:20px 22px;border-left:3px solid var(--gold);background:#152739;line-height:1.75}
.reset-card label {font-weight:600;line-height:1.5}
.reset-card input {min-height:50px;background:#0c1a29;border-color:#4b6072;font-size:16px}
.reset-card input:focus-visible,.reset-card select:focus-visible,.reset-card button:focus-visible {outline:3px solid var(--gold);outline-offset:3px}
.reset-card #requirements,.reset-card #match {font-size:14px;line-height:1.7;color:#b7c9d7}
.reset-card #home {display:inline-flex;align-items:center;min-height:44px;text-underline-offset:5px;text-decoration:underline}
.reset-card #cancel {background:#20364b;color:var(--text)}
body:has(#invite-open) main {padding-block:clamp(48px,9vh,100px)}
body:has(#invite-open) main>img {margin-inline:auto;margin-bottom:28px;object-fit:contain}
body:has(#invite-open) h1 {font-size:clamp(36px,5vw,58px);line-height:1.12;text-wrap:balance;margin-block:20px}
body:has(#invite-open) main>p:not(.eyebrow) {max-width:550px;margin:24px auto;font-size:17px;line-height:1.75}
body:has(#invite-open) .button {font-family:'Segoe UI',Arial,sans-serif;font-size:17px}
.policy-page p,.policy-page li {overflow-wrap:anywhere}
.policy-page main>h2 {text-wrap:balance}
@media(max-width:700px) {
 .confirmation-main {background:#0b1725;padding-block:24px}
 .confirmation-card {padding:28px 20px}
 .confirmation-card h1 {font-size:30px}
 .confirmation-card .button {width:100%;padding:14px 16px}
 .confirmation-card .deletion-notice {padding:18px;margin-block:24px}
 .confirmation-card .deletion-notice p {font-size:15px}
 .deletion-card .actions {margin-top:28px}
 .reset-card {margin-block:32px 48px}
 .reset-card #status {padding:17px 18px}
 .reset-card h1 {font-size:36px;text-wrap:balance}
 .reset-card #language {max-width:none}
 .policy-page h1 {font-size:34px;line-height:1.15}
 .policy-page p,.policy-page li {font-size:16px;line-height:1.75}
 .policy-page h2 {font-size:27px;line-height:1.2}
}

/* Usability finishing: visible keyboard focus, native form readability and thumb targets. */
input:focus-visible,
textarea:focus-visible {
  outline:3px solid var(--gold);
  outline-offset:4px;
}
.analytics-choice {
  max-height:calc(100dvh - 32px - env(safe-area-inset-bottom));
  overflow-y:auto;
  overscroll-behavior:contain;
  bottom:calc(16px + env(safe-area-inset-bottom));
}
.analytics-choice > a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  text-decoration:underline;
  text-underline-offset:3px;
}
@media (max-width:700px) {
  .nav .language { font-size:16px; }
}
@media (pointer:coarse) {
  .footer-links > a,
  .footer-links > button:not([hidden]) {
    min-height:44px;
    display:inline-flex;
    align-items:center;
  }
}
