/* Final rhythm layer: shared geometry, calm surfaces, and usable phone layouts. */
:root{--panel-radius:14px;--control-radius:9px;--focus-ring:#7296b6}
.workspace,.content,.card,.grow{min-width:0}
.content{padding-bottom:40px}
.content>.page-title{min-height:44px;align-items:center;gap:16px;margin-bottom:24px}
.page-title h1{margin:0;line-height:1.35}
.page-title>.row,.page-title>div>.row{gap:10px;flex-wrap:wrap;justify-content:flex-end}
.card{border-radius:var(--panel-radius)}
.card-head{align-items:center;gap:16px;padding-bottom:18px;margin-bottom:0}
.card-head h3{margin:0}
.card-head .text-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;white-space:nowrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;border-radius:var(--control-radius);white-space:nowrap;vertical-align:middle;text-align:center}
button{touch-action:manipulation}
button:disabled{opacity:.42;cursor:not-allowed}
:is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:46px;border-radius:var(--control-radius);box-sizing:border-box}
textarea{border-radius:var(--control-radius);line-height:1.75;resize:vertical;box-sizing:border-box}
label>input,label>select,label>textarea{margin-top:7px}
input[readonly]{background-color:#f7f9fb;color:#536575}
input::placeholder,textarea::placeholder{color:#788692;opacity:1}
.tag{display:inline-flex;align-items:center;justify-content:center;min-height:24px;line-height:1.35;vertical-align:middle}
.student-banner{align-items:center;gap:14px}
.student-banner>div:last-child{min-width:0}
.student-identity-line{align-items:center;gap:10px;flex-wrap:wrap}
.student-identity-line>small{margin:0!important;line-height:1.5}
.student-banner small{line-height:1.65}
.legend{display:flex;flex-wrap:wrap;align-items:center;row-gap:10px}
.legend>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.empty-state{padding:32px 16px;line-height:1.8;font-size:14px}
.notice-filter{margin-bottom:20px}
.notice-list-row{column-gap:14px;padding-top:18px;padding-bottom:18px}
.notice-customer-contacts small{margin-bottom:6px}
.notice-footer{align-items:center;gap:20px}
.notice-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.notes-card .comment-tools,.notes-card .closing-tools{display:flex;align-items:center;gap:10px}
.editor-actions>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.editor-actions .saved-status{padding:0;line-height:1.6}
.level-panel summary{align-items:center}
.level-panel summary b{min-width:0;line-height:1.6}
.level-panel summary small{white-space:nowrap;flex-shrink:0}
.rating-options{justify-content:flex-end}
.report .rating-options{justify-content:center}
.report-toolbar>.row{gap:9px;flex-wrap:wrap}
.customer-metrics{display:flex;flex-wrap:wrap;gap:14px 26px}
.customer-layout .card-head{padding-bottom:16px}
.contact-item{gap:8px 12px}
.customer-history-row{gap:16px}
.staff-table{width:100%;min-width:0;table-layout:fixed}
.staff-table :is(th,td){text-align:center!important;vertical-align:middle;padding:18px 8px;white-space:normal;overflow-wrap:anywhere;line-height:1.65}
.staff-table th:nth-child(1){width:18%}.staff-table th:nth-child(2){width:24%}.staff-table th:nth-child(3){width:9%}.staff-table th:nth-child(4){width:10%}.staff-table th:nth-child(5){width:13%}.staff-table th:nth-child(6){width:26%}
.staff-table .staff-person{justify-content:center;gap:10px;flex-wrap:wrap}
.staff-table .staff-person b{white-space:nowrap}
.staff-table .row{gap:8px;flex-wrap:wrap;justify-content:center}
.staff-table .btn{padding:8px 10px;font-size:12px;min-height:36px}
.staff-table small{font-size:12px;line-height:1.6}
.list tbody tr:last-child>td{border-bottom:0}
.list th{font-weight:500;line-height:1.5}
.leave-table .row{align-items:center}
.pay-breakdown>div{gap:18px}
.pay-breakdown b{white-space:nowrap}
.modal-title{gap:16px;align-items:center;margin-bottom:22px}
.modal-title h2{margin:0;font-size:22px}
.modal-title>button{display:grid;place-items:center;flex:none;width:36px;height:36px;line-height:1;border-radius:8px}
.modal-title>button:hover{background:#edf2f6}
.modal-actions{gap:10px;flex-wrap:wrap;align-items:center;margin-top:24px}
.form-grid>label{min-width:0}
.student-head{align-items:center;gap:12px}
.photo-file-label{min-height:44px}
.activity-filters .btn{min-height:46px}
@media(hover:hover){.btn.outline:hover{background:#f3f6f9;border-color:#b8c8d5}.btn.light:hover{filter:brightness(.97)}.family-link:hover{color:#527795}}
html[data-theme=dark] input[readonly]{background:#192632;color:#b9cbd9}
html[data-theme=dark] .modal-title>button:hover,html[data-theme=dark] .btn.outline:hover{background:#2b4052}
@media(max-width:1000px) and (min-width:701px){.staff-table :is(th,td){padding:15px 5px;font-size:12px}.staff-table .avatar{width:30px;height:30px}.staff-table .row{flex-direction:column}.staff-table .btn{min-height:34px}.staff-table .staff-person{gap:6px}}
@media(max-width:700px){
.content{padding:22px 16px 32px}
.content>.page-title{min-height:44px;gap:14px;flex-wrap:wrap;margin-bottom:22px}
.page-title h1{font-size:25px}
.page-title>.row{width:100%;justify-content:flex-start}
.page-title>.btn{margin-left:auto}
.card{padding:18px}
.card-head{gap:12px;padding-bottom:16px}
.card-head>h3{font-size:16px;line-height:1.5;min-width:0}
.card-head .text-btn{font-size:12px;min-height:36px}
.btn{min-height:42px;font-size:13px;padding:10px 13px}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{font-size:16px}
.mode-control select,.calendar-tools select,.student-head select,.pay-week-controls select{font-size:12px}
.student-banner{gap:12px}
.student-identity-line>h2{font-size:21px}
.notice-summary .feedback-context,.feedback-summary .feedback-context{grid-template-columns:1fr;gap:16px}
.feedback-context .context-block p{margin-top:7px;font-size:14px}
.notice-list-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px}
.notice-list-row .avatar{width:36px;height:36px}
.notice-row-action .btn{min-width:84px;min-height:42px}
.notice-footer{align-items:flex-start;gap:18px}
.notice-actions{gap:8px;justify-content:flex-end}
.notice-compose textarea{font-size:15px;line-height:1.85}
.level-control-card{grid-template-columns:1fr;gap:14px}
.level-progress{padding-bottom:0!important}
.assessment-row{grid-template-columns:minmax(0,1fr) 116px;gap:12px;padding:16px 14px}
.rating-options{gap:4px}
.rating-button{width:36px;height:42px;flex:0 0 36px}
.rating-button .symbol{width:20px;height:20px}
.level-panel>summary{flex-wrap:wrap;gap:8px;padding:16px 14px}
.level-panel summary .level-badge{flex:none}
.level-panel summary b{flex:1 1 145px;font-size:15px}
.level-panel summary small{margin-left:auto}
.level-panel>summary:after{margin-left:4px}
.notes-card{margin-top:18px}
.notes-card .comment-tools{gap:8px}
.comment-tools>small{flex:1 1 100%;line-height:1.6}
.editor-actions{gap:12px;padding:12px 0;margin-top:6px;align-items:center}
.editor-actions>div:last-child{margin-left:auto;justify-content:flex-end}
.editor-actions .btn{min-height:42px;padding:10px 12px}
.saved-status{font-size:11px}
.report-toolbar{gap:12px}
.report-toolbar>.row{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.report-toolbar>.row>.btn{padding:9px 5px;font-size:12px;white-space:normal}
.report{padding:26px 20px}
.report .assessment-row{grid-template-columns:minmax(0,1fr) 76px;gap:12px;padding:15px 10px}
.report .rating-options{gap:5px}
.report .rating-options .symbol{margin:0;width:18px;height:18px;flex:none}
.report-level h3{line-height:1.65}
.customer-layout aside{grid-template-columns:1fr}
.customer-history-row{grid-template-columns:minmax(0,1fr) auto;gap:10px 16px}
.customer-history-row>div:nth-child(2){grid-column:1;grid-row:2}
.customer-history-row>.btn{grid-column:2;grid-row:1/3;align-self:center}
.customer-metrics{gap:12px 18px;padding-top:16px;margin-top:16px;font-size:12px}
.customer-metrics b{margin-left:5px}
.account-panel label{margin:18px 0}
.pay-line{justify-content:flex-start}
.pay-lesson-amount{gap:8px 14px}
.pay-toolbar{margin-bottom:18px}
.pay-breakdown>div{font-size:14px}
.pay-week-controls select{font-size:13px}
.modal-actions>.btn{min-height:42px}
.modal-title{margin-bottom:18px}.modal-title h2{font-size:21px}
/* Histories and staff lists reflow into complete cards instead of clipped tables. */
.history-table,.staff-table,.history-table tbody,.staff-table tbody{display:block;min-width:0!important;width:100%;table-layout:auto}
.history-table colgroup,.history-table thead,.staff-table thead{display:none}
.history-table tr,.staff-table tr{display:grid;gap:16px 18px;padding:17px;border:1px solid var(--line);border-radius:11px;margin-bottom:14px;position:relative}
.history-table tr:last-child,.staff-table tr:last-child{margin-bottom:0}
.history-table tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.history-table td,.staff-table td{display:block;padding:0!important;border:0!important;text-align:left!important;min-width:0;font-size:14px;white-space:normal;overflow-wrap:anywhere}
.history-table td:before,.staff-table td:before{content:attr(data-label);display:block;font-size:11px;color:var(--muted);margin-bottom:5px;line-height:1.5;font-weight:400}
.history-table td:first-child{grid-column:1/-1;padding-right:76px!important}
.history-table td[data-label="보기"]{position:absolute;right:17px;top:17px}
.history-table td[data-label="보기"]:before{display:none}
.history-table td[data-label="상태"]{grid-column:1/-1;padding-top:12px!important;border-top:1px solid var(--line)!important}
.history-student{justify-content:flex-start}
.history-table .report-timestamp{justify-content:flex-start;align-items:baseline;gap:6px;flex-wrap:wrap;margin-top:6px;font-size:12px}
.history-table .report-timestamp span{margin:0}
.history-table td:last-child .btn{min-width:62px;padding:9px 12px;min-height:40px}
.staff-table tr{grid-template-columns:repeat(3,minmax(0,1fr))}
.staff-table td[data-label="강사"],.staff-table td[data-label="아이디 · 이메일"],.staff-table td[data-label="관리"]{grid-column:1/-1}
.staff-table td[data-label="강사"]:before{display:none}
.staff-table .staff-person{justify-content:flex-start;flex-wrap:nowrap;gap:10px}
.staff-table .staff-person .avatar{width:36px;height:36px}
.staff-table td[data-label="관리"]{padding-top:13px!important;border-top:1px solid var(--line)!important}
.staff-table td[data-label="관리"]:before{display:none}
.staff-table .row{justify-content:flex-start;flex-direction:row;gap:8px}
.staff-table .btn{min-height:40px;font-size:12px;padding:9px 12px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* A short desktop viewport must never hide account or logout controls. */
@media(min-width:701px){
.sidebar{display:flex;flex-direction:column;height:100dvh;overflow:hidden}
.sidebar>.brand,.sidebar>.season,.sidebar>.theme-switch,.sidebar>.profile{flex-shrink:0}
.sidebar>.side-nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;scrollbar-width:thin;scrollbar-color:#c7d2db transparent;padding-right:3px;margin-right:-3px}
.sidebar>.theme-switch{margin-top:10px;margin-bottom:0}
.sidebar>.profile{margin-top:8px}
}
.content>.page-title .btn{min-height:44px}
@media(min-width:701px){.sidebar{height:calc(100dvh - 36px)}}
@media(max-width:700px){.customer-directory .directory-search input,.customer-directory #customer-order{font-size:16px}.level-choice select,#feedback-student{font-size:14px}.form-grid input,.form-grid select,.student-fields input,.student-fields select{font-size:16px}}
.dashboard-stats .stat strong{margin:0}
/* Date, text and select fields share one baseline inside dialogs. */
dialog input:not([type=checkbox]):not([type=radio]):not([type=file]),dialog select{height:48px;min-height:48px;line-height:1.5;padding:10px 12px;box-sizing:border-box}
dialog select{padding-right:40px}

/* Dashboard summaries are keyboard-accessible navigation controls. */
.dashboard-stats button.stat{font:inherit;color:inherit;text-align:left;cursor:pointer;appearance:none;transition:border-color .15s ease,box-shadow .15s ease}
.dashboard-stats button.stat:hover{border-color:#8b9fb2;box-shadow:0 2px 8px #1739570d}
.dashboard-stats button.stat:focus-visible{outline:2px solid #7296b6;outline-offset:3px}
