:root { 
    --font-main: 'Gaegu', cursive; 
    --color-text: #44403c; 
    --color-bg: #FDFDF2; 
    --color-primary: #f59e0b; 
    --color-border: #a8a29e; 
    --color-dark-border: #57534e; 
}

body { 
    font-family: var(--font-main); 
    background-color: var(--color-bg); 
    color: var(--color-text); 
    margin: 0; 
}

#app { 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

main { 
    flex-grow: 1; 
    padding: 1rem; 
}

button { 
    background: none; 
    border: none; 
    padding: 0; 
    cursor: pointer; 
    font-family: var(--font-main); 
}

.header { 
    position: sticky; 
    top: 0; 
    z-index: 40; 
    display: flex; 
    align-items: center; 
    padding: 1rem; 
    font-size: 1.5rem; 
    font-weight: 700; 
    background-color: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(8px); 
    border-bottom: 2px dashed var(--color-border); 
}

.header .header-center { 
    flex: 1; 
    text-align: center; 
    min-width: 0; 
    margin-bottom: 0; 
}

.header .header-actions { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    margin-right: 2vw; 
}

.header .icon-btn { 
    color: var(--color-dark-border); 
    transition: all 0.2s ease-in-out; 
    font-size: 1.75rem; 
}

.header .icon-btn:hover { 
    color: var(--color-primary); 
    transform: scale(1.2) rotate(8deg); 
}

.student-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    gap: 1.1em;
    box-sizing: border-box;
    flex-shrink: 0;
}

.student-name {
    flex: 1 1 0;
    min-width: 5em;
    white-space: nowrap;
    font-size: 1.4rem;
    font-weight: 700;
}

#student-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: flex-start;
}

.heart-paper-area {
    display: flex;
    align-items: center;
    gap: 0.7em;
    min-width: 5.5em;
    justify-content: flex-end;
}

.heart-count, .paper-count {
    display: flex;
    align-items: center;
    gap: 0.2em;
}

.heart-num, .paper-num {
    min-width: 2em;
    text-align: right;
    display: inline-block;
}

.record-btn {
    min-width: 4.5em;
    flex-shrink: 0;
}

.student-card.selected { 
    border-color: var(--color-primary); 
    transform: rotate(-1.5deg); 
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); 
}

.sticker-btn { 
    background: #fff; 
    border: 2px solid var(--color-dark-border); 
    padding: 10px 18px; 
    border-radius: 12px; 
    font-weight: 700; 
    font-size: 1.25rem; 
    box-shadow: 3px 3px 0px var(--color-dark-border); 
    transition: all 0.15s ease-out; 
}

.sticker-btn:hover:not(:disabled) { 
    transform: scale(1.05); 
    box-shadow: 1px 1px 0px var(--color-dark-border); 
}

.sticker-btn:disabled { 
    background-color: #e7e5e4; 
    color: var(--color-border); 
    box-shadow: none; 
    cursor: not-allowed; 
}

.sticker-btn.red { 
    background-color: #fecaca; 
    border-color: #b91c1c; 
    box-shadow-color: #b91c1c; 
    color: #b91c1c;
}

.tag-btn { 
    background-color: #f1f5f9; 
    color: #475569; 
    padding: 0.5rem 0.75rem; 
    border-radius: 8px; 
    font-size: 1rem; 
    font-weight: 700; 
    transition: all 0.2s; 
}

.tag-btn:hover { 
    background-color: #e2e8f0; 
    transform: scale(1.05); 
}

.tag-btn.selected, .tag-btn.active {
    background-color: #fcd34d !important;
    color: #92400e !important;
    border: 2px solid #f59e0b !important;
    box-shadow: 0 2px 8px #fcd34d44;
}

.praise-toggle {
    background-color: #f1f5f9;
    color: #475569;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 2px solid #cbd5e1;
}

.praise-toggle:hover {
    background-color: #e2e8f0;
    transform: scale(1.05);
}

.praise-toggle.active {
    background-color: #dcfce7;
    color: #166534;
    border-color: #22c55e;
    box-shadow: 0 2px 8px #22c55e44;
}

#praise-btn.active {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border-color: #22c55e !important;
}

#warn-btn.active {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #ef4444 !important;
}

.phrase-btn { 
    background-color: #e0f2fe; 
    color: #0c4a6e; 
    padding: 0.5rem 0.75rem; 
    border-radius: 8px; 
    font-size: 1rem; 
    font-weight: 700; 
    transition: all 0.2s; 
    border: 2px solid #0ea5e9;
}

.phrase-btn:hover { 
    background-color: #bae6fd; 
    transform: scale(1.05); 
    box-shadow: 0 2px 8px #0ea5e944;
}

.modal-backdrop { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background-color: rgba(0,0,0,0.3); 
    backdrop-filter: blur(4px); 
    z-index: 50; 
    justify-content: center; 
    align-items: center; 
    padding: 1rem; 
}

.modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 2px solid var(--color-dark-border);
    border-radius: 16px;
    box-shadow: 8px 8px 0 var(--color-dark-border);
    width: 100%;
    max-width: 500px;
    padding: 1.5rem;
    transform: rotate(0deg);
}

.modal-content.tilted { 
    transform: rotate(-1deg); 
}

.modal-title { 
    font-size: 1.875rem; 
    font-weight: 700; 
    text-align: center; 
    margin-bottom: 1rem; 
    line-height: 1.2; 
}

.modal-body { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
}

.modal-footer {
    flex-shrink: 0;
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: 0.5em;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

.form-label { 
    font-weight: 700; 
    font-size: 1.25rem; 
}

.modal-input, .modal-textarea, .modal-select { 
    font-family: var(--font-main); 
    font-size: 1.25rem; 
    border: 2px dashed var(--color-border); 
    border-radius: 8px; 
    padding: 0.5rem 0.75rem; 
    width: 100%; 
    box-sizing: border-box;
}

.modal-input:focus, .modal-textarea:focus, .modal-select:focus { 
    outline: none; 
    border-style: solid; 
    border-color: var(--color-primary); 
}

.loader { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    border: 4px solid #f3f3f3; 
    border-top-color: var(--color-primary); 
    animation: spin 1s linear infinite; 
}

@keyframes spin { 
    to { 
        transform: rotate(360deg); 
    } 
}

#action-bar { 
    position: sticky; 
    top: 74px; 
    z-index: 30; 
    padding: 0.75rem; 
    background-color: rgba(251, 238, 203, 0.8); 
    backdrop-filter: blur(4px); 
    transition: transform 0.3s ease-in-out; 
    transform: translateY(-150%); 
}

.footer { 
    position: sticky; 
    bottom: 0; 
    z-index: 40; 
    display: flex; 
    justify-content: space-around; 
    padding-block: 0.5rem; 
    font-weight: 700; 
    background-color: #ffffff; 
    border-top: 2px solid #d6d3d1; 
    color: var(--color-dark-border); 
}

.nav-btn { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 0.25rem; 
    color: var(--color-dark-border); 
    flex-grow: 1; 
    font-size: 1rem;
}

.nav-btn.active { 
    color: var(--color-primary); 
}

.nav-icon { 
    font-size: 1.875rem; 
    transition: transform 0.2s; 
}

.nav-btn:hover .nav-icon { 
    transform: rotate(5deg) scale(1.1); 
}

.hidden { 
    display: none !important; 
}

#opinion-action-bar {
    font-size: 1.25rem;
}

#opinion-action-bar .sticker-btn {
    font-size: 1.05rem;
    padding: 0.45em 1.1em;
    min-width: 90px;
    height: 2.8em;
    box-sizing: border-box;
}

#opinion-selection-counter {
    font-size: 1.15rem;
}

.opinion-student-btn {
    background: #f1f5f9;
    border: 2px solid #a8a29e;
    border-radius: 8px;
    color: #44403c;
    font-size: 1.35rem;
    font-family: var(--font-main);
    font-weight: 700;
    padding: 0.35em 1em;
    cursor: pointer;
    transition: all 0.15s;
    margin: 0;
    outline: none;
}

.opinion-student-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #b45309;
    box-shadow: 0 2px 8px #fcd34d44;
}

#opinion-student-table {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1.18rem;
}

#opinion-student-table th, #opinion-student-table td {
    padding: 0.32em 0.7em;
    word-break: break-all;
}

#opinion-student-table th {
    background: #fef3c7;
    border-bottom: 2.5px solid #f59e0b;
    text-align: center;
    font-size: 1.08em;
    height: 1.7em;
}

#opinion-student-table td {
    background: #fff;
    border-bottom: 1.5px solid #fde68a;
    vertical-align: top;
    font-size: 1.05em;
}

/* 종합의견 테이블 - 체크박스와 이름은 고정, 의견만 유연하게 */
#opinion-student-table th:nth-child(1), #opinion-student-table td:nth-child(1) { 
    width: 50px; 
    min-width: 50px; 
    max-width: 50px;
}

#opinion-student-table th:nth-child(2), #opinion-student-table td:nth-child(2) { 
    width: 120px; 
    min-width: 120px; 
    max-width: 120px;
}

#opinion-student-table th:nth-child(3), #opinion-student-table td:nth-child(3) { 
    width: auto; 
    min-width: 300px; 
}

@media (max-width: 600px) {
    #opinion-student-table th, #opinion-student-table td { 
        font-size: 1rem; 
        padding: 0.6em 0.3em; 
    }
}

#subject-opinion-action-bar {
    font-size: 1.25rem;
}

#subject-opinion-action-bar .sticker-btn {
    font-size: 1.05rem;
    padding: 0.45em 1.1em;
    min-width: 90px;
    height: 2.8em;
    box-sizing: border-box;
}

#subject-selection-counter {
    font-weight: 700;
    color: #92400e;
}

#subject-opinion-table {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1.13rem;
}

#subject-opinion-table th, #subject-opinion-table td {
    padding: 0.32em 0.7em;
    font-size: 1.02em;
    background: #fef3c7;
    border-bottom: 2.5px solid #f59e0b;
    text-align: center;
}

#subject-opinion-table td {
    background: #fff;
    border-bottom: 1.5px solid #fde68a;
    vertical-align: top;
}

/* 과목별 테이블 - 체크박스와 이름은 고정, 의견만 유연하게 */
#subject-opinion-table th:nth-child(1), #subject-opinion-table td:nth-child(1) { 
    width: 50px; 
    min-width: 50px; 
    max-width: 50px;
}

#subject-opinion-table th:nth-child(2), #subject-opinion-table td:nth-child(2) { 
    width: 120px; 
    min-width: 120px; 
    max-width: 120px;
}

#subject-opinion-table th:nth-child(3), #subject-opinion-table td:nth-child(3) { 
    width: auto; 
    min-width: 300px; 
}

#activity-opinion-action-bar {
    font-size: 1.25rem;
}

#activity-opinion-action-bar .sticker-btn {
    font-size: 1.05rem;
    padding: 0.45em 1.1em;
    min-width: 90px;
    height: 2.8em;
    box-sizing: border-box;
}

#activity-selection-counter {
    font-weight: 700;
    color: #92400e;
}

#activity-opinion-table {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1.13rem;
}

#activity-opinion-table th, #activity-opinion-table td {
    padding: 0.32em 0.7em;
    font-size: 1.02em;
    background: #fef3c7;
    border-bottom: 2.5px solid #f59e0b;
    text-align: center;
}

#activity-opinion-table td {
    background: #fff;
    border-bottom: 1.5px solid #fde68a;
    vertical-align: top;
}

/* 창체 테이블 - 체크박스와 이름은 고정, 의견만 유연하게 */
#activity-opinion-table th:nth-child(1), #activity-opinion-table td:nth-child(1) { 
    width: 50px; 
    min-width: 50px; 
    max-width: 50px;
}

#activity-opinion-table th:nth-child(2), #activity-opinion-table td:nth-child(2) { 
    width: 120px; 
    min-width: 120px; 
    max-width: 120px;
}

#activity-opinion-table th:nth-child(3), #activity-opinion-table td:nth-child(3) { 
    width: auto; 
    min-width: 300px; 
}

#assessment-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
}

#assessment-table th, #assessment-table td {
    padding: 0.5em;
    border: 1px solid #d6d3d1;
    text-align: center;
}

#assessment-table th {
    background: #fef3c7;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

#assessment-table td {
    background: #fff;
}

#assessment-table td:first-child {
    position: sticky;
    left: 0;
    background: #fef3c7;
    z-index: 5;
}

#assessment-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 15;
}

#assessment-table input[type="radio"] {
    width: 1.2em;
    height: 1.2em;
}

#assessment-table select {
    font-family: var(--font-main);
    font-size: 0.9em;
    padding: 0.2em;
    border: 1px solid #d6d3d1;
    border-radius: 4px;
}

#attendance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1.1rem;
}

#attendance-table th, #attendance-table td {
    padding: 0.5em;
    border: 1px solid #d6d3d1;
    text-align: center;
}

#attendance-table th {
    background: #fef3c7;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

#attendance-table td {
    background: #fff;
}

#attendance-table td:first-child {
    position: sticky;
    left: 0;
    background: #fef3c7;
    z-index: 5;
}

#attendance-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 15;
}

#attendance-table input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
}

#attendance-table select {
    font-family: var(--font-main);
    font-size: 0.9em;
    padding: 0.2em;
    border: 1px solid #d6d3d1;
    border-radius: 4px;
}

/* 출결 관리 스타일 */
.arrow-btn { 
    font-size:1.5em; 
    background:none; 
    border:none; 
    color:#b45309; 
    cursor:pointer; 
    margin:0 0.2em; 
}

#attendance-month-bar { 
    display:flex; 
    align-items:center; 
    gap:0.7em; 
    margin-bottom:1.2em; 
    flex-wrap: wrap; 
}

#attendance-month-bar button, 
#attendance-month-bar select {
    margin-bottom: 0.3em;
}

@media (max-width: 600px) {
    #attendance-month-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5em;
    }
    #attendance-month-bar button, 
    #attendance-month-bar select {
        width: 100%;
        min-width: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

#attendance-today-status { 
    background:#fef9c3; 
    border-radius:10px; 
    padding:1.2em 1.5em; 
    margin-bottom:1.5em; 
    display:flex; 
    align-items:center; 
    justify-content:space-between; 
}

.status-chip { 
    display:inline-block; 
    margin-right:0.7em; 
    margin-bottom:0.3em; 
    padding:0.4em 1em; 
    border-radius:8px; 
    font-weight:700; 
    font-size:1.1em; 
}

.status-chip.absent { 
    background:#fee2e2; 
    color:#dc2626; 
}

.status-chip.exp { 
    background:#e0f2fe; 
    color:#2563eb; 
}

.att-table { 
    width:100%; 
    border-collapse:collapse; 
    margin-top:2em; 
}

.att-table th, 
.att-table td { 
    border:1.5px solid #fde68a; 
    padding:0.7em 0.5em; 
    text-align:left; 
    font-size:1.1em; 
}

.att-name { 
    font-weight:700; 
    color:#b45309; 
}

.att-record-btn { 
    margin:0.2em 0.5em 0.2em 0; 
    padding:0.4em 1.7em 0.4em 1em; 
    border-radius:8px; 
    border:none; 
    font-weight:700; 
    font-size:1em; 
    cursor:pointer; 
    background:#fee2e2; 
    color:#dc2626; 
    transition:background 0.2s; 
    position:relative; 
    display:inline-flex; 
    align-items:center; 
}

.att-record-btn.exp { 
    background:#e0f2fe; 
    color:#2563eb; 
}

.att-record-btn.submitted { 
    background:#d1d5db !important; 
    color:#444 !important; 
}

.att-del-btn { 
    margin-left:0.5em; 
    color:#888; 
    font-size:1.1em; 
    cursor:pointer; 
    background:none; 
    border:none; 
    position:static; 
    vertical-align:middle; 
}

#attendance-modal .modal-content { 
    background:#fff; 
    border-radius:12px; 
    padding:2em; 
    min-width:340px; 
    box-shadow:0 4px 24px #0002; 
}

#attendance-modal label { 
    font-weight:700; 
    margin-top:0.7em; 
    display:block; 
}

#attendance-modal input, 
#attendance-modal select, 
#attendance-modal textarea { 
    width:100%; 
    font-size:1.1em; 
    margin-top:0.2em; 
    margin-bottom:0.7em; 
    padding:0.4em; 
    border-radius:6px; 
    border:1.5px solid #f59e0b; 
}

#attendance-modal select { 
    font-family: inherit; 
    font-size:1.13em; 
    padding:0.5em 0.7em; 
    border-radius:8px; 
    border:1.5px solid #f59e0b; 
    background:#fffbe8; 
    color:#92400e; 
}

#attendance-modal .modal-footer { 
    display:flex; 
    justify-content:flex-end; 
    gap:1em; 
    margin-top:1.2em; 
}

.modal-input, 
.modal-textarea, 
.modal-select, 
#attendance-modal input[type='date'] {
    font-family: 'Gaegu', '맑은 고딕', 'Malgun Gothic', Arial, sans-serif;
    font-size: 1.18em;
    font-weight: 700;
    color: #92400e;
    background: #fffbe8;
    border: 2px solid #f59e0b;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .header .header-actions {
        margin-right: 0;
    }
    
    .student-card {
        max-width: 100%;
        min-width: 280px;
    }
    
    #student-list-container {
        justify-content: center;
    }
    
    .modal-content {
        max-width: 95vw;
        padding: 1rem;
    }
    
    .sticker-btn {
        font-size: 1rem;
        padding: 8px 14px;
    }
} 

#page-assessment {
  display: flex;
  flex-direction: column;
}
#assessment-empty-message {
  display: block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
} 

.assessment-btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.2em;
  margin-bottom: 1.2em;
  width: 100%;
} /* G
oogle Drive 연결 상태 스타일 */
.status-connected {
    color: #16a34a;
    font-weight: bold;
    padding: 0.2em 0.5em;
    background-color: #dcfce7;
    border-radius: 4px;
    font-size: 0.9em;
}

.status-disconnected {
    color: #dc2626;
    font-weight: bold;
    padding: 0.2em 0.5em;
    background-color: #fef2f2;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Google Drive 설정 섹션 스타일 */
.google-drive-section {
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #fafafa;
}

.google-drive-section label {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}

.google-drive-section input[type="text"] {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.google-drive-section input[type="text"]:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.google-drive-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.google-drive-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#last-sync-time {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}