/* 입시·학습 허브의 반응형 화면과 접근성 스타일. */
:root {
    color-scheme: light;
    --ink: #172523;
    --muted: #526460;
    --border: #d9e1de;
    --green: #096047;
    --page: #f5f7f6;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; line-height: 1.55; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
a { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #096cbe; outline-offset: 3px; }
[hidden] { display: none !important; }
.js-only { display: none; }
.enhanced .js-only { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 12px; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: white; border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1200px; padding: 16px 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; text-decoration: none; min-height: 44px; }
.brand img { width: 104px; height: 32px; object-fit: contain; }
.site-name { font-size: 14px; color: var(--muted); }
.container { max-width: 1200px; margin: auto; padding: 28px 24px 0; }
.page-heading { display: flex; gap: 20px; align-items: baseline; margin-bottom: 24px; }
h1 { margin: 0; font-size: 32px; line-height: 1.3; font-weight: 800; }
.page-heading p { color: var(--muted); margin: 0; font-size: 16px; }
.finder { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.enhanced .finder { display: grid; grid-template-columns: minmax(200px, 1fr) auto; gap: 16px 24px; }
.search-form { display: flex; align-items: center; gap: 12px; background: white; border: 1px solid #81968e; border-radius: 6px; padding-left: 16px; min-height: 48px; min-width: 0; }
.search-form:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.search-form > img { flex: 0 0 22px; }
.search-form input { background: transparent; border: 0; outline: 0; min-width: 0; width: 100%; height: 46px; font-size: 16px; padding: 6px 0; }
input::-webkit-search-cancel-button { display: none; }
input::placeholder { color: #61706b; opacity: 1; }
.year-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.year-row label { font-size: 14px; font-weight: 600; flex-shrink: 0; }
select { min-height: 48px; border-radius: 6px; border: 1px solid #81968e; padding: 8px 30px 8px 12px; background: white; min-width: 0; max-width: 220px; }
.icon-button { position: relative; display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border-radius: 6px; }
.icon-button:hover { background: #e3ebe7; }
.icon-button img { width: 20px; height: 20px; }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.topic-nav button { min-height: 44px; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--border); background: white; font-size: 15px; font-weight: 600; }
.topic-nav button:hover { border-color: var(--green); }
.topic-nav button[aria-pressed="true"] { color: white; background: var(--green); border-color: var(--green); }
.feedback { margin: 12px 0 0; color: var(--green); font-size: 15px; }
.enhanced .result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.result-bar p { color: var(--muted); font-size: 15px; margin: 12px 0; overflow-wrap: anywhere; }
.reset-button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 4px; background: none; color: var(--green); font-size: 14px; font-weight: 600; }
.category-section { margin-bottom: 32px; }
.category-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.category-header h2, .category-header h3 { font-size: 20px; margin: 0; line-height: 1.4; }
.category-count { color: var(--muted); font-size: 14px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-card { display: flex; flex-direction: column; min-width: 0; min-height: 228px; padding: 20px; background: white; border: 1px solid var(--border); border-top: 3px solid #3b7eac; border-radius: 8px; text-decoration: none; transition: border-color 150ms, box-shadow 150ms; }
.dashboard-card:hover { border-color: var(--green); box-shadow: 0 3px 12px #1725230d; }
.dashboard-card[data-topic="subjects"] { border-top-color: #946326; }
.dashboard-card[data-topic="scores"] { border-top-color: #308261; }
.dashboard-card[data-topic="study"] { border-top-color: #b05270; }
.dashboard-card[data-topic="school"] { border-top-color: #7379ab; }
.dashboard-card[data-topic="statistics"], .dashboard-card[data-topic="examples"] { border-top-color: #64746d; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; min-height: 25px; }
.card-tags span { font-size: 12px; line-height: 1.4; border-radius: 3px; padding: 4px 7px; font-weight: 600; }
.type-tag { color: #334b60; background: #edf3f8; }
[data-topic="study"] .type-tag { background: #f9edf1; color: #8c3954; }
[data-topic="scores"] .type-tag { background: #e9f4ee; color: #266346; }
.year-tag { color: #285e42; background: #eaf3e8; }
.example-tag { color: #813d2c; background: #fbede7; }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.45; margin: 0 0 8px; word-break: keep-all; overflow-wrap: anywhere; }
.card-description { font-size: 15px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; word-break: keep-all; overflow-wrap: anywhere; }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; }
.card-bottom img { flex: 0 0 20px; }
.data-period { color: var(--muted); font-size: 13px; }
.access-hint { font-size: 13px; color: var(--muted); margin-bottom: 12px; overflow-wrap: anywhere; }
.common-content { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.common-title { margin: 0 0 20px; font-size: 22px; }
.recent-section { margin: 16px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.recent-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recent-header h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0; font-weight: 600; }
.recent-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.recent-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration-thickness: 1px; text-underline-offset: 4px; min-height: 44px; overflow-wrap: anywhere; }
.recent-link img { flex-shrink: 0; }
.text-button { min-height: 44px; padding: 8px 4px; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.empty-state { padding: 36px 0; }
.empty-state h2 { margin: 0 0 8px; font-size: 22px; }
.empty-state p { color: var(--muted); margin: 0 0 16px; overflow-wrap: anywhere; }
.primary-button { display: block; background: var(--green); color: white; border-radius: 6px; padding: 12px 16px; min-height: 44px; margin-bottom: 8px; }
footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 13px; }
footer p { margin: 0 0 8px; }
.footer-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
dialog { padding: 20px; border: 1px solid var(--border); border-radius: 8px; width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: #17252370; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-heading h2 { font-size: 20px; margin: 0; }
dialog input { width: 100%; min-height: 48px; padding: 8px; border: 1px solid #81968e; border-radius: 4px; }
@media (max-width: 1000px) {
    .enhanced .finder { grid-template-columns: 1fr; gap: 12px; }
    .year-row select { flex: 1; max-width: none; }
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .header-inner { padding: 10px 16px; }
    .brand { font-size: 18px; gap: 8px; }
    .brand img { width: 84px; height: 28px; }
    .site-name { display: none; }
    .container { padding: 20px 16px 0; }
    .page-heading { display: block; margin-bottom: 18px; }
    h1 { font-size: 28px; }
    .page-heading p { margin-top: 4px; font-size: 15px; }
    .year-row { gap: 8px; }
    .year-row label { font-size: 13px; }
    select { font-size: 14px; width: 100%; padding-left: 8px; padding-right: 20px; }
    .topic-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .topic-nav button { padding: 8px 4px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
    .cards-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .dashboard-card { padding: 18px; min-height: 206px; }
    .card-title { font-size: 19px; }
    .category-header h2, .category-header h3 { font-size: 19px; }
    .result-bar { align-items: flex-start !important; }
    .result-bar p { font-size: 14px; }
    .recent-links { display: grid; gap: 0; }
    .recent-link { font-size: 14px; }
    .recent-header h2 { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
