.tool-body { background: var(--mist); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tool-main { max-width: 1040px; margin: 0 auto; padding: 52px 22px 76px; }
.tool-hero { max-width: 720px; margin-bottom: 28px; }
.tool-hero h1 { margin: 0 0 12px; color: var(--navy); font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.05em; }
.tool-hero h1 span { color: var(--teal); }
.tool-hero p { max-width: 650px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.tool-card { padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 34px rgba(22, 42, 60, 0.07); }
.tool-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tool-tab { min-height: 42px; padding: 0 16px; border: 1px solid #c8d9df; border-radius: 999px; background: #fff; color: var(--teal-dark); cursor: pointer; font-size: 12px; font-weight: 800; }
.tool-tab:hover { border-color: var(--teal); background: #f0f8f7; }
.tool-tab.is-active { border-color: var(--teal); background: var(--teal); color: #fff; }
.grade-rows { display: grid; gap: 10px; }
.grade-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(100px, 0.65fr) minmax(120px, 0.75fr) auto; align-items: end; gap: 10px; padding: 13px; border: 1px solid #e0eaee; border-radius: 11px; background: #fbfdfd; }
.grade-row .tool-field { gap: 5px; }
.grade-remove { width: 34px; height: 34px; border: 1px solid #d8e4e7; border-radius: 8px; background: #fff; color: #a05b5b; cursor: pointer; font-size: 20px; line-height: 1; }
.grade-remove:hover { border-color: #c98f8f; background: #fff7f7; }
.grade-actions { margin-top: 16px; }
.grade-history-field { max-width: 560px; margin-top: 19px; }
.grade-history-field label span { color: var(--muted); font-weight: 500; }
.tool-card h2 { margin: 0 0 8px; color: var(--navy); font-size: 21px; letter-spacing: -0.025em; }
.tool-card-intro { margin: 0 0 23px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.tool-dropzone { display: grid; place-items: center; min-height: 180px; padding: 24px; border: 2px dashed #bcd5d5; border-radius: 13px; background: #f7fbfb; text-align: center; transition: border-color 140ms ease, background 140ms ease; }
.tool-dropzone:hover, .tool-dropzone:focus-within { border-color: var(--teal); background: #f0f8f7; }
.tool-dropzone strong { display: block; margin-bottom: 6px; color: var(--navy); font-size: 15px; }
.tool-dropzone span { display: block; color: var(--muted); font-size: 12px; }
.tool-file { margin-top: 15px; color: var(--teal-dark); font-size: 12px; font-weight: 700; }
.tool-file-list { margin: 13px 0 0; padding: 0; list-style: none; color: #5b7181; font-size: 12px; line-height: 1.7; }
.tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 22px; }
.tool-field { display: flex; flex-direction: column; gap: 7px; }
.tool-field label { color: var(--navy); font-size: 12px; font-weight: 750; }
.tool-field input, .tool-field select { min-height: 43px; padding: 0 12px; border: 1px solid #cfdde5; border-radius: 9px; background: #fff; color: var(--navy); font-size: 13px; }
.tool-field input:focus, .tool-field select:focus { border-color: var(--teal); outline: 3px solid rgba(36, 124, 131, 0.16); }
.tool-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 17px; color: var(--navy); font-size: 12px; font-weight: 700; }
.tool-check input { width: 16px; height: 16px; accent-color: var(--teal); }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 22px; }
.tool-button { min-height: 44px; padding: 0 17px; border: 0; border-radius: 9px; background: var(--teal); color: #fff; cursor: pointer; font-size: 12px; font-weight: 800; }
.tool-button:hover { background: var(--teal-dark); }
.tool-button.secondary { background: #edf4f4; color: var(--teal-dark); }
.tool-button:disabled { cursor: not-allowed; opacity: 0.5; }
.tool-message { min-height: 20px; margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tool-result { display: none; margin-top: 24px; padding: 18px; border: 1px solid #cce1df; border-radius: 12px; background: #f2faf8; }
.tool-result.is-visible { display: block; }
.tool-result h3 { margin: 0 0 8px; color: var(--navy); font-size: 15px; }
.tool-result p { margin: 4px 0; color: #5b7181; font-size: 12px; line-height: 1.5; }
.resize-output-preview { margin: 14px 0; padding: 12px; border: 1px solid #d8e5e7; border-radius: 10px; background: #fff; }
.resize-output-preview img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(55vh, 440px); margin: 0 auto; border-radius: 6px; object-fit: contain; }
.resize-output-preview figcaption { margin-top: 9px; color: #5b7181; font-size: 12px; line-height: 1.4; text-align: center; }
.tool-download { display: inline-flex; align-items: center; min-height: 38px; margin-top: 11px; padding: 0 13px; border-radius: 8px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 800; text-decoration: none; }
.tool-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.tool-links a { color: var(--teal-dark); font-size: 12px; font-weight: 750; text-decoration: none; }
.tool-links a:hover { text-decoration: underline; }
.tool-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tool-info { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tool-info h3 { margin: 0 0 5px; color: var(--navy); font-size: 13px; }
.tool-info p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.attendance-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 19px; }
.attendance-stat { padding: 14px; border-radius: 10px; background: #f4f8fa; }
.attendance-stat strong { display: block; color: var(--teal-dark); font-size: 22px; letter-spacing: -0.03em; }
.attendance-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
@media (max-width: 700px) {
    .tool-main { padding: 36px 16px 56px; }
    .tool-fields, .tool-info-grid, .attendance-result, .grade-row { grid-template-columns: 1fr; }
    .tool-card { padding: 20px 17px; }
    .grade-remove { width: 100%; }
}
