:root{--cri-font-text:"Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif}
/* Original diagnosis cinematic edition, 2026-11-10.
   Namespace: explicit entrance / question / footer IDs only.
   No root tokens, result selectors, character selectors or new motion. */
#main > .hero {
  max-width: 100%;
  margin-top: 24px;
  padding: clamp(24px, 3vw, 40px) clamp(22px, 5vw, 64px);
  border: 1px solid #d2bcca;
  border-top: 7px solid #39243e;
  border-radius: 24px 24px 3px 3px;
  background: radial-gradient(ellipse at 100% 0%, #ddcce6 0%, transparent 62%), linear-gradient(120deg, #f7f1e8 38%, #ecd6de);
  box-shadow: 0 18px 44px #39243e0c;
}
#main > .hero h1 {
  max-width: 16em;
  margin: 16px 0;
  font-family: var(--cri-font-text);
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.045em;
  color: #39243e;
  overflow-wrap: anywhere;
}
#main > .hero .eyebrow {
  margin: 0;
  color: #8e355c;
  font-size: 11px;
  letter-spacing: .2em;
}
#main > .hero #lead { max-width: 40em; color: #645269; line-height: 2; }
#main > .mode-picker button {
  margin-top: 24px;
  min-height: 78px;
  border-color: #967b92;
  border-radius: 3px;
  background: #fffaf3;
  color: #39243e;
  line-height: 1.85;
}
#main > .mode-picker button[aria-checked=true] {
  border: 2px solid #8e355c;
  background: linear-gradient(120deg, #ecd6de, #e8dced);
  color: #572944;
  box-shadow: inset 0 -4px 0 #8e355c;
}
#main > .mode-picker button:hover { border-color: #8e355c; background-color: #f5e6ec; }
#intro > .intro-copy {
  margin: 16px 0 48px;
  padding: clamp(18px, 2.2vw, 28px);
  border-left: 4px solid #9e668e;
  background: #f7f1e8;
  color: #39243e;
  font-size: 16px;
  line-height: 2;
}
#begin {
  max-width: 100%;
  min-height: 64px;
  margin-top: 12px;
  padding: 18px 30px;
  border: 1px solid #733151;
  border-radius: 4px;
  background: linear-gradient(115deg, #963256, #543460);
  color: #fffaf3;
  box-shadow: 0 10px 22px #39243e20;
  letter-spacing: .025em;
  white-space: normal;
  overflow-wrap: anywhere;
}
#begin:hover { background: #543460; }
#intro .gallery-section { padding: 12px 0 72px; border-top: 2px solid #9e819b; }
#intro .section-heading {
  padding: 24px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid #d2bcca;
  color: #39243e;
}
#gallery figcaption {
  padding: 18px 4px 20px;
  color: #39243e;
  line-height: 1.8;
  border-bottom: 1px solid #d2bcca;
}
#gallery .type-number { margin-bottom: 8px; color: #8e355c; letter-spacing: .18em; }
#quiz.panel:not(:empty) {
  padding: clamp(22px, 4vw, 52px);
  border: 1px solid #ad8fa5;
  border-top: 5px solid #8e355c;
  border-radius: 24px;
  background: #fffcf6;
  color: #39243e;
  box-shadow: 0 16px 40px #39243e0c;
  line-height: 2;
}
#quiz > button {
  min-height: 64px;
  padding: 18px 20px;
  border: 1px solid #ad7892;
  border-radius: 5px;
  background: #fffaf3;
  color: #39243e;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
#quiz > button:hover { border-color: #8e355c; background: #f4e4ed; }
#quiz progress { accent-color: #8e355c; }
#to-intro { color: #8e355c; }
#main > footer {
  margin-top: 64px;
  padding: clamp(32px, 5vw, 64px) clamp(22px, 5vw, 64px);
  border-top: 6px solid #b68ca8;
  border-radius: 3px 3px 24px 24px;
  background: #39243e;
  color: #fff3e9;
  font-size: 12px;
  line-height: 2.2;
}
#main > footer > p:first-child {
  max-width: 23em;
  margin-top: 0;
  margin-bottom: 30px;
  font-family: var(--cri-font-text);
  font-size: clamp(23px, 3.2vw, 38px);
  line-height: 1.7;
  letter-spacing: -.025em;
}
#main > footer a { color: #efd0e0; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
#main > .mode-picker button:focus-visible,
#begin:focus-visible,
#quiz > button:focus-visible,
#to-intro:focus-visible { outline: 3px solid #8e355c; outline-offset: 4px; }
#main > footer a:focus-visible { outline: 3px solid #fff3e9; outline-offset: 4px; }
@media (max-width: 700px) {
  #main > .hero { margin-top: 16px; padding: 22px 14px; }
  #main > .hero h1 { font-size: clamp(20px, 6vw, 28px); margin: 14px 0; line-height: 1.5; }
  #main > .hero #lead { font-size: 14px; line-height: 1.85; margin-bottom: 0; }
  #main > .mode-picker button { margin-top: 16px; font-size: 12px; }
  #intro > .intro-copy { margin-bottom: 36px; padding: 16px; font-size: 14px; }
  #begin { min-height: 56px; margin-top: 4px; padding: 14px 12px; font-size: 14px; }
  #quiz.panel:not(:empty) { padding: 24px 18px; }
  #quiz > button { padding: 16px 14px; }
  #main > footer { margin-top: 40px; }
}
@media (forced-colors: active) {
  #main > .hero,
  #main > .mode-picker button,
  #main > .mode-picker button[aria-checked=true],
  #intro > .intro-copy,
  #begin,
  #quiz.panel:not(:empty),
  #quiz > button,
  #main > footer { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  #main > .mode-picker button[aria-checked=true] { border-color: Highlight; }
  #main > .hero h1,
  #main > .hero .eyebrow,
  #main > .hero #lead,
  #intro .section-heading,
  #gallery figcaption,
  #gallery .type-number { color: CanvasText; border-color: CanvasText; }
  #to-intro,
  #main > footer a { color: LinkText; }
  #main > .mode-picker button:focus-visible,
  #begin:focus-visible,
  #quiz > button:focus-visible,
  #to-intro:focus-visible,
  #main > footer a:focus-visible { outline-color: Highlight; }
}
