        :root {
            --primary: #0b9347;
            --primary-hover: #087a3b;
            --primary-light: #e8f5ed;
            --fox-blue: #0278c7;
            --fox-blue-dark: #005ea0;
            --bg-page: #f6f8fb;
            --card-bg: #ffffff;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --border-color: #e2e8f0;
            --table-border: #95C03E;
            --table-header-bg: #eef5e8;
            --radius-md: 10px;
            --radius-lg: 14px;
            --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
            --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', dotum, sans-serif;
            background-color: var(--bg-page);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* Top Brand Navigation Header */
        .top-navbar {
            background: #ffffff;
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 50;
            box-shadow: var(--shadow-sm);
        }

        .navbar-inner {
            max-width: 1480px;
            margin: 0 auto;
            padding: 8px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header-homework-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-family: 'Outfit', sans-serif;
            font-size: 24px;
            font-weight: 800;
            color: #1e293b;
            letter-spacing: 0.5px;
            line-height: 1;
        }

        .hw-title-icon {
            width: 36px;
            height: 36px;
            border-radius: 9px;
            background: linear-gradient(135deg, #e8f5ed 0%, #d1fae5 100%);
            color: #0b9347;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            box-shadow: 0 2px 5px rgba(11, 147, 71, 0.12);
        }

        .header-littlefox-link {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            color: #0b9347;
            font-weight: 800;
            font-size: 17px;
            transition: opacity 0.2s;
        }

        .header-littlefox-link:hover {
            opacity: 0.85;
        }

        .header-littlefox-link img {
            height: 36px;
            width: auto;
            display: block;
        }

        /* Main Container */
        .page-container {
            max-width: 1480px;
            margin: 8px auto 10px auto;
            padding: 0 16px;
            width: 100%;
            flex: 1;
        }

        /* Two-Column Grid */
        .mypage-grid {
            display: grid;
            grid-template-columns: 240px 1fr;
            gap: 16px;
            align-items: start;
        }

        @media (max-width: 900px) {
            body:not(.is-embedded) .mypage-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Embedded Split Mode Styles - Perfectly Fit Without Horizontal Scrollbars */
        html.is-embedded, body.is-embedded {
            background-color: #f8fafc;
            overflow-x: hidden !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        body.is-embedded {
            zoom: 0.80; /* Base scale down for perfect at-a-glance fit without scrollbar */
        }
        body.is-embedded .mypage-grid {
            grid-template-columns: 180px 1fr !important;
            gap: 10px !important;
        }
        body.is-embedded .sidebar-col {
            width: 180px !important;
        }
        body.is-embedded .fox-login-card {
            width: 180px !important;
            height: 175px !important;
        }
        body.is-embedded .page-container {
            padding: 0 6px !important;
            margin: 4px auto 10px auto !important;
            max-width: 100% !important;
        }
        body.is-embedded .top-navbar {
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        body.is-embedded .navbar-inner {
            padding: 4px 8px !important;
        }
        body.is-embedded .header-homework-title {
            font-size: 17px !important;
        }
        body.is-embedded .row-header {
            width: 102px !important;
            font-size: 9.5px !important;
            padding: 3px 2px !important;
        }
        body.is-embedded .homework-table thead th.col-day {
            width: 102px !important;
            font-size: 11px !important;
            padding: 4px 2px !important;
        }
        body.is-embedded .hw-pill {
            width: 102px !important;
            min-width: 102px !important;
            max-width: 102px !important;
            font-size: 9.5pt !important;
            padding: 2px 2px !important;
            height: 28px !important;
            min-height: 28px !important;
        }
        body.is-embedded .table-responsive {
            overflow-x: hidden !important;
            border-radius: 6px !important;
        }
        body.is-embedded .homework-table {
            width: 100% !important;
        }
        body.is-embedded .day-name {
            font-size: 11px !important;
        }
        body.is-embedded .day-date {
            font-size: 10.5px !important;
        }

        /* LEFT SIDEBAR */
        .sidebar-col {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        /* Fox-ear Login Box - Preserving the LittleFox Fox ears image exactly */
        .fox-login-card {
            width: 240px;
            height: 235px;
            position: relative;
            background: url('../img/login_mypage.jpg') no-repeat center top;
            background-size: 100% 100%;
            border-radius: 12px;
            box-shadow: var(--shadow-md);
            overflow: hidden;
            margin: 0 auto;
        }

        /* Interactive overlays positioned precisely over login_mypage.jpg fields */
        .fox-login-form {
            position: absolute;
            inset: 0;
        }

        .fox-input-id {
            position: absolute;
            left: 17px;
            top: 102px;
            width: 135px;
            height: 32px;
            background: rgba(255, 255, 255, 0.98);
            border: 1.5px solid #94a3b8;
            border-radius: 6px;
            padding: 0 8px;
            font-size: 18px;
            font-weight: 800;
            color: #0f172a;
            outline: none;
            transition: all 0.2s;
            box-sizing: border-box;
            letter-spacing: 0.5px;
        }

        .fox-input-id:focus {
            border-color: var(--fox-blue);
            box-shadow: 0 0 0 2px rgba(2, 120, 199, 0.25);
            background: #ffffff;
        }

        .fox-input-pw {
            position: absolute;
            left: 17px;
            top: 138px;
            width: 135px;
            height: 32px;
            background: rgba(255, 255, 255, 0.98);
            border: 1.5px solid #94a3b8;
            border-radius: 6px;
            padding: 0 8px;
            font-size: 18px;
            font-weight: 800;
            color: #0f172a;
            outline: none;
            transition: all 0.2s;
            box-sizing: border-box;
            letter-spacing: 1px;
        }

        .fox-input-pw:focus {
            border-color: var(--fox-blue);
            box-shadow: 0 0 0 2px rgba(2, 120, 199, 0.25);
            background: #ffffff;
        }

        .fox-input-id::placeholder,
        .fox-input-pw::placeholder {
            font-size: 13px;
            font-weight: 600;
            color: #94a3b8;
            letter-spacing: 0;
        }

        .fox-btn-login {
            position: absolute;
            left: 156px;
            top: 102px;
            width: 68px;
            height: 68px;
            background: transparent;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .fox-btn-login:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        .fox-link-join {
            position: absolute;
            left: 17px;
            top: 181px;
            width: 98px;
            height: 28px;
            background: transparent;
            border-radius: 14px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .fox-link-join:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        .fox-link-find {
            position: absolute;
            left: 121px;
            top: 181px;
            width: 100px;
            height: 28px;
            background: transparent;
            border-radius: 14px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .fox-link-find:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        /* Logged In Status Overlay */
        .fox-logged-overlay {
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(2px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 16px;
            text-align: center;
            border-radius: 12px;
            border: 2px solid var(--fox-blue);
            z-index: 5;
            transition: opacity 0.3s;
        }

        .fox-logged-avatar {
            width: 52px;
            height: 52px;
            background: #e0f2fe;
            color: var(--fox-blue);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 25px;
            margin-bottom: 6px;
        }

        .fox-logged-name {
            font-size: 21px;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: -0.5px;
            margin-bottom: 2px;
        }

        .fox-logged-class {
            font-size: 14.5px;
            color: #1e293b;
            margin: 2px 0 12px 0;
            font-weight: 700;
        }

        .btn-fox-logout {
            background: #f1f5f9;
            color: #334155;
            border: 1.5px solid #94a3b8;
            padding: 6px 22px;
            border-radius: 18px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-fox-logout:hover {
            background: #fee2e2;
            color: #dc2626;
            border-color: #f87171;
        }

        /* Modern Quick Menu Buttons */
        .quick-menu-group {
            display: flex;
            flex-direction: column;
            gap: 9px;
            width: 240px;
            margin: 0 auto;
        }

        .quick-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 11px 16px;
            border-radius: var(--radius-md);
            text-decoration: none;
            font-weight: 700;
            font-size: 13px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            border: none;
            cursor: pointer;
        }

        .quick-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }

        .quick-btn-memo {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
            color: #ffffff;
        }

        .quick-btn-point {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: #ffffff;
        }

        .quick-btn-remote {
            background: linear-gradient(135deg, #f46b45 0%, #eea849 100%);
            color: #ffffff;
        }


        .quick-btn-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .quick-btn-sub {
            font-size: 11px;
            font-weight: 400;
            opacity: 0.9;
        }

        .memo-unread-pill {
            position: absolute;
            top: 5px;
            right: 8px;
            background: #ef4444;
            color: #ffffff;
            font-size: 11px;
            font-weight: 800;
            padding: 2px 7px;
            border-radius: 12px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.25);
            line-height: 1.2;
            z-index: 2;
        }

        /* Student Message Popup Modal (Oct 26+ messages) */
        .student-msg-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.65);
            backdrop-filter: blur(4px);
            z-index: 999999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            box-sizing: border-box;
        }

        .student-msg-card {
            background: #ffffff;
            width: 100%;
            max-width: 500px;
            max-height: 85vh;
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.8);
            animation: studentMsgPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes studentMsgPop {
            0% { transform: scale(0.92); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        .student-msg-header {
            background: linear-gradient(135deg, #0b9347, #087036);
            color: #ffffff;
            padding: 14px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .student-msg-header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .student-msg-icon {
            font-size: 20px;
            color: #E6F54D;
        }

        .student-msg-title {
            font-size: 16px;
            font-weight: 700;
            letter-spacing: -0.3px;
        }

        .student-msg-badge {
            background: #ef4444;
            color: #ffffff;
            font-size: 11px;
            font-weight: 800;
            padding: 2px 7px;
            border-radius: 12px;
        }

        .student-msg-close {
            background: transparent;
            border: none;
            color: #ffffff;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
            opacity: 0.85;
            transition: opacity 0.15s;
            padding: 0 4px;
        }

        .student-msg-close:hover {
            opacity: 1;
        }

        .student-msg-body {
            padding: 16px;
            overflow-y: auto;
            max-height: calc(85vh - 130px);
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: #f8fafc;
        }

        .student-msg-item {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-left: 4px solid #0b9347;
            border-radius: 10px;
            padding: 14px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
        }

        .student-msg-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            padding-bottom: 6px;
            border-bottom: 1px dashed #e2e8f0;
        }

        .student-msg-sender {
            font-size: 13px;
            font-weight: 700;
            color: #0b9347;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .student-msg-time {
            font-size: 11px;
            color: #94a3b8;
        }

        .student-msg-content {
            font-size: 14px;
            line-height: 1.6;
            color: #1e293b;
            white-space: pre-wrap;
            word-break: break-word;
            font-weight: 500;
            padding: 4px 0 8px 0;
        }

        .student-msg-item-footer {
            display: flex;
            justify-content: flex-end;
        }

        .btn-msg-item-read {
            background: #f1f5f9;
            border: 1px solid #cbd5e1;
            color: #475569;
            font-size: 12px;
            font-weight: 600;
            padding: 4px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s;
        }

        .btn-msg-item-read:hover {
            background: #0b9347;
            border-color: #0b9347;
            color: #ffffff;
        }

        .student-msg-footer {
            background: #ffffff;
            border-top: 1px solid #e2e8f0;
            padding: 12px 18px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
        }

        .btn-msg-open-memo {
            background: #ffffff;
            border: 1px solid #0b9347;
            color: #0b9347;
            font-size: 13px;
            font-weight: 600;
            padding: 8px 14px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.15s;
        }

        .btn-msg-open-memo:hover {
            background: #f0fdf4;
        }

        .btn-msg-confirm-all {
            background: #0b9347;
            border: none;
            color: #ffffff;
            font-size: 13px;
            font-weight: 700;
            padding: 8px 18px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background 0.15s;
        }

        .btn-msg-confirm-all:hover {
            background: #087036;
        }

        /* Customer Service Info Card */
        .customer-card {
            width: 240px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: var(--radius-md);
            padding: 16px 14px;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            text-align: center;
        }

        .customer-title-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            color: #0b9347;
            font-size: 13px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .customer-tel {
            font-size: 26px;
            font-weight: 800;
            color: #0b9347;
            letter-spacing: -0.5px;
            font-family: 'Outfit', sans-serif;
            margin: 4px 0 8px 0;
        }

        .customer-desc {
            font-size: 11px;
            color: #64748b;
            line-height: 1.5;
            text-align: left;
            padding-left: 6px;
            margin-bottom: 12px;
        }

        .btn-counsel {
            width: 100%;
            background: #64748b;
            color: #ffffff;
            border: none;
            border-radius: 20px;
            padding: 8px 0;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-counsel:hover {
            background: #475569;
        }

        /* RIGHT MAIN CONTENT AREA - Matching Image 3 */
        .main-col {
            background: var(--card-bg);
            border-radius: var(--radius-lg);
            padding: 12px 18px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-color);
        }

        /* Top Bar: Sticker, Badge, Penalty, Info Edit */
        .stats-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 6px;
            border-bottom: 2px solid var(--table-border);
            margin-bottom: 8px;
        }

        .stats-left {
            display: flex;
            align-items: center;
            gap: 20px;
            font-size: 14px;
            font-weight: 800;
            font-family: 'Outfit', 'Noto Sans KR', sans-serif;
        }

        .sticker-badge-box {
            border: 2px solid #ef4444;
            border-radius: 6px;
            padding: 2px 10px;
            color: #1e3a8a;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

                .btn-munsang-apply {
            background: linear-gradient(135deg, #10B981 0%, #059669 100%);
            color: #FFFFFF;
            font-size: 11px;
            font-weight: 800;
            padding: 3px 10px;
            border-radius: 6px;
            border: 1px solid #047857;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
            transition: all 0.2s ease;
            line-height: 1.3;
        }
        .btn-munsang-apply:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(16, 185, 129, 0.35);
        }

        .sticker-badge-box:hover {
            background-color: #fee2e2;
            box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
            transform: translateY(-1px);
        }

        .sticker-label {
            color: #ef4444;
        }

        .badge-text {
            color: #334155;
        }

        .penalty-text {
            color: #ef4444;
        }

        .stat-num {
            font-weight: 800;
        }

        .btn-edit-info {
            background: #ffffff;
            border: 1px solid #cbd5e1;
            color: #334155;
            padding: 4px 14px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s;
        }

        .btn-edit-info:hover {
            background: #f8fafc;
            border-color: #94a3b8;
        }

        /* Student Info Bar & Week Navigation */
        .info-nav-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 6px 12px;
            margin-bottom: 8px;
            gap: 12px;
            flex-wrap: nowrap !important;
            white-space: nowrap !important;
            overflow-x: auto;
        }

        .student-details {
            font-size: 14px;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: nowrap !important;
            white-space: nowrap !important;
            font-weight: 600;
            flex-shrink: 0;
        }

        .student-name {
            color: #0055ff;
            font-weight: 800;
            font-size: 15.5px;
        }

        .class-info-wrap {
            display: inline-flex;
            align-items: center;
        }

        .class-badge {
            font-weight: 800;
            font-size: 14.5px;
            color: #0f172a;
        }

        .level-group {
            color: #16a34a;
            font-weight: 800;
            font-size: 14.5px;
        }

        .teacher-name {
            color: #0055ff;
            font-weight: 700;
            font-size: 14.5px;
        }

        .class-time {
            color: #334155;
            font-weight: 600;
            font-size: 13.5px;
        }

        .btn-exam-nav {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
            color: #ffffff;
            border: 1px solid #3b82f6;
            padding: 3px 12px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            margin-left: 8px;
            box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
            transition: all 0.15s ease;
            white-space: nowrap;
            line-height: 1.4;
            vertical-align: middle;
        }

        .btn-exam-nav:hover {
            background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);
            box-shadow: 0 4px 10px rgba(37, 99, 235, 0.38);
            transform: translateY(-1px);
        }

        .btn-exam-nav:active {
            transform: translateY(0);
        }

        .btn-exam-nav i {
            font-size: 13px;
        }

        /* Week Navigation Pill Group */
        .week-navigator {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            white-space: nowrap !important;
        }

        .btn-week-nav {
            background: #ffffff;
            border: 1px solid #cbd5e1;
            color: #334155;
            padding: 5px 12px;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            white-space: nowrap !important;
            flex-shrink: 0 !important;
            word-break: keep-all !important;
            line-height: 1.4;
        }

        .btn-week-nav:hover {
            background: #f1f5f9;
            border-color: #94a3b8;
        }

        .week-label {
            font-size: 14.5px;
            font-weight: 800;
            color: #0f172a;
            min-width: 135px;
            text-align: center;
            white-space: nowrap !important;
            flex-shrink: 0 !important;
            word-break: keep-all !important;
        }

        /* Quick Status / Certification Rows */
        .cert-status-section {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding-bottom: 6px;
            border-bottom: 2px solid var(--table-border);
            margin-bottom: 8px;
        }

        .cert-row {
            display: flex;
            align-items: center;
            font-size: 14px;
            color: #334155;
            font-weight: 700;
            gap: 10px;
        }

        .cert-label {
            width: 65px;
            font-weight: 800;
            color: #0f172a;
            font-size: 14px;
        }

        .btn-cert-view {
            background: #ffffff;
            border: 1px solid #cbd5e1;
            color: #2563eb;
            font-size: 12px;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s;
        }

        .btn-cert-view:hover {
            background: #eff6ff;
            border-color: #93c5fd;
        }

        .cert-colon {
            color: #64748b;
            font-weight: 700;
        }

        .cert-val {
            color: #475569;
            font-size: 14px;
            font-weight: 700;
        }

        /* Dynamic 3-Column Grid for weeks >= 2026-10-26 */
        /* 단어인증과 과거동사 폭을 조금씩 줄이고, 파닉스 폭을 늘려 테스트 버튼이 넉넉히 표시되도록 조정 */
        .cert-status-section.grid-layout {
            display: grid;
            grid-template-columns: 1fr 1fr 1.25fr;
            gap: 6px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--table-border);
            margin-bottom: 8px;
        }

        .cert-status-section.grid-layout .cert-row {
            border: 1px solid #B0CC88;
            background-color: #FBFDF9;
            border-radius: 6px;
            padding: 7px 6px;
            min-height: 36px;
            display: flex;
            align-items: center;
            gap: 4px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.03);
            min-width: 0;
        }

        /* 파닉스 칸(마지막 칸) */
        .cert-status-section.grid-layout .cert-row:last-child {
            padding: 7px 8px;
            gap: 4px;
        }
        .cert-status-section.grid-layout .cert-row:last-child .cert-val {
            flex: 1 1 auto;
            overflow: visible;
        }

        .cert-status-section.grid-layout .cert-label {
            font-weight: 800;
            color: #333333;
            font-size: 12.5px;
            min-width: 0;
            width: auto;
            flex-shrink: 0;
        }

        .cert-status-section.grid-layout .btn-cert-view {
            font-size: 11px;
            padding: 2px 5px;
            height: 22px;
            border-radius: 4px;
            cursor: pointer;
            flex-shrink: 0;
        }

        .cert-status-section.grid-layout .cert-colon {
            color: #666666;
            margin: 0 1px;
            flex-shrink: 0;
        }

        .cert-status-section.grid-layout .cert-val {
            font-weight: normal;
            color: #222222;
            font-size: 12px;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            /* 내용(레벨/점수)이 길면 글자 부분만 줄이고 '단어보기' 버튼은 항상 보이도록 */
            display: flex;
            align-items: center;
            min-width: 0;
        }
        .cert-status-section.grid-layout .cert-val > span {
            flex-shrink: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .cert-status-section.grid-layout .cert-val > span:first-child {
            flex-shrink: 2;
        }
        .cert-status-section.grid-layout .cert-val > button {
            flex-shrink: 0;
            margin-left: 4px !important;
            padding: 1px 5px !important;
            font-size: 8.5pt !important;
        }

        .btn-cert-test-orange {
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1.5px solid #FF8800 !important;
            background-color: #FFFFFF !important;
            color: #E65100 !important;
            font-size: 9.5pt;
            font-weight: bold;
            padding: 2px 10px;
            border-radius: 3px;
            box-shadow: 0 1px 2px rgba(255, 136, 0, 0.15);
            transition: all 0.15s ease;
            line-height: 1.3;
        }

        .btn-cert-test-orange:hover {
            background-color: #FFF3E0 !important;
            border-color: #FF6F00 !important;
            color: #D84315 !important;
            box-shadow: 0 2px 5px rgba(255, 136, 0, 0.3);
            transform: translateY(-1px);
        }

        .btn-cert-test-orange:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(255, 136, 0, 0.15);
        }

        .btn-cert-test-inspecting {
            cursor: default;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1.5px solid #2563EB !important;
            background-color: #EFF6FF !important;
            color: #1D4ED8 !important;
            font-size: 9.5pt;
            font-weight: bold;
            padding: 2px 10px;
            border-radius: 3px;
            box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
            line-height: 1.3;
        }

        .btn-cert-test-ta {
            cursor: default;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1.5px solid #DC2626 !important;
            background-color: #FEF2F2 !important;
            color: #DC2626 !important;
            font-size: 9.5pt;
            font-weight: bold;
            padding: 2px 10px;
            border-radius: 3px;
            box-shadow: 0 1px 2px rgba(220, 38, 38, 0.12);
            line-height: 1.3;
        }

        @media (max-width: 768px) {
            .cert-status-section.grid-layout {
                grid-template-columns: 1fr;
            }
        }

        /* Homework Table Container */
        .table-responsive {
            width: 100%;
            overflow-x: auto;
        }

        .homework-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            text-align: center;
            border: 1px solid #cbd5e1;
        }

        .homework-table th {
            border: 1px solid #cbd5e1;
            padding: 6px 4px;
            vertical-align: middle;
        }

        .homework-table td {
            border: 1px solid #e2e8f0;
            padding: 4px 3px;
            vertical-align: middle;
            height: 38px;
            box-sizing: border-box;
        }

        /* Header Rows */
        .homework-table thead th {
            background-color: var(--table-header-bg);
            color: #0f172a;
            font-weight: 800;
            font-size: 13px;
            border-bottom: 2px solid #bbf7d0;
        }

        .homework-table thead th.col-day {
            width: 140px;
            font-size: 13px;
            letter-spacing: 2px;
            padding: 6px 4px;
        }

        .day-header {
            display: flex;
            flex-direction: column;
            gap: 1px;
            align-items: center;
            justify-content: center;
        }

        .day-name {
            font-weight: 800;
            font-size: 13px;
            color: #0f172a;
        }

        .day-date {
            color: #dc2626;
            font-weight: 700;
            font-size: 12px;
        }

        /* Row Headers (D A Y Column) */
        .row-header {
            background: #f8fafc;
            font-weight: 800;
            color: #0f172a;
            font-size: 12px;
            text-align: center;
            width: 135px;
            letter-spacing: 0.3px;
            padding: 4px 6px !important;
            line-height: 1.25;
        }

        /* Homework Badges (Rectangular buttons) */
        .hw-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 124px;
            min-width: 124px;
            max-width: 124px;
            height: 30px;
            min-height: 30px;
            padding: 5px 8px;
            border-radius: 4px;
            font-size: 11pt;
            font-weight: 700;
            color: #1e293b;
            background: #ffffff;
            border: 1px solid #94a3b8;
            cursor: pointer;
            transition: all 0.15s ease;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04);
            text-decoration: none;
            user-select: none;
            line-height: 1.35;
            white-space: nowrap;
            box-sizing: border-box;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .hw-pill:hover {
            background: #f1f5f9;
            border-color: #64748b;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        }

        /* Muted Workbook Pill */
        .hw-pill.muted {
            background: #f8fafc;
            color: #94a3b8;
            border-color: #cbd5e1;
            box-shadow: none;
        }

        .hw-pill.muted:hover {
            background: #f1f5f9;
            color: #64748b;
        }

        /* Color Variations from seeyoung.net */
        /* 1. 파란색 (Blue) - 제출완료 (Submitted) */
        .hw-pill.color-blue {
            color: #0055ff !important;
            border-color: #0055ff !important;
            background-color: #f0f7ff !important;
            font-weight: 800 !important;
        }
        .hw-pill.color-blue:hover {
            background-color: #e0edff !important;
        }

        /* 2. 초록색 (Green) - 완료 / 통과 (OK / Done) */
        .hw-pill.color-green {
            color: #059669 !important;
            border-color: #059669 !important;
            background-color: #ecfdf5 !important;
            font-weight: 800 !important;
        }
        .hw-pill.color-green:hover {
            background-color: #d1fae5 !important;
        }

        /* 3. 빨간색 (Red) - 다시풀기 (Again / Retest) */
        .hw-pill.color-red {
            color: #dc2626 !important;
            border-color: #dc2626 !important;
            background-color: #fef2f2 !important;
            font-weight: 800 !important;
        }
        .hw-pill.color-red:hover {
            background-color: #fee2e2 !important;
        }

        /* 4. 보라색 (Purple) - 첨삭확인 (Teacher Check / Rewrite) */
        .hw-pill.color-purple {
            color: #c000c0 !important;
            border-color: #c000c0 !important;
            background-color: #fdf2f8 !important;
            font-weight: 800 !important;
        }
        .hw-pill.color-purple:hover {
            background-color: #fce7f3 !important;
        }

        /* 5. 미완료 기본 */
        .hw-pill.color-black, .hw-pill.color-default {
            color: #1e293b;
            border-color: #94a3b8;
            background-color: #ffffff;
        }

        /* Stack for multiple homework items in one day cell */
        .hw-item-stack {
            display: flex;
            flex-direction: column;
            gap: 2px;
            align-items: center;
            justify-content: center;
            padding: 1px 0;
        }

        /* Study Data Row Specifics */
        .study-data-cell {
            padding: 3px 4px !important;
        }

        .study-data-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
            align-items: center;
        }

        .study-data-item {
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }

        .study-tag-s {
            font-weight: 900;
            color: #1e293b;
            font-size: 11px;
            margin-right: 2px;
        }

        .study-pill-orange {
            border: 1px solid #ea580c;
            color: #ea580c;
            background: #fff7ed;
            font-weight: 700;
            font-size: 11px;
            padding: 2px 7px;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            line-height: 1.3;
        }

        .study-pill-orange:hover {
            background: #ffedd5;
            transform: translateY(-1px);
        }

        .study-pill-gray {
            border: 1px solid #94a3b8;
            color: #475569;
            background: #f8fafc;
            font-weight: 700;
            font-size: 11px;
            padding: 2px 7px;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            line-height: 1.3;
        }

        .study-pill-gray:hover {
            background: #f1f5f9;
            transform: translateY(-1px);
        }

        .study-pill-white {
            border: 1px solid #cbd5e1;
            color: #0f172a;
            background: #ffffff;
            font-weight: 700;
            font-size: 11px;
            padding: 2px 7px;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            line-height: 1.3;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        }

        .study-pill-white:hover {
            background: #f8fafc;
            border-color: #94a3b8;
            transform: translateY(-1px);
        }

        .study-tag-mt {
            font-size: 10px;
            color: #000000;
            margin-right: 2px;
            font-weight: 800;
            display: inline-block;
            vertical-align: middle;
        }

        .btn-study-print {
            border: 1px solid #93c5fd;
            color: #2563eb;
            background: #eff6ff;
            border-radius: 3px;
            padding: 2px 5px;
            font-size: 10px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            line-height: 1.3;
        }

        .btn-study-print:hover {
            background: #dbeafe;
            border-color: #60a5fa;
        }

        /* Modern Footer */
        footer {
            margin-top: auto;
            background: #ffffff;
            border-top: 1px solid var(--border-color);
            padding: 6px 16px;
        }

        .footer-inner {
            max-width: 1480px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
        }

        .footer-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .footer-logo {
            height: 38px;
            width: auto;
        }

        .footer-info {
            font-size: 12px;
            color: #64748b;
            line-height: 1.6;
        }

        .footer-links {
            display: flex;
            gap: 14px;
            margin-bottom: 4px;
            font-weight: 600;
            color: #334155;
        }

        .footer-links a {
            color: #475569;
            text-decoration: none;
        }

        .footer-links a:hover {
            color: var(--primary);
        }

        /* Notification Modal */
        .notice-modal-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .notice-modal {
            background: #ffffff;
            border-radius: var(--radius-lg);
            padding: 24px;
            max-width: 400px;
            width: 90%;
            text-align: center;
            box-shadow: var(--shadow-lg);
        }

        .notice-modal-icon {
            font-size: 36px;
            color: #f59e0b;
            margin-bottom: 12px;
        }

        .notice-modal-title {
            font-size: 16px;
            font-weight: 800;
            color: #1e293b;
            margin-bottom: 8px;
        }

        .notice-modal-body {
            font-size: 13px;
            color: #475569;
            line-height: 1.6;
            margin-bottom: 18px;
        }

        .btn-modal-close {
            background: var(--primary);
            color: #ffffff;
            border: none;
            padding: 8px 24px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .btn-modal-close:hover {
            background: var(--primary-hover);
        }
