/* Layout only. The original React bundle owns copy, choices, scoring and navigation. */
html[data-gintama-route] {
  --ui-bg: #0c1014;
  --ui-ink: #f6f9fb;
  --ui-muted: #a2b0b8;
  --ui-line: #ffffff26;
  --ui-card: #151c21;
  --result-accent: #1c7bd5;
}
html.light-mode[data-gintama-route] {
  --ui-bg: #faf9f6;
  --ui-ink: #171b20;
  --ui-muted: #827d75;
  --ui-line: #deddd9;
  --ui-card: #fff;
}
html[data-gintama-route] body,
html[data-gintama-route] #root > div { background: var(--ui-bg) !important; color: var(--ui-ink); }
html[data-gintama-route] #root footer { border: 0 !important; background: var(--ui-bg) !important; box-shadow: none !important; padding: 1.5rem 1rem !important; }
html[data-gintama-route] #root footer img { display: none; }
html[data-gintama-route] #root footer p { margin: 0; }
html[data-gintama-route] nav > div { border-bottom: 1px solid var(--ui-line); }
html[data-gintama-route="quiz"] nav > div:first-child { border-bottom: 0; }
html[data-gintama-view="question"] nav > div:first-child { border-bottom: 1px solid var(--ui-line); }
html[data-gintama-route] nav > div > div:first-child span { display: block; font-family: Douyin, sans-serif !important; letter-spacing: -.02em; }
html[data-gintama-route] nav > div > div:first-child img { width: 42px; height: 42px; }
html[data-gintama-route] nav .gintama-author-site { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
html[data-gintama-route] #root nav a[href="/"],
html[data-gintama-route] #root nav a[href="/about"],
html[data-gintama-route] #root nav .gintama-author-site { font-family: Outfit,"Douyin Sans",sans-serif !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: .05em !important; }
html[data-gintama-view="home"] nav a.text-sm,
html[data-gintama-view="home"] nav .gintama-author-site { font-family: Outfit, "Douyin Sans", sans-serif !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: .05em !important; }
html[data-gintama-view="home"] nav > div:first-child a.text-sm,
html[data-gintama-view="home"] nav > div:first-child .gintama-author-site { color: rgb(255 255 255 / 78%) !important; }
@media (min-width: 768px) {
  html[data-gintama-route] { scrollbar-gutter: stable; }
  html.light-mode[data-gintama-view="home"].gintama-home-nav-scrolled #root nav > div:first-child > div:first-child span,
  html.light-mode[data-gintama-view="home"].gintama-home-nav-scrolled #root nav > div:first-child a[href="/"],
  html.light-mode[data-gintama-view="home"].gintama-home-nav-scrolled #root nav > div:first-child a[href="/about"],
  html.light-mode[data-gintama-view="home"].gintama-home-nav-scrolled #root nav > div:first-child .gintama-author-site { color: #171b20 !important; }
  html[data-gintama-route] #root nav > div:first-child > div:nth-child(2) > a[href="/"],
  html[data-gintama-route] #root nav > div:first-child > div:nth-child(2) > a[href="/about"],
  html[data-gintama-route] #root nav > div:first-child > div:nth-child(2) > .gintama-author-site {
    display: inline-flex;
    inline-size: 5.5rem;
    flex: 0 0 5.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  html[data-gintama-route] #root nav > div:first-child > div:nth-child(2) > a:last-child {
    display: inline-flex;
    inline-size: 7rem;
    flex: 0 0 7rem;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

/* Landing: keep the original artwork and copy, with the approved left-led composition. */
html[data-gintama-view="home"] #root > div > section:first-of-type { min-height: 720px; align-items: stretch; }
html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative { min-height: 720px; max-width: 1320px; margin-inline: auto; padding-inline: 3.25rem; justify-content: center; }
html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:first-child { flex: 0 0 auto; justify-content: flex-start; align-items: flex-end; padding: 8rem 0 0; }
html[data-gintama-view="home"] #root > div > section:first-of-type h1 { text-align: left; font: 700 clamp(4rem,6.5vw,6.25rem)/1.12 Douyin,sans-serif !important; }
html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:nth-child(2) { text-align: left; padding: 2rem 0 7rem; }
html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:nth-child(2) p { margin-left: 0; }
html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:nth-child(2) > div { justify-content: flex-start; align-items: flex-start; }
html[data-gintama-view="home"] #intro { background: var(--ui-bg) !important; padding-top: 2rem; }
html[data-gintama-view="home"] #intro h3 { text-align: center; font: 700 2.6rem/1.2 Douyin,sans-serif !important; }
html[data-gintama-view="home"] #intro .text-center { text-align: left; }
html[data-gintama-view="home"] #intro .grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
html.light-mode[data-gintama-view="home"] #root > div > section:first-of-type h1,
html.light-mode[data-gintama-view="home"] #root > div > section:first-of-type h1 > span { color: #fff !important; text-shadow: none !important; }
html.light-mode[data-gintama-view="home"] #root > div > section:first-of-type h1 > span > span { color: #00b4ff !important; }
html.light-mode[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:nth-child(2) p { color: rgb(255 255 255 / 70%) !important; font-size: 18px !important; font-weight: 400 !important; text-shadow: none !important; }
html.light-mode[data-gintama-view="home"] #root > div > section:first-of-type a { background: #00b4ff !important; color: #fff !important; box-shadow: none !important; font-size: 16px !important; font-weight: 700 !important; }
html.light-mode[data-gintama-view="home"] nav > div:first-child > div:first-child span { color: #fff !important; font-size: 16px !important; font-weight: 700 !important; }

/* The question uses the available phone viewport without hiding any answer. */
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center { padding-top: 5.25rem; padding-bottom: 1rem; }
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child { margin-bottom: 1.5rem; }
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > span { grid-column: 1 / -1; grid-row: 1; font: 700 2.75rem/1.15 Douyin,sans-serif !important; color: var(--ui-ink) !important; text-align: left; }
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:first-child { grid-column: 1; grid-row: 2; justify-self: start; }
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:last-child { grid-column: 2; grid-row: 2; justify-self: end; }
html[data-gintama-view="question"] #root h2 { font-family: Douyin, sans-serif !important; }
html[data-gintama-view="question"] #root button[type="button"] { min-height: 44px; }
html[data-gintama-view="question"] .gintama-progress-panel { padding-bottom: 1.4rem; }
html[data-gintama-view="question"] .gintama-progress-track { --gintama-avatar-inset: 18px; position: relative; overflow: visible !important; margin-top: 1.45rem; }
html[data-gintama-view="question"] .gintama-progress-track::after { content: ""; position: absolute; top: 50%; left: clamp(18px, var(--gintama-progress, 0%), calc(100% - 18px)); width: 36px; height: 36px; transform: translate(-50%, -50%); background: url("./progress-avatar.png") center / contain no-repeat; pointer-events: none; opacity: 0; visibility: hidden; transition: left .3s ease, opacity .3s ease; }
html[data-gintama-view="question"] .gintama-progress-panel:is([data-progress-phase="enter"], [data-progress-phase="active"], [data-progress-phase="complete"]) .gintama-progress-track::after { visibility: visible; }
html[data-gintama-view="question"] .gintama-progress-panel:is([data-progress-phase="enter"], [data-progress-phase="active"]) .gintama-progress-track::after { opacity: 1; }
.gintama-progress-panel[data-progress-phase="empty"] > div:first-child > span:last-child,
.gintama-progress-panel[data-progress-phase="complete"] > div:first-child > span:last-child { visibility: hidden; }
.gintama-progress-panel[data-progress-phase="empty"] .gintama-progress-track::after { content: none; opacity: 0; visibility: hidden; animation: none; transition: none; }
html[data-gintama-view="question"] .gintama-progress-panel[data-progress-phase="enter"] .gintama-progress-track::after { animation: gintama-progress-enter .45s ease-out both; }
html[data-gintama-view="question"] .gintama-progress-panel[data-progress-phase="complete"] .gintama-progress-track::after { left: calc(100% - var(--gintama-avatar-inset)); opacity: 0; }
@keyframes gintama-progress-enter { from { left: 0; opacity: 0; } to { left: clamp(var(--gintama-avatar-inset), var(--gintama-progress, 3%), calc(100% - var(--gintama-avatar-inset))); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html[data-gintama-view="question"] .gintama-progress-panel[data-progress-phase="enter"] .gintama-progress-track::after { animation: none; } }
@media (prefers-reduced-motion: reduce) { html[data-gintama-view="question"] .gintama-progress-track::after { transition: none; } }

/* Result layout: shared surfaces, per-character original accent, same in both themes. */
html[data-gintama-route="result"] #root > div > div.flex-1 { padding: 7.5rem 2rem 2rem; }
html[data-gintama-route="result"] #root .max-w-4xl { max-width: 1280px; display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); column-gap: 3.5rem; align-items: start; }
html[data-gintama-route="result"] #root .max-w-4xl > div:first-child,
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2),
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) { display: contents; }
html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > p:first-child { grid-column: 1 / -1; grid-row: 1; text-align: left; font: 700 2.75rem/1.15 Douyin,sans-serif; letter-spacing: 0; text-transform: none; color: var(--ui-ink) !important; margin: 0 0 1.8rem; }
html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > p:nth-child(2) { grid-column: 2; grid-row: 2; font-size: 5.5rem; line-height: 1; letter-spacing: -.04em; margin: 0; text-align: left; }
html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > h1 { grid-column: 2; grid-row: 3; font: 700 2.5rem/1.2 Douyin,sans-serif !important; letter-spacing: 0; margin: .25rem 0 0; color: var(--ui-ink) !important; text-align: left; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child { grid-column: 1; grid-row: 2 / span 6; height: auto; min-width: 0; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child > div:first-child { width: 100%; height: auto; aspect-ratio: 1; min-height: 0; background: #fff !important; border-radius: 1.25rem; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child img { position: static; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 0; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child > div:first-child > div.absolute { display: none; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child > div:last-child { display: none; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:first-child { grid-column: 2; grid-row: 4; background: transparent !important; border: 0 !important; padding: 1.4rem 0 0; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:first-child p:first-child,
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > p:first-child { color: var(--ui-muted) !important; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) { grid-column: 2; grid-row: 5; margin-top: 1.4rem; padding: 1.3rem 1.5rem; border-radius: 1rem; color: #fff; }
html[data-gintama-route="result"][data-result-tone="dark-text"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) { color: #352912; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) p { color: inherit !important; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) > div.absolute { display: none; }
html[data-gintama-route="result"] .gintama-report-title { margin: 0 0 .75rem !important; color: inherit !important; font: 700 1.05rem/1.3 Douyin,sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; white-space: nowrap; }
html[data-gintama-route="result"] .gintama-report-subtitle { display: none !important; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) { grid-column: 2; grid-row: 6; margin-top: 1rem; background: var(--ui-card) !important; border-color: var(--ui-line) !important; }
html[data-gintama-route="result"] #root .gintama-data-title { margin: 0 0 .85rem !important; color: var(--ui-ink) !important; font: 700 1.1rem/1.25 Douyin,sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div.flex { flex-direction: row; gap: 1rem; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div.flex > div { flex: 1; min-width: 0; border-bottom: 0; border-top: 1px solid var(--ui-line); padding-top: .7rem; padding-bottom: 0; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div.flex > div > div:first-child { display: flex; flex-direction: column; align-items: start; gap: .3rem; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) span:first-child { color: var(--ui-ink) !important; font-family: Douyin,sans-serif !important; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) span:nth-child(2) { color: var(--result-accent) !important; font-family: Outfit,Douyin,sans-serif !important; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) { grid-column: 2; grid-row: 7; margin-top: 1rem; flex-direction: row; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) { flex-wrap: wrap; }
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) > * { flex: 0 1 auto; padding: .75rem 1.25rem; border-radius: .7rem; min-height: 44px; }


/* Poster: show the supplied poster edge to edge, without the extra overlay. */
html[data-gintama-route="poster"] #root > div > div.flex-1 { padding-top: 6.8rem; padding-bottom: 2rem; }
html[data-gintama-route="poster"] #root .max-w-4xl { max-width: 1120px; }
html[data-gintama-route="poster"] #root .max-w-4xl > div:first-child { margin-bottom: 1.5rem; }
html[data-gintama-route="poster"] .gintama-poster-page-close { display: none !important; }
html[data-gintama-route="poster"] #root .grid { grid-template-columns: minmax(0,360px) minmax(0,1fr); gap: 3.5rem; }
html[data-gintama-route="poster"] #root .grid > div:first-child > div { aspect-ratio: 3000 / 5640; background: transparent !important; border: 0; }
html[data-gintama-route="poster"] #root .grid > div:first-child img { object-fit: contain; display: block; cursor: pointer; }
html[data-gintama-route="poster"] #root .grid > div:first-child img:focus-visible { outline: 3px solid #00b4ff; outline-offset: 3px; }
html[data-gintama-route="poster"] #root .grid > div:first-child img ~ div { display: none; }
html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > div:first-child { background: transparent !important; border: 0 !important; padding: 0; }
html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > div:first-child p { display: none; }

/* The profile's original GIF remains a full-width animated window. */
html[data-gintama-route="profile"] #root video[src$="profile-rap-20261127.mp4"] { display: block; width: 100%; height: auto; }
html[data-gintama-route="profile"] #root .max-w-2xl > div:has(> video) { position: relative; }
html[data-gintama-route="profile"] #root .gintama-video-replay { position: absolute; right: 1rem; bottom: 1rem; min-height: 44px; padding: .6rem 1rem; border-radius: 999px; background: rgb(12 16 20 / 88%); color: #fff; font: 600 .875rem Douyin,sans-serif; cursor: pointer; }
html[data-gintama-route="profile"] #root .gintama-video-replay[hidden] { display: none; }
html[data-gintama-route="profile"] #root .max-w-2xl { max-width: 1172px; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 1.8rem 2rem; border: 0; background: transparent; padding: 0; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child { display: contents; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:first-child { grid-column: 1; grid-row: 1 / 3; width: 200px; height: 200px; border: 0; border-radius: 1.2rem; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:nth-child(2) { grid-column: 2; grid-row: 1; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:nth-child(2) { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:nth-child(2) > div { border-top: 1px solid var(--ui-line); padding-top: 1rem; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type { background: transparent; border: 0; padding: 0; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child { display: grid; min-width: 0; width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; border: 0; padding: 0; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child > div { display: block; background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: .9rem; padding: 1.2rem; }
html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child > div > div:first-child { display: none; }
html[data-gintama-route="profile"] #root .gintama-social-card { position: relative; min-height: 132px; padding: 0 !important; border: 0 !important; background: transparent !important; perspective: 900px; cursor: pointer; outline-offset: 4px; }
html[data-gintama-route="profile"] #root .gintama-social-card:focus-visible { outline: 3px solid #00b4ff; }
html[data-gintama-route="profile"] #root .gintama-social-card > div { display: none !important; }
html[data-gintama-route="profile"] #root .gintama-social-card[data-gintama-social-card="xiaohongshu"] { --social-front: #df304b; }
html[data-gintama-route="profile"] #root .gintama-social-card[data-gintama-social-card="wechat"] { --social-front: #07a65b; }
html[data-gintama-route="profile"] #root .gintama-social-card[data-gintama-social-card="douyin"] { --social-front: #29213f; }
html[data-gintama-route="profile"] #root .gintama-social-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 1rem; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; visibility: hidden; pointer-events: none; transition: transform .55s cubic-bezier(.2,.7,.2,1); text-align: center; }
html[data-gintama-route="profile"] #root .gintama-social-card { width: 100%; min-width: 0; max-width: 100%; min-height: 0; aspect-ratio: auto; box-sizing: border-box; }
html[data-gintama-route="profile"] #root .gintama-social-card::before { content: ""; display: block; padding-top: 36.73077%; }
html[data-gintama-route="profile"] #root .gintama-social-face { min-width: 0; box-sizing: border-box; }
html[data-gintama-route="profile"] #root .gintama-social-front { background: transparent url('/media/gintama/social-red-transparent.webp') center bottom / 100% 100% no-repeat; border-radius: 0; color: transparent; font-size: 0; visibility: visible; pointer-events: auto; }
html[data-gintama-route="profile"] #root [data-gintama-social-card="wechat"] .gintama-social-front { background-image: url('/media/gintama/social-green-transparent.webp'); }
html[data-gintama-route="profile"] #root [data-gintama-social-card="douyin"] .gintama-social-front { background-image: url('/media/gintama/social-purple-transparent.webp'); }
html[data-gintama-route="profile"] #root .gintama-social-back { display: grid; grid-template-columns: minmax(0,1fr) min(34%,96px); grid-template-rows: minmax(0,1fr); align-items: center; gap: .75rem; padding: .65rem 1rem; text-align: left; transform: rotateX(180deg); border: 1px solid var(--ui-line); background: var(--ui-card); color: var(--ui-ink); }
html[data-gintama-route="profile"] #root .gintama-social-qr { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
html[data-gintama-route="profile"] #root .gintama-social-qr-link { display: block; width: 100%; height: 100%; min-height: 0; cursor: zoom-in; }
html[data-gintama-route="profile"] #root .gintama-social-qr-link:focus-visible { outline: 3px solid #00b4ff; outline-offset: 3px; }
html[data-gintama-route="profile"] #root .gintama-social-card.is-open .gintama-social-front { transform: rotateX(-180deg); visibility: hidden; pointer-events: none; }
html[data-gintama-route="profile"] #root .gintama-social-card.is-open .gintama-social-back { transform: rotateX(0); visibility: visible; pointer-events: auto; }
/* During rotation, backface culling hands the image over at the actual angle.
   After rotation, hide the unused side explicitly for theme snapshots. */
html[data-gintama-route="profile"] #root .gintama-social-card.is-flipping .gintama-social-face { visibility: visible; }
html[data-gintama-route="profile"] #root .gintama-social-label { display: none; }
html[data-gintama-route="profile"] #root .gintama-social-account { justify-self: start; max-width: 100%; overflow-wrap: anywhere; font: 600 1.15rem/1.25 Outfit,Douyin,sans-serif; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; cursor: text; }
@media (max-width: 767px) { html[data-gintama-route="profile"] #root .gintama-social-qr-link { cursor: pointer; } }
@media (prefers-reduced-motion: reduce) { html[data-gintama-route="profile"] #root .gintama-social-face { transition: none; } }
/* Approved macOS-inspired desktop profile; the mobile layout stays as shipped. */
html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:first-child img { content: url('/media/gintama/profile-avatar-red-hat-20261126.webp'); }
@media (min-width: 768px) {
  html[data-gintama-route="profile"] #root .max-w-2xl { max-width: 1080px; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:first-child { margin-bottom: 1.7rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:first-child h1 { font-family: Douyin,sans-serif !important; font-weight: 700; letter-spacing: -.035em; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2),
  html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type { border: 1px solid rgb(255 255 255 / 11%); border-radius: 26px; background: linear-gradient(145deg,rgb(255 255 255 / 9%),rgb(255 255 255 / 4%)); box-shadow: 0 18px 48px rgb(0 0 0 / 15%),inset 0 1px rgb(255 255 255 / 7%); }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) { grid-template-columns: 180px minmax(0,1fr); grid-template-rows: auto auto; gap: 1.25rem 2rem; align-items: start; padding: 2rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:first-child { grid-column: 1; grid-row: 1 / 3; width: 180px; height: 180px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 22px; box-shadow: 0 10px 30px rgb(0 0 0 / 20%); }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:nth-child(2) { grid-column: 2; grid-row: 1; align-self: start; padding: .15rem 0 .95rem; border-bottom: 1px solid rgb(255 255 255 / 10%); }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:nth-child(2) p:nth-child(2) { font-size: 1.45rem; line-height: 1.25; letter-spacing: -.02em; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:nth-child(2) { grid-column: 2; grid-row: 2; align-self: start; align-items: start; gap: 1.25rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:nth-child(2) > div { min-width: 0; margin-top: 0; padding-top: 0; border-top: 0; }
  html[data-gintama-route="profile"] #root .max-w-2xl > div:has(> video) { border-radius: 24px; box-shadow: 0 18px 48px rgb(0 0 0 / 15%); }
  html[data-gintama-route="profile"] #root .max-w-2xl > div:has(> video) video { width: 100%; max-height: 390px; object-fit: cover; object-position: center 44%; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type { padding: 1.8rem 2rem 2rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child { align-items: stretch; gap: .8rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / 10%); }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child > div { margin-top: 0; border: 1px solid rgb(255 255 255 / 9%); border-radius: 16px; background: rgb(255 255 255 / 5%); }
  html.light-mode[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type { border-color: #d9dde0; background: #fff; box-shadow: 0 18px 48px rgb(24 35 45 / 10%), inset 0 1px #fff; }
  html.light-mode[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child { border-top-color: #d9dde0; }
  html.light-mode[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child > div { border-color: #d9dde0; background: #f1f3f4; }
}
html[data-gintama-route="about"] #root .max-w-3xl { max-width: 1172px; }
html[data-gintama-route="about"] #root .max-w-3xl > section:first-child > div { background: transparent; border: 0; padding: 0; }
html[data-gintama-route="about"] #root .max-w-3xl > section:first-child > div > div:first-child { width: 155px; height: 155px; border-radius: 1rem; border: 0; }

.gintama-share-backdrop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 1rem; background: rgba(0,0,0,.88); }
.gintama-share-dialog { position: relative; width: min(350px,100%); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.25rem; border: 1px solid #52606a; border-radius: 1rem; background: var(--ui-card); color: var(--ui-ink); display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.gintama-share-dialog img { display: block; width: min(200px,58vw); height: auto; aspect-ratio: 3000 / 5640; object-fit: contain; border-radius: .7rem; }
.gintama-share-dialog .gintama-share-actions { width: 100%; display: flex; justify-content: center; gap: .5rem; }
.gintama-share-dialog .gintama-share-actions button { min-height: 44px; padding: .7rem .8rem; border-radius: .7rem; font: 700 .8rem Douyin,sans-serif; }
.gintama-share-dialog .gintama-share-actions button:first-child { background: #00b4ff; color: #061b2b; }
.gintama-share-dialog .gintama-share-actions button:last-child { border: 1px solid var(--ui-line); color: var(--ui-ink); }
.gintama-share-dialog .gintama-share-close { position: absolute; top: .35rem; right: .35rem; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ui-ink); font-size: 1.4rem; }

@media (max-width: 767px) {
  html[data-gintama-route="poster"] nav { background: rgb(0 0 0 / var(--poster-nav-opacity, 0)) !important; transition: none !important; }
  html[data-gintama-route="poster"].gintama-poster-nav-dark nav:not(:has(> div:nth-child(2))) > div:first-child span,
  html[data-gintama-route="poster"].gintama-poster-nav-dark nav:not(:has(> div:nth-child(2))) > div:first-child button { color: #fff !important; transition: color .18s ease; }
  html[data-gintama-route] nav > div { padding-inline: 1rem; height: 3.5rem; }
  html[data-gintama-route] nav:has(> div:nth-child(2)) { background: var(--ui-bg) !important; }
  html[data-gintama-route] nav:has(> div:nth-child(2)) > div:first-child span { color: var(--ui-ink) !important; }
  html[data-gintama-route] nav:has(> div:nth-child(2)) > div:first-child > div:last-child button { color: var(--ui-ink) !important; }
  html[data-gintama-route] nav > div:nth-child(2) { height: auto; background: var(--ui-bg) !important; border-bottom: 1px solid var(--ui-line); box-shadow: 0 .75rem 1.5rem #0002; }
  html[data-gintama-route] nav > div:nth-child(2) > div { padding: .8rem 1rem 1rem; gap: .25rem; }
  html[data-gintama-route] nav > div:nth-child(2) a,
  html[data-gintama-route] nav > div:nth-child(2) .gintama-author-site { display: grid; width: 100%; min-height: 44px; padding-block: .7rem; place-items: center; color: var(--ui-ink) !important; font-size: 16px !important; font-weight: 600 !important; text-align: center; }
  html[data-gintama-route] #root nav > div:nth-child(2) a[href="/"],
  html[data-gintama-route] #root nav > div:nth-child(2) a[href="/about"],
  html[data-gintama-route] #root nav > div:nth-child(2) .gintama-author-site { font-size: 16px !important; font-weight: 600 !important; }
  html.light-mode[data-gintama-view="home"] nav:has(> div:nth-child(2)) > div:first-child > div:first-child span { color: var(--ui-ink) !important; }
  html[data-gintama-route] nav > div:nth-child(2) a:last-child { margin-top: .35rem; color: #fff !important; }
  html[data-gintama-route] input,
  html[data-gintama-route] textarea,
  html[data-gintama-route] select { font-size: 16px !important; }
  html[data-gintama-route] nav > div > div:first-child { gap: .45rem; }
  html[data-gintama-route] nav > div > div:first-child img { width: 2rem; height: 2rem; }
  html[data-gintama-route] nav > div > div:first-child span { font-size: 1rem; }
  html[data-gintama-route] nav button { min-width: 44px; min-height: 44px; }
  html[data-gintama-view="home"] #root > div > section:first-of-type,
  html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative { min-height: 665px; }
  html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative { padding-inline: 1.5rem; transform: translateY(clamp(3.25rem, 8dvh, 4.5rem)); }
  html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:first-child { padding-top: 10rem; }
  html[data-gintama-view="home"] #root > div > section:first-of-type h1 { font-size: 3.15rem !important; line-height: 1.14 !important; }
  html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:nth-child(2) { padding: 1.4rem 0 6rem; }
  html[data-gintama-view="home"] #root > div > section:first-of-type > div.relative > div:nth-child(2) p { font-size: 1rem; line-height: 1.7; }
  html[data-gintama-view="home"] #intro { padding: .6rem 0 4rem; }
  html[data-gintama-view="home"] #intro h3 { font-size: 1.85rem !important; }
  html[data-gintama-view="home"] #intro .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center { padding: 4.4rem 1rem 1rem; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child { position: relative; margin-bottom: .35rem; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .45rem; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > span { grid-column: 1 / -1; grid-row: 1; font: 700 1.8rem/1.2 Douyin,sans-serif !important; color: var(--ui-ink) !important; text-align: left; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button { position: absolute; grid-row: auto; z-index: 2; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:first-child { top: .58rem; left: auto; right: 0; justify-self: auto; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:last-child { top: 3.05rem; left: auto; right: 0; justify-self: auto; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button::before { content: ""; position: absolute; inset: -14px -4px; }
  html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:last-child::before { inset-block: -7px; }
  html[data-gintama-view="question"] #root .max-w-2xl > .text-center { margin-bottom: 1rem; }
  html[data-gintama-view="question"] #root .max-w-2xl > .text-center h2 { font-size: 1.3rem; line-height: 1.32; }
  html[data-gintama-view="question"] #root .max-w-2xl > .flex.flex-col { gap: .55rem; }
  html[data-gintama-view="question"] #root .max-w-2xl > .flex.flex-col > button { padding: .65rem .8rem; line-height: 1.38; }
  html[data-gintama-view="question"] .gintama-progress-panel { position: relative; padding-bottom: 1.7rem; }
  html[data-gintama-view="question"] .gintama-progress-panel > div:first-child { min-height: 44px; align-items: center; }
  html[data-gintama-view="question"] .gintama-progress-panel > div:first-child > span:last-child { position: absolute; top: 3.1rem; left: var(--gintama-marker-x, 24px); transform: translateX(-50%) !important; font-size: 1rem; white-space: nowrap; transition: left .5s ease; }
  html[data-gintama-view="question"] .gintama-progress-track { --gintama-avatar-inset: 24px; margin-top: 4.3rem; }
  html[data-gintama-view="question"] .gintama-progress-track::after { top: -20px; width: 48px; height: 48px; left: clamp(24px, var(--gintama-progress, 0%), calc(100% - 24px)); }
  html[data-gintama-route="result"] #root > div > div.flex-1 { padding: 4.25rem .9rem 1rem; }
  html[data-gintama-route="result"] #root .max-w-4xl { display: grid; grid-template-columns: 8.6rem minmax(0,1fr); column-gap: .9rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > p:first-child { font-size: 1.8rem; margin-bottom: .8rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > p:nth-child(2) { font-size: 2.7rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > h1 { font-size: 1.4rem !important; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child { grid-row: 2 / span 3; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:first-child { grid-row: 4; grid-column: 2; padding: .6rem 0 0; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:first-child p:last-child { font-size: .83rem; line-height: 1.4; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) { grid-column: 1 / -1; grid-row: 5; margin-top: .85rem; padding: .8rem 1rem; font-size: .82rem; }
  html[data-gintama-route="result"] .gintama-report-title { margin-bottom: .65rem !important; font-size: .95rem !important; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) { grid-column: 1 / -1; grid-row: 6; padding: .75rem; margin-top: .7rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > p { margin-bottom: .5rem; }
  html[data-gintama-route="result"] #root .gintama-data-title { margin-bottom: .7rem !important; font-size: 1rem !important; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div.flex { gap: .5rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div.flex > div { padding-top: .4rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) span { font-size: .68rem !important; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) { grid-column: 1 / -1; grid-row: 7; gap: .5rem; margin-top: .7rem; }
  html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) > * { flex: 1 1 0; font-size: .75rem; padding-inline: .45rem; }
  html[data-gintama-route="poster"] #root > div > div.flex-1 { padding: 4.5rem .9rem 1rem; }
  html[data-gintama-route="poster"] #root .max-w-4xl > div:first-child { margin-bottom: .75rem; }
  html[data-gintama-route="poster"] #root .max-w-4xl > div:first-child h1 { font-size: 1.9rem; }
  html[data-gintama-route="poster"] #root .grid { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
  html[data-gintama-route="poster"] #root .grid > div:first-child { width: min(230px, 65vw); }
  html[data-gintama-route="poster"] #root .grid > div:nth-child(2) { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; align-items: center; }
  html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > div:first-child,
  html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > div:last-child { grid-column: 1 / -1; }
  html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > div:first-child h3 { text-align: center; font-size: 1.8rem; }
  html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > button { width: 100%; display: inline-flex; font-size: .78rem; min-height: 44px; padding: .7rem .35rem; }
  html[data-gintama-route="poster"] #root .grid > div:nth-child(2) > div:last-child { width: 100%; justify-content: center; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) { display: block; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child { display: flex; flex-direction: column; align-items: start; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:first-child > div:first-child { width: 150px; height: 150px; border-radius: 1rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:nth-child(2) { display: block; margin-top: 1.5rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:nth-child(2) > div:nth-child(2) > div { margin-top: 1rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child { grid-template-columns: minmax(0,1fr); gap: .5rem; }
  html[data-gintama-route="profile"] #root .max-w-2xl > section:last-of-type > div:last-child > .gintama-social-card { margin-top: 0; margin-bottom: 0; }
  html[data-gintama-route="about"] #root .max-w-3xl > section:first-child > div > div:first-child { width: 95px; height: 95px; }
}
/* Holds the brand avatar through React's page-level header replacement. */
.gintama-avatar-shield {
  position: fixed;
  z-index: 51;
  display: block;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 80ms linear;
}

.gintama-avatar-shield.is-visible {
  opacity: 1;
  transition: none;
}

/* Approved desktop prototype: progress-desktop-prototype (2026-11-29). */

@media(min-width:768px){
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:1.5rem;row-gap:2rem;}
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child {display:contents;}
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > span {grid-column:1;grid-row:1;align-self:center;}
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:first-child {grid-column:2;grid-row:2;justify-self:end;align-self:start;min-height:44px;margin:0;z-index:1;}
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > div:first-child > button:last-child {grid-column:2;grid-row:1;justify-self:end;align-self:center;margin:0;}
html[data-gintama-view="question"] #root > div > div.flex-1.flex.flex-col.items-center > div:first-child > .gintama-progress-panel {grid-column:1 / -1;grid-row:2;margin-top:0;}
html[data-gintama-view="question"] .gintama-progress-panel {position:relative;padding-bottom:1.7rem;}
html[data-gintama-view="question"] .gintama-progress-panel > div:first-child {min-height:44px;align-items:center;}
html[data-gintama-view="question"] .gintama-progress-panel > div:first-child > span:last-child {position:absolute;top:3.1rem;left:var(--gintama-marker-x,24px);transform:translateX(-50%) !important;font-size:1rem;white-space:nowrap;transition:left .5s ease;}
html[data-gintama-view="question"] .gintama-progress-track {--gintama-avatar-inset:24px;margin-top:4.3rem;}
html[data-gintama-view="question"] .gintama-progress-track::after {top:-20px;width:48px;height:48px;left:clamp(24px,var(--gintama-progress,0%),calc(100% - 24px));}
}

/* Approved desktop prototype: result-desktop-prototype (2026-11-29). */

@media(min-width:768px){
html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > p:nth-child(2),
html[data-gintama-route="result"] #root .max-w-4xl > div:first-child > h1 {max-width:46%;}
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:first-child {grid-row:2 / span 5;}
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:first-child {grid-column:2;grid-row:2 / span 2;justify-self:end;align-self:start;width:50%;padding:.75rem 0 0 1rem;min-width:0;}
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) {grid-row:4;margin-top:1.5rem;}
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) {grid-row:5;}
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) {grid-row:6;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;}
html[data-gintama-route="result"] #root .max-w-4xl > div:nth-child(2) > div:nth-child(2) > div:nth-child(4) > * {width:100%;min-width:0;justify-content:center;}
}
