/* Illustrated materials stay inside the app's second stage. */
.guide-tabs { display: flex; align-items: stretch; gap: 4px; padding: 5px; margin: 24px 0; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.guide-tabs button { flex: 1; min-width: 0; min-height: 46px; border: 0; padding: 10px 12px; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.35; }
.guide-tabs button[aria-selected="true"] { background: #edf2ff; color: #315dde; box-shadow: 0 1px 5px #274cbe12; }
.guide-subheading { margin: 28px 0 20px; font-size: 23px; }
.guide-teaser { display: flex; align-items: center; gap: 17px; width: 100%; margin: 24px 0; padding: 23px; border: 1px solid #cfdcf7; border-radius: 20px; background: #edf3ff; text-align: left; color: var(--ink); }
.guide-teaser > span:nth-child(2) { flex: 1; min-width: 0; }
.guide-teaser strong { display: block; font-size: 19px; line-height: 1.35; }
.guide-teaser small { display: block; margin-top: 6px; color: #5c739b; }
.guide-teaser-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px; background: var(--panel); color: #3764ed; font-size: 28px; }
.guide-teaser > span:last-child { font-size: 23px; color: #3764ed; }
.guide-heading { padding-top: 8px; margin-bottom: 24px; }
.guide-heading h2 { margin: 0 0 12px; font-size: clamp(25px,3vw,32px); letter-spacing: -.7px; }
.guide-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.guide-capture-tip { display: flex; align-items: flex-start; gap: 15px; padding: 20px; margin: 24px 0; border: 1px solid #dde6fa; border-radius: 18px; background: #edf3ff; color: #315483; }
.guide-capture-tip > span { flex: 0 0 26px; font-size: 27px; line-height: 1.3; }
.guide-capture-tip strong { display: block; font-size: 12px; line-height: 1.6; }
.guide-capture-tip p { margin: 7px 0 0; font-size: 13px; line-height: 1.65; }
.guide-photo-card { margin: 24px 0; padding: 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); overflow: hidden; }
.guide-photo-open { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 13px; overflow: hidden; background: #eef1f6; cursor: zoom-in; }
.guide-photo-open img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.guide-photo-zoom { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; background: #14243ded; color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 2px 8px #0002; }
.guide-photo-card figcaption { padding: 13px 8px 5px; color: var(--muted); font-size: 12px; }
.guide-photo-warning { margin: 9px 8px 6px; font-size: 12px; color: var(--muted); }
.guide-photo-unavailable { display: grid; place-items: center; gap: 6px; min-height: 180px; padding: 24px; background: var(--page); border-radius: 13px; text-align: center; }
.guide-photo-unavailable > span { color: var(--muted); font-size: 40px; }
.guide-photo-unavailable strong { font-size: 16px; }
.guide-photo-unavailable p { margin: 0; color: var(--muted); font-size: 13px; }
.guide-contents { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; margin: 20px 0; }
.guide-contents > span { color: var(--muted); font-size: 12px; margin-right: 5px; }
.guide-contents button { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--panel); color: var(--blue); font-size: 12px; }
.guide-section { margin: 34px 0; scroll-margin-top: 108px; }
.guide-section h2 { font-size: 23px; line-height: 1.4; margin: 0 0 20px; letter-spacing: -.45px; }
.guide-intro-text { color: var(--muted); font-size: 15px; line-height: 1.8; }
.guide-materials { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.guide-materials article { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.guide-material-number { display: inline-flex; font-size: 11px; color: var(--blue); background: #edf3ff; border-radius: 9px; padding: 7px 10px; }
.guide-materials h3 { margin: 15px 0 8px; font-size: 18px; }
.guide-materials p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.guide-rule { padding: 24px; margin: 14px 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); scroll-margin-top: 108px; }
.guide-rule h3 { margin: 0 0 14px; font-size: 19px; line-height: 1.45; }
.guide-rule p, .guide-rule li { color: var(--muted); font-size: 14px; line-height: 1.8; }
.guide-rule strong { color: var(--ink); }
.guide-rule p:last-child { margin-bottom: 0; }
.guide-rule ul { padding-left: 22px; }
.guide-copy-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--blue); border-radius: 10px; background: var(--page); }
.guide-copy-line span { font-size: 15px; font-weight: 600; }
.guide-next .button-row { display: flex; flex-wrap: wrap; }
body.photo-viewing { overflow: hidden; }
.photo-viewer { width: min(1050px,calc(100vw - 40px)); height: min(950px,calc(100dvh - 40px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 90px #0005; }
.photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.photo-viewer::backdrop { background: #0a1222b8; backdrop-filter: blur(10px); }
.photo-viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.photo-viewer-top small { font-size: 9px; letter-spacing: 1px; }
.photo-viewer-top h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.3px; }
.photo-viewer-close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--page); color: var(--ink); font-size: 30px; }
.photo-viewer-canvas { display: flex; align-items: center; justify-content: center; min-height: 0; overflow: auto; padding: 16px; background: #e9edf3; overscroll-behavior: contain; }
.photo-viewer-canvas img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; flex-shrink: 0; }
.photo-viewer-canvas.is-zoomed { display: block; }
.photo-viewer-canvas.is-zoomed img { width: 200%; max-width: none; max-height: none; height: auto; }
.photo-viewer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.photo-viewer-switch { display: flex; flex: 1; gap: 6px; min-width: 0; }
.photo-viewer-switch button { flex: 1; padding: 10px; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--page); color: var(--muted); font-size: 12px; }
.photo-viewer-switch button[aria-pressed="true"] { background: #edf3ff; color: #315dde; border-color: #9eb6f4; }
.photo-viewer-bottom > p { width: 100%; margin: 0; font-size: 11px; color: var(--muted); }
html[data-theme="dark"] .guide-tabs button[aria-selected="true"], html[data-theme="dark"] .photo-viewer-switch button[aria-pressed="true"] { background: #304a70; color: #d3e3ff; }
html[data-theme="dark"] .guide-teaser { border-color: #45628b; background: #243a58; }
html[data-theme="dark"] .guide-teaser small { color: #b5c9e6; }
html[data-theme="dark"] .guide-teaser-icon, html[data-theme="dark"] .guide-material-number { background: #304a70; color: #c4d8ff; }
html[data-theme="dark"] .guide-teaser > span:last-child { color: #c4d8ff; }
html[data-theme="dark"] .guide-capture-tip { border-color: #47648b; background: #263e60; color: #ccdef8; }
html[data-theme="dark"] .photo-viewer-canvas { background: #101b2d; }
html[data-theme="dark"] .guide-photo-open { background: #101b2d; }
@media (max-width:640px) {
  .guide-tabs { gap: 3px; margin: 20px 0; padding: 4px; }
  .guide-tabs button { padding: 10px 7px; font-size: 11px; }
  .guide-teaser { gap: 12px; padding: 18px; }
  .guide-teaser strong { font-size: 17px; }
  .guide-teaser small { font-size: 11px; }
  .guide-teaser-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .guide-section { margin: 28px 0; scroll-margin-top: 86px; }
  .guide-section h2 { font-size: 21px; }
  .guide-materials { grid-template-columns: 1fr; gap: 10px; }
  .guide-materials article { position: relative; padding: 18px 18px 18px 66px; }
  .guide-material-number { position: absolute; left: 17px; top: 19px; }
  .guide-materials h3 { margin: 0 0 6px; }
  .guide-rule { padding: 20px; scroll-margin-top: 86px; }
  .guide-rule h3 { font-size: 18px; }
  .guide-capture-tip { padding: 18px; gap: 12px; }
  .guide-photo-card { padding: 8px; border-radius: 18px; }
  .guide-next .button-row > button { width: 100%; }
  .photo-viewer { width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .photo-viewer-top { padding: calc(14px + env(safe-area-inset-top)) 16px 14px; }
  .photo-viewer-top h2 { font-size: 17px; }
  .photo-viewer-bottom { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .photo-viewer-bottom > .button { width: 100%; }
  .photo-viewer-canvas { padding: 10px; }
}
