/* Shared application UI. Page-specific styles belong in their own stylesheet. */
:root {
    --ink: #203531;
    --muted: #657772;
    --brand: #176b56;
    --brand-hover: #10523f;
    --line: #dfe7e2;
    --surface: #ffffff;
    --canvas: #f5f7f4;
    --soft: #eaf2eb;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { color: var(--ink); background: var(--canvas); font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif; font-size: 15px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6, .question-content, .gnb { font-family: inherit; letter-spacing: -.04em; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #73a88b; outline-offset: 4px; }
button { border: 1px solid transparent; background: var(--brand); border-radius: 10px; min-height: 44px; padding: 11px 24px; font-weight: 600; transition: background .18s; }
button:hover { background: var(--brand-hover); }
button:disabled { opacity: .55; cursor: wait; }
button.border { border-color: var(--line); color: var(--ink); background: white; }
input:not([type=radio]):not([type=checkbox]), select, textarea { max-width: 100%; min-height: 48px; border: 1px solid #ccd9d1; border-radius: 9px; background: white; color: var(--ink); padding: 12px 14px; }
select { min-width: 0; width: min(100%, 360px); margin: 0 12px 12px 0; font-weight: 500; }
input::placeholder { color: #82908a; font-size: 14px; }
input[type=radio], input[type=checkbox] { accent-color: var(--brand); }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; background: var(--brand); color: white; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
header.site-header, header.mypage-header { min-height: 80px; height: auto; background: white; border: 0; border-bottom: 1px solid var(--line); padding: 18px max(24px, calc((100% - 1180px) / 2)); gap: 28px; }
.site-brand { display: flex; flex-shrink: 0; text-decoration: none; align-items: center; }
.site-brand img, .mypage-logo-box img { width: 172px; height: auto; }
header.site-header nav.gnb { gap: 28px; justify-content: flex-end; font-size: 14px; font-weight: 600; }
header.site-header nav.gnb a { padding: 6px 0; color: var(--muted); }
header.site-header nav.gnb a:hover, header.site-header nav.gnb a[aria-current=page] { color: var(--brand); }
header.site-header nav.sub { gap: 8px; }
header.site-header nav.sub a, header.mypage-header nav.sub a { margin: 0; padding: 8px 17px; font-size: 13px; border-radius: 8px; border-color: var(--line); background: white; color: var(--ink); }
header.site-header nav.sub a.join, header.site-header nav.sub a.mypage { background: var(--brand); border-color: var(--brand); color: white; }
main { display: block; min-height: calc(100vh - 205px); padding: 40px max(24px, calc((100% - 1180px) / 2)) 64px; border: 0; background: var(--canvas); }
main form { height: auto; }
main.home, main.ass { padding: 48px max(24px, calc((100% - 1180px) / 2)); }
main.home > div, main.ass > div { margin: 0; }
main.choice_main { height: auto; }
section.breadcrumbs { margin-bottom: 18px; font-size: 12px; }
section.breadcrumbs img { width: 18px; vertical-align: middle; }
main section.title { margin: 0 0 30px; }
main section.title h1 { color: var(--ink); font-size: clamp(26px, 3vw, 36px); line-height: 1.35; }
main section.title h3, main section.title h4 { color: var(--muted); font-size: 15px; font-weight: 400; margin: 12px 0 0; }
main section.container { display: flex; align-items: flex-start; gap: 26px; height: auto; }
main section aside { flex: 0 0 205px; width: 205px; padding: 12px; border: 1px solid var(--line); background: white; border-radius: 14px; }
main section aside nav a, main section aside nav form button { width: 100%; margin: 0 0 5px; padding: 13px 16px; color: var(--muted); background: transparent; font-size: 14px; text-align: left; border-radius: 8px; }
main section aside nav a::before, main section aside nav a::after { display: none; }
main section aside nav a:hover, main section aside nav form button:hover { color: var(--brand); background: var(--soft); }
main section aside nav a.selected, main section aside nav form button.selected { background: var(--soft); color: var(--brand); }
section.content { min-width: 0; height: auto; min-height: 400px; margin: 0; padding: 28px 32px; border: 1px solid var(--line); border-radius: 16px; overflow: auto; background: white; }
section.content h5 { font-size: 16px; padding: 0; border: 0; margin: 24px 0 12px; }
section.content h5:first-child { margin-top: 0; }
section.cards { gap: 20px; padding: 0; }
.card { position: relative; padding: 32px; border: 1px solid var(--line); background: white; border-radius: 16px; }
.card h4 { color: var(--brand); font-size: 13px; letter-spacing: .06em; }
.card h3 { font-size: 30px; margin-top: 16px; }
.card h5 { font-size: 15px; font-weight: 400; line-height: 1.8; }
a.card:hover { background: var(--soft); background-image: none; border-color: #a9c5b4; }
a.card:hover h3, a.card:hover h4, a.card:hover h5 { color: var(--brand); }
.ass_select_box { height: auto; margin: 0; padding: 24px; background: var(--soft); }
.ass_select_box .cards { height: auto; background: transparent; }
.ass_cards { gap: 20px !important; }
.main_cards a.card h5, .ass_cards a.card h5 { height: auto; }
.ass_radio_box input[type=radio]+label { width: auto; min-width: 100px; padding: 10px 20px; border-radius: 9px; }
.ass_radio_box input[type=radio]:checked+label { background: var(--brand); border-color: var(--brand); }
.select-div.ass-button-box { justify-content: flex-start; }
section.content form .input_box { height: auto; min-height: 70px; gap: 14px; flex-wrap: wrap; }
section.content form .input_box span { width: 120px; font-size: 14px; font-weight: 600; }
section.content form .input_box input, section.content form .input_box select { margin: 0; width: min(100%, 380px); height: auto; font-size: 15px; font-weight: 400; }
section.content form .input_box button { width: auto; min-width: 110px; height: auto; margin: 0; }
.signin-choise-box, .signin-choice-box, .signup-choice-box { display: flex; gap: 12px; height: auto; margin: 0 0 28px; }
.signin-choise-box a, .signin-choice-box a, .signup-choice-box a { width: auto; height: auto; padding: 8px 18px; margin: 0; border-radius: 8px; line-height: 1.7; font-size: 14px; text-decoration: none; background: #eef1ed; }
.signin-choise-box a.selected, .signin-choice-box a.selected, .signup-choice-box a.selected { color: var(--brand); background: var(--soft); opacity: 1; }
section.quiz { padding: 20px 12px; }
.question-content { font-size: 21px; line-height: 1.9; word-spacing: normal; text-align: left; }
.question-container, .mlc-question-container { width: 100%; min-width: 0; }
.question-carousel, .mlc-question-carousel { display: flex; }
.question-box, .mlc-question-box { min-width: 0; flex: 0 0 100%; }
.question-btn-box { flex-wrap: wrap; gap: 12px; }
.question-next, .question-prev, .question-pass { width: auto; min-width: 120px; height: 48px; border-radius: 9px; padding: 10px 22px; background: var(--brand); font-size: 15px; }
.question-prev { background: #e5ece6; color: var(--ink); }
.question-pass { background: #aa5145; }
.question-image-box { height: auto; }
.question-image-box img, .mlc-question-image-box img, .plage-mlc-content form img { min-width: 0; max-width: 100%; height: auto; max-height: 400px; object-fit: contain; }
.question-third, .question-forth { height: auto; flex-wrap: wrap; }
section.quiz label { font-size: 18px; }
section.content table { border-collapse: separate; border-spacing: 0 8px; }
section.content table th { font-size: 14px; padding: 12px; color: var(--muted); }
section.content div.knowledge, section.content div.result { font-size: 15px; }
.mypage-container .sidebar { flex: 0 0 220px; width: 220px; border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: white; }
.container .sidebar img { width: 48px; height: 48px; }
.user-info-box { margin: 0 0 24px; font-weight: 600; }
.sidebar ul { padding-left: 18px; }
.plage-record, .plage-progress, .plage-analysis { margin: 16px 0; background: var(--soft); border-radius: 8px; color: var(--brand); }
main section.container div.mypage-contents { display: block; flex: 1; width: 0; min-width: 0; margin: 0; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
main section.container div.mypage-contents table { box-shadow: none; border: 1px solid var(--line); }
main section.container div.mypage-contents th, main section.container div.mypage-contents td { border-color: var(--line); padding: 12px; font-size: 14px; }
main section.container div.mypage-contents th { background: var(--soft); opacity: 1; }
.assH-box, .learning-box { margin-top: 24px; }
.modal, [class$="-modal"] { z-index: 100; padding: 28px 16px; background-color: rgb(21 40 32 / 48%); }
.modal-content { display: flex; flex-direction: column; width: min(960px, 100%); height: auto; max-height: calc(100dvh - 56px); padding: 24px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 80px #172b3429; }
.modal-title { flex-shrink: 0; height: auto; min-height: 44px; gap: 16px; }
.modal-h3 { margin: 0; font-size: 20px; }
.modal-close { display: flex; justify-content: center; align-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; background: var(--brand); }
.modal-close img { width: 18px; height: 18px; object-fit: contain; }
.modal-main-content { min-height: 0; height: auto; border-radius: 0; overflow: auto; padding: 12px 4px; }
.modal-main-content section.cards { height: auto; width: 100%; }
.modal-main-content img { max-width: 100%; height: auto; }
footer.site-footer { min-height: 125px; padding: 28px max(24px, calc((100% - 1180px) / 2)); background: white; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-brand { font-weight: 800; font-size: 18px; letter-spacing: -.06em; color: var(--brand); }
.footer-caption { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.site-footer .footer_message { width: auto; color: var(--muted); font-size: 11px; }
@media (max-width: 800px) {
    header.site-header, header.mypage-header { padding: 16px 20px; gap: 14px; flex-wrap: wrap; }
    header.site-header nav.gnb { order: 3; flex: 1 0 100%; justify-content: flex-start; gap: 24px; overflow-x: auto; font-size: 13px; }
    header.site-header nav.sub { margin-left: auto; }
    .site-brand img, .mypage-logo-box img { width: 142px; }
    header.site-header nav.sub a { padding: 7px 12px; font-size: 12px; }
    main, main.home, main.ass { padding: 28px 20px 44px; }
    main section.container { display: flex; flex-direction: column; gap: 18px; }
    main section aside { flex: auto; width: 100%; padding: 8px; }
    main section aside nav { display: flex; flex-wrap: wrap; gap: 6px; }
    main section aside nav a { width: auto; margin: 0; padding: 10px 14px; }
    section.content { width: 100%; padding: 22px; min-height: 0; }
    section.cards { flex-wrap: wrap; }
    section.cards > .card { flex-basis: 240px; }
    .mypage-container .sidebar { width: 100%; flex: auto; }
    main section.container div.mypage-contents { width: 100%; padding: 18px; }
    .mypage-logo-box a:nth-child(2) { margin-left: 12px; }
    .mypage-header a span { font-size: 14px; }
    .question-content { font-size: 18px; }
    .question-third { display: grid; }
    .question-first { height: auto; line-height: 1.7; }
    .question-forth { justify-content: flex-start; }
    section.quiz h4 { font-size: 18px; }
    section.quiz h4::before { display: none; }
    .modal-content { padding: 18px; }
    .modal-main-content section.cards { display: block; }
    footer.site-footer { padding: 24px 20px; }
}
@media (max-width: 480px) {
    main section.title h1 { font-size: 26px; }
    section.content form .input_box { display: flex; align-items: stretch; gap: 7px; padding: 8px 0; }
    section.content form .input_box span { width: 100%; }
    section.content form .input_box input, section.content form .input_box select { width: 100%; }
    .question-next, .question-prev, .question-pass { min-width: 90px; padding: 8px 14px; }
    .ass_select_box { padding: 16px; }
    .card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* V3 uses radio groups and illustrated choice cards instead of select menus. */
.ass_radio_box, .grade-sub-select-option, .sem-select-option,
.chapter-select-option, .section-select-option, .unit-select-option {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.school_radio_box { padding: 0; }
.ass_radio_box input[type=radio] {
    display: block; position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%);
}
.ass_radio_box input[type=radio]+label {
    height: auto; min-height: 46px; line-height: 1.6; padding: 11px 18px;
    max-width: 100%; white-space: normal; font-size: 14px;
    border-color: var(--line); color: var(--ink); font-weight: 500;
}
.ass_radio_box input[type=radio]+label:hover { background: var(--soft); color: var(--brand); border-color: #9cbaa9; }
.ass_radio_box input[type=radio]:checked+label,
.ass_radio_box input[type=radio]:checked+label:hover { background: var(--brand); border-color: var(--brand); color: white; }
.ass_radio_box input[type=radio]:focus-visible+label { outline: 3px solid #73a88b; outline-offset: 3px; }
main.ass > .ass_select_box, main.home > .ass_select_box { margin: 0 !important; padding: 0; background: transparent; }
.ass_select_box .choice-title { display: block; margin-bottom: 26px; }
.ass_select_box .choice-title h2 { width: auto; padding: 0; text-align: left; font-size: 32px; background: transparent; }
.ass_select_box .choice-title h4 { margin: 10px 0 0; }
.ass_select_box .cards { display: flex; gap: 24px; padding: 0; }
.ass_select_box a.card { background: white; padding: 32px; }
.ass_select_box a.card:hover { background: var(--soft); }
.main_cards a.card h5 { display: block; }
.cars_img_box { margin-top: 28px; }
.cars_img_box img { max-width: 40%; max-height: 150px; object-fit: contain; }
.cars_img_box .arrow-next { width: 48px; height: 48px; background: var(--soft); border-radius: 50%; }
.cars_img_box .arrow-next::after { width: 10px; height: 10px; border-width: 2px; border-color: var(--brand); left: 17px; top: 18px; }
section.content > hr { height: 1px; background: var(--line); margin: 0 0 24px; }
.learning-position-box { width: 100%; }
.mypage-main { padding: 40px max(24px, calc((100% - 1180px) / 2)) 64px; }
.position-td span { background: var(--soft); color: var(--brand); font-size: 13px; }
@media (max-width: 600px) {
    .mypage-main { padding: 28px 20px 44px; }
    .ass_select_box .cards { flex-direction: column; }
    .ass_select_box .cards > .card { flex: auto; width: 100%; padding: 24px; }
    .ass_select_box .choice-title h2 { font-size: 26px; }
    .ass_radio_box input[type=radio]+label { min-width: 80px; padding: 10px 12px; }
}
