:root { --sim-accent: #93415f; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { color: var(--ink); }
button, .file-button, .text-file-label { cursor: pointer; }
button { border: 1px solid var(--line); background: var(--white); }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, .viewport:focus-visible, .file-button:has(+ input:focus-visible) { outline: 3px solid #2f6597; outline-offset: 3px; }
.site-header { position: relative; backdrop-filter: none; }
.header-inner { width: min(1560px, calc(100% - 48px)); min-height: 66px; }
.brand-mark { width: 35px; height: 35px; }
.simulator { width: min(1560px, calc(100% - 48px)); margin: auto; }
.breadcrumb { padding: 8px 0 3px; font-size: 10px; }
.sim-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 5px 0 16px; }
.sim-eyebrow { margin: 0 0 8px; color: var(--sim-accent); font: 700 10px Arial,sans-serif; letter-spacing: .16em; }
.sim-eyebrow span { color: var(--ink-soft); margin-left: 10px; font-size: 9px; }
.sim-hero h1 { margin: 0; font: 600 clamp(25px, 2.2vw, 35px)/1.45 "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .025em; }
.sim-hero p:last-child { margin: 5px 0 0; font-size: 12px; color: var(--ink-soft); }
.title-mark { display: inline-flex; margin-left: 20px; vertical-align: middle; }
.title-mark i { width: 18px; height: 18px; border-radius: 50%; background: #4a82b8; margin-left: -5px; mix-blend-mode: multiply; }
.title-mark i:nth-child(2) { background: #e7a93d; }.title-mark i:nth-child(3) { background: #c96f8b; }
.quiet-button { border: 0; background: transparent; padding: 8px 0; font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.quiet-button span { margin-left: 8px; }
.mode-bar { display: flex; border-bottom: 1px solid var(--line); gap: 26px; }
.mode-bar button { position: relative; border: 0; padding: 12px 0; background: transparent; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.mode-bar button[aria-selected="true"] { color: var(--sim-accent); }
.mode-bar button[aria-selected="true"]::after { content: ''; position: absolute; height: 3px; bottom: -1px; left: 0; right: 0; background: var(--sim-accent); }
.mode-bar small { margin-left: 10px; font-size: 10px; font-weight: 400; color: var(--ink-soft); }
.mini-label { margin: 0; font: 700 10px/1.5 Arial,sans-serif; letter-spacing: .12em; color: var(--sim-accent); }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: start; gap: 18px; padding: 16px 0 20px; }
.comparison { position: relative; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.comparison-toolbar { min-height: 52px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.comparison-label { font-size: 11px; font-weight: 700; }
#fullscreen-toggle { min-height: 34px; padding: 5px 12px; border: 1px solid var(--ink); border-radius: 5px; font-size: 12px; font-weight: 700; }
#fullscreen-toggle[aria-pressed="true"] { color: white; background: var(--ink); }
select { max-width: 100%; border: 1px solid #c9ceca; border-radius: 5px; background: var(--white); padding: 5px 24px 5px 8px; font-size: 11px; min-height: 32px; }
.zoom-controls { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.zoom-controls button, .image-zoom-controls button { min-width: 30px; min-height: 32px; border-radius: 4px; font-size: 13px; }
.zoom-controls button:last-child, .image-zoom-controls button:last-child { padding: 3px 8px; font-size: 11px; }
.zoom-controls input { width: 75px; accent-color: var(--ink); }
.zoom-controls output, .image-zoom-controls output { font: 11px Arial,sans-serif; min-width: 39px; text-align: center; }
.highlight-switch { display: flex; align-items: center; gap: 4px; font-size: 11px; white-space: nowrap; }
input[type="checkbox"] { accent-color: var(--sim-accent); width: 15px; height: 15px; }
.focus-bar { min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 5px 12px; background: #f8f7f1; }
.focus-label { font-size: 11px; font-weight: 700; }
.focus-bar select { min-height: 28px; padding-top: 2px; padding-bottom: 2px; background: transparent; }
#interaction-hint { margin-left: auto; color: var(--ink-soft); font-size: 10px; }
.comparison-body { display: grid; grid-template-columns: 170px minmax(0,1fr); height: clamp(640px, 80vh, 1000px); min-height: 0; }
.comparison-area { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.comparison.is-upload .comparison-body { grid-template-columns: minmax(0,1fr); }
.step-navigation { min-height: 0; padding: 14px 10px; background: #f4f1e9; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.process-hint { font-size: 10px; color: var(--ink-soft); margin: 4px 0 12px; }
.step-buttons { display: grid; gap: 9px; }
.step-group { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.step-group > p { font-size: 11px; font-weight: 700; margin: 0 0 2px; }
.step-button { text-align: left; padding: 6px 8px; border: 1px solid #d7d5cb; background: transparent; font-size: 11px; line-height: 1.6; border-radius: 5px; min-height: 32px; }
.step-button:hover { background: #ede8de; }
.step-button[aria-current="step"] { border-color: var(--sim-accent); background: #f0e3e7; color: #77334c; font-weight: 700; }
.step-group:has([aria-current="step"]) > p { color: var(--sim-accent); }
.final-step { margin-top: 5px; border-color: var(--ink); font-weight: 700; }
.comparison-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); padding: 0 10px 10px; gap: 10px; }
.view-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view-heading { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 38px; padding: 5px 2px; font-size: 14px; }
.view-heading small { font: 9px Arial,sans-serif; color: var(--ink-soft); font-weight: 400; }
.view-column figure { margin: 0; min-height: 0; flex: 1; display: flex; }
.viewport { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: #e5e8e2; border: 1px solid #d6dcd6; border-radius: 5px; touch-action: none; cursor: zoom-in; }
.viewport:active { cursor: grabbing; }
.viewport canvas { position: absolute; display: block; max-width: none; }
.change-outline { position: absolute; z-index: 1; border: 2px dashed #122e35; outline: 1px solid white; box-shadow: 0 0 0 1px white inset; pointer-events: none; }
.change-outline span { position: absolute; left: -2px; top: -18px; font: 700 10px/15px sans-serif; white-space: nowrap; padding: 0 4px; color: white; background: #122e35; border: 1px solid white; }
.error-message { margin: 5px 12px 10px; border-left: 3px solid #9a3131; padding: 8px; background: #fff0e8; color: #7a2424; font-size: 12px; }
.lesson-notes { padding: 4px 0; min-width: 0; }
.lesson-heading { display: grid; gap: 6px; padding-bottom: 9px; }
.lesson-notes h2 { margin: 0; font: 600 20px/1.5 "Yu Mincho",serif; }
.step-question { margin: 0; font-size: 12px; line-height: 1.75; font-weight: 600; }
.step-notes { margin: 0; display: grid; grid-template-columns: minmax(0,1fr); }
.step-notes > div { padding: 10px 0; border-top: 1px solid var(--line); }
.step-notes dt { font-size: 11px; font-weight: 700; }
.step-notes dt span { display: inline-block; width: 20px; color: var(--sim-accent); }
.step-notes dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }
.change-links { display: flex; flex-wrap: wrap; gap: 4px; }
.change-links button { min-height: 26px; padding: 2px 6px; border-radius: 3px; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.step-tip { margin: 4px 0 0; padding: 6px 10px; border-left: 2px solid var(--sim-accent); background: #ede9e2; font-size: 10px; color: var(--ink-soft); line-height: 1.8; }
.contrast-evidence { margin: 5px 0; background: var(--white); border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; font-size: 10px; line-height: 1.8; }
.contrast-evidence strong, .contrast-evidence span { display: block; }
.contrast-evidence small { display: block; font-size: 9px; color: var(--ink-soft); }
.drop-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 15px; margin-top: 12px; border: 2px dashed #8f9f98; border-radius: 8px; }
.drop-zone.is-dragging { background: #eaf1ed; border-color: var(--ink); }
.drop-overlay { display: none; }
.comparison.is-upload.is-dragging .drop-overlay { display: flex; position: absolute; inset: 8px; z-index: 5; pointer-events: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 3px dashed var(--ink); border-radius: 8px; background: #eaf1edf5; text-align: center; padding: 20px; }
.drop-overlay strong { font-size: clamp(17px,2vw,23px); }.drop-overlay span { font-size: 12px; }
.drop-zone strong { font-size: 13px; }.drop-zone p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; }
.file-button { margin-left: auto; border: 1px solid var(--ink); border-radius: 6px; padding: 7px 15px; background: var(--ink); color: white; font-size: 12px; font-weight: 600; }
.file-button span { margin-left: 20px; }.drop-hint { font-size: 10px; color: var(--ink-soft); }
.upload-copy { font-size: 12px; color: var(--ink-soft); }
.upload-checklist { display: grid; gap: 0; font-size: 11px; }
.upload-checklist > div { padding: 12px 0; border-bottom: 1px solid var(--line); }.upload-checklist dt { font-weight: 700; }.upload-checklist dd { margin: 5px 0 0; color: var(--ink-soft); }
.save-area { max-width: 360px; margin-top: 22px; }.save-area > label { display: block; font-size: 11px; font-weight: 700; margin-bottom: 8px; }.save-area select { width: 100%; }
.primary-button { width: 100%; display: flex; justify-content: space-between; margin-top: 9px; background: var(--ink); color: white; border-color: var(--ink); border-radius: 5px; padding: 9px 13px; font-size: 12px; }
.save-area p { margin: 8px 0; font-size: 10px; color: var(--ink-soft); }
.empty-state { flex: 1; min-height: 0; display: grid; place-content: center; text-align: center; padding: 25px; }.empty-state > span { font-size: 55px; color: #83978b; }.empty-state h2 { margin: 10px 0 5px; font-size: 17px; }.empty-state p { font-size: 12px; color: var(--ink-soft); }.text-file-label { font-size: 12px; text-decoration: underline; text-underline-offset: 5px; }
.sim-footer { border-top: 1px solid var(--line); padding: 17px 0 25px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 10px; color: var(--ink-soft); }.sim-footer p { margin: 0; }.sim-footer a { text-underline-offset: 4px; }
.learning-points { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.learning-points > summary { cursor: pointer; padding: 15px 18px; font-size: 14px; font-weight: 700; }
.learning-points > summary span { margin-left: 12px; font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.learning-points > summary:focus-visible { outline: 3px solid #2f6597; outline-offset: 3px; }
.learning-points-body { padding: 0 18px 16px; font-size: 12px; line-height: 1.85; }
.learning-points-body > p { max-width: 1000px; }
.learning-points table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.learning-points caption { text-align: left; padding: 10px 0; font-weight: 700; }
.learning-points th, .learning-points td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.learning-points thead { background: #f4f1e9; }
.learning-points th:first-child { width: 23%; }
.learning-points small { color: var(--ink-soft); font-size: 10px; font-weight: 400; }
.points-check { padding: 12px; background: #edf2ed; border-left: 2px solid var(--ink); }
.points-reference { color: var(--ink-soft); font-size: 11px; }
@media (max-width: 600px) {
  .learning-points > summary { padding: 12px; }
  .learning-points > summary span { display: block; margin: 4px 0 0 18px; }
  .learning-points-body { padding: 0 10px 10px; font-size: 11px; }
  .learning-points th, .learning-points td { padding: 7px 5px; }
  .learning-points th:first-child { width: 26%; }
}
dialog { width: min(650px,calc(100% - 32px)); max-height: 85dvh; border: 1px solid var(--line); padding: 24px; border-radius: 14px; color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
dialog::backdrop { background: #102f3588; backdrop-filter: blur(4px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.dialog-header button { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; }
dialog h2 { font: 600 24px/1.5 "Yu Mincho",serif; }dialog h3 { margin: 24px 0 7px; font-size: 14px; }dialog p, dialog li { font-size: 12px; color: var(--ink-soft); line-height: 1.9; }dialog a { text-underline-offset: 3px; }
.image-dialog { width: min(1300px,calc(100% - 24px)); height: calc(100dvh - 24px); max-height: 1100px; padding: 14px; overflow: hidden; }
.image-dialog[open] { display: flex; flex-direction: column; gap: 8px; }
.image-dialog h2 { margin: 0; font: 600 16px/1.5 "Hiragino Sans","Yu Gothic",sans-serif; }
.image-zoom-controls { display: flex; align-items: center; justify-content: center; gap: 7px; }
.enlarged-viewport { cursor: grab; }.image-hint { margin: 0; text-align: center; font-size: 10px; }
.has-fullscreen-card { overflow: hidden; }
.workspace.is-fullscreen, .workspace:fullscreen { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 12px; grid-template-columns: minmax(0,1fr) 220px; grid-template-rows: minmax(0,1fr); gap: 16px; background: #f5f3eb; }
.workspace.is-fullscreen .comparison { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.workspace.is-fullscreen .comparison-body { flex: 1; min-height: 0; height: auto; }
.workspace.is-fullscreen .comparison-toolbar, .workspace.is-fullscreen .focus-bar { flex-shrink: 0; }
.workspace.is-fullscreen .lesson-notes { height: 100%; min-height: 0; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; overscroll-behavior: contain; }
.workspace.is-fullscreen .step-notes { grid-template-columns: minmax(0,1fr); gap: 0; }
@media (max-width: 1100px) {
  .sim-hero h1 { font-size: 28px; }.mode-bar small { display: none; }
  .zoom-controls input { width: 55px; }#interaction-hint { font-size: 9px; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .step-notes { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
}
@media (max-width: 800px) {
  .workspace.is-fullscreen { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) minmax(130px,27%); padding: 6px; gap: 8px; }
  .workspace.is-fullscreen .step-notes { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
  .simulator,.header-inner { width: calc(100% - 28px); }
  .comparison-body { grid-template-columns: 132px minmax(0,1fr); }
  .step-navigation { padding: 12px 7px; }.step-button { padding: 5px; font-size: 10px; }
  .zoom-controls input { display: none; }.comparison-label { display: none; }
  #interaction-hint { margin: 0; width: 100%; }
  .sim-footer span { display: none; }
}
@media (max-width: 520px) {
  .brand strong { font-size: 12px; }.brand small { font-size: 8px; }.brand-mark { width: 28px; height: 28px; font-size: 18px; }.brand { gap: 7px; }
  .sim-hero { align-items: start; padding-bottom: 17px; gap: 7px; }.sim-hero h1 { font-size: 24px; }.sim-hero p:last-child { font-size: 10px; }.sim-eyebrow { font-size: 8px; }.sim-eyebrow span { display: none; }.title-mark { margin-left: 12px; }.title-mark i { width: 13px; height: 13px; }
  #open-method { font-size: 9px; max-width: 75px; flex-shrink: 0; text-align: right; }
  .mode-bar { gap: 24px; }.mode-bar button { font-size: 13px; }
  .lesson-notes { padding: 12px 0; }.lesson-notes h2 { font-size: 20px; }.step-notes { gap: 0 12px; }.step-notes dt { font-size: 10px; }.step-notes dd { font-size: 10px; }.step-question { font-size: 11px; }.step-tip { font-size: 10px; }
  .comparison-toolbar { padding: 6px; gap: 5px; }#fullscreen-toggle { font-size: 11px; padding: 4px 7px; }.zoom-controls { gap: 2px; }.zoom-controls button { min-width: 26px; }.zoom-controls button:last-child { font-size: 9px; padding: 3px 5px; }.zoom-controls output { font-size: 10px; min-width: 32px; }
  .highlight-switch { width: 100%; justify-content: flex-end; margin-top: -3px; font-size: 10px; }
  .focus-bar { padding: 5px 7px; gap: 6px; }.focus-label { font-size: 10px; }#interaction-hint { font-size: 8px; }
  .comparison-body { grid-template-columns: 96px minmax(0,1fr); height: 400px; }
  .step-navigation { padding: 10px 5px; }.step-navigation .mini-label { font-size: 7px; }.process-hint { font-size: 8px; }.step-group > p { font-size: 10px; }.step-button { font-size: 9px; }
  .comparison-grid { padding: 0 5px 6px; gap: 6px; }.view-heading { min-height: 33px; gap: 2px; font-size: 12px; }.view-heading small { display: none; }.change-outline span { font-size: 8px; }
  .sim-footer { font-size: 9px; }.sim-footer p { max-width: 150px; text-align: right; }
  .drop-zone { gap: 8px; }.drop-zone p { font-size: 10px; }.file-button { margin-left: 0; }.drop-hint { font-size: 9px; }.upload-checklist { display: block; }
  dialog { padding: 18px; }dialog h2 { font-size: 21px; }.image-dialog { padding: 8px; }.image-dialog h2 { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }* { transition: none !important; } }

.image-info { margin: 8px 0 0; color: var(--ink-soft); font-size: 11px; overflow-wrap: anywhere; }
.simulation-method { margin-top: 18px; border-top: 1px solid var(--line); }
.simulation-method > summary { cursor: pointer; padding: 14px 0; font-weight: 700; }
.simulation-method > summary:focus-visible { outline: 3px solid #2f6597; outline-offset: 3px; }
.method-content { max-width: 1000px; }
.method-content h3 { margin: 20px 0 6px; font-size: 13px; }
.method-content p, .method-content li { overflow-wrap: anywhere; }
.method-content a { text-underline-offset: 3px; }
.method-content .method-small { font-size: 10px; color: var(--ink-soft); }
