[hidden] { display: none !important; }
main { max-width: 1200px; padding-bottom: 100px; }
nav { flex-wrap: wrap; }
.problem-intro { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 28px 0 22px; }
.problem-intro > img { width: 110px; height: 110px; object-fit: cover; border: 3px solid white; border-radius: 24px; box-shadow: 0 8px 24px #24567e14; }
.problem-intro > div { max-width: 700px; }
.problem-intro h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -1px; }
.problem-intro p { margin-bottom: 0; }
.task-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; margin: 20px 0; }
#progress { min-width: 150px; text-align: center; font-weight: bold; }
.workspace { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.workspace > section { min-width: 0; }
#problem { font-size: 19px; line-height: 1.65; }
#step-title { margin-top: 0; }
#step-title:focus { outline: none; }
#fields select { max-width: 100%; border: 2px solid #b5cddd; border-radius: 11px; padding: 9px 12px; font: inherit; color: #214b72; background: white; }
#fields input { width: 165px; max-width: 100%; }
#fields select[aria-invalid="true"] { border-color: #d8334b; background: #fff1f3; }
#fields select:focus-visible { outline: 3px solid #214b72; outline-offset: 3px; }
#fields input.correct, #fields select.correct { border-color: #25a77c; background: #eafaf2; }
.result.correct { color: #187858; }
.question .result { display: block; margin-top: 6px; }
.field-help, .drawing-note { font-size: 13px; color: #477b8f; line-height: 1.5; }
details { margin-top: 20px; padding-top: 16px; border-top: 1px solid #dceaf1; }
summary { cursor: pointer; font-weight: bold; line-height: 1.5; }
summary:focus-visible { outline: 3px solid #214b72; outline-offset: 4px; }
#steps { padding-left: 24px; }
#steps li { padding: 7px 0; line-height: 1.6; overflow-wrap: anywhere; }
.read-button { margin-top: 4px; font-size: 14px; padding: 9px 15px; }
.data-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 16px; }
.data-table caption { text-align: left; font-weight: bold; margin-bottom: 10px; }
.data-table th, .data-table td { text-align: left; border-bottom: 1px solid #d4e4ee; padding: 8px; }
.data-table thead { background: #e4f0fa; }
.data-table tbody tr:nth-child(even) { background: #ffffff80; }
.geometry-diagram { display: block; width: 100%; max-width: 420px; margin: 12px auto; }
.geometry-diagram text { font: 17px 'Trebuchet MS', sans-serif; fill: #214b72; }
.pattern-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.pattern-grid figure { margin: 0; background: #f7fbff; border: 1px solid #d8e6ee; border-radius: 16px; padding: 10px; text-align: center; }
.pattern-grid figcaption { font-size: 14px; font-weight: bold; }
.pattern-grid svg { width: 100%; max-width: 160px; display: block; margin: auto; }
.pattern-grid svg text { fill: #214b72; font: 14px 'Trebuchet MS', sans-serif; }
.sequence { font-size: clamp(21px,3vw,30px); font-weight: bold; text-align: center; padding: 20px 8px; background: #e9edff; border-radius: 18px; overflow-wrap: anywhere; }
.completion { text-align: center; margin-top: 24px; background: #edf9ef; }
.new-task-row { text-align: center; margin-top: 26px; }
#new-task { background: #c5e3c2; border-color: #39834b; color: #215b32; }
.sheet-card { min-width: 0; margin-bottom: 24px; }
.ps-grid { overflow: auto; max-height: 540px; border: 1px solid #a7c6d8; border-radius: 10px; background: white; }
.ps-grid .economy-grid { min-width: 1000px; }
.ps-grid caption { text-align: left; padding: 12px; font-weight: bold; background: #edf5fa; }
.ps-grid .economy-grid th { position: sticky; top: 0; }
.ps-grid .economy-grid input { max-width: none; }
.ps-grid td { position: relative; }
.ps-grid input.selected-cell { outline: 2px solid #176cad; outline-offset: -2px; background-color: #e2f0ff; }
.ps-grid input.ps-fill-preview { outline: 2px dashed #176cad; outline-offset: -2px; }
.ps-grid .ps-fill-handle { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; min-width: 0; padding: 0; border: 1px solid white; border-radius: 0; background: #176cad; cursor: crosshair; touch-action: none; z-index: 2; }
.ps-grid input[readonly] { background: #f5f8fa; border: 0; }
.ps-formula { flex: 1; min-width: 160px; font: 16px Consolas, monospace; }
.ps-address { min-width: 44px; text-align: center; font-weight: bold; padding: 10px; background: #e7f2fa; border-radius: 9px; }
.ps-value, .ps-status, .ps-residual { font-size: 14px; line-height: 1.6; }
.sheet-problem { font-size: 18px; line-height: 1.6; }
.ps-residual:not(:empty) { background: #e5f1fa; padding: 12px; border-radius: 12px; font-weight: bold; }
.pattern-overview { margin-bottom: 24px; }
.pattern-overview > h2 { margin-top: 0; }
.composite-series { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.composite-series figure, .composite-candidates figure { margin: 0; padding: 12px 6px 0; border: 1px solid #d2e2ed; border-radius: 20px; background: #f8fcff; }
.composite-series figcaption, .composite-candidates figcaption { text-align: center; font-weight: bold; }
.composite-frame { display: block; width: 100%; max-width: 340px; margin: auto; }
.composite-frame text { font: bold 13px 'Trebuchet MS', sans-serif; fill: #214b72; paint-order: stroke; stroke: #f8fcff; stroke-width: 3px; stroke-linejoin: round; }
.composite-frame .scale-label { font-size: 11px; font-weight: normal; fill: #688397; }
.composite-frame .position-label { fill: #688397; }
.composite-frame .arm-a { fill: #277765; }
.composite-frame .arm-b { fill: #8053a0; }
.composite-frame .marker-label { fill: #a3333d; }
.composite-frame .triangle-label { fill: #305ca7; }
.composite-candidates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 24px 0; }
.pattern-legend { font-size: 14px; line-height: 1.7; margin: 18px 0 0; }
.pattern-reference { margin-top: 14px; }
#solution-graphic:not(:empty) { max-width: 340px; margin: 18px auto; border-radius: 20px; background: #f8fcff; border: 1px solid #d2e2ed; }
@media(max-width:950px) { .composite-series { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .composite-series, .composite-candidates { grid-template-columns: 1fr; } }
@media(max-width:850px) { .workspace { grid-template-columns: 1fr; } }
@media(max-width:600px) { .problem-intro { gap: 12px; text-align: left; } .problem-intro > img { width: 70px; height: 85px; border-radius: 16px; } .problem-intro h1 { font-size: 28px; } .problem-intro p { font-size: 14px; } .tabs button { padding: 10px 12px; font-size: 14px; } #problem { font-size: 17px; } .task-navigation { gap: 8px; } .task-navigation button { padding: 10px 12px; font-size: 14px; } #progress { min-width: 125px; font-size: 14px; } }
