.tools-layout {
    display: grid;
    grid-template-columns: 176px minmax(0,1fr);
    gap: 56px;
}
.tools-sidebar {
    padding-top: 12px;
}
.tools-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tools-sidebar nav a {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
}
.tools-sidebar nav a span {
    opacity: 0;
}
.tools-sidebar nav a[aria-current=page] {
    background: #eef3ff;
    color: var(--blue);
}
.tools-sidebar nav a[aria-current=page] span {
    opacity: 1;
}
.tools-side-note {
    margin: 35px 16px;
}
.tools-main {
    min-width: 0;
    max-width: 1040px;
}
.tools-heading {
    padding: 8px 0 28px;
}
.tools-heading h1 {
    font-size: 38px;
    line-height: 1.4;
    letter-spacing: -1.5px;
}
.tools-heading p {
    margin-top: 18px;
}
.tool-card {
    border: 1px solid var(--line);
    padding: 28px;
    border-radius: 14px;
    margin-bottom: 18px;
    background: #fff;
    min-width: 0;
}
.tool-card h2 {
    font-size: 19px;
    margin: 0;
}
.tool-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.tool-tag {
    font: 400 10px 'Pretendard Variable',Kanit,sans-serif;
    letter-spacing: 1px;
    color: var(--blue);
}
.tool-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    margin-bottom: 24px;
}
.tool-fields>* {
    min-width: 0;
}
.tool-card label small {
    font-size: 11px;
    color: var(--muted);
}
.tool-card input,.tool-card select {
    font-size: 15px;
}
.tool-card input[type=number],.tool-card input[inputmode=text] {
    font-family: 'Pretendard Variable',Manrope,sans-serif;
    font-variant-numeric: tabular-nums;
}
.tool-presets {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.tool-presets button {
    border: 1px solid var(--line);
    background: var(--surface);
    font: 12px 'Pretendard Variable',Manrope,sans-serif;
    padding: 7px 13px;
    border-radius: 5px;
    cursor: pointer;
}
.tool-error {
    color: #a93232;
    font-size: 13px;
    margin: 15px 0;
}
.tool-error:empty {
    display: none;
}
.tool-result:empty {
    display: none;
}
.tool-result {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}
.tool-metrics {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
}
.tool-metrics small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 8px;
}
.tool-metrics strong {
    font: 500 clamp(22px,2.5vw,30px) 'Pretendard Variable',Manrope,sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}
.tool-metrics span {
    font-size: 12px;
    margin-left: 5px;
    color: var(--muted);
}
.tool-metrics>div:first-child strong {
    color: var(--blue);
}
.tool-table {
    max-height: 440px;
}
.tool-table th {
    position: sticky;
    top: 0;
}
.tool-details>summary {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    cursor: pointer;
    font-size: 17px;
    list-style: none;
}
.tool-details>summary:after {
    content: '+';
    font-size: 22px;
    color: var(--blue);
}
.tool-details[open]>summary:after {
    content: '−';
}
.tool-details>summary small {
    font-size: 12px;
    color: var(--muted);
    margin-left: auto;
}
.tool-details[open]>summary {
    margin-bottom: 25px;
}
.tool-method {
    margin: 20px 0;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    font-size: 12px;
    color: var(--muted);
}
.tool-method summary {
    cursor: pointer;
    min-height: 30px;
}
.tool-method a,.text-link {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.text-link {
    background: none;
    border: 0;
    padding: 7px 0;
    font: inherit;
    cursor: pointer;
}
.tool-local {
    margin: 40px 0 0;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.tool-local strong {
    font-size: 14px;
    font-weight: 500;
}
.tool-local p {
    font-size: 11px;
}
.tool-local .actions {
    gap: 12px;
    flex-shrink: 0;
}
.tool-local .button {
    font-size: 15px;
    min-height: 40px;
    padding: 8px 13px;
}
.segment-input {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 24px;
    gap: 12px;
    align-items: center;
}
.segment-input>button {
    background: none;
    border: 0;
    font-size: 22px;
    cursor: pointer;
}
.tool-days {
    display: flex;
    gap: 9px;
    border: 0;
    padding: 0;
    margin: 15px 0 24px;
    flex-wrap: wrap;
}
.tool-days legend {
    font-size: 13px;
    margin-bottom: 12px;
}
.tool-days label {
    margin: 0;
    position: relative;
    cursor: pointer;
}
.tool-days input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    min-height: 1px;
}
.tool-days span {
    display: block;
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 13px;
}
.tool-days input:checked+span {
    color: var(--blue);
    border-color: var(--blue);
    background: #eef3ff;
}
.tool-days input:focus-visible+span {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}
.plan-phase {
    font-size: 11px;
    color: var(--muted);
    display: block;
}
.plan-chart {
    display: flex;
    align-items: end;
    gap: 5px;
    height: 130px;
    border-bottom: 1px solid var(--line);
    margin: 24px 0 40px;
}
.plan-bar {
    flex: 1;
    position: relative;
    background: #245bff;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
}
.plan-bar.recovery {
    background: #a8bbea;
}
.plan-bar span {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font: 10px 'Pretendard Variable',Manrope,sans-serif;
    color: var(--muted);
}
.record-studio {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(300px,.85fr);
    gap: 24px;
    align-items: start;
}
.studio-preview {
    position: sticky;
    top: 24px;
    min-width: 0;
}
.studio-preview canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: repeating-conic-gradient(#dadde3 0% 25%,#eff0f3 0% 50%) 0/24px 24px;
}
.studio-preview p {
    margin-top: 16px;
}
.record-studio .tool-card {
    padding: 22px;
}
.record-studio .tool-fields {
    gap: 8px 14px;
}
.about-hero {
    padding: 35px 0 70px;
    border-bottom: 1px solid var(--line);
}
.about-hero h1 {
    font-size: clamp(36px,4.7vw,62px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -2px;
}
.about-hero>p:not(.eyebrow) {
    line-height: 1.9;
    color: var(--muted);
    margin: 28px 0;
}
.about-services article {
    display: grid;
    grid-template-columns: 130px minmax(0,740px);
    gap: 30px;
    padding: 55px 0;
    border-bottom: 1px solid var(--line);
}
.about-number {
    font-size: 42px;
    color: #b6c6ed;
    font-weight: 400;
}
.about-services h2 {
    font-size: 26px;
    line-height: 1.5;
}
.about-services p {
    line-height: 2;
}
.about-contact {
    background: #f5f7fc;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-top: 64px;
    padding: 48px;
}
.about-contact h2 {
    font-size: 32px;
}
.about-email {
    display: inline-block;
    font-size: clamp(21px,3.5vw,40px);
    color: var(--blue);
    margin: 14px 0 25px;
    overflow-wrap: anywhere;
}
.about-contact>.muted {
    max-width: 760px;
    line-height: 1.8;
}
.about-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 35px;
    font-size: 12px;
}
.tool-card button:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.tools-main [hidden] {
    display: none!important;
}
@media(max-width:1100px) {
    .tools-layout {
        gap: 28px;
        grid-template-columns: 150px minmax(0,1fr);
    }
    .record-studio {
        grid-template-columns: 1fr;
    }
    .studio-preview {
        position: static;
        max-width: 520px;
    }
    .tool-local {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }
    .tool-local .actions {
        margin-bottom: 0;
    }
}
@media(max-width:767px) {
    .header nav {
        gap: 24px;
        width: 100%;
        justify-content: flex-start;
        font-size: 12px;
    }
    .tools-layout {
        display: block;
    }
    .tools-sidebar {
        padding: 0;
    }
    .tools-sidebar>.eyebrow,.tools-side-note {
        display: none;
    }
    .tools-sidebar nav {
        flex-direction: row;
        gap: 4px;
        overflow: auto;
        border-bottom: 1px solid var(--line);
        padding-bottom: 14px;
    }
    .tools-sidebar nav a {
        font-size: 12px;
        padding: 10px 11px;
        flex-shrink: 0;
    }
    .tools-sidebar nav a span {
        display: none;
    }
    .tools-heading {
        padding-top: 28px;
    }
    .tools-heading h1 {
        font-size: 30px;
    }
    .tool-card {
        padding: 22px 18px;
    }
    .tool-card-heading {
        align-items: flex-start;
        gap: 8px;
    }
    .tool-tag {
        font-size: 9px;
    }
    .tool-fields {
        gap: 5px 13px;
    }
    .tool-card label {
        font-size: 12px;
    }
    .tool-card input,.tool-card select {
        font-size: 16px;
        padding: 10px;
    }
    .tool-metrics {
        gap: 12px;
        grid-template-columns: 1fr 1fr;
    }
    .tool-metrics strong {
        font-size: 25px;
    }
    .tool-details>summary {
        font-size: 16px;
        flex-wrap: wrap;
    }
    .tool-details>summary small {
        font-size: 11px;
        margin-left: 0;
    }
    .segment-input {
        grid-template-columns: 1fr 1fr 24px;
        gap: 6px 10px;
        border-bottom: 1px solid var(--line);
    }
    .segment-input label:nth-child(3) {
        grid-row: 2;
    }
    .segment-input>button {
        grid-column: 3;
        grid-row: 1;
    }
    .tool-days {
        gap: 6px;
    }
    .tool-days span {
        padding: 9px 11px;
    }
    .tool-local .actions {
        flex-wrap: wrap;
        flex-shrink: 1;
    }
    .about-hero {
        padding-top: 10px;
        padding-bottom: 45px;
    }
    .about-services article {
        grid-template-columns: 38px minmax(0,1fr);
        gap: 15px;
        padding: 35px 0;
    }
    .about-number {
        font-size: 26px;
    }
    .about-services h2 {
        font-size: 22px;
    }
    .about-contact {
        padding: 26px 22px;
    }
    .about-contact h2 {
        font-size: 26px;
    }
    .desktop-break {
        display: none;
    }
    .record-studio {
        gap: 22px;
    }
    .plan-bar span {
        font-size: 8px;
    }
}
@media(prefers-reduced-motion:no-preference) {
    .tool-result {
        animation: tool-reveal .2s ease-out;
    }
    @keyframes tool-reveal {
        from {
            opacity: .4;
            transform: translateY(3px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
}
.record-download {
    margin-top: 64px;
}
.record-download .record-studio {
    grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr);
}
.record-download .studio-preview {
    max-width: none;
    width: 100%;
}
.record-download form {
    align-self: start;
}
.record-download .studio-preview canvas {
    display: block;
    width: 100%;
    height: auto;
}
@media(max-width:850px) {
    .record-download .record-studio {
        grid-template-columns: minmax(0,1fr);
    }
    .record-download .studio-preview {
        position: static;
        max-width: 100%;
    }
}
/* Running tool navigation shares the horizontal tabs used by events and My Page. */
.tools-layout {
    display: block;
}
.tools-main {
    max-width: none;
}
.tools-heading {
    padding-top: 8px;
}
/* Running tools: alternating blue/green sections without shadows. */
.tools-main [data-tool-tone] {
    --tool-surface: #f1f6ff;
    --tool-border: #ccdcf5;
}
.tools-main [data-tool-tone="green"] {
    --tool-surface: #eff7f2;
    --tool-border: #cde2d5;
}
.tools-main .tool-card {
    background: var(--tool-surface,#f1f6ff);
    border-color: var(--tool-border,#ccdcf5);
    box-shadow: none;
    margin-bottom: 32px;
}
.tools-main>.tool-details[open]>summary {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tool-border);
    margin-bottom: 24px;
}
.tools-main .tool-card-heading {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tool-border);
}
.tools-main .tool-card input,.tools-main .tool-card select {
    background: #fff;
    border-color: #a5b1c2;
}
.tools-main .tool-presets button {
    background: #fff;
    border-color: var(--tool-border);
}
.tools-main .tool-result:not(:empty) {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--tool-border);
    border-radius: 10px;
    box-shadow: none;
}
.tools-main .tool-local {
    background: var(--tool-surface);
    border: 1px solid var(--tool-border);
    border-radius: 12px;
    padding: 24px;
    gap: 20px;
    box-shadow: none;
}
@media(max-width:767px) {
    .tools-main .tool-card {
        margin-bottom: 24px;
    }
    .tools-main .tool-result:not(:empty) {
        padding: 18px 14px;
    }
    .tools-main>.tool-details[open]>summary {
        padding-bottom: 16px;
        margin-bottom: 20px;
    }
    .tools-main .tool-local {
        padding: 22px 18px;
    }
}
.tools-main .tool-presets button {
    border-radius: 8px;
    border-color: var(--button-line);
    box-shadow: none;
}
/* Readable action labels, consistent with common buttons. */
.tools-main .tool-presets button {
    font-size: 15px;
}
/* Match choices to the section surface: blue on blue, green on green. */
.tools-main [data-tool-tone="green"] .choice-options>.choice-option:hover {
    border-color: #83b69a;
    background: #f0f8f3;
}
.tools-main [data-tool-tone="green"] .choice-options>.choice-option[aria-checked=true] {
    border-color: #56a581;
    background: #e5f4eb;
    color: #216647;
    box-shadow: inset 0 0 0 .5px #56a581;
}
.tools-main [data-tool-tone="green"] .choice-options>.choice-option:focus-visible {
    outline-color: #27835a;
}
/* Keep calculation choices and short distance headings readable on phones. */
.tool-table th {
    line-height: 1.45;
}
.tool-table th br {
    display: block;
}
@media(max-width:767px) {
    .tool-fields>.tool-solve {
        grid-column: 1/-1;
    }
    .tool-solve select,.tool-solve .choice-group,.tool-solve .choice-options {
        width: 100%;
    }
    .tool-solve .choice-option {
        flex: 1 1 0;
        min-width: 0;
    }
    .tool-table th,.tool-table td {
        padding: 10px 8px;
    }
    .tool-table th {
        font-size: 12px;
    }
    .tool-table td {
        font-size: 13px;
    }
    .tool-table table {
        min-width: 0;
        width: 100%;
    }
}
/* Keep the two target course fields on one row after the previous time. */
.tool-fields>.tool-field-wide {
    grid-column: 1/-1;
}
/* Photo record backgrounds: two mutually exclusive, keyboard-accessible toggles. */
.record-background-picker {
    margin: 16px 0 24px;
}
.record-background-picker>span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.record-background-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.record-background-buttons .button {
    margin: 0;
}
.record-background-picker .record-background-buttons .button[aria-pressed="true"] {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
.record-background-buttons button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}
.record-background-picker[aria-busy="true"] {
    opacity: .65;
}
