:root {
    --font-body: "BIZ UDPGothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
    --font-head: "BIZ UDPGothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
    --ink-900: #1b2434;
    --ink-800: #253249;
    --ink-700: #334155;
    --ink-600: #475569;
    --muted-500: #64748b;
    --surface-0: #ffffff;
    --surface-1: #f8fafc;
    --surface-2: #eef2f7;
    --line-200: #e2e8f0;
    --line-300: #cbd5e1;
    --brand-600: #2a5bd7;
    --brand-500: #3b72f0;
    --brand-400: #6b94f6;
    --accent-500: #12a3a6;
    --danger-500: #d14949;
    --shadow-soft: 0 22px 50px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink-900);
    background:
        radial-gradient(circle at 12% 18%, rgba(42, 91, 215, 0.08), transparent 45%),
        radial-gradient(circle at 86% 10%, rgba(18, 163, 166, 0.1), transparent 40%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

body.app-body::before,
body.app-body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(0.5px);
}

body.app-body::before {
    top: -220px;
    right: -140px;
    background: radial-gradient(circle at 30% 30%, rgba(59, 114, 240, 0.26), rgba(59, 114, 240, 0) 70%);
}

body.app-body::after {
    bottom: -260px;
    left: -180px;
    background: radial-gradient(circle at 70% 70%, rgba(18, 163, 166, 0.22), rgba(18, 163, 166, 0) 70%);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--ink-800);
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

p {
    margin: 0 0 12px;
}

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: color 180ms ease;
}

a:hover {
    color: var(--accent-500);
}

input,
select,
textarea {
    max-width: 100%;
    font-family: var(--font-body);
}

.app-header,
.app-shell,
.login-shell {
    position: relative;
    z-index: 1;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-200);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 70;
}

.app-header::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(42, 91, 215, 0.7), rgba(18, 163, 166, 0.5));
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-brand a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ink-900);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
}

.app-brand-link {
    text-decoration: none;
}

.app-brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    flex: 0 0 auto;
}

.app-brand-text {
    display: inline-block;
    white-space: nowrap;
}

.app-page-title {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding-left: 14px;
    margin-left: 2px;
    border-left: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-700);
    letter-spacing: 0.03em;
    max-width: min(44vw, 520px);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.app-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.app-notification {
    position: relative;
}

.app-notification-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(42, 91, 215, 0.22);
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink-800);
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-notification-btn:hover,
.app-notification-btn:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.36);
    transform: translateY(-1px);
}

.app-notification-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-notification-icon {
    width: 22px;
    height: 22px;
}

.app-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.app-notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: min(440px, 70vh);
    overflow: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(10px);
    z-index: 95;
}

.app-notification-head {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted-500);
    text-transform: uppercase;
    padding: 4px 6px 8px;
}

.app-notification-item {
    border: 1px solid rgba(203, 213, 225, 0.65);
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
    overflow: hidden;
}

.app-notification-item:last-child {
    margin-bottom: 0;
}

.app-notification-item.is-unread {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(239, 246, 255, 0.9);
}

.app-notification-link {
    display: block;
    padding: 8px 10px;
    color: inherit;
    text-decoration: none;
}

.app-notification-link:hover {
    text-decoration: none;
    background: rgba(248, 250, 252, 0.7);
}

.app-notification-link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: -2px;
}

.app-notification-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-900);
}

.app-notification-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--muted-500);
}

.app-notification-severity {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(248, 250, 252, 0.95);
    color: var(--ink-700);
}

.app-notification-empty {
    padding: 10px;
    color: var(--muted-500);
    font-size: 12px;
}

.app-user {
    position: relative;
}

.app-user-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(42, 91, 215, 0.22);
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink-800);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-user-btn:hover,
.app-user-btn:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.36);
    transform: translateY(-1px);
}

.app-user-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-user-btn-icon {
    width: 22px;
    height: 22px;
}

.app-user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(10px);
    z-index: 90;
}

.app-user-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-user-menu-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.app-user-menu-k {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted-500);
    white-space: nowrap;
}

.app-user-menu-v {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
    max-width: 220px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.app-user-menu-select {
    font: inherit;
    color: inherit;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 12px;
    padding: 6px 10px;
    line-height: 1.2;
    width: 120px;
    max-width: 100%;
}

.app-user-menu-select:focus {
    outline: none;
}

.app-user-menu-select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-user-menu-sep {
    height: 1px;
    background: rgba(203, 213, 225, 0.7);
    margin: 12px 0;
}

.app-user-menu-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(42, 91, 215, 0.35);
    background: rgba(42, 91, 215, 0.08);
    color: var(--brand-600);
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.app-user-menu-logout:hover,
.app-user-menu-logout:focus {
    background: rgba(42, 91, 215, 0.12);
    border-color: rgba(42, 91, 215, 0.45);
    color: var(--brand-600);
    transform: translateY(-1px);
}

.app-user-menu-logout:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

body.app-body:not(.dashboard-home) .app-brand a {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--muted-500);
}

body.app-body:not(.dashboard-home) .app-page-title {
    font-size: 20px;
    color: var(--ink-900);
}

.app-nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(42, 91, 215, 0.22);
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink-800);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-nav-toggle:hover,
.app-nav-toggle:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.36);
    transform: translateY(-1px);
}

.app-nav-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-nav-toggle-icon {
    width: 22px;
    height: 22px;
}

.app-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    flex-wrap: wrap;
}

.app-meta-item {
    background: var(--surface-1);
    border: 1px solid var(--line-200);
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    color: var(--ink-700);
}

.app-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-700);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.85);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.app-home:hover,
.app-home:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.25);
    color: var(--brand-600);
    transform: translateY(-1px);
}

.app-home:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-logout {
    color: var(--brand-600);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(42, 91, 215, 0.35);
    background: rgba(42, 91, 215, 0.08);
}

.app-shell {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 20px 24px 32px;
    min-height: calc(100vh - 72px);
    max-width: 1480px;
    margin: 0;
    transition: padding-left 260ms var(--ease-out-quart);
}

.app-sidebar {
    width: min(280px, calc(100vw - 48px));
    background: var(--surface-0);
    padding: 18px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-200);
    box-shadow: var(--shadow-card);
    position: fixed;
    top: 92px;
    left: 24px;
    bottom: 24px;
    overflow-y: auto;
    transform: translateX(calc(-100% - 40px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    transition: transform 260ms var(--ease-out-quart), opacity 200ms ease, visibility 0s linear 260ms;
}

body.nav-open {
    overflow: hidden;
}

body.nav-open .app-sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 260ms var(--ease-out-quart), opacity 200ms ease, visibility 0s;
}

.app-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(2px) saturate(1.03);
    -webkit-backdrop-filter: blur(2px) saturate(1.03);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 40;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
}

body.nav-open .app-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 200ms ease, visibility 0s;
}

@media (min-width: 1101px) {
    body.nav-open {
        overflow: auto;
    }

    body.nav-open:not(.nav-pinned) .app-shell {
        padding-left: 328px;
    }

    body.nav-open:not(.nav-pinned) .app-nav-backdrop {
        display: none;
    }

    body.nav-pinned {
        overflow: auto;
    }

    body.nav-pinned .app-sidebar {
        position: sticky;
        top: 92px;
        left: auto;
        bottom: auto;
        flex: 0 0 280px;
        width: 280px;
        max-height: calc(100vh - 92px - 24px);
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: none;
        z-index: 20;
    }

    body.nav-pinned .app-nav-backdrop {
        display: none;
    }
}

.app-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 10px;
    margin: -6px -6px 8px;
    border-bottom: 1px solid var(--line-200);
}

.app-sidebar-head-title {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--ink-700);
}

.app-sidebar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.app-sidebar-pin {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--line-200);
    background: var(--surface-1);
    color: var(--ink-700);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.app-sidebar-pin:hover,
.app-sidebar-pin:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.3);
    transform: translateY(-1px);
}

.app-sidebar-pin:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-sidebar-pin[aria-pressed="true"] {
    background: rgba(42, 91, 215, 0.12);
    border-color: rgba(42, 91, 215, 0.35);
    color: var(--brand-600);
}

.app-sidebar-pin-icon {
    width: 18px;
    height: 18px;
}

.app-sidebar-close {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--line-200);
    background: var(--surface-1);
    color: var(--ink-700);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.app-sidebar-close:hover,
.app-sidebar-close:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.3);
    transform: translateY(-1px);
}

.app-sidebar-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.22);
}

.app-sidebar-close-icon {
    width: 18px;
    height: 18px;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-nav a {
    color: var(--ink-700);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid transparent;
    position: relative;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.app-nav a.nav-sub {
    padding-left: 30px;
    font-size: 13px;
    color: var(--muted-500);
}

.app-nav a.nav-sub::before {
    left: 18px;
    width: 4px;
    height: 4px;
    opacity: 0.6;
}

.app-nav a::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: transparent;
    transform: translateY(-50%);
}

.app-nav a:hover,
.app-nav a:focus {
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.2);
    color: var(--brand-600);
    transform: translateX(2px);
}

.app-nav a.active,
.app-nav a[aria-current="page"] {
    background: rgba(42, 91, 215, 0.12);
    border-color: rgba(42, 91, 215, 0.3);
    color: var(--brand-600);
}

.app-nav a.active::before,
.app-nav a[aria-current="page"]::before {
    display: none;
}

.app-main {
    flex: 1;
    /* Allow flex item to shrink even if it contains wide tables (e.g. weekly calendar). */
    min-width: 0;
    padding: 4px 6px 12px;
    animation: riseIn 600ms var(--ease-out-expo) both;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    position: relative;
}

.page-head:not(:has(.page-actions)) {
    display: none;
}

.page-head > div:first-child {
    display: none;
}

.page-head .page-actions {
    margin-left: auto;
    margin-bottom: 18px;
}

.page-title {
    font-size: 28px;
    margin: 0;
}

.page-subtitle {
    color: var(--muted-500);
    margin: 4px 0 0;
    font-size: 13px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card {
    background: var(--surface-0);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-card);
    position: relative;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-head h2 {
    font-size: 20px;
    margin: 0;
}

.card h3 {
    font-size: 16px;
    margin-top: 2px;
}

.card .card {
    background: var(--surface-1);
    border-color: var(--line-200);
    box-shadow: none;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 114, 240, 0.18);
    background: linear-gradient(140deg, rgba(59, 114, 240, 0.08), rgba(255, 255, 255, 0.8));
}

.stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.stat-card-link:hover,
.stat-card-link:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
    border-color: rgba(42, 91, 215, 0.42);
    background: linear-gradient(140deg, rgba(59, 114, 240, 0.14), rgba(255, 255, 255, 0.96));
    box-shadow: 0 10px 20px rgba(42, 91, 215, 0.12);
}

.stat-card-link:focus {
    outline: none;
}

.stat-card-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.2), 0 10px 20px rgba(42, 91, 215, 0.12);
}

.portal-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-shell .portal-section {
    margin-bottom: 0;
}

.portal-shell--attendance .portal-section {
    background: linear-gradient(160deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0.98));
}

.portal-shell--grade .portal-section {
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0.98));
}

.portal-shell--school .portal-section {
    background: linear-gradient(160deg, rgba(59, 114, 240, 0.08), rgba(255, 255, 255, 0.98));
}

.portal-section--priority {
    background: linear-gradient(145deg, rgba(59, 114, 240, 0.14), rgba(255, 255, 255, 0.99));
    border-color: rgba(59, 114, 240, 0.22);
}

.portal-section-copy {
    margin: 4px 0 0;
    color: #5d7394;
    font-size: 14px;
    line-height: 1.4;
}

.portal-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.portal-summary-grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 360px;
}

.portal-summary-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 112px;
    border-radius: 14px;
    border: 1px solid #d8e3f3;
    background: #ffffff;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
}

.portal-summary-card:hover,
.portal-summary-card:focus {
    border-color: #8eaee1;
    background: #f7faff;
    color: inherit;
}

.portal-summary-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.23);
}

.portal-summary-label {
    color: #627899;
    font-size: 14px;
    line-height: 1.35;
}

.portal-summary-value {
    font-size: 36px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.portal-summary-value--danger {
    color: #d45d63;
}

.portal-summary-value--teal {
    color: #0f766e;
}

.portal-summary-value--amber {
    color: #b7791f;
}

.portal-summary-value--violet {
    color: #5b56cc;
}

.portal-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.portal-nav-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
}

.portal-priority-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.portal-nav-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 160px;
    text-align: left;
    padding: 14px 16px;
}

.portal-nav-card .menu-tile-title {
    font-size: 20px;
    line-height: 1.25;
    margin: 0;
}

.portal-nav-card .menu-tile-sub {
    margin-top: 0;
    font-size: 14px;
    color: #5d7394;
    line-height: 1.35;
}

.portal-nav-card--priority {
    min-height: 192px;
    border-color: rgba(42, 91, 215, 0.3);
    background: linear-gradient(155deg, rgba(59, 114, 240, 0.18), rgba(255, 255, 255, 0.99));
    box-shadow: 0 16px 28px rgba(42, 91, 215, 0.1);
}

.portal-nav-card--priority .menu-tile-title {
    font-size: 22px;
}

.portal-nav-card--priority .menu-tile-sub {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-priority-actions {
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-priority-actions .btn {
    min-height: 40px;
}

.portal-priority-actions .btn-outline {
    background: rgba(255, 255, 255, 0.86);
}

.portal-priority-actions .btn-outline:hover,
.portal-priority-actions .btn-outline:focus {
    background: rgba(42, 91, 215, 0.08);
}

.portal-nav-meta {
    margin-top: auto;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.portal-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.portal-tag--attendance {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(20, 184, 166, 0.25);
}

.portal-tag--grade {
    color: #4338ca;
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.24);
}

.portal-tag--school {
    color: #2a5bd7;
    background: rgba(59, 114, 240, 0.14);
    border-color: rgba(59, 114, 240, 0.25);
}

/* 学校管理ポータル: スプライト非表示 */
.school-portal-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.portal-shell--school .portal-nav-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: 12px;
    flex-shrink: 0;
    color: var(--brand-600);
    background: rgba(59, 114, 240, 0.12);
    border: 1px solid rgba(59, 114, 240, 0.22);
}

.portal-shell--school .portal-nav-card-icon svg {
    width: 24px;
    height: 24px;
}

.portal-subsection {
    margin-top: 22px;
}

.portal-subsection:first-of-type {
    margin-top: 0;
}

.portal-subsection-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-700);
    letter-spacing: 0.02em;
}

/* 基本3件・学事6件: デスクトップで列数を安定（孤児カードを減らす） */
.portal-nav-grid--basic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-nav-grid--academic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-shell--school .stat-card-link.portal-nav-card .portal-nav-meta {
    color: var(--brand-600);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.portal-shell--school .stat-card-link.portal-nav-card:hover .portal-nav-meta,
.portal-shell--school .stat-card-link.portal-nav-card:focus .portal-nav-meta {
    color: var(--accent-500);
}

.portal-shell--grade .stat-card-link.portal-nav-card .portal-nav-meta {
    color: #5b56cc;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.portal-shell--grade .stat-card-link.portal-nav-card:hover .portal-nav-meta,
.portal-shell--grade .stat-card-link.portal-nav-card:focus .portal-nav-meta {
    color: #4338ca;
}

.portal-shell--attendance .stat-card-link.portal-nav-card .portal-nav-meta {
    color: #0f766e;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.portal-shell--attendance .stat-card-link.portal-nav-card:hover .portal-nav-meta,
.portal-shell--attendance .stat-card-link.portal-nav-card:focus .portal-nav-meta {
    color: #0d9488;
}

.portal-nav-grid--grade-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-nav-grid--grade-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .portal-nav-grid--basic,
    .portal-nav-grid--academic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .portal-nav-grid--basic,
    .portal-nav-grid--academic {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .portal-nav-grid--grade-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-nav-grid--grade-settings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .portal-nav-grid--grade-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .portal-priority-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-label {
    font-size: 13px;
    color: var(--muted-500);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: 0.02em;
}

.stat-value-lg {
    font-size: 36px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 12px;
}

.form-grid,
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 16px;
    margin-bottom: 14px;
}

.form-field,
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-actions,
.filter-actions,
.chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    justify-content: space-between;
}

.toggle-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-700);
}

.status-message {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-700);
}

.form-row label,
.form-field label,
.filter-field label {
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-700);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    background: var(--surface-0);
    border: 1px solid var(--line-300);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    min-width: 160px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(59, 114, 240, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.18);
}

input[type="checkbox"] {
    accent-color: var(--brand-600);
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(18, 163, 166, 0.12);
    color: var(--accent-500);
    font-weight: 600;
}

.student-detail-badges .badge {
    font-size: 14px;
    padding: 4px 12px;
    letter-spacing: 0.02em;
}

.table-shell {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.student-commute-shell {
    border-color: #d7e2ef;
    background:
        radial-gradient(circle at top right, rgba(123, 160, 201, 0.14), transparent 34%),
        linear-gradient(180deg, #fbfdff 0%, #f5f9fc 100%);
}

.student-commute-card-head {
    margin-bottom: 12px;
}

.student-commute-accordion {
    padding: 0;
    overflow: hidden;
}

.student-commute-accordion summary {
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(233, 239, 246, 0.96), rgba(243, 247, 251, 0.96));
    font-size: 17px;
}

.student-commute-accordion > :not(summary) {
    padding: 20px 22px 22px;
}

.student-commute-summary {
    letter-spacing: 0.02em;
}

.student-commute-body {
    display: grid;
    gap: 16px;
}

.student-commute-copy {
    margin: 0;
    max-width: 760px;
    color: #5f7387;
    font-size: 13px;
    line-height: 1.6;
}

.student-commute-layout {
    display: grid;
    gap: 14px;
}

.student-commute-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.student-commute-panel {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #d7e0ea;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.95));
    box-shadow: 0 8px 18px rgba(25, 52, 83, 0.035);
}

.student-commute-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.student-commute-panel-head h3 {
    margin: 0;
    font-size: 16px;
    color: #21364d;
}

.student-commute-panel-head p {
    margin: 4px 0 0;
    color: #667b90;
    font-size: 12px;
    line-height: 1.5;
}

.student-commute-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(29, 78, 137, 0.1);
    color: #24527d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.student-commute-help {
    margin-top: 10px;
}

.commute-choice-list {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.commute-choice-list td {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d7dde6;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.commute-choice-list td:hover {
    border-color: #9db4cb;
    box-shadow: 0 6px 12px rgba(41, 72, 105, 0.05);
}

.commute-choice-list input[type="checkbox"],
.commute-choice-list input[type="radio"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #24527d;
}

.commute-choice-list input[type="checkbox"] + label,
.commute-choice-list input[type="radio"] + label {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #233548;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    cursor: pointer;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface-0);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none;
}

.table th,
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-200);
    vertical-align: top;
}

.table th {
    background: var(--surface-2);
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-600);
}

.table tr:last-child td {
    border-bottom: none;
}

.table-hover tbody tr:hover td {
    background: var(--surface-1);
}

.attendance-editor-filters {
    margin-bottom: 4px;
}

.attendance-editor-actions,
.grade-entry-actions {
    justify-content: flex-start;
    gap: 12px;
}

.attendance-editor-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.attendance-editor-context {
    margin: 8px 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
}

.attendance-editor-context-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted-500);
}

.attendance-editor-context-name {
    margin-top: 2px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1.35;
}

.attendance-editor-context-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted-500);
    line-height: 1.35;
}

.attendance-editor-context-hint {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--ink-700);
    line-height: 1.5;
}

.attendance-editor-status {
    margin-top: 4px;
    font-weight: 600;
}

.attendance-reception-banner {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(42, 91, 215, 0.16);
    background:
        linear-gradient(135deg, rgba(42, 91, 215, 0.08), rgba(18, 163, 166, 0.08)),
        rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.attendance-reception-banner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.attendance-reception-banner-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-700);
}

.attendance-reception-banner-body {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 14px;
    margin-top: 12px;
    align-items: start;
}

.attendance-reception-banner-caption {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-500);
}

.attendance-reception-count strong {
    display: inline-block;
    font-size: 24px;
    line-height: 1.15;
    color: var(--ink-900);
}

.attendance-reception-count--open strong {
    color: #0f766e;
}

.attendance-reception-copy {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--ink-700);
    line-height: 1.6;
}

.attendance-reception-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.attendance-reception-pill::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.attendance-reception-pill--open {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.24);
    color: #047857;
}

.attendance-reception-pill--closed {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.22);
    color: #b45309;
}

.attendance-reception-pill--idle,
.attendance-reception-pill--done {
    background: rgba(59, 114, 240, 0.1);
    border-color: rgba(59, 114, 240, 0.18);
    color: var(--brand-600);
}

.attendance-reception-pill--feature-off {
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.18);
    color: var(--ink-600);
}

.attendance-editor-help,
.grade-entry-mobile-help {
    margin: 0 0 12px;
}

.grade-entry-mobile-only-cell {
    display: none;
}

.grade-entry-mobile-toggle {
    width: 100%;
}

.student-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.student-name-with-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-stack {
    position: relative;
    flex: 0 0 auto;
    display: inline-block;
}

.avatar-stack--sm {
    width: 36px;
    height: 36px;
}

.avatar-stack--lg {
    width: 88px;
    height: 88px;
}

.avatar-stack .mock-avatar {
    position: absolute;
    top: 0;
    left: 0;
}

.avatar-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    border: 1px solid rgba(71, 85, 105, 0.18);
    background: #fff;
}

.mock-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(71, 85, 105, 0.18);
    background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.45);
}

.mock-avatar::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: #94a3b8;
}

.mock-avatar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 24px;
    height: 14px;
    border-radius: 14px 14px 10px 10px;
    transform: translateX(-50%);
    background: #94a3b8;
}

.mock-avatar--sm {
    width: 36px;
    height: 36px;
}

.mock-avatar--sm::before {
    top: 7px;
    width: 10px;
    height: 10px;
}

.mock-avatar--sm::after {
    bottom: 6px;
    width: 18px;
    height: 10px;
}

.mock-avatar--lg {
    width: 88px;
    height: 88px;
}

.mock-avatar--lg::before {
    top: 18px;
    width: 24px;
    height: 24px;
}

.mock-avatar--lg::after {
    bottom: 14px;
    width: 44px;
    height: 24px;
}

.student-profile-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.student-profile-head .student-profile-meta {
    margin-bottom: 0;
    flex: 1 1 420px;
}

.student-profile-head--compact {
    gap: 14px;
    margin-bottom: 0;
}

.student-profile-head--compact .student-profile-meta {
    flex: 1 1 0;
    min-width: 0;
}

.student-profile-title {
    margin-bottom: 8px;
}

.student-profile-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.student-profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.student-profile-kana-inline {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-500);
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.student-profile-kana-inline:empty {
    display: none;
}

.student-profile-romaji-inline {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-500);
}

.student-profile-romaji-inline:empty {
    display: none;
}

.student-summary-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.student-summary-kv-grid .kv {
    margin: 0;
}

.student-profile-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted-500);
}

.student-profile-kana,
.student-profile-romaji {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.85);
}

.kv-grid {
    margin: 10px 0 12px;
}

.kv {
    border-radius: var(--radius-md);
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 12px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.kv-full {
    grid-column: 1 / -1;
}

.kv-label {
    font-size: 11px;
    color: var(--muted-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.kv-label--keep-case {
    text-transform: none;
}

.kv-value {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
    word-break: break-word;
}

.detail-accordion {
    border-radius: var(--radius-md);
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

.detail-accordion summary {
    cursor: pointer;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.detail-accordion summary::-webkit-details-marker {
    display: none;
}

.detail-accordion summary::after {
    content: "v";
    color: var(--muted-500);
    transition: transform 180ms ease;
}

.detail-accordion[open] summary::after {
    transform: rotate(180deg);
}

.detail-accordion > :not(summary) {
    padding: 12px;
}

.text-muted {
    color: var(--muted-500);
    font-size: 13px;
}

.student-name-kana {
    font-size: 11px;
    color: var(--muted-500);
    line-height: 1.2;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.student-name-main {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.3;
    white-space: nowrap;
}

.student-list-desktop {
    display: block;
}

.student-search-actions {
    justify-content: space-between;
}

.student-search-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.student-search-actions-group--secondary {
    margin-left: auto;
    justify-content: flex-end;
}

.teacher-search-actions {
    justify-content: flex-start;
}

.student-list-mobile {
    display: none;
}

.teacher-list-desktop {
    display: block;
}

.teacher-list-mobile {
    display: none;
}

.student-list-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.92);
    padding: 12px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.student-list-card + .student-list-card {
    margin-top: 12px;
}

.student-list-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.student-list-card-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(42, 91, 215, 0.22);
    background: rgba(42, 91, 215, 0.08);
    color: var(--brand-600);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.student-list-card-kv {
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.student-list-card-kv dt {
    font-size: 11px;
    color: var(--muted-500);
    letter-spacing: 0.04em;
}

.student-list-card-kv dd {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
    word-break: break-word;
}

.student-list-card-kv__wide {
    grid-column: 1 / -1;
}

.student-list-card-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.student-list-card-actions .btn {
    flex: 1 1 0;
}

.course-category {
    margin-bottom: 12px;
}

.course-order-card .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.course-order-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.course-page-actions {
    width: auto;
}

.course-order-save,
.course-order-cancel {
    display: none;
}

.course-filter-accordion {
    margin: 12px 0 10px;
    border-color: rgba(153, 173, 201, 0.32);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: none;
}

.course-filter-accordion summary {
    padding: 10px 12px;
    background: rgba(247, 250, 255, 0.9);
}

.course-filter-accordion[open] summary {
    border-bottom: 1px solid rgba(153, 173, 201, 0.22);
}

.course-filter-accordion > :not(summary) {
    padding: 10px 12px 8px;
}

.course-filter-strip {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.course-filter-strip-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.course-filter-strip-top {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.course-filter-strip-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink-900);
    letter-spacing: 0.02em;
}

.course-filter-summary-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
}

.course-filter-strip-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.course-filter-strip-badges:empty {
    display: none;
}

.course-filter-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(70, 115, 230, 0.14);
    background: rgba(70, 115, 230, 0.06);
    color: var(--brand-700);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.course-filter-toggle-text {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-700);
    white-space: nowrap;
}

.course-filter-body {
    display: grid;
    gap: 10px;
}

.course-filter-grid {
    margin-bottom: 0;
    gap: 10px 12px;
}

.course-filter-actions {
    justify-content: flex-start;
    gap: 8px;
}

.course-category-list {
    display: block;
}

.course-order-controls {
    display: none;
    align-items: center;
    gap: 4px;
}

.course-order-control {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--line-300);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.course-order-control:hover,
.course-order-control:focus {
    border-color: var(--brand-300);
    color: var(--brand-700);
    outline: none;
}

.course-order-handle {
    cursor: grab;
}

.course-order-editing .course-category[data-category-editable='1'] > summary .course-category-order-controls {
    display: inline-flex;
}

.course-order-editing .course-item[data-course-editable='1'] .course-item-order-controls {
    display: inline-flex;
}

.course-order-editing .course-item-attendance {
    pointer-events: none;
    opacity: 0.45;
}

.course-category.is-dragging,
.course-item.is-dragging {
    opacity: 0.55;
}

.course-category > summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-category-title {
    font-weight: 800;
    flex: 1 1 auto;
}

.course-category-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.course-items {
    display: grid;
    gap: 10px;
}

.course-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, auto);
    gap: 8px 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
    align-items: start;
}

.course-item-main {
    grid-column: 2 / 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-item-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1.35;
    margin: 0;
}

.course-item-actions {
    grid-column: 3 / 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    align-content: flex-start;
    align-self: start;
}

.course-item-actions br {
    display: none;
}

.course-item-order-controls {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    align-self: start;
    margin-top: 2px;
}

.course-item-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
    letter-spacing: 0.02em;
    min-width: 74px;
    justify-content: center;
}

.course-item-target,
.course-item-meta,
.course-item-instructors {
    font-size: 12px;
    color: var(--muted-500);
    line-height: 1.35;
    word-break: break-word;
}

.course-item-attendance-summary {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-700);
    line-height: 1.35;
    word-break: break-word;
}

.course-item-instructors {
    margin-top: 2px;
}

.course-item-instructors a.course-instructor-link {
    color: var(--brand-600);
    font-weight: 700;
    text-decoration: none;
}

.course-item-instructors a.course-instructor-link:hover,
.course-item-instructors a.course-instructor-link:focus {
    text-decoration: underline;
}

.course-item-attendance.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.course-order-editor {
    position: relative;
}

.course-order-editor .course-order-editor-dirty {
    display: none;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #f3c4a8;
    background: #fff5ef;
    color: #9f3f1d;
    font-size: 12px;
    font-weight: 700;
}

.course-order-editor.has-dirty .course-order-editor-dirty {
    display: inline-flex;
}

.course-order-editor-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 14px;
}

.course-order-editor-side {
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    padding: 10px;
    position: sticky;
    top: 108px;
    align-self: start;
}

.course-order-editor-side-title {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--ink-800);
}

.course-order-editor-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-order-editor-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--line-200);
    background: #fff;
}

.course-order-editor-category.is-active {
    border-color: rgba(42, 91, 215, 0.35);
    box-shadow: 0 6px 14px rgba(42, 91, 215, 0.12);
}

.course-order-editor-category-label {
    border: 0;
    background: transparent;
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    color: var(--ink-900);
    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
}

.course-order-editor-category-label .badge {
    white-space: nowrap;
}

.course-order-editor-category-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-order-editor-inline-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.course-order-editor-control {
    min-width: 32px;
    min-height: 32px;
    border: 1px solid var(--line-300);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-700);
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.course-order-editor-control:hover,
.course-order-editor-control:focus {
    border-color: var(--brand-300);
    color: var(--brand-700);
    outline: none;
}

.course-order-editor-category[data-category-editable='0'] .course-order-editor-inline-controls,
.course-order-editor-course[data-course-editable='0'] .course-order-editor-inline-controls {
    opacity: 0.45;
    pointer-events: none;
}

.course-order-editor[data-can-edit='0'] .course-order-editor-inline-controls {
    display: none;
}

.course-order-editor[data-can-edit='0'] .course-order-editor-savebar {
    display: none;
}

.course-order-editor-course[data-course-editable='0'] .course-order-editor-inline-controls {
    display: none;
}

.course-order-editor-handle {
    cursor: grab;
    user-select: none;
}

.course-order-editor-main {
    min-width: 0;
}

.course-order-editor-panels {
    display: block;
}

.course-order-editor-panel {
    display: none;
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    padding: 12px;
}

.course-order-editor-panel.is-active {
    display: block;
}

.course-order-editor-panel-head {
    margin-bottom: 10px;
}

.course-order-editor-panel-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.course-order-editor-panel-head p {
    margin: 0;
    font-size: 13px;
    color: var(--muted-500);
}

.course-order-editor-course-list {
    display: grid;
    gap: 8px;
}

.course-order-editor-course {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--line-200);
    background: #fff;
}

.course-order-editor-course-main {
    min-width: 0;
}

.course-order-editor-course-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.4;
}

.course-order-editor-category.is-dragging,
.course-order-editor-course.is-dragging {
    opacity: 0.58;
}

.course-order-editor-savebar {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 0 0;
    border-top: 1px solid var(--line-200);
}

.selector-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.selector-grid td {
    padding: 6px 10px;
    vertical-align: top;
}

.selector-grid input[type="checkbox"] {
    margin-right: 8px;
}

.timetable-editor-grid {
    overflow-x: auto;
}

.timetable-editor-table {
    min-width: 860px;
}

.timetable-period-head {
    min-width: 92px;
}

.timetable-period-sub {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted-500);
    font-weight: 500;
}

.timetable-slot-cell {
    min-width: 210px;
    vertical-align: top;
}

.timetable-slot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 34px;
    margin-bottom: 8px;
}

.timetable-slot-empty {
    color: var(--muted-500);
    font-size: 13px;
}

.timetable-slot-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1f3d71;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid #d7e3ff;
}

.timetable-slot-edit-btn {
    width: 100%;
}

.timetable-slot-modal-open {
    overflow: hidden;
}

.timetable-slot-modal[hidden] {
    display: none;
}

.timetable-slot-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.timetable-slot-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(21, 31, 43, 0.42);
}

.timetable-slot-modal-panel {
    position: relative;
    width: min(700px, calc(100vw - 24px));
    max-height: calc(100vh - 28px);
    margin: 14px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(12, 24, 38, 0.22);
    display: flex;
    flex-direction: column;
}

.timetable-slot-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5ebf2;
}

.timetable-slot-modal-head h3 {
    margin: 0;
    font-size: 18px;
}

.timetable-slot-modal-body {
    padding: 14px 18px 10px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timetable-slot-search-label {
    font-size: 13px;
    color: var(--muted-600);
    font-weight: 600;
}

.timetable-slot-course-list {
    border: 1px solid #e3e9f2;
    border-radius: 10px;
    padding: 10px;
    max-height: 48vh;
    overflow: auto;
}

.timetable-slot-course-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid #edf1f6;
    cursor: pointer;
}

.timetable-slot-course-item:last-child {
    border-bottom: 0;
}

.timetable-slot-course-item input[type="checkbox"] {
    margin-top: 3px;
}

.timetable-slot-modal-actions {
    border-top: 1px solid #e5ebf2;
    padding: 12px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.table-compact th,
.table-compact td {
    padding: 9px 12px;
}

.table-report-field-value {
    white-space: normal;
    word-break: break-word;
    line-height: 1.8;
    text-indent: 0;
    padding-left: 8px !important;
}

.table-report-item-name {
    width: 160px;
    min-width: 160px;
    max-width: 200px;
    color: var(--ink-800);
    font-weight: 600;
}

.table-report-field-detail {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}

.table-report-field-detail th,
.table-report-field-detail td {
    border: 0;
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
}

.table-report-field-detail th {
    width: 120px;
    color: #4b5f70;
    font-weight: 600;
    white-space: nowrap;
    text-transform: none;
    font-size: 13px;
    letter-spacing: 0;
    background: #f4f7fb;
}

.table-report-field-detail td {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.8;
}

.student-detail-layout .student-detail-actions,
.student-activity-layout .student-detail-actions {
    margin-bottom: 14px;
}

.student-page-intro-card {
    padding-top: 16px;
}

.student-page-intro-card .student-detail-actions {
    margin-bottom: 10px;
}

.student-page-intro-card .student-local-nav {
    margin: 10px 0 14px;
}

.student-page-intro-card .student-profile-head {
    margin-top: 0;
}

.student-page-intro-card--public .form-row {
    margin-bottom: 8px;
}

.public-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(280px, 1fr) auto;
    gap: 12px 16px;
    align-items: end;
}

.public-filter-bar__student,
.public-filter-bar__actions {
    min-width: 0;
}

.public-filter-bar__student .form-control,
.public-filter-bar__student select,
.public-date-range__field .form-control,
.public-date-range__field input[type="date"],
.public-request-form-grid .form-control,
.public-request-form-grid select,
.public-request-form-grid textarea {
    width: 100%;
    min-width: 0;
}

.public-filter-bar__actions {
    justify-content: flex-end;
}

.public-filter-bar__actions .btn {
    min-width: 120px;
}

.public-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.public-request-helper {
    margin-bottom: 14px;
}

.public-request-single-day-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(59, 114, 240, 0.18);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.94));
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.12);
    cursor: pointer;
}

.public-request-single-day-toggle__checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

.public-request-single-day-toggle__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--ink-800);
}

.public-request-single-day-toggle__copy strong {
    font-size: 15px;
    line-height: 1.3;
}

.public-request-single-day-toggle__copy span {
    font-size: 12px;
    color: var(--muted-500);
}

.public-request-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}

.public-request-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.public-request-date-grid__field {
    min-width: 0;
}

.public-request-date-grid__field--end label::after {
    content: "";
}

.public-request-date-grid.is-single-day .public-request-date-grid__field--end label::after {
    content: "同日";
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(18, 163, 166, 0.12);
    color: #0f766e;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.public-request-date-grid.is-single-day .public-request-date-grid__field--end .form-control,
.public-request-date-grid.is-single-day .public-request-date-grid__field--end input[type="date"] {
    background: rgba(248, 250, 252, 0.96);
    color: var(--muted-600);
}

.public-request-form-actions {
    justify-content: flex-end;
}

.dashboard-schedule-scroll-hint {
    display: none;
    margin: 4px 0 12px;
    color: var(--muted-500);
    font-size: 12px;
}

.student-local-nav {
    margin: 12px 0 16px;
}

.student-local-nav .talk-tab,
.student-report-tabs .talk-tab {
    min-height: 40px;
    text-decoration: none;
}

.student-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.student-section-meta {
    font-size: 13px;
    color: var(--muted-500);
}

.student-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-detail-readonly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 16px;
}

.student-detail-readonly-grid .kv {
    margin: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.96);
}

.student-detail-subsection-title {
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
}

.student-report-tabs {
    margin-bottom: 14px;
}

.student-report-workspace {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.student-report-side {
    position: sticky;
    top: 106px;
    align-self: start;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
}

.student-report-side-title {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--ink-800);
}

.student-report-side-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 68vh;
    overflow: auto;
}

.student-report-side-list a {
    display: block;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--ink-700);
    text-decoration: none;
    line-height: 1.35;
}

.student-report-side-list a:hover,
.student-report-side-list a:focus {
    background: rgba(42, 91, 215, 0.1);
    color: var(--brand-700);
}

.student-report-main {
    min-width: 0;
}

.student-report-grid tbody tr[id] {
    scroll-margin-top: 112px;
}

.student-detail-layout .table-report-item-name {
    width: 220px;
    min-width: 220px;
    max-width: 260px;
}

.student-detail-layout .table-report-field-value {
    padding-left: 0 !important;
    line-height: 1.75;
    vertical-align: top;
}

.student-activity-summary {
    margin: 2px 0 2px;
    color: var(--muted-500);
    font-size: 13px;
}

.student-activity-panel {
    margin-top: 4px;
}

.student-memo-help {
    margin: 2px 0 10px;
}

.student-memo-link {
    display: block;
    padding: 6px 8px;
    margin: -6px -8px;
    border-radius: 10px;
    color: var(--brand-700);
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease;
}

.student-memo-link:hover,
.student-memo-link:focus {
    background: rgba(42, 91, 215, 0.08);
    color: var(--brand-800);
    text-decoration: underline;
}

.student-memo-link.is-selected {
    background: rgba(42, 91, 215, 0.12);
    color: var(--ink-900);
}

.student-memo-row,
.student-achievement-row,
.student-criterion-row {
    cursor: pointer;
}

.student-memo-row td,
.student-achievement-row td,
.student-criterion-row td {
    transition: background-color 180ms ease;
}

.student-memo-row:hover td,
.student-memo-row:focus-visible td,
.student-achievement-row:hover td,
.student-achievement-row:focus-visible td,
.student-criterion-row:hover td,
.student-criterion-row:focus-visible td {
    background: rgba(42, 91, 215, 0.08);
}

.student-memo-row.is-selected td,
.student-achievement-row.is-selected td,
.student-criterion-row.is-selected td {
    background: rgba(42, 91, 215, 0.12);
}

.student-memo-row:focus-visible,
.student-achievement-row:focus-visible,
.student-criterion-row:focus-visible {
    outline: 2px solid rgba(42, 91, 215, 0.34);
    outline-offset: 2px;
}

.student-memo-row.is-selected .student-memo-link {
    color: var(--ink-900);
}

.student-memo-detail,
.student-achievement-detail,
.student-criterion-detail {
    margin-top: 14px;
}

.student-memo-detail-card,
.student-achievement-detail-card,
.student-criterion-detail-card {
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 18px 20px;
}

.student-memo-detail-label,
.student-achievement-detail-label,
.student-criterion-detail-label {
    margin-bottom: 6px;
    color: var(--muted-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.student-memo-detail-card h3,
.student-achievement-detail-card h3,
.student-criterion-detail-card h3 {
    margin: 0 0 8px;
    color: var(--ink-900);
    font-size: 24px;
}

.student-memo-detail-meta,
.student-achievement-detail-meta,
.student-criterion-detail-meta {
    margin-bottom: 14px;
    color: var(--muted-500);
    font-size: 13px;
}

.student-memo-detail-body,
.student-achievement-detail-body,
.student-criterion-detail-body {
    color: var(--ink-900);
    line-height: 1.9;
    white-space: normal;
    word-break: break-word;
}

.student-activity-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.student-activity-detail-item {
    border: 1px solid var(--line-200);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 14px;
}

.student-activity-detail-item-label {
    margin-bottom: 4px;
    color: var(--muted-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.student-activity-detail-item-value {
    color: var(--ink-900);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
}

.student-score-summary {
    margin: 2px 0 10px;
    color: var(--ink-800);
    font-size: 14px;
    font-weight: 600;
}

.student-attendance-period {
    margin-bottom: 6px;
}

.student-attendance-note {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid rgba(18, 163, 166, 0.18);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(18, 163, 166, 0.08), rgba(42, 91, 215, 0.04));
    color: var(--ink-700);
    font-size: 13px;
    line-height: 1.7;
}

.student-attendance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.student-attendance-kpi-card {
    padding: 14px 16px;
    border: 1px solid rgba(42, 91, 215, 0.12);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.student-attendance-kpi-card.is-alert {
    border-color: rgba(209, 73, 73, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 248, 248, 0.98), rgba(255, 239, 239, 0.94));
}

.student-attendance-kpi-label {
    color: var(--muted-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.student-attendance-kpi-value {
    margin-top: 6px;
    color: var(--ink-900);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.student-attendance-kpi-card.is-alert .student-attendance-kpi-value {
    color: var(--danger-500);
}

.student-attendance-overview-grid td {
    vertical-align: middle;
}

.student-attendance-overview-grid td.student-attendance-cell--course {
    font-weight: 700;
    color: var(--ink-800);
}

.student-attendance-overview-grid td.student-attendance-cell--teacher {
    color: var(--muted-500);
}

.student-attendance-overview-grid td.student-attendance-cell--metric {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.student-attendance-overview-grid td.student-attendance-cell--rate {
    white-space: nowrap;
    font-weight: 700;
}

.student-attendance-overview-grid td.student-attendance-cell--zero {
    color: var(--muted-500);
}

.student-attendance-overview-grid td.student-attendance-cell--alert {
    color: var(--danger-500);
    font-weight: 700;
    background: rgba(209, 73, 73, 0.08);
}

.student-attendance-overview-grid tr.student-attendance-overview-row--attention td {
    background: rgba(18, 163, 166, 0.04);
}

.student-attendance-overview-grid tr.student-attendance-overview-row--attention td.student-attendance-cell--alert {
    background: rgba(209, 73, 73, 0.1);
}

.student-attendance-empty {
    padding: 16px 18px;
    border: 1px dashed var(--line-300);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.84);
    color: var(--muted-500);
    font-size: 14px;
}

.student-attendance-date-group {
    margin-top: 14px;
    border: 1px solid rgba(42, 91, 215, 0.1);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(42, 91, 215, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.96));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.student-attendance-date-group:first-of-type {
    margin-top: 0;
}

.student-attendance-date-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.student-attendance-date-group-copy {
    min-width: 0;
}

.student-attendance-date-group-title {
    margin: 0;
    color: var(--ink-800);
    font-size: 18px;
    font-weight: 700;
}

.student-attendance-date-group-meta {
    margin-top: 6px;
    color: var(--muted-500);
    font-size: 13px;
    line-height: 1.7;
}

.student-attendance-date-group-count {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(42, 91, 215, 0.12);
    color: var(--brand-600);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.student-attendance-detail-list {
    width: 100%;
}

.student-attendance-detail-list-head,
.student-attendance-detail-list-row {
    display: grid;
    grid-template-columns: 92px minmax(260px, 2.2fr) 120px 120px minmax(160px, 1.5fr);
    gap: 14px;
    align-items: start;
    padding: 12px 18px;
}

.student-attendance-detail-list-head {
    background: rgba(238, 242, 247, 0.78);
    color: var(--muted-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.student-attendance-detail-list-row + .student-attendance-detail-list-row {
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.student-attendance-detail-cell {
    min-width: 0;
    color: var(--ink-700);
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.student-attendance-detail-cell--period,
.student-attendance-detail-cell--status {
    font-weight: 700;
    color: var(--ink-800);
}

.student-attendance-detail-cell--course {
    font-weight: 700;
    color: var(--ink-900);
}

@media (max-width: 900px) {
    .student-attendance-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-attendance-date-group-head {
        flex-direction: column;
        align-items: stretch;
    }

    .student-attendance-date-group-count {
        align-self: flex-start;
    }

    .student-attendance-detail-list-head {
        display: none;
    }

    .student-attendance-detail-list {
        padding: 12px;
    }

    .student-attendance-detail-list-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        border: 1px solid var(--line-200);
        border-radius: 14px;
        background: var(--surface-0);
    }

    .student-attendance-detail-list-row + .student-attendance-detail-list-row {
        margin-top: 10px;
        border-top: 1px solid var(--line-200);
    }

    .student-attendance-detail-cell::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted-500);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
}

.student-score-matrix {
    min-width: 1320px;
}

.student-score-matrix th,
.student-score-matrix td {
    white-space: nowrap;
}

.student-score-matrix th:first-child,
.student-score-matrix td:first-child {
    min-width: 140px;
}

.student-score-matrix th:nth-child(2),
.student-score-matrix td:nth-child(2) {
    min-width: 280px;
    white-space: normal;
}

.student-score-matrix th:last-child,
.student-score-matrix td:last-child {
    min-width: 80px;
    text-align: center;
}

.grade-year-result-grid {
    min-width: 1180px;
}

.grade-entry-grid {
    min-width: 1480px;
}

.grade-entry-grid th,
.grade-entry-grid td {
    white-space: nowrap;
}

.grade-entry-grid th:nth-child(2),
.grade-entry-grid td:nth-child(2) {
    min-width: 180px;
    white-space: normal;
}

.grade-entry-mobile td:nth-child(2) .student-name-main {
    font-weight: 800;
}

.grade-year-result-grid th,
.grade-year-result-grid td {
    white-space: nowrap;
}

.grade-year-result-grid th:nth-child(2),
.grade-year-result-grid td:nth-child(2) {
    min-width: 180px;
    white-space: normal;
}

@media (max-width: 1024px) {
    .course-order-editor-workspace {
        grid-template-columns: 1fr;
    }

    .course-order-editor-side {
        position: static;
    }

    .student-report-workspace {
        grid-template-columns: 1fr;
    }

    .student-report-side {
        position: static;
    }
}

.table-chat td {
    font-size: 13px;
}

.table-schedule th,
.table-schedule td {
    white-space: nowrap;
}

.table-schedule td {
    font-variant-numeric: tabular-nums;
}

.table-schedule th:nth-child(1),
.table-schedule td:nth-child(1) {
    min-width: 180px;
}

.table-schedule th:nth-child(2),
.table-schedule td:nth-child(2),
.table-schedule th:nth-child(3),
.table-schedule td:nth-child(3) {
    min-width: 150px;
}

.table-schedule th:nth-child(4),
.table-schedule td:nth-child(4) {
    min-width: 140px;
}

.table-schedule-actions th:nth-child(5),
.table-schedule-actions td:nth-child(5) {
    min-width: 60px;
    text-align: center;
}

.table-period-settings th,
.table-period-settings td {
    white-space: nowrap;
}

.table-period-settings td {
    font-variant-numeric: tabular-nums;
}

.table-period-settings th:nth-child(1),
.table-period-settings td:nth-child(1) {
    min-width: 80px;
    text-align: center;
}

.table-period-settings th:nth-child(2),
.table-period-settings td:nth-child(2) {
    min-width: 200px;
}

.table-period-settings th:nth-child(3),
.table-period-settings td:nth-child(3),
.table-period-settings th:nth-child(4),
.table-period-settings td:nth-child(4) {
    min-width: 120px;
    text-align: center;
}

.table-period-settings th:nth-child(5),
.table-period-settings td:nth-child(5) {
    min-width: 120px;
    text-align: center;
}

.table-period-settings .form-control {
    min-width: 0;
    width: 120px;
    padding: 6px 10px;
    font-size: 13px;
}

.table-period-settings .period-name-input {
    width: 200px;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    box-shadow: 0 8px 14px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-action:hover,
.icon-action:focus {
    transform: translateY(-1px);
    background: rgba(42, 91, 215, 0.08);
    border-color: rgba(42, 91, 215, 0.35);
    color: #1d4ed8;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.icon-action svg {
    width: 18px;
    height: 18px;
}

.icon-action--danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
}

.icon-action--danger:hover,
.icon-action--danger:focus {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.55);
    color: #991b1b;
}

.icon-action--ok {
    color: #0f766e;
    border-color: rgba(20, 184, 166, 0.35);
}

.icon-action--ok:hover,
.icon-action--ok:focus {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.55);
    color: #0f766e;
}

.period-add-actions {
    align-self: end;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 18px rgba(42, 91, 215, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(42, 91, 215, 0.28);
}

.btn[disabled],
.btn.disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 10px 18px rgba(18, 163, 166, 0.22);
}

.btn-secondary:hover,
.btn-secondary:focus {
    box-shadow: 0 12px 22px rgba(18, 163, 166, 0.28);
}

.btn-outline {
    background: var(--surface-0);
    border: 1px solid rgba(42, 91, 215, 0.5);
    color: var(--brand-600);
    box-shadow: none;
}

.btn-outline:hover,
.btn-outline:focus {
    background: rgba(42, 91, 215, 0.08);
    box-shadow: none;
}

.btn-reception-open {
    background: linear-gradient(135deg, #10b981, #0f766e);
    box-shadow: 0 10px 18px rgba(16, 185, 129, 0.22);
}

.btn-reception-open:hover,
.btn-reception-open:focus {
    box-shadow: 0 12px 22px rgba(16, 185, 129, 0.28);
}

.btn-reception-close {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 10px 18px rgba(245, 158, 11, 0.24);
}

.btn-reception-close:hover,
.btn-reception-close:focus {
    box-shadow: 0 12px 22px rgba(245, 158, 11, 0.3);
}

@media (max-width: 760px) {
    .attendance-reception-banner-body {
        grid-template-columns: 1fr;
    }

    .attendance-reception-count strong {
        font-size: 20px;
    }
}

.btn-xs {
    padding: 5px 12px;
    font-size: 12px;
    letter-spacing: 0.02em;
    margin-right: 6px;
}

.school-settings-layout .school-admin-nav-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.school-settings-layout .school-admin-tab-groups {
    gap: 10px;
}

.school-settings-layout .school-admin-tab-groups .talk-tab {
    padding: 7px 14px;
    border-color: rgba(42, 91, 215, 0.24);
    background: rgba(42, 91, 215, 0.08);
    color: var(--ink-700);
}

.school-settings-layout .school-admin-tab-groups .talk-tab.is-active {
    color: #ffffff;
    border-color: rgba(42, 91, 215, 0);
    background: linear-gradient(135deg, rgba(42, 91, 215, 0.95), rgba(59, 114, 240, 0.88));
}

.school-settings-layout .school-admin-tabs {
    margin-bottom: 0;
    padding-top: 2px;
}

.school-subtabs {
    margin-bottom: 14px;
}

.school-guide-panel {
    border: 1px solid rgba(42, 91, 215, 0.18);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(42, 91, 215, 0.08), rgba(18, 163, 166, 0.08));
    padding: 14px 16px;
}

.school-guide-panel h3 {
    margin-bottom: 8px;
    font-size: 15px;
}

.school-guide-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    color: var(--ink-700);
    font-size: 13px;
}

.academic-structure-guide h3 {
    margin-bottom: 8px;
    font-size: 15px;
}

.academic-structure-guide-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    color: var(--ink-700);
    font-size: 13px;
}

.school-current-year {
    color: var(--ink-800);
    font-weight: 600;
}

.mt-12 {
    margin-top: 12px;
}

.school-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.school-settings-actions {
    margin-top: 6px;
}

.verification-scan-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.verification-scan-actions .form-control {
    flex: 1 1 260px;
}

.verification-scan-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.verification-scan-toolbar .btn {
    min-width: 176px;
}

.verification-panel-note {
    margin: 0;
    max-width: 62ch;
    color: var(--ink-700);
    line-height: 1.75;
}

.verification-scan-status {
    display: block;
    margin-top: 10px;
}

.verification-scan-status.is-error {
    color: #c2410c;
}

.verification-scan-status.is-success {
    color: #15803d;
}

.verification-scanner-panel {
    position: relative;
    display: block;
    width: 100%;
}

.verification-scanner-video {
    width: 100%;
    min-height: 320px;
    max-height: min(72vh, 640px);
    object-fit: cover;
    border-radius: 16px;
    background: #0f172a;
    display: block;
}

.verification-scanner-open {
    overflow: hidden;
}

.verification-scanner-overlay[hidden] {
    display: none;
}

.verification-scanner-overlay {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: grid;
    place-items: center;
    padding: 24px;
}

.verification-scanner-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
}

.verification-scanner-overlay-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 28px;
    border: 1px solid rgba(191, 219, 254, 0.28);
    background: linear-gradient(180deg, rgba(7, 16, 32, 0.98), rgba(15, 23, 42, 0.96));
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.45);
    color: #fff;
    overflow: hidden;
}

.verification-scanner-overlay-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.verification-scanner-overlay-copy {
    display: grid;
    gap: 6px;
}

.verification-scanner-overlay-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.9);
}

.verification-scanner-overlay-head h3 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.verification-scanner-overlay-head p {
    margin: 0;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.7;
}

.verification-scanner-close {
    flex: 0 0 auto;
    border-color: rgba(191, 219, 254, 0.35);
    color: #fff;
    background: rgba(15, 23, 42, 0.36);
}

.verification-scanner-close:hover {
    background: rgba(30, 41, 59, 0.72);
    color: #fff;
}

.verification-scanner-overlay-body {
    display: grid;
    gap: 14px;
    min-height: 0;
}

.verification-scanner-stage {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.verification-scanner-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: grid;
    place-items: center;
}

.verification-scanner-frame::before {
    content: "";
    width: min(72vw, 340px);
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    border: 3px solid rgba(96, 165, 250, 0.95);
    box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.34);
}

.verification-scanner-frame span {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: rgba(226, 232, 240, 0.96);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.verification-scanner-overlay-status {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(226, 232, 240, 0.96);
    line-height: 1.7;
}

.verification-scanner-overlay-status.is-error {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.36);
}

.verification-scanner-overlay-status.is-success {
    color: #dcfce7;
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(20, 83, 45, 0.38);
}

.verification-scanner-overlay-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.verification-scanner-overlay-actions .btn {
    min-width: 160px;
}

.verification-search-panel {
    overflow: hidden;
}

.verification-search-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-900);
}

.verification-search-panel > summary::-webkit-details-marker {
    display: none;
}

.verification-search-panel > summary::after {
    content: "⌄";
    color: var(--muted-500);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.verification-search-panel[open] > summary::after {
    transform: rotate(180deg);
}

.verification-search-panel__body {
    margin-top: 12px;
}

.verification-compact-shortcuts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.verification-management-page.is-compact .verification-scan-card,
.verification-management-page.is-compact .verification-list-card {
    scroll-margin-top: 16px;
}

.verification-detail-card {
    scroll-margin-top: 96px;
    outline: none;
}

.verification-detail-head {
    align-items: center;
}

.verification-detail-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
}

.verification-detail-badge.is-neutral {
    background: rgba(59, 114, 240, 0.08);
    border-color: rgba(59, 114, 240, 0.16);
    color: var(--ink-700);
}

.verification-detail-badge.is-success {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.2);
    color: #166534;
}

.verification-detail-badge.is-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.22);
    color: #b45309;
}

.verification-detail-badge.is-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.verification-detail-person {
    display: grid;
    gap: 4px;
}

.verification-detail-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--muted-500);
}

.verification-detail-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -0.02em;
    color: var(--ink-900);
}

.verification-detail-callout {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(59, 114, 240, 0.16);
    background: rgba(59, 114, 240, 0.08);
    color: var(--ink-800);
    line-height: 1.65;
}

.verification-detail-callout.is-success {
    border-color: rgba(22, 163, 74, 0.18);
    background: rgba(22, 163, 74, 0.08);
    color: #166534;
}

.verification-detail-callout.is-warning {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.verification-detail-callout.is-danger {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.verification-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.verification-detail-item {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-200);
    background: rgba(255, 255, 255, 0.82);
}

.verification-detail-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted-500);
    letter-spacing: 0.03em;
}

.verification-detail-value {
    color: var(--ink-900);
    font-weight: 600;
    line-height: 1.55;
}

.verification-decision-actions {
    justify-content: flex-start;
    gap: 10px;
}

.verification-detail-secondary-actions {
    justify-content: flex-start;
    margin-top: 10px;
}

.verification-note-field {
    margin-top: 14px;
}

.verification-note-field .form-control {
    min-height: 132px;
}

@media (max-width: 860px) {
    .dashboard-admin-work-panel {
        padding: 10px;
        border-radius: 16px;
    }

    .dashboard-admin-work-panel--attention {
        padding: 10px 10px 12px;
    }

    .dashboard-admin-work-panel--idle {
        padding: 2px 0 4px;
        margin-bottom: 10px;
    }

    .dashboard-admin-work-panel-head {
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-admin-work-panel-head p {
        display: none;
    }

    .dashboard-admin-work-badge {
        min-height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }

    .dashboard-admin-work-widget {
        grid-template-columns: 1fr;
        gap: 10px 12px;
        margin-top: 10px;
        padding: 14px;
        border-radius: 18px;
    }

    .dashboard-admin-work-widget__main {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        justify-items: stretch;
    }

    .dashboard-admin-work-widget__icon {
        width: 56px;
        height: 56px;
        border-radius: 18px;
    }

    .dashboard-admin-work-widget__icon svg {
        width: 25px;
        height: 25px;
    }

    .dashboard-admin-work-widget__copy {
        gap: 4px;
    }

    .dashboard-admin-work-widget__copy h3 {
        font-size: 22px;
        line-height: 1.12;
    }

    .dashboard-admin-work-widget__copy p {
        font-size: 13px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .dashboard-admin-work-widget__meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        justify-items: start;
        text-align: left;
    }

    .dashboard-admin-work-widget__count-label {
        display: none;
    }

    .dashboard-admin-work-widget__count {
        font-size: 28px;
    }

    .dashboard-admin-work-widget__state {
        min-height: 26px;
        padding: 0 9px;
        font-size: 11px;
    }

    .dashboard-admin-work-widget__actions {
        justify-content: stretch;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dashboard-admin-work-widget__actions .btn {
        width: 100%;
        min-height: 42px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .dashboard-admin-work-widget--idle {
        padding: 12px 14px;
        gap: 10px 12px;
    }

    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__main {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        justify-items: stretch;
    }

    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__copy h3 {
        font-size: 20px;
    }

    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__copy p {
        font-size: 12px;
    }

    .verification-scanner-overlay {
        padding: 0;
    }

    .verification-scanner-overlay-panel {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) 16px;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .verification-scanner-overlay-head {
        align-items: stretch;
        flex-direction: column;
    }

    .verification-scanner-overlay-head h3 {
        font-size: 26px;
    }

    .verification-scanner-stage {
        min-height: 54vh;
    }

    .verification-scanner-video {
        min-height: 54vh;
        max-height: none;
        border-radius: 18px;
    }

    .verification-scanner-frame::before {
        width: min(76vw, 320px);
        border-radius: 24px;
    }

    .verification-scanner-overlay-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .verification-scanner-overlay-actions .btn,
    .verification-scan-toolbar .btn {
        width: 100%;
        min-width: 0;
    }

    .verification-management-page.is-compact .page-head {
        margin-bottom: 8px;
    }

    .verification-management-page.is-compact .page-subtitle,
    .verification-management-page.is-compact .page-actions,
    .verification-management-page.is-compact .school-admin-nav-stack,
    .verification-management-page.is-compact .verification-panel-note {
        display: none;
    }

    .verification-management-page.is-compact .page-title {
        font-size: 30px;
    }

    .verification-management-page.is-compact .verification-scan-field {
        margin-top: 10px;
    }

    .verification-management-page.is-compact .verification-scan-actions {
        gap: 8px;
    }

    .verification-management-page.is-compact .verification-scan-actions .form-control {
        flex-basis: 100%;
    }

    .verification-management-page.is-compact .verification-compact-shortcuts {
        display: grid;
        grid-template-columns: 1fr;
    }

    .verification-management-page.is-compact .verification-compact-shortcuts .btn {
        width: 100%;
    }

    .verification-management-page.is-compact .verification-search-panel > summary {
        font-size: 16px;
    }
}

.attendance-reason-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.attendance-reason-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--line-200);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.attendance-reason-toolbar-group-order {
    background: rgba(59, 114, 240, 0.06);
}

.attendance-reason-toolbar-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink-600);
    margin-right: 4px;
}

.attendance-reason-order-root .attendance-reason-order-handle {
    cursor: grab;
    user-select: none;
    min-width: 34px;
    min-height: 32px;
    font-size: 14px;
    padding: 4px 10px;
}

.attendance-reason-order-root .attendance-reason-order-handle:active {
    cursor: grabbing;
}

.attendance-reason-order-root .reason-order-row.is-dragging {
    opacity: 0.56;
    background: rgba(59, 114, 240, 0.08);
}

.attendance-reason-order-root .reason-order-row.drop-before {
    box-shadow: inset 0 2px 0 rgba(59, 114, 240, 0.95);
}

.attendance-reason-order-root .reason-order-row.drop-after {
    box-shadow: inset 0 -2px 0 rgba(59, 114, 240, 0.95);
}

.attendance-reason-order-root .reason-order-row.is-inactive td {
    background: rgba(127, 142, 168, 0.12);
    color: #4f5f78;
}

.attendance-reason-order-root .reason-order-row.is-inactive td:first-child {
    box-shadow: inset 3px 0 0 rgba(93, 108, 136, 0.35);
}

.attendance-reason-order-root .reason-order-row.is-inactive:hover td {
    background: rgba(127, 142, 168, 0.2);
}

.attendance-reason-order-root .reason-order-row.is-inactive .btn-outline {
    border-color: rgba(88, 108, 145, 0.42);
    color: #4f6392;
}

.attendance-reason-order-root .reason-order-row.is-inactive .btn-outline:hover,
.attendance-reason-order-root .reason-order-row.is-inactive .btn-outline:focus {
    background: rgba(79, 99, 146, 0.12);
}

.attendance-reason-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.attendance-reason-row-actions-main,
.attendance-reason-row-actions-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.attendance-reason-row-actions-order {
    padding-left: 10px;
    border-left: 1px dashed var(--line-300);
}

.attendance-reason-order-root.attendance-reason-no-drag .attendance-reason-order-handle {
    display: none;
}

.attendance-reason-order-root[data-can-reorder='0'] .attendance-reason-order-handle {
    display: none;
}

.school-warning-box {
    border: 1px solid rgba(59, 114, 240, 0.2);
    border-radius: 12px;
    background: rgba(59, 114, 240, 0.08);
    color: var(--ink-700);
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
}

.school-emblem-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.school-emblem-status {
    color: var(--ink-700);
    font-size: 13px;
}

.school-help-text {
    color: var(--muted-500);
    font-size: 12px;
    margin-top: 6px;
}

.label-with-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    white-space: normal;
}

.required-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(209, 73, 73, 0.35);
    background: rgba(209, 73, 73, 0.1);
    color: #b22626;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    line-height: 1.2;
}

.field-note {
    color: var(--muted-500);
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.45;
}

.field-validation-error {
    display: block;
    color: var(--danger-500);
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.4;
}

.school-inline-value {
    min-height: 36px;
    display: flex;
    align-items: center;
    color: var(--ink-800);
    font-weight: 600;
}

.year-update-candidates .year-update-reason-input {
    min-width: 200px;
}

.text-danger {
    color: var(--danger-500);
}

.chat-layout,
.schedule-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
}

.chat-composer .form-grid {
    margin-bottom: 10px;
}

.chat-actions {
    justify-content: flex-start;
}

.talk-shell {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 320px);
    gap: 18px;
    align-items: stretch;
    height: max(560px, calc(100vh - 152px));
    height: max(560px, calc(100dvh - 152px));
}

.talk-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.talk-pane--receipt-screen {
    display: none;
}

.talk-pane--thread {
    --talk-message-body-font-size: 13px;
    --talk-message-body-line-height: 1.55;
    --talk-message-meta-font-size: 11px;
    --talk-message-attachment-font-size: 12px;
    --talk-message-attachment-size-font-size: 11px;
}

.talk-pane--thread[data-font-scale="large"] {
    --talk-message-body-font-size: 15px;
    --talk-message-body-line-height: 1.7;
    --talk-message-meta-font-size: 12px;
    --talk-message-attachment-font-size: 13px;
    --talk-message-attachment-size-font-size: 12px;
}

.talk-pane--thread[data-font-scale="xlarge"] {
    --talk-message-body-font-size: 17px;
    --talk-message-body-line-height: 1.78;
    --talk-message-meta-font-size: 13px;
    --talk-message-attachment-font-size: 14px;
    --talk-message-attachment-size-font-size: 12px;
}

.talk-pane-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.65);
}

.talk-pane-body {
    flex: 1;
    min-height: 0;
    margin-top: 12px;
}

.talk-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.talk-search-input {
    flex: 1;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(248, 250, 252, 0.95);
    padding: 10px 14px;
    font-size: 13px;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.talk-search-input:focus {
    outline: none;
    border-color: rgba(42, 91, 215, 0.6);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 114, 240, 0.18);
}

.talk-search-btn {
    border-radius: 999px;
    border: 1px solid rgba(42, 91, 215, 0.22);
    padding: 10px 14px;
    background: rgba(42, 91, 215, 0.08);
    color: var(--brand-600);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.talk-search-btn:hover,
.talk-search-btn:focus {
    background: rgba(42, 91, 215, 0.14);
    border-color: rgba(42, 91, 215, 0.35);
    transform: translateY(-1px);
}

.talk-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.talk-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.9);
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.talk-tab:hover,
.talk-tab:focus {
    color: var(--brand-600);
    background: rgba(42, 91, 215, 0.1);
    border-color: rgba(42, 91, 215, 0.25);
    transform: translateY(-1px);
}

.talk-tab.is-active {
    color: #ffffff;
    border-color: rgba(42, 91, 215, 0.0);
    background: linear-gradient(135deg, rgba(42, 91, 215, 0.95), rgba(59, 114, 240, 0.88));
}

.talk-tab.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.talk-mobile-actions {
    display: none;
}

.talk-list-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.talk-thread {
    display: block;
    padding: 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.7);
    background: rgba(248, 250, 252, 0.95);
    color: var(--ink-800);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.talk-thread:hover,
.talk-thread:focus {
    background: #ffffff;
    border-color: rgba(42, 91, 215, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.talk-thread.is-active {
    background: rgba(42, 91, 215, 0.12);
    border-color: rgba(42, 91, 215, 0.35);
    box-shadow: 0 14px 24px rgba(30, 64, 175, 0.12);
}

.talk-thread-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.talk-thread-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
}

.talk-thread-title {
    min-width: 0;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.03em;
    color: var(--ink-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.talk-thread-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.talk-thread-recipient-summary {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 12px;
    color: rgba(71, 85, 105, 0.92);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.talk-thread-recipient-summary:empty {
    display: none;
}

.talk-thread-snippet {
    font-size: 12px;
    color: var(--muted-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.talk-thread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid rgba(42, 91, 215, 0.18);
    background: rgba(42, 91, 215, 0.08);
    color: var(--brand-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.talk-thread-badge--header {
    flex: 0 1 auto;
    max-width: min(100%, 180px);
}

.talk-thread-badge--header:empty {
    display: none;
}

.talk-thread-time {
    font-size: 11px;
    color: rgba(71, 85, 105, 0.9);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.talk-thread-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 16px;
}

.talk-thread-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.talk-thread-meta-line {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 6px;
    min-width: 0;
}

.talk-thread-heading {
    font-size: 18px;
    margin: 0;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.talk-thread-sub {
    min-width: 0;
    font-size: 12px;
    color: var(--muted-500);
    letter-spacing: 0.04em;
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.talk-thread-sub:empty {
    display: none;
}

.talk-thread-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

.talk-font-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    background: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.talk-font-btn {
    min-width: 34px;
    padding: 6px 10px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.talk-font-btn:hover,
.talk-font-btn:focus {
    background: rgba(42, 91, 215, 0.1);
    color: var(--brand-600);
}

.talk-font-btn.is-active {
    background: linear-gradient(135deg, rgba(42, 91, 215, 0.95), rgba(59, 114, 240, 0.88));
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.16);
}

.talk-mobile-back {
    display: none;
    flex: 0 0 auto;
}

.talk-mobile-create,
.talk-detail-back {
    display: none;
    flex: 0 0 auto;
}

.talk-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.7);
    background:
        radial-gradient(circle at 12% 18%, rgba(42, 91, 215, 0.08), transparent 46%),
        radial-gradient(circle at 84% 10%, rgba(18, 163, 166, 0.08), transparent 44%),
        rgba(248, 250, 252, 0.7);
}

.talk-msg {
    display: flex;
}

.talk-msg--mine {
    justify-content: flex-end;
}

.talk-msg-bubble {
    max-width: 78%;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 12px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.talk-msg--mine .talk-msg-bubble {
    border-color: rgba(42, 91, 215, 0.0);
    background: linear-gradient(135deg, rgba(42, 91, 215, 0.95), rgba(18, 163, 166, 0.86));
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(30, 64, 175, 0.18);
}

.talk-pane--thread[data-reply-mode="readonly"] .talk-msg--other {
    width: 100%;
}

.talk-pane--thread[data-reply-mode="readonly"] .talk-msg--other .talk-msg-bubble {
    width: 100%;
    max-width: 100%;
}

.talk-msg-body {
    font-size: var(--talk-message-body-font-size);
    line-height: var(--talk-message-body-line-height);
    white-space: normal;
    word-break: break-word;
}

.talk-msg-meta {
    margin-top: 6px;
    font-size: var(--talk-message-meta-font-size);
    color: rgba(71, 85, 105, 0.85);
    letter-spacing: 0.06em;
    text-align: right;
}

.talk-msg--mine .talk-msg-meta {
    color: rgba(255, 255, 255, 0.82);
}

.talk-composer {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.talk-composer--readonly {
    gap: 8px;
}

.talk-reply-readonly {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.7);
    background: rgba(248, 250, 252, 0.82);
}

.talk-reply-note {
    margin: 0;
    font-size: 12px;
    color: var(--muted-500);
}

.talk-input {
    min-height: 44px;
    resize: vertical;
}

.talk-composer-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.talk-file {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.talk-multi {
    min-height: 140px;
}

.talk-checklist-shell,
.talk-choice-shell {
    min-height: 188px;
    max-height: 188px;
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
}

.talk-student-picker {
    display: grid;
    gap: 10px;
}

.talk-picker-note,
.talk-picker-empty {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted-500);
}

.talk-picker-empty[hidden] {
    display: none !important;
}

.talk-picker-search {
    min-width: 0;
}

.talk-checklist {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.talk-radio-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.talk-checklist tbody,
.talk-checklist tr,
.talk-checklist td {
    width: 100%;
}

.talk-radio-list tbody,
.talk-radio-list tr,
.talk-radio-list td {
    width: 100%;
}

.talk-checklist td {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.talk-checklist td:hover {
    background: rgba(59, 114, 240, 0.08);
}

.talk-checklist td.is-selected {
    background: rgba(59, 114, 240, 0.14);
    box-shadow: inset 0 0 0 1px rgba(59, 114, 240, 0.14);
}

.talk-radio-list td {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.talk-radio-list td:hover {
    background: rgba(59, 114, 240, 0.08);
}

.talk-radio-list td.is-selected {
    background: rgba(59, 114, 240, 0.14);
    box-shadow: inset 0 0 0 1px rgba(59, 114, 240, 0.14);
}

.talk-checklist input[type="checkbox"] {
    margin: 0;
    flex: 0 0 auto;
}

.talk-radio-list input[type="radio"] {
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.talk-checklist label {
    margin: 0;
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink-800);
    cursor: pointer;
}

.talk-radio-list label {
    margin: 0;
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink-800);
    cursor: pointer;
    white-space: normal;
}

.talk-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
}

.talk-new-grid .talk-check {
    min-height: 30px;
}

.talk-new-grid .talk-check + .talk-detail-note {
    margin-top: 0;
}

.talk-check input[type="checkbox"] {
    margin: 0;
    flex: 0 0 auto;
}

.talk-check label {
    display: block;
    margin: 0;
    line-height: 1.2;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
}

.help-text {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted-500);
}

.talk-send {
    flex: 0 0 auto;
    min-width: 88px;
}

.talk-msg-files {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.talk-file-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.8);
    color: var(--ink-800);
    text-decoration: none;
    font-size: var(--talk-message-attachment-font-size);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.talk-file-link:hover,
.talk-file-link:focus {
    background: rgba(203, 213, 225, 0.9);
    color: var(--ink-900);
}

.talk-file-size {
    opacity: 0.72;
    font-size: var(--talk-message-attachment-size-font-size);
}

.talk-empty {
    border: 1px dashed rgba(148, 163, 184, 0.8);
    border-radius: 16px;
    padding: 16px 14px;
    background: rgba(248, 250, 252, 0.85);
    color: var(--ink-700);
    text-align: center;
}

.talk-empty-title {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.talk-empty-sub {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--muted-500);
}

.talk-detail-body {
    overflow: auto;
    padding-right: 4px;
}

.talk-detail-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.talk-detail-heading-group {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.talk-detail-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.talk-detail-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.92);
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.talk-detail-tab:hover,
.talk-detail-tab:focus {
    color: var(--brand-600);
    border-color: rgba(42, 91, 215, 0.25);
    background: rgba(42, 91, 215, 0.08);
    transform: translateY(-1px);
}

.talk-detail-tab.is-active {
    color: #ffffff;
    border-color: rgba(42, 91, 215, 0);
    background: linear-gradient(135deg, rgba(42, 91, 215, 0.95), rgba(18, 163, 166, 0.9));
}

.talk-detail-section + .talk-detail-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(203, 213, 225, 0.65);
}

.talk-detail-heading {
    font-size: 18px;
    margin: 0;
}

.talk-detail-title {
    margin: 0 0 10px;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--ink-800);
}

.talk-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.talk-detail-kv {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 8px 12px;
    align-items: baseline;
    margin-top: 10px;
}

.talk-detail-label {
    font-size: 12px;
    color: var(--muted-500);
    letter-spacing: 0.06em;
}

.talk-detail-value {
    font-size: 13px;
    color: var(--ink-800);
    font-weight: 700;
    word-break: break-word;
}

.talk-detail-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--muted-500);
}

.talk-detail-note--compact {
    margin-top: 0;
}

.talk-read-status-link {
    min-width: 88px;
}

.talk-shell[data-view="receipt"] {
    grid-template-columns: minmax(0, 1fr);
}

.talk-shell[data-view="receipt"] .talk-pane--list,
.talk-shell[data-view="receipt"] .talk-pane--thread,
.talk-shell[data-view="receipt"] .talk-pane--detail {
    display: none;
}

.talk-shell[data-view="receipt"] .talk-pane--receipt-screen {
    display: flex;
    grid-column: 1 / -1;
}

.talk-receipt-section {
    display: grid;
    gap: 18px;
}

.talk-receipt-screen-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.talk-receipt-screen-back {
    flex: 0 0 auto;
}

.talk-receipt-screen-titles {
    display: grid;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.talk-receipt-screen-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--brand-600);
}

.talk-receipt-screen-title {
    margin: 0;
    font-size: 24px;
    letter-spacing: 0.03em;
    word-break: break-word;
}

.talk-receipt-screen-body {
    overflow: auto;
    padding-right: 4px;
}

.talk-receipt-headline {
    display: grid;
    gap: 6px;
}

.talk-receipt-tracked {
    font-size: 12px;
    color: var(--muted-500);
    letter-spacing: 0.04em;
}

.talk-receipt-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.talk-receipt-kpi {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.75);
    background:
        radial-gradient(circle at 100% 0%, rgba(42, 91, 215, 0.12), transparent 42%),
        rgba(248, 250, 252, 0.9);
}

.talk-receipt-kpi-label {
    font-size: 11px;
    color: var(--muted-500);
    letter-spacing: 0.08em;
}

.talk-receipt-kpi-value {
    font-size: 22px;
    line-height: 1.1;
    color: var(--ink-900);
    letter-spacing: 0.02em;
}

.talk-receipt-block {
    display: grid;
    gap: 10px;
}

.talk-receipt-block-head {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--ink-800);
}

.talk-receipt-summary-list,
.talk-receipt-member-list {
    display: grid;
    gap: 10px;
}

.talk-receipt-summary-row {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.75);
    background: rgba(248, 250, 252, 0.92);
}

.talk-receipt-summary-bar {
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: rgba(226, 232, 240, 0.95);
}

.talk-receipt-summary-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(42, 91, 215, 0.95), rgba(18, 163, 166, 0.92));
}

.talk-receipt-summary-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.talk-receipt-summary-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-900);
}

.talk-receipt-summary-rate {
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-600);
}

.talk-receipt-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--muted-500);
}

.talk-receipt-filters {
    display: grid;
    gap: 12px;
}

.talk-receipt-filter-group {
    display: grid;
    gap: 8px;
}

.talk-receipt-filter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted-500);
}

.talk-receipt-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.talk-receipt-member {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.75);
    background: rgba(248, 250, 252, 0.92);
}

.talk-receipt-member.is-unread {
    border-color: rgba(234, 88, 12, 0.22);
    box-shadow: inset 3px 0 0 rgba(234, 88, 12, 0.78);
}

.talk-receipt-member.is-read {
    border-color: rgba(42, 91, 215, 0.18);
    box-shadow: inset 3px 0 0 rgba(42, 91, 215, 0.72);
}

.talk-receipt-member-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.talk-receipt-member-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-900);
}

.talk-receipt-member-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.talk-receipt-member-state.is-read {
    background: rgba(42, 91, 215, 0.1);
    color: var(--brand-600);
}

.talk-receipt-member-state.is-unread {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.talk-receipt-member-sub,
.talk-receipt-member-time {
    font-size: 12px;
    color: var(--muted-500);
}

.talk-receipt-mini-empty {
    text-align: left;
}

@media (max-width: 1180px) {
    .talk-shell {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    }

    .talk-mobile-actions {
        display: flex;
    }

    .talk-mobile-create--list,
    .talk-detail-back {
        display: inline-flex;
    }

    .talk-pane--detail {
        display: none;
    }

    .talk-shell[data-view="compose"] {
        grid-template-columns: 1fr;
    }

    .talk-shell[data-view="compose"] .talk-pane--list,
    .talk-shell[data-view="compose"] .talk-pane--thread {
        display: none;
    }

    .talk-shell[data-view="compose"] .talk-pane--detail {
        display: flex;
    }

    .talk-shell[data-view="receipt"] {
        grid-template-columns: 1fr;
    }

    .talk-shell[data-view="receipt"] .talk-pane--list,
    .talk-shell[data-view="receipt"] .talk-pane--thread,
    .talk-shell[data-view="receipt"] .talk-pane--detail {
        display: none;
    }

    .talk-shell[data-view="receipt"] .talk-pane--receipt-screen {
        display: flex;
    }
}

@media (max-width: 860px) {
    .talk-shell {
        grid-template-columns: 1fr;
        height: auto;
    }

    .talk-thread-head {
        grid-template-columns: 1fr;
    }

    .talk-detail-head,
    .talk-receipt-screen-head {
        flex-direction: column;
        align-items: stretch;
    }

    .talk-thread-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .talk-font-controls {
        order: 10;
        margin-left: 0;
    }

    .talk-mobile-back {
        display: inline-flex;
        align-self: flex-start;
    }

    .talk-mobile-create--thread {
        display: inline-flex;
        align-self: flex-start;
    }

    .talk-pane--detail {
        display: none;
    }

    .talk-shell[data-view="thread"] .talk-pane--list {
        display: none;
    }

    .talk-shell[data-view="list"] .talk-pane--thread {
        display: none;
    }

    .talk-shell[data-view="receipt"] .talk-pane--list,
    .talk-shell[data-view="receipt"] .talk-pane--thread,
    .talk-shell[data-view="receipt"] .talk-pane--detail {
        display: none;
    }

    .talk-shell[data-view="receipt"] .talk-pane--receipt-screen {
        display: flex;
    }

    .talk-pane {
        height: auto;
    }

    .talk-messages {
        max-height: 55vh;
    }

    .talk-receipt-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .talk-receipt-member-main,
    .talk-receipt-summary-main {
        align-items: flex-start;
        flex-direction: column;
    }
}

.login-shell {
    max-width: 460px;
    margin: 72px auto;
    background: var(--surface-0);
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-200);
    box-shadow: var(--shadow-soft);
    animation: riseIn 650ms var(--ease-out-expo) both;
}

.login-shell h1 {
    margin-top: 0;
    font-size: 28px;
    letter-spacing: 0.08em;
}

.login-shell .form-row label {
    flex: 0 0 100%;
    white-space: normal;
}

.login-shell .form-row .form-control,
.login-shell .form-row input[type="text"],
.login-shell .form-row input[type="password"],
.login-shell .form-row input[type="search"],
.login-shell .form-row input[type="email"],
.login-shell .form-row input[type="number"],
.login-shell .form-row select,
.login-shell .form-row textarea {
    flex: 1 1 100%;
    width: 100%;
}

.login-shell .password-field {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.login-shell .password-field .form-control,
.login-shell .password-field input[type="password"],
.login-shell .password-field input[type="text"] {
    padding-right: 84px;
}

.login-shell .password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--primary-600);
    line-height: 1;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-shell .password-toggle:hover,
.login-shell .password-toggle:focus-visible {
    background: rgba(59, 109, 242, 0.1);
    color: var(--primary-700);
    outline: none;
}

.login-shell .password-toggle.is-active {
    color: var(--primary-700);
}

.login-shell .password-toggle__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.login-shell .password-toggle__icon--visible {
    display: none;
}

.login-shell .password-toggle.is-active .password-toggle__icon--hidden {
    display: none;
}

.login-shell .password-toggle.is-active .password-toggle__icon--visible {
    display: block;
}

.login-shell .form-row input[type="checkbox"] {
    flex: 0 0 auto;
}

.login-shell .form-row input[type="checkbox"] + label {
    flex: 0 0 auto;
    width: auto;
    margin-left: 6px;
}

.login-shell .birthdate-input-group {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.login-shell .birthdate-field {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-shell .birthdate-field .form-control {
    min-width: 0;
    text-align: center;
}

.login-shell .birthdate-suffix {
    flex: 0 0 auto;
    align-self: center;
    color: var(--text-500);
    font-weight: 700;
}

@media (max-width: 640px) {
    .login-shell .birthdate-input-group {
        gap: 8px;
    }

    .login-shell .birthdate-field {
        gap: 6px;
    }

    .login-shell .birthdate-field .form-control {
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-shell .password-field .form-control,
    .login-shell .password-field input[type="password"],
    .login-shell .password-field input[type="text"] {
        padding-right: 76px;
    }

    .login-shell .password-toggle {
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .login-shell .password-toggle__icon {
        width: 18px;
        height: 18px;
    }
}

.login-shell .login-remember {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.login-shell .login-remember label {
    /* Override .login-shell .form-row label { flex-basis:100% } for this inline row */
    flex: 1 1 auto;
    width: auto;
    margin: 0;
    min-width: 0;
}

.login-shell .login-links {
    align-items: center;
}

.login-shell .login-links a + a::before {
    content: "/";
    display: inline-block;
    margin: 0 8px;
    color: var(--muted-500);
    font-weight: 700;
}

.privacy-policy-page {
    max-width: 920px;
    margin: 48px auto 72px;
    padding: 0 20px;
}

.privacy-policy-container {
    background: var(--surface-0);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 32px 36px;
    color: var(--text-700);
    line-height: 1.9;
    overflow-wrap: anywhere;
    word-break: normal;
    animation: riseIn 650ms var(--ease-out-expo) both;
}

.privacy-policy-back-link {
    margin: 0 0 28px;
    font-size: 14px;
}

.privacy-policy-back-button {
    min-width: 0;
}

.privacy-policy-header {
    margin-bottom: 24px;
}

.privacy-policy-header h1 {
    margin: 0 0 18px;
    font-size: 32px;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.privacy-policy-meta {
    display: grid;
    gap: 4px;
    font-size: 15px;
    color: var(--text-600);
}

.privacy-policy-meta p,
.privacy-policy-container > p,
.privacy-policy-section p {
    margin: 0;
}

.privacy-policy-section {
    margin-top: 28px;
}

.privacy-policy-section h2 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .privacy-policy-page {
        margin: 28px auto 48px;
        padding: 0 12px;
    }

    .privacy-policy-container {
        padding: 24px 18px;
        border-radius: var(--radius-lg);
        line-height: 1.8;
    }

    .privacy-policy-header h1 {
        font-size: 28px;
    }

    .privacy-policy-section {
        margin-top: 24px;
    }

    .privacy-policy-section h2 {
        font-size: 19px;
    }
}

body.dashboard-home {
    color: #25344f;
    background:
        radial-gradient(circle at 10% 8%, rgba(65, 125, 255, 0.12), transparent 44%),
        radial-gradient(circle at 88% 2%, rgba(42, 170, 170, 0.1), transparent 34%),
        linear-gradient(180deg, #f7fafe 0%, #eef4fb 100%);
}

body.dashboard-home::before {
    background: radial-gradient(circle at 36% 26%, rgba(58, 118, 230, 0.2), rgba(58, 118, 230, 0) 70%);
    opacity: 0.56;
}

body.dashboard-home::after {
    background: radial-gradient(circle at 66% 64%, rgba(22, 163, 174, 0.16), rgba(22, 163, 174, 0) 70%);
    opacity: 0.5;
}

body.dashboard-home h1,
body.dashboard-home h2,
body.dashboard-home h3 {
    color: #142744;
    font-family: var(--font-body);
    letter-spacing: 0.03em;
}

body.dashboard-home .app-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(148, 163, 184, 0.26);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

body.dashboard-home .app-header::after {
    background: linear-gradient(90deg, rgba(42, 91, 215, 0.75), rgba(18, 163, 166, 0.55));
}

body.dashboard-home .app-brand a {
    color: #152948;
}

body.dashboard-home .app-meta-item {
    background: #f8fbff;
    border-color: #d6e1ef;
    color: #445b7d;
}

body.dashboard-home .app-logout {
    color: #2f5fc5;
    border-color: rgba(42, 91, 215, 0.34);
    background: rgba(42, 91, 215, 0.08);
}

body.dashboard-home .app-shell {
    max-width: 1600px;
    padding: 14px 18px 24px;
}

body.dashboard-home .app-main {
    padding: 0;
    animation: none;
}

.dashboard-screen {
    position: relative;
    background:
        radial-gradient(circle at 14% 20%, rgba(57, 117, 230, 0.08), transparent 36%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #d5e1ef;
    border-radius: 24px;
    padding: 22px 26px 24px;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.dashboard-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 4px 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid #d7e2f1;
}

.dashboard-hero-main {
    text-align: left;
}

.dashboard-hero-date {
    margin: 0;
    color: #60728d;
    font-size: 18px;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.dashboard-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 12px;
    border: 1px solid #2755b7;
    background: linear-gradient(135deg, #3a73dc, #2a57ba);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.dashboard-hero-action:hover,
.dashboard-hero-action:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #2f65d2, #244ca4);
    border-color: #214592;
    transform: translateY(-1px);
}

.dashboard-hero-action:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.26);
}

.dashboard-panel {
    background: #f7faff;
    border: 1px solid #d7e2f1;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
}

.dashboard-panel-head {
    margin-bottom: 14px;
}

.dashboard-panel-head h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    color: #16315c;
}

.dashboard-menu-panel {
    border: none;
    background: transparent;
    padding: 8px 2px 4px;
    margin-bottom: 18px;
}

.dashboard-admin-work-panel {
    box-shadow: none;
}

.dashboard-admin-work-panel--attention {
    padding: 18px 20px 20px;
    background: linear-gradient(180deg, #ffffff, #f6f9ff);
    box-shadow: 0 14px 28px rgba(29, 78, 216, 0.08);
}

.dashboard-admin-work-panel--idle {
    padding: 4px 2px 6px;
    border: none;
    background: transparent;
    margin-bottom: 12px;
}

.dashboard-admin-work-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-admin-work-panel-head h2 {
    font-size: 24px;
}

.dashboard-admin-work-panel-head p {
    margin: 6px 0 0;
    color: #60728d;
    line-height: 1.65;
    max-width: 44ch;
}

.dashboard-admin-work-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #d8e3f3;
    background: #f8fbff;
    color: #4f6e95;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.dashboard-admin-work-widget {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main meta"
        "actions actions";
    gap: 16px 18px;
    align-items: center;
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid #d8e3f3;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dashboard-admin-work-widget--attention {
    border-color: #cfe5de;
    background: linear-gradient(135deg, #ffffff, #eefaf7 56%, #e5f7f1);
    box-shadow: 0 18px 34px rgba(17, 94, 89, 0.12);
}

.dashboard-admin-work-widget--idle {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "main meta actions";
    gap: 12px 16px;
    margin-top: 0;
    padding: 12px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.06);
}

.dashboard-admin-work-widget__main {
    grid-area: main;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.dashboard-admin-work-widget__icon {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.24), 0 10px 22px rgba(15, 23, 42, 0.14);
}

.dashboard-admin-work-widget__icon svg {
    width: 30px;
    height: 30px;
}

.dashboard-admin-work-widget__icon--emerald {
    background: linear-gradient(145deg, #2fb99d, #1f8b75);
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__icon svg {
    width: 24px;
    height: 24px;
}

.dashboard-admin-work-widget__copy {
    display: grid;
    gap: 6px;
}

.dashboard-admin-work-widget__eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f6e95;
}

.dashboard-admin-work-widget__copy h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    color: #16315c;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__copy {
    gap: 2px;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__copy h3 {
    font-size: 22px;
}

.dashboard-admin-work-widget__copy p {
    margin: 0;
    color: #5f7391;
    line-height: 1.65;
    max-width: 54ch;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__copy p {
    font-size: 13px;
    line-height: 1.45;
    max-width: none;
}

.dashboard-admin-work-widget__meta {
    grid-area: meta;
    display: grid;
    gap: 6px;
    justify-items: end;
    text-align: right;
}

.dashboard-admin-work-widget__count-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #6b7f9f;
}

.dashboard-admin-work-widget__count {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: #16315c;
}

.dashboard-admin-work-widget--attention .dashboard-admin-work-widget__count {
    color: #176f56;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__count {
    color: #335b9d;
}

.dashboard-admin-work-widget__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.dashboard-admin-work-widget__state--attention {
    background: #dff4ea;
    color: #176f56;
}

.dashboard-admin-work-widget__state--idle {
    background: #edf4ff;
    color: #335b9d;
}

.dashboard-admin-work-widget__actions {
    grid-area: actions;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__actions {
    flex-wrap: nowrap;
    gap: 8px;
}

.dashboard-admin-work-widget--idle .dashboard-admin-work-widget__actions .btn {
    min-height: 38px;
    padding: 8px 14px;
}

.dashboard-menu-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px 14px;
}

.menu-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    text-decoration: none;
    color: #1c2f4d;
    min-height: 168px;
    border-radius: 16px;
    border: 1px solid #d8e3f3;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 8px 8px 10px;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.menu-tile:hover,
.menu-tile:focus {
    color: #152b4d;
    border-color: #84a8de;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 22px rgba(30, 64, 175, 0.14);
}

.menu-tile:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22), 0 14px 22px rgba(30, 64, 175, 0.14);
}

.menu-tile-icon {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    color: #ffffff;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.24), 0 10px 18px rgba(30, 64, 175, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.menu-tile:hover .menu-tile-icon,
.menu-tile:focus .menu-tile-icon {
    transform: translateY(-1px) scale(1.02);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), 0 14px 24px rgba(30, 64, 175, 0.24);
}

.menu-tile-icon svg {
    width: 36px;
    height: 36px;
}

.menu-tile-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.18;
}

.menu-tile-sub {
    margin-top: 5px;
    font-size: 13px;
    color: #697d9b;
    line-height: 1.3;
}

.menu-tile-sub--single-line {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-tile-icon--blue {
    background: linear-gradient(145deg, #4a7de2, #2b5fc6);
}

.menu-tile-icon--cyan {
    background: linear-gradient(145deg, #2ea9bf, #1b7f98);
}

.menu-tile-icon--orange {
    background: linear-gradient(145deg, #e6a14a, #c77422);
}

.menu-tile-icon--amber {
    background: linear-gradient(145deg, #d4aa44, #ab7c1c);
}

.menu-tile-icon--violet {
    background: linear-gradient(145deg, #6f7de2, #4b58bf);
}

.menu-tile-icon--purple {
    background: linear-gradient(145deg, #7c70c6, #5a4b9a);
}

.menu-tile-icon--indigo {
    background: linear-gradient(145deg, #5e7ad8, #3f5eb8);
}

.menu-tile-icon--teal {
    background: linear-gradient(145deg, #27b2a6, #197f7a);
}

.menu-tile-icon--green {
    background: linear-gradient(145deg, #3fae72, #288450);
}

.menu-tile-icon--emerald {
    background: linear-gradient(145deg, #2bab8f, #1e816c);
}

.menu-tile-icon--red {
    background: linear-gradient(145deg, #db6876, #b13f52);
}

.menu-tile-icon--pink {
    background: linear-gradient(145deg, #cf7197, #a34b6f);
}

.menu-tile-icon--slate {
    background: linear-gradient(145deg, #7488a0, #526377);
}

.menu-tile-icon--sky {
    background: linear-gradient(145deg, #4fb2d6, #2b84ac);
}

.menu-tile-icon--gray {
    background: linear-gradient(145deg, #8b9ab0, #66758a);
}

.dashboard-summary-panel {
    background: linear-gradient(160deg, #f4f8ff, #edf3ff);
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-summary-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 112px;
    border-radius: 14px;
    border: 1px solid #d8e3f3;
    background: #ffffff;
    padding: 12px 14px;
    text-decoration: none;
}

.dashboard-summary-card:hover,
.dashboard-summary-card:focus {
    border-color: #8eaee1;
    background: #f7faff;
}

.dashboard-summary-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.23);
}

.dashboard-summary-label {
    color: #627899;
    font-size: 14px;
    line-height: 1.35;
}

.dashboard-summary-value {
    font-size: 38px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.dashboard-summary-value--danger {
    color: #d45d63;
}

.dashboard-summary-value--green {
    color: #1d9961;
}

.dashboard-summary-value--yellow {
    color: #aa7d1e;
}

.dashboard-summary-value--brand {
    color: #2a5ebf;
}

.dashboard-schedule-panel {
    background: #f5f8ff;
}

.dashboard-schedule-panel .table {
    background: #ffffff;
    border-color: #d8e3f3;
}

.dashboard-schedule-panel .table th {
    background: #edf3ff;
    color: #3f567a;
    border-bottom-color: #d1deef;
}

.dashboard-schedule-panel .table td {
    color: #314866;
    border-bottom-color: #dbe5f3;
}

.dashboard-schedule-panel .table-hover tbody tr:hover td {
    background: #f6faff;
}

.weekcal {
    max-width: 100%;
    min-width: 0;
}

.weekcal__notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px dashed rgba(42, 91, 215, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #314866;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.weekcal__shell {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.weekcal__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid #d8e3f3;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.weekcal__table th,
.weekcal__table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dbe5f3;
    border-right: 1px solid #dbe5f3;
    vertical-align: top;
}

.weekcal__table td:last-child,
.weekcal__table th:last-child {
    border-right: none;
}

.weekcal__table tr:last-child td {
    border-bottom: none;
}

.weekcal__corner,
.weekcal__th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #edf3ff;
    color: #3f567a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: none;
    white-space: nowrap;
}

.weekcal__corner {
    left: 0;
    z-index: 4;
    min-width: 88px;
}

.weekcal__rowhead {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f2f7ff;
    color: #36506f;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    min-width: 88px;
}

.weekcal__rowhead--events {
    background: rgba(18, 163, 166, 0.12);
    color: #0f766e;
}

.weekcal__th--today {
    box-shadow: inset 0 -2px 0 rgba(42, 91, 215, 0.45);
}

.weekcal__date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    color: #1e355b;
}

.weekcal__cell {
    min-width: 168px;
    min-height: 56px;
    background: #ffffff;
}

.weekcal__cell--today {
    background: rgba(42, 91, 215, 0.04);
}

.weekcal__cell--events {
    background: rgba(18, 163, 166, 0.06);
}

.weekcal__chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weekcal__chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}

.weekcal__chip-link {
    text-decoration: none;
    cursor: pointer;
}

.weekcal__chip--lesson {
    background: rgba(42, 91, 215, 0.1);
    color: #2451b0;
    border-color: rgba(42, 91, 215, 0.18);
}

.weekcal__chip-link.weekcal__chip--lesson:hover,
.weekcal__chip-link.weekcal__chip--lesson:focus {
    background: rgba(42, 91, 215, 0.16);
    border-color: rgba(42, 91, 215, 0.32);
    color: #1d4ed8;
    text-decoration: none;
}

.weekcal__chip-link.weekcal__chip--lesson:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(42, 91, 215, 0.25);
}

.weekcal__chip--event {
    background: rgba(18, 163, 166, 0.12);
    color: #0f766e;
    border-color: rgba(18, 163, 166, 0.25);
}

.weekcal__more {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}

.weekcal__empty {
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed rgba(42, 91, 215, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #314866;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 1400px) {
    .dashboard-menu-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-menu-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-tile-title {
        font-size: 19px;
    }
}

@media (max-width: 900px) {
    .dashboard-menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .student-commute-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .student-commute-duo {
        grid-template-columns: 1fr;
    }

    .student-commute-panel-head {
        flex-direction: column;
    }

    .student-commute-chip {
        align-self: flex-start;
    }

    .student-commute-accordion summary {
        padding: 14px 16px;
    }

    .student-commute-accordion > :not(summary) {
        padding: 16px;
    }

    .commute-choice-list td {
        padding: 9px 11px;
    }

    .commute-choice-list input[type="checkbox"] + label,
    .commute-choice-list input[type="radio"] + label {
        font-size: 14px;
    }

    body.dashboard-home .app-shell {
        padding: 12px;
    }

    .dashboard-screen {
        border-radius: 18px;
        padding: 14px;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 8px 2px 12px;
    }

    .dashboard-hero-main {
        text-align: left;
    }

    .dashboard-hero-date {
        font-size: 15px;
    }

    .dashboard-hero-action {
        align-self: flex-start;
        margin-top: 2px;
    }

    .dashboard-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .menu-tile {
        min-height: 138px;
        padding: 8px 6px;
    }

    .menu-tile-icon {
        width: 58px;
        height: 58px;
        border-radius: 16px;
        margin-bottom: 8px;
    }

    .menu-tile-icon svg {
        width: 28px;
        height: 28px;
    }

    .menu-tile-title {
        font-size: 16px;
    }

    .menu-tile-sub {
        font-size: 11px;
    }

    .dashboard-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dashboard-summary-card {
        min-height: 96px;
    }

    .dashboard-summary-value {
        font-size: 30px;
    }

    .dashboard-panel-head h2 {
        font-size: 20px;
    }

    .weekcal__cell {
        min-width: 140px;
    }

    .weekcal__chip {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 860px) {
    .dashboard-admin-work-panel {
        padding: 9px;
        border-radius: 16px;
    }

    .dashboard-admin-work-panel--attention {
        padding: 9px 9px 10px;
    }

    .dashboard-admin-work-panel--idle {
        padding: 2px 0 4px;
        margin-bottom: 10px;
    }

    .dashboard-admin-work-panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dashboard-admin-work-panel-head p {
        display: none;
    }

    .dashboard-admin-work-badge {
        min-height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }

    .dashboard-admin-work-widget,
    .dashboard-admin-work-widget--idle {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "main meta"
            "actions actions";
        gap: 6px 8px;
        align-items: start;
        border-radius: 18px;
    }

    .dashboard-admin-work-widget {
        margin-top: 7px;
        padding: 10px 11px;
    }

    .dashboard-admin-work-widget--idle {
        margin-top: 0;
        padding: 9px 11px;
        gap: 4px 8px;
    }

    .dashboard-admin-work-widget__main,
    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__main {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        justify-items: stretch;
    }

    .dashboard-admin-work-widget__icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .dashboard-admin-work-widget__icon svg {
        width: 21px;
        height: 21px;
    }

    .dashboard-admin-work-widget__copy {
        min-width: 0;
        gap: 4px;
    }

    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__copy {
        gap: 2px;
    }

    .dashboard-admin-work-widget__copy h3 {
        font-size: 18px;
        line-height: 1.08;
    }

    .dashboard-admin-work-widget__copy p {
        max-width: none;
        font-size: 11px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .dashboard-admin-work-widget__meta {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        align-self: start;
        gap: 5px;
        justify-content: flex-end;
        text-align: right;
        white-space: nowrap;
    }

    .dashboard-admin-work-widget__count-label {
        display: none;
    }

    .dashboard-admin-work-widget__count {
        font-size: 22px;
    }

    .dashboard-admin-work-widget__state {
        min-height: 24px;
        padding: 0 8px;
        font-size: 10px;
    }

    .dashboard-admin-work-widget__actions,
    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        gap: 6px 8px;
        flex-wrap: wrap;
    }

    .dashboard-admin-work-widget__actions .btn,
    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__actions .btn {
        width: 100%;
        min-height: 34px;
        padding: 6px 8px;
        font-size: 11px;
        line-height: 1.3;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .dashboard-admin-work-panel--attention {
        padding: 8px 8px 10px;
    }

    .dashboard-admin-work-widget {
        margin-top: 5px;
        padding: 9px;
        border-radius: 16px;
    }

    .dashboard-admin-work-widget--idle {
        gap: 3px 6px;
    }

    .dashboard-admin-work-widget__icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .dashboard-admin-work-widget__icon svg {
        width: 18px;
        height: 18px;
    }

    .dashboard-admin-work-widget__copy h3 {
        font-size: 16px;
    }

    .dashboard-admin-work-widget__copy p {
        font-size: 10px;
    }

    .dashboard-admin-work-widget__count {
        font-size: 20px;
    }

    .dashboard-admin-work-widget__actions .btn,
    .dashboard-admin-work-widget--idle .dashboard-admin-work-widget__actions .btn {
        min-height: 32px;
        padding: 5px 6px;
        font-size: 10px;
    }
}

@media (max-width: 420px) {
    .dashboard-hero-action {
        width: 100%;
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        /* Avoid creating a stacking-context/containing-block after the animation ends (Bootstrap modal needs this). */
        transform: none;
    }
}

@media (max-width: 1100px) {
    .app-shell {
        padding: 16px;
    }

    .app-sidebar-pin {
        display: none;
    }

    .chat-layout,
    .schedule-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-header {
        padding: 10px 12px;
    }

    .app-header::after {
        left: 12px;
        right: 12px;
    }

    .app-brand-logo {
        width: 28px;
        height: 28px;
    }

    .app-page-title {
        max-width: min(54vw, 340px);
    }

    body.app-body:not(.dashboard-home) .app-page-title {
        font-size: 18px;
    }

    .app-sidebar {
        top: 92px;
        left: 12px;
        bottom: 12px;
        width: min(320px, calc(100vw - 24px));
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .portal-summary-grid,
    .portal-nav-grid,
    .portal-nav-grid--compact {
        grid-template-columns: 1fr;
    }

    .portal-priority-grid {
        grid-template-columns: 1fr;
    }

    .portal-summary-grid--single {
        max-width: none;
    }

    .portal-nav-card {
        min-height: 0;
    }

    .portal-nav-card .menu-tile-title {
        font-size: 18px;
    }

    .portal-nav-card .menu-tile-sub {
        font-size: 13px;
    }

    .portal-section-copy {
        font-size: 13px;
    }

    .portal-nav-card--priority {
        min-height: 0;
    }

    .portal-priority-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row label {
        white-space: normal;
    }

    .login-shell .login-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .login-shell .login-links a + a::before {
        content: none;
    }

    .btn {
        width: 100%;
    }

    .public-filter-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .public-date-range {
        gap: 10px;
    }

    .public-filter-bar__actions {
        justify-content: stretch;
    }

    .public-request-helper {
        margin-bottom: 12px;
    }

    .public-request-single-day-toggle {
        padding: 11px 12px;
        gap: 10px;
        border-radius: 16px;
    }

    .public-request-single-day-toggle__copy strong {
        font-size: 14px;
    }

    .public-request-form-grid {
        grid-template-columns: 1fr;
        gap: 10px 12px;
    }

    .public-request-date-grid {
        gap: 10px;
    }

    .dashboard-schedule-scroll-hint {
        display: block;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-profile-head {
        align-items: flex-start;
    }

    .student-profile-name {
        font-size: 18px;
    }

    .mock-avatar--lg {
        width: 72px;
        height: 72px;
    }

    .mock-avatar--lg::before {
        top: 14px;
        width: 20px;
        height: 20px;
    }

    .mock-avatar--lg::after {
        bottom: 11px;
        width: 36px;
        height: 20px;
    }

    .course-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .course-item-order-controls {
        grid-column: 1 / 2;
        grid-row: auto;
        margin-bottom: 2px;
    }

    .course-item-main,
    .course-item-actions {
        grid-column: 1 / 2;
    }

    .course-item-actions {
        justify-content: flex-start;
    }

    .course-item-actions .btn {
        min-width: 0;
    }

    .selector-grid,
    .selector-grid tbody,
    .selector-grid tr,
    .selector-grid td {
        display: block;
        width: 100%;
    }

    .selector-grid td {
        padding: 4px 0;
    }

    .timetable-editor-table {
        min-width: 680px;
    }

    .timetable-slot-cell {
        min-width: 180px;
    }

    .timetable-slot-edit-btn {
        min-height: 44px;
    }

    .timetable-slot-modal-panel {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        margin: 6px auto;
    }

    .timetable-slot-modal-actions {
        flex-wrap: wrap;
    }

    .timetable-slot-modal-actions .btn {
        width: auto;
        min-height: 44px;
        flex: 1 1 0;
    }

    .course-order-toolbar {
        width: 100%;
    }

    .course-order-toolbar .btn,
    .course-order-toolbar button {
        width: auto;
        flex: 1 1 0;
    }

    .course-page-actions {
        width: 100%;
        margin-left: 0;
        margin-bottom: 0;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .course-page-actions .btn,
    .course-page-actions a.btn {
        width: auto;
        min-width: 0;
        min-height: 42px;
        padding: 10px 8px;
        flex: 1 1 0;
        white-space: nowrap;
        font-size: 14px;
    }

    .course-filter-accordion summary {
        align-items: flex-start;
    }

    .course-filter-strip {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .course-filter-strip-top {
        width: 100%;
    }

    .course-filter-toggle-text {
        white-space: normal;
    }

    .course-filter-actions .btn {
        width: auto;
        flex: 1 1 0;
    }

    .course-order-editor-side {
        padding: 8px;
        overflow-x: auto;
    }

    .course-order-editor-category-list {
        flex-direction: row;
        gap: 8px;
        min-width: max-content;
    }

    .course-order-editor-category {
        min-width: 220px;
    }

    .course-order-editor-category-label {
        min-height: 44px;
    }

    .course-order-editor-control {
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    .course-order-editor-course {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .course-order-editor-inline-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .course-order-editor-savebar {
        position: sticky;
        bottom: 0;
        background: rgba(247, 250, 255, 0.98);
        padding: 10px 0 6px;
        margin-top: 10px;
        z-index: 5;
    }

    .course-order-editor-savebar .btn,
    .course-order-editor-savebar button {
        min-height: 44px;
        width: auto;
        flex: 1 1 0;
    }

    .student-local-nav,
    .student-report-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .student-summary-kv-grid,
    .student-detail-readonly-grid {
        grid-template-columns: 1fr;
    }

    .student-local-nav .talk-tab,
    .student-report-tabs .talk-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .student-page-intro-card {
        padding-top: 14px;
    }

    .student-page-intro-card .student-detail-actions {
        margin-bottom: 8px;
    }

    .student-page-intro-card .student-local-nav {
        margin: 8px 0 12px;
    }

    .student-page-intro-card--public .form-row {
        margin-bottom: 6px;
    }

    .public-date-range {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-date-range__field,
    .public-request-date-grid__field {
        min-width: 0;
    }

    .public-date-range__field .form-control,
    .public-date-range__field input[type="date"],
    .public-request-date-grid__field .form-control,
    .public-request-date-grid__field input[type="date"] {
        min-width: 0;
    }

    .student-report-side {
        display: none;
    }

    .student-report-grid thead {
        display: none;
    }

    .student-report-grid,
    .student-report-grid tbody,
    .student-report-grid tr,
    .student-report-grid td {
        display: block;
        width: 100%;
    }

    .student-report-grid tr {
        border: 1px solid var(--line-200);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.92);
        padding: 12px;
        margin-bottom: 10px;
    }

    .student-report-grid td {
        border: 0 !important;
        padding: 0 !important;
    }

    .student-detail-layout .student-report-grid td.table-report-item-name {
        width: auto;
        min-width: 0;
        max-width: none;
        margin-bottom: 8px;
        color: var(--ink-800);
    }

    .student-report-grid td.table-report-item-name::before,
    .student-report-grid td.table-report-field-value::before {
        display: block;
        font-size: 11px;
        letter-spacing: 0.05em;
        color: var(--muted-500);
        text-transform: uppercase;
        margin-bottom: 3px;
    }

    .student-report-grid td.table-report-item-name::before {
        content: "項目";
    }

    .student-report-grid td.table-report-field-value::before {
        content: "値";
    }

    .student-report-grid .table-report-field-detail,
    .student-report-grid .table-report-field-detail tbody {
        display: block;
    }

    .student-report-grid .table-report-field-detail tr {
        display: block;
        border: 1px solid var(--line-200);
        border-radius: 10px;
        padding: 7px 9px;
        margin-bottom: 8px;
        background: #f8fafc;
    }

    .student-report-grid .table-report-field-detail th,
    .student-report-grid .table-report-field-detail td {
        display: block;
        width: 100%;
        border: 0;
        padding: 0;
        background: transparent;
        white-space: pre-wrap;
    }

    .student-report-grid .table-report-field-detail th {
        margin-bottom: 2px;
        font-size: 12px;
        color: var(--muted-500);
        font-weight: 700;
    }
}

@media (max-width: 1024px) {
    .school-settings-grid {
        grid-template-columns: 1fr;
    }

    .verification-detail-grid {
        grid-template-columns: 1fr;
    }

    .verification-scan-actions {
        align-items: stretch;
    }

    .verification-scan-actions .form-control,
    .verification-scan-actions .btn {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .school-settings-layout {
        padding: 14px;
    }

    .verification-panel-note {
        font-size: 13px;
        line-height: 1.7;
    }

    .verification-search-panel > summary {
        font-size: 16px;
    }

    .verification-search-panel__body {
        margin-top: 10px;
    }

    .verification-detail-card {
        scroll-margin-top: 88px;
    }

    .verification-detail-head {
        align-items: flex-start;
        gap: 10px;
    }

    .verification-detail-title {
        font-size: 22px;
    }

    .verification-detail-callout {
        font-size: 14px;
        line-height: 1.7;
    }

    .verification-detail-grid {
        gap: 10px;
    }

    .verification-detail-item {
        border-radius: 14px;
    }

    .school-guide-panel {
        padding: 12px;
    }

    .academic-structure-guide-list {
        font-size: 12px;
        padding-left: 16px;
    }

    .school-guide-list {
        font-size: 12px;
        padding-left: 16px;
    }

    .school-settings-layout .school-admin-tab-groups,
    .school-settings-layout .school-admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .school-subtabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .school-settings-layout .school-admin-tab-groups .talk-tab,
    .school-settings-layout .school-admin-tabs .talk-tab {
        white-space: nowrap;
        min-height: 44px;
    }

    .school-settings-actions {
        position: sticky;
        bottom: 8px;
        z-index: 5;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--line-200);
        border-radius: 12px;
        padding: 8px;
    }

    .verification-search-panel .school-settings-actions {
        position: static;
        bottom: auto;
        z-index: auto;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .verification-decision-actions {
        position: sticky;
        bottom: 8px;
        z-index: 6;
        padding-top: 12px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 18px, rgba(255, 255, 255, 0.96) 100%);
    }

    .verification-decision-actions .btn {
        width: 100%;
    }

    .attendance-reason-order-root .attendance-reason-order-handle {
        display: none;
    }

    .attendance-reason-toolbar {
        align-items: stretch;
    }

    .attendance-reason-toolbar-group {
        width: 100%;
    }

    .attendance-reason-row-actions-order {
        border-left: 0;
        padding-left: 0;
    }

    .school-emblem-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-list-desktop {
        display: none;
    }

    .teacher-list-desktop {
        display: none;
    }

    .student-search-card,
    .teacher-search-card {
        padding: 16px;
    }

    .student-search-grid,
    .teacher-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
        margin-bottom: 12px;
    }

    .teacher-search-grid .filter-field:last-child {
        grid-column: 1 / -1;
    }

    .student-search-actions {
        justify-content: flex-start;
        gap: 8px;
    }

    .student-search-actions-group,
    .teacher-search-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .student-search-actions-group--secondary {
        margin-left: 0;
        justify-content: flex-start;
    }

    .student-search-actions-group .btn,
    .teacher-search-actions .btn {
        width: auto;
        min-width: 0;
        min-height: 42px;
        padding: 10px 8px;
    }

    .student-list-mobile {
        display: block;
    }

    .teacher-list-mobile {
        display: block;
    }

    .student-list-card-actions .btn {
        width: auto;
    }
}

@media (max-width: 420px) {
    .student-search-grid,
    .teacher-search-grid {
        grid-template-columns: 1fr;
    }

    .teacher-search-grid .filter-field:last-child {
        grid-column: auto;
    }

    .student-list-card-kv {
        grid-template-columns: 1fr;
    }

    .student-list-card-actions {
        flex-direction: column;
    }

    .student-list-card-actions .btn {
        width: 100%;
    }
}

/* Attendance picker (HR / Lesson) */
.attendance-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attendance-picker .attendance-code {
    min-width: 140px;
}

.attendance-indicator {
    order: -1;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    background: var(--surface-2);
    color: var(--muted-500);
    border: 1px solid var(--line-200);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.attendance-code[data-attendance="PRESENT"] + .attendance-indicator {
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.35);
    color: #15803d;
}

.attendance-code[data-attendance="ABSENT"] + .attendance-indicator {
    background: rgba(209, 73, 73, 0.12);
    border-color: rgba(209, 73, 73, 0.35);
    color: var(--danger-500);
}

.attendance-code[data-attendance="LATE"] + .attendance-indicator {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
    color: #b45309;
}

.attendance-code[data-attendance="EARLY"] + .attendance-indicator {
    background: rgba(59, 114, 240, 0.14);
    border-color: rgba(59, 114, 240, 0.35);
    color: #2563eb;
}

.table-attendance-edit {
    min-width: 920px;
}

@media (max-width: 720px) {
    .table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .table-shell > .table {
        width: max-content;
        min-width: 100%;
    }

    .table-shell .table .form-control,
    .table-shell .table input[type="text"],
    .table-shell .table input[type="password"],
    .table-shell .table input[type="email"],
    .table-shell .table input[type="number"],
    .table-shell .table input[type="date"],
    .table-shell .table input[type="datetime-local"],
    .table-shell .table input[type="time"],
    .table-shell .table select,
    .table-shell .table textarea {
        min-height: 44px;
    }

    .table-attendance-edit {
        min-width: 980px;
    }

    .table-attendance-edit .attendance-picker {
        min-width: 170px;
    }

    .table-attendance-edit .attendance-picker .attendance-code,
    .table-attendance-edit .attendance-reason {
        min-width: 140px;
    }

    .table-mobile-stack {
        border: 0;
        background: transparent;
        box-shadow: none;
        min-width: 0 !important;
        width: 100% !important;
    }

    .table-mobile-stack thead {
        display: none;
    }

    .table-mobile-stack,
    .table-mobile-stack tbody {
        display: block;
        width: 100%;
    }

    .table-mobile-stack tr {
        display: block;
        border: 1px solid var(--line-200);
        border-radius: var(--radius-md);
        background: var(--surface-0);
        padding: 12px;
        margin-bottom: 10px;
    }

    .table-mobile-stack td {
        display: block;
        width: 100%;
        border: 0 !important;
        padding: 0 !important;
        margin-top: 8px;
    }

    .table-mobile-stack td:first-child {
        margin-top: 0;
    }

    .table-mobile-stack td::before {
        display: block;
        margin-bottom: 4px;
        font-size: 11px;
        font-weight: 700;
        color: var(--muted-500);
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .table-mobile-stack td:last-child {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .table-mobile-stack td > * {
        width: 100%;
        max-width: 100%;
    }

    .table-mobile-stack td .btn {
        width: 100%;
    }

    .table-mobile-stack td:last-child > a,
    .table-mobile-stack td:last-child > input[type="submit"],
    .table-mobile-stack td:last-child > button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .attendance-code-table td:nth-child(1)::before {
        content: "表示名";
    }

    .attendance-code-table td:nth-child(2)::before {
        content: "略称";
    }

    .attendance-code-table td:nth-child(3)::before {
        content: "集計カテゴリ";
    }

    .attendance-code-table td:nth-child(4)::before {
        content: "状態";
    }

    .attendance-code-table td:nth-child(5)::before {
        content: "操作";
    }

    .academic-years-table td:nth-child(1)::before {
        content: "年度";
    }

    .academic-years-table td:nth-child(2)::before {
        content: "開始日";
    }

    .academic-years-table td:nth-child(3)::before {
        content: "終了日";
    }

    .academic-years-table td:nth-child(4)::before {
        content: "状態";
    }

    .academic-year-update-candidates-table td:nth-child(1)::before {
        content: "学籍番号";
    }

    .academic-year-update-candidates-table td:nth-child(2)::before {
        content: "氏名";
    }

    .academic-year-update-candidates-table td:nth-child(3)::before {
        content: "現学年";
    }

    .academic-year-update-candidates-table td:nth-child(4)::before {
        content: "現HR（クラス）";
    }

    .academic-year-update-candidates-table td:nth-child(5)::before {
        content: "現在籍状態";
    }

    .academic-year-update-candidates-table td:nth-child(6)::before {
        content: "判定結果";
    }

    .academic-year-update-candidates-table td:nth-child(7)::before {
        content: "留年";
    }

    .academic-year-update-candidates-table td:nth-child(8)::before {
        content: "留年理由";
    }

    .academic-year-update-results-table td:nth-child(1)::before {
        content: "学籍番号";
    }

    .academic-year-update-results-table td:nth-child(2)::before {
        content: "氏名";
    }

    .academic-year-update-results-table td:nth-child(3)::before {
        content: "現学年";
    }

    .academic-year-update-results-table td:nth-child(4)::before {
        content: "現HR（クラス）";
    }

    .academic-year-update-results-table td:nth-child(5)::before {
        content: "判定結果";
    }

    .academic-year-update-results-table td:nth-child(6)::before {
        content: "処理結果";
    }

    .academic-year-update-results-table td:nth-child(7)::before {
        content: "メッセージ";
    }

    .academic-grades-table td:nth-child(1)::before {
        content: "学年";
    }

    .academic-grades-table td:nth-child(2)::before {
        content: "番号";
    }

    .academic-grades-table td:nth-child(3)::before {
        content: "状態";
    }

    .academic-homerooms-table td:nth-child(1)::before {
        content: "HR（クラス）";
    }

    .academic-homerooms-table td:nth-child(2)::before {
        content: "学年";
    }

    .academic-homerooms-table td:nth-child(3)::before {
        content: "状態";
    }

    .attendance-reason-table td:nth-child(1)::before {
        content: "理由名";
    }

    .attendance-reason-table td:nth-child(2)::before {
        content: "状態";
    }

    .attendance-reason-table td:nth-child(3)::before {
        content: "操作";
    }

    .assessment-category-table td:nth-child(1)::before {
        content: "カテゴリ名";
    }

    .assessment-category-table td:nth-child(2)::before {
        content: "重み";
    }

    .assessment-category-table td:nth-child(3)::before {
        content: "並び順";
    }

    .assessment-category-table td:nth-child(4)::before {
        content: "状態";
    }

    .assessment-category-table td:nth-child(5)::before {
        content: "操作";
    }

    .assessment-item-table td:nth-child(1)::before {
        content: "項目名";
    }

    .assessment-item-table td:nth-child(2)::before {
        content: "カテゴリ";
    }

    .assessment-item-table td:nth-child(3)::before {
        content: "満点";
    }

    .assessment-item-table td:nth-child(4)::before {
        content: "重み";
    }

    .assessment-item-table td:nth-child(5)::before {
        content: "並び順";
    }

    .assessment-item-table td:nth-child(6)::before {
        content: "状態";
    }

    .assessment-item-table td:nth-child(7)::before {
        content: "操作";
    }

    .guardian-master-table td:nth-child(1)::before {
        content: "姓";
    }

    .guardian-master-table td:nth-child(2)::before {
        content: "名";
    }

    .guardian-master-table td:nth-child(3)::before {
        content: "メール";
    }

    .guardian-master-table td:nth-child(4)::before {
        content: "状態";
    }

    .guardian-master-table td:nth-child(5)::before {
        content: "操作";
    }

    .guardian-link-table td:nth-child(1)::before {
        content: "生徒番号";
    }

    .guardian-link-table td:nth-child(2)::before {
        content: "姓";
    }

    .guardian-link-table td:nth-child(3)::before {
        content: "名";
    }

    .guardian-link-table td:nth-child(4)::before {
        content: "HR（クラス）";
    }

    .guardian-link-table td:nth-child(5)::before {
        content: "続柄";
    }

    .guardian-link-table td:nth-child(6)::before {
        content: "主";
    }

    .guardian-link-table td:nth-child(7)::before {
        content: "操作";
    }

    .program-course-table td:nth-child(1)::before {
        content: "課程名";
    }

    .program-course-table td:nth-child(2)::before {
        content: "課程コード";
    }

    .program-course-table td:nth-child(3)::before {
        content: "コース名";
    }

    .program-course-table td:nth-child(4)::before {
        content: "コースコード";
    }

    .program-course-table td:nth-child(5)::before {
        content: "状態";
    }

    .program-course-table td:nth-child(6)::before {
        content: "操作";
    }

    .room-master-table td:nth-child(1)::before {
        content: "コード";
    }

    .room-master-table td:nth-child(2)::before {
        content: "名称";
    }

    .room-master-table td:nth-child(3)::before {
        content: "収容人数";
    }

    .room-master-table td:nth-child(4)::before {
        content: "並び順";
    }

    .room-master-table td:nth-child(5)::before {
        content: "状態";
    }

    .room-master-table td:nth-child(6)::before {
        content: "操作";
    }

    .school-calendar-day-table td:nth-child(1)::before {
        content: "日付";
    }

    .school-calendar-day-table td:nth-child(2)::before {
        content: "日種別";
    }

    .school-calendar-day-table td:nth-child(3)::before {
        content: "授業日";
    }

    .school-calendar-day-table td:nth-child(4)::before {
        content: "メモ";
    }

    .staff-master-table td:nth-child(1)::before {
        content: "教員コード";
    }

    .staff-master-table td:nth-child(2)::before {
        content: "姓";
    }

    .staff-master-table td:nth-child(3)::before {
        content: "名";
    }

    .staff-master-table td:nth-child(4)::before {
        content: "職種";
    }

    .staff-master-table td:nth-child(5)::before {
        content: "在職状態";
    }

    .staff-master-table td:nth-child(6)::before {
        content: "在職期間";
    }

    .staff-master-table td:nth-child(7)::before {
        content: "電子印";
    }

    .staff-master-table td:nth-child(8)::before {
        content: "ログインID";
    }

    .staff-master-table td:nth-child(9)::before {
        content: "アカウント状態";
    }

    .staff-master-table td:nth-child(10)::before {
        content: "ロック";
    }

    .staff-master-table td:nth-child(11)::before {
        content: "多要素認証";
    }

    .staff-master-table td:nth-child(12)::before {
        content: "操作";
    }

    .student-memo-category-table td:nth-child(1)::before {
        content: "カテゴリコード";
    }

    .student-memo-category-table td:nth-child(2)::before {
        content: "表示名";
    }

    .student-memo-category-table td:nth-child(3)::before {
        content: "並び順";
    }

    .student-memo-category-table td:nth-child(4)::before {
        content: "状態";
    }

    .student-memo-category-table td:nth-child(5)::before {
        content: "操作";
    }

    .subject-settings-table td:nth-child(1)::before {
        content: "カテゴリ";
    }

    .subject-settings-table td:nth-child(2)::before {
        content: "コード";
    }

    .subject-settings-table td:nth-child(3)::before {
        content: "科目名";
    }

    .subject-settings-table td:nth-child(4)::before {
        content: "種別";
    }

    .subject-settings-table td:nth-child(5)::before {
        content: "状態";
    }

    .subject-settings-table td:nth-child(6)::before {
        content: "操作";
    }

    .term-settings-table td:nth-child(1)::before {
        content: "学期名";
    }

    .term-settings-table td:nth-child(2)::before {
        content: "開始日";
    }

    .term-settings-table td:nth-child(3)::before {
        content: "終了日";
    }

    .term-settings-table td:nth-child(4)::before {
        content: "状態";
    }

    .teachers-table td:nth-child(1)::before {
        content: "詳細";
    }

    .teachers-table td:nth-child(2)::before {
        content: "氏名";
    }

    .teachers-table td:nth-child(3)::before {
        content: "メール";
    }

    .teachers-table td:nth-child(4)::before {
        content: "職種";
    }

    .teachers-table td:nth-child(5)::before {
        content: "在職状態";
    }

    .teachers-table td:nth-child(6)::before {
        content: "在職期間";
    }

    .teachers-table td:nth-child(7)::before {
        content: "電子印";
    }

    .grade-average-rules-table td:nth-child(1)::before {
        content: "適用範囲";
    }

    .grade-average-rules-table td:nth-child(2)::before {
        content: "対象";
    }

    .grade-average-rules-table td:nth-child(3)::before {
        content: "丸め";
    }

    .grade-average-rules-table td:nth-child(4)::before {
        content: "小数桁";
    }

    .grade-average-rules-table td:nth-child(5)::before {
        content: "欠損値";
    }

    .grade-average-rules-table td:nth-child(6)::before {
        content: "更新日時";
    }

    .grade-publish-settings-table td:nth-child(1)::before {
        content: "公開対象";
    }

    .grade-publish-settings-table td:nth-child(2)::before {
        content: "学期";
    }

    .grade-publish-settings-table td:nth-child(3)::before {
        content: "公開開始";
    }

    .grade-publish-settings-table td:nth-child(4)::before {
        content: "公開終了";
    }

    .grade-publish-settings-table td:nth-child(5)::before {
        content: "公開中";
    }

    .grade-publish-settings-table td:nth-child(6)::before {
        content: "操作";
    }

    .health-reports-table td:nth-child(1)::before {
        content: "報告番号";
    }

    .health-reports-table td:nth-child(2)::before {
        content: "タイトル";
    }

    .health-reports-table td:nth-child(3)::before {
        content: "状態";
    }

    .health-visits-table td:nth-child(1)::before {
        content: "生徒";
    }

    .health-visits-table td:nth-child(2)::before {
        content: "来室日時";
    }

    .health-visits-table td:nth-child(3)::before {
        content: "備考";
    }

    .category-rules-categories-table td:nth-child(1)::before {
        content: "カテゴリ";
    }

    .category-rules-categories-table td:nth-child(2)::before {
        content: "表示名";
    }

    .category-rules-categories-table td:nth-child(3)::before {
        content: "並び順";
    }

    .category-rules-categories-table td:nth-child(4)::before {
        content: "有効";
    }

    .category-rules-rules-table td:nth-child(1)::before {
        content: "カテゴリ";
    }

    .category-rules-rules-table td:nth-child(2)::before {
        content: "表示名";
    }

    .category-rules-rules-table td:nth-child(3)::before {
        content: "送信者種別";
    }

    .category-rules-rules-table td:nth-child(4)::before {
        content: "新規送信";
    }

    .category-rules-rules-table td:nth-child(5)::before {
        content: "返信";
    }

    .category-rules-rules-table td:nth-child(6)::before {
        content: "全校送信";
    }

    .category-rules-rules-table td:nth-child(7)::before {
        content: "送信曜日マスク";
    }

    .category-rules-rules-table td:nth-child(8)::before {
        content: "開始時刻";
    }

    .category-rules-rules-table td:nth-child(9)::before {
        content: "終了時刻";
    }

    .category-rules-rules-table td:nth-child(10)::before {
        content: "タイムゾーンID";
    }

    .table-period-settings.table-mobile-stack td:nth-child(1)::before {
        content: "時限";
    }

    .table-period-settings.table-mobile-stack td:nth-child(2)::before {
        content: "表示名";
    }

    .table-period-settings.table-mobile-stack td:nth-child(3)::before {
        content: "開始時間";
    }

    .table-period-settings.table-mobile-stack td:nth-child(4)::before {
        content: "終了時間";
    }

    .table-period-settings.table-mobile-stack td:nth-child(5)::before {
        content: "操作";
    }

    .table-period-settings.table-mobile-stack .table-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .table-period-settings.table-mobile-stack .icon-action {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }

    .rank-definitions-table td:nth-child(1)::before {
        content: "名称";
    }

    .rank-definitions-table td:nth-child(2)::before {
        content: "集計単位";
    }

    .rank-definitions-table td:nth-child(3)::before {
        content: "集計対象";
    }

    .rank-definitions-table td:nth-child(4)::before {
        content: "学期";
    }

    .rank-definitions-table td:nth-child(5)::before {
        content: "順位基準";
    }

    .rank-definitions-table td:nth-child(6)::before {
        content: "操作";
    }

    .rank-results-table td:nth-child(1)::before {
        content: "順位";
    }

    .rank-results-table td:nth-child(2)::before {
        content: "生徒番号";
    }

    .rank-results-table td:nth-child(3)::before {
        content: "生徒名";
    }

    .rank-results-table td:nth-child(4)::before {
        content: "指標値";
    }

    .rank-results-table td:nth-child(5)::before {
        content: "母集団";
    }

    .rank-results-table td:nth-child(6)::before {
        content: "計算日時";
    }

    .rank-group-members-table td:nth-child(1)::before {
        content: "生徒番号";
    }

    .rank-group-members-table td:nth-child(2)::before {
        content: "生徒名";
    }

    .rank-group-members-table td:nth-child(3)::before {
        content: "開始日";
    }

    .rank-group-members-table td:nth-child(4)::before {
        content: "終了日";
    }

    .school-calendar-day-table td:last-child,
    .academic-years-table td:last-child,
    .academic-year-update-results-table td:last-child,
    .academic-grades-table td:last-child,
    .academic-homerooms-table td:last-child,
    .category-rules-categories-table td:last-child,
    .category-rules-rules-table td:last-child,
    .term-settings-table td:last-child,
    .teachers-table td:last-child,
    .grade-average-rules-table td:last-child,
    .health-reports-table td:last-child,
    .health-visits-table td:last-child,
    .rank-results-table td:last-child,
    .rank-group-members-table td:last-child {
        display: block;
        margin-top: 8px;
    }

    .academic-year-update-candidates-table .year-update-reason-input {
        min-width: 0;
    }

    .attendance-editor-actions,
    .grade-entry-actions {
        align-items: stretch;
    }

    .attendance-editor-actions-group {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .attendance-editor-actions-group .btn,
    .grade-entry-actions .btn {
        width: 100%;
    }

    .table-attendance-mobile-stack {
        min-width: 0 !important;
    }

    .table-attendance-mobile-stack td:nth-child(1)::before {
        content: "生徒番号";
    }

    .table-attendance-mobile-stack td:nth-child(2)::before {
        content: "生徒名";
    }

    .table-attendance-mobile-stack td:nth-child(3)::before {
        content: "出欠";
    }

    .table-attendance-mobile-stack td:nth-child(4)::before {
        content: "理由";
    }

    .table-attendance-mobile-stack td:nth-child(5)::before {
        content: "備考";
    }

    .table-attendance-mobile-stack td:last-child {
        display: block;
    }

    .table-attendance-mobile-stack .attendance-picker {
        align-items: stretch;
        gap: 8px;
    }

    .table-attendance-mobile-stack .attendance-picker .attendance-code,
    .table-attendance-mobile-stack .attendance-reason {
        min-width: 0;
        width: 100%;
    }

    .grade-entry-mobile {
        min-width: 0 !important;
    }

    .grade-entry-mobile .grade-entry-mobile-only-cell {
        display: block;
    }

    .grade-entry-mobile td:nth-child(1)::before {
        content: "出席番号";
    }

    .grade-entry-mobile td:nth-child(2)::before {
        content: "氏名";
    }

    .grade-entry-mobile td:nth-child(3)::before {
        display: none;
        content: "";
    }

    .grade-entry-mobile td:nth-child(4)::before {
        content: "素点";
    }

    .grade-entry-mobile td:nth-child(5)::before {
        content: "状態";
    }

    .grade-entry-mobile td:nth-child(6)::before {
        content: "学年末評点";
    }

    .grade-entry-mobile td:nth-child(7)::before {
        content: "学年末評定";
    }

    .grade-entry-mobile td:nth-child(8)::before {
        content: "知識・技能";
    }

    .grade-entry-mobile td:nth-child(9)::before {
        content: "思考・判断・表現";
    }

    .grade-entry-mobile td:nth-child(10)::before {
        content: "主体的に学習に取り組む態度";
    }

    .grade-entry-mobile tr {
        transition: border-color 180ms ease, box-shadow 180ms ease;
    }

    .grade-entry-mobile tr.is-expanded {
        border-color: rgba(42, 91, 215, 0.3);
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
    }

    .grade-entry-mobile tr:not(.is-expanded) td:nth-child(n+4) {
        display: none;
    }

    .grade-entry-mobile .grade-entry-mobile-toggle {
        min-height: 44px;
    }

    .student-attendance-overview-grid td:nth-child(1)::before {
        content: "授業（科目）";
    }

    .student-attendance-overview-grid td:nth-child(2)::before {
        content: "担当";
    }

    .student-attendance-overview-grid td:nth-child(3)::before {
        content: "実施回";
    }

    .student-attendance-overview-grid td:nth-child(4)::before {
        content: "欠席";
    }

    .student-attendance-overview-grid td:nth-child(5)::before {
        content: "遅刻";
    }

    .student-attendance-overview-grid td:nth-child(6)::before {
        content: "早退";
    }

    .student-attendance-overview-grid td:nth-child(7)::before {
        content: "公欠";
    }

    .student-attendance-overview-grid td:nth-child(8)::before {
        content: "忌引";
    }

    .student-attendance-overview-grid td:nth-child(9)::before {
        content: "出停";
    }

    .student-attendance-overview-grid td:nth-child(10)::before {
        content: "遅早";
    }

    .student-attendance-detail-grid td:nth-child(1)::before {
        content: "日付";
    }

    .student-attendance-detail-grid td:nth-child(2)::before {
        content: "時限";
    }

    .student-attendance-detail-grid td:nth-child(3)::before {
        content: "授業（科目）";
    }

    .student-attendance-detail-grid td:nth-child(4)::before {
        content: "区分";
    }

    .student-attendance-detail-grid td:nth-child(5)::before {
        content: "理由";
    }

    .student-attendance-detail-grid td:nth-child(6)::before {
        content: "備考";
    }

    .student-score-matrix {
        min-width: 0 !important;
    }

    .student-score-matrix td:nth-child(1)::before {
        content: "カテゴリ";
    }

    .student-score-matrix td:nth-child(2)::before {
        content: "科目";
    }

    .student-score-matrix td:nth-child(3)::before {
        content: "前期素点";
    }

    .student-score-matrix td:nth-child(4)::before {
        content: "後期素点";
    }

    .student-score-matrix td:nth-child(5)::before {
        content: "学年末評点";
    }

    .student-score-matrix td:nth-child(6)::before {
        content: "学年末評定";
    }

    .student-score-matrix td:nth-child(7)::before {
        content: "知識・技能";
    }

    .student-score-matrix td:nth-child(8)::before {
        content: "思考・判断・表現";
    }

    .student-score-matrix td:nth-child(9)::before {
        content: "主体的に学習に取り組む態度";
    }

    .student-score-matrix td:nth-child(10)::before {
        content: "単位";
    }

    .student-score-matrix tr {
        background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    }

    .student-memo-detail-card,
    .student-achievement-detail-card,
    .student-criterion-detail-card {
        padding: 14px;
    }

    .student-memo-detail-card h3,
    .student-achievement-detail-card h3,
    .student-criterion-detail-card h3 {
        font-size: 20px;
    }

    .student-activity-detail-grid {
        grid-template-columns: 1fr;
    }

    .student-score-matrix td:last-child,
    .student-attendance-overview-grid td:last-child,
    .student-attendance-detail-grid td:last-child,
    .student-memo-list td:last-child,
    .student-achievement-list td:last-child,
    .student-criterion-list td:last-child {
        display: block;
    }

    .student-memo-list td:nth-child(1)::before {
        content: "日付";
    }

    .student-memo-list td:nth-child(2)::before {
        content: "カテゴリ";
    }

    .student-memo-list td:nth-child(3)::before {
        content: "タイトル";
    }

    .student-memo-list td:nth-child(4)::before {
        content: "公開範囲";
    }

    .student-memo-list td:nth-child(5)::before {
        content: "登録者";
    }

    .student-memo-list td:nth-child(6)::before {
        content: "登録日時";
    }

    .student-achievement-list td:nth-child(1)::before {
        content: "実施日";
    }

    .student-achievement-list td:nth-child(2)::before {
        content: "種別";
    }

    .student-achievement-list td:nth-child(3)::before {
        content: "タイトル";
    }

    .student-achievement-list td:nth-child(4)::before {
        content: "結果";
    }

    .student-achievement-list td:nth-child(5)::before {
        content: "公開範囲";
    }

    .student-criterion-list td:nth-child(1)::before {
        content: "更新日時";
    }

    .student-criterion-list td:nth-child(2)::before {
        content: "科目";
    }

    .student-criterion-list td:nth-child(3)::before {
        content: "学期";
    }

    .student-criterion-list td:nth-child(4)::before {
        content: "種別";
    }

    .student-criterion-list td:nth-child(5)::before {
        content: "観点";
    }

    .student-criterion-list td:nth-child(6)::before {
        content: "評価";
    }

    .table-request-entry td:nth-child(1)::before,
    .table-request-manage td:nth-child(1)::before {
        content: "生徒番号";
    }

    .table-request-entry td:nth-child(2)::before,
    .table-request-manage td:nth-child(2)::before {
        content: "生徒名";
    }

    .table-request-entry td:nth-child(3)::before,
    .table-request-manage td:nth-child(3)::before {
        content: "申請種別";
    }

    .table-request-entry td:nth-child(4)::before,
    .table-request-manage td:nth-child(4)::before {
        content: "開始日";
    }

    .table-request-entry td:nth-child(5)::before,
    .table-request-manage td:nth-child(5)::before {
        content: "終了日";
    }

    .table-request-entry td:nth-child(6)::before,
    .table-request-manage td:nth-child(6)::before {
        content: "状態";
    }

    .table-request-entry td:nth-child(7)::before,
    .table-request-manage td:nth-child(7)::before {
        content: "理由";
    }

    .table-request-entry td:nth-child(8)::before,
    .table-request-manage td:nth-child(8)::before {
        content: "操作";
    }

    .talk-composer-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .talk-composer-row .form-control,
    .talk-composer-row .talk-file,
    .talk-composer-row .talk-send {
        width: 100%;
        max-width: 100%;
    }
}

.student-intake-import .student-intake-import-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.student-intake-import .table-shell {
    margin-top: 12px;
}

.student-intake-import .table {
    min-width: 880px;
}

.student-intake-import .student-intake-example {
    margin-top: 12px;
}

.student-intake-import .student-intake-example-shell .table {
    min-width: 760px;
}

.student-single-entry .student-single-entry-nextlinks {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.student-single-entry .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-single-entry .form-help {
    margin-top: 2px;
}

.student-single-entry .optional-profile-accordion {
    border-color: rgba(104, 137, 188, 0.35);
    background: linear-gradient(180deg, rgba(236, 244, 255, 0.72) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.student-single-entry .optional-profile-accordion summary {
    background: rgba(214, 228, 247, 0.8);
    color: var(--ink-800);
}

.student-single-entry .optional-profile-caption {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted-500);
}

.student-single-entry .optional-profile-accordion > :not(summary) {
    background: transparent;
}

.student-single-entry .optional-profile-grid {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .student-single-entry .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .student-single-entry .form-grid {
        grid-template-columns: 1fr;
    }
}
