:root {
    color-scheme: light dark;
}

body.practice-records-page {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text-main);
    font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.practice-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
}

.practice-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 0 22px;
}

.practice-kicker {
    color: var(--text-sub);
    font-size: 0.86rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.practice-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.2;
}

.practice-subtitle {
    margin: 8px 0 0;
    color: var(--text-sub);
    font-size: 0.95rem;
}

.practice-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.practice-btn {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 13px;
    background: var(--card-bg);
    color: var(--text-main);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.practice-btn:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

.practice-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.practice-btn.danger {
    border-color: rgba(239, 68, 68, 0.45);
    color: #ef4444;
}

.practice-btn.small {
    padding: 7px 10px;
    font-size: 0.84rem;
}

.practice-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.practice-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.practice-panel h2,
.practice-panel h3 {
    margin: 0 0 12px;
    font-size: 1.08rem;
}

.practice-muted {
    color: var(--text-sub);
    font-size: 0.9rem;
}

.practice-form {
    display: grid;
    gap: 12px;
}

.practice-field {
    display: grid;
    gap: 6px;
}

.practice-field label {
    color: var(--text-sub);
    font-size: 0.84rem;
    font-weight: 800;
}

.practice-input,
.practice-select,
.practice-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 11px;
    background: var(--input-bg, var(--bg));
    color: var(--text-main);
    font: inherit;
}

.practice-textarea {
    min-height: 92px;
    resize: vertical;
}

.practice-toggle-list,
.practice-task-list,
.practice-entry-list,
.practice-check-list {
    display: grid;
    gap: 10px;
}

.practice-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-bg) 88%, var(--primary) 12%);
}

.practice-toggle input {
    margin-top: 3px;
}

.practice-toggle strong {
    display: block;
    font-size: 0.94rem;
}

.practice-toggle span {
    color: var(--text-sub);
    font-size: 0.83rem;
}

.practice-task-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
}

.practice-task-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

.practice-task-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 900;
}

.practice-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 900;
    background: var(--primary-soft);
    color: var(--primary);
}

.practice-badge.off {
    background: rgba(148, 163, 184, 0.16);
    color: var(--text-sub);
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.practice-stat {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
}

.practice-stat strong {
    display: block;
    font-size: 1.45rem;
}

.practice-stat span {
    color: var(--text-sub);
    font-size: 0.82rem;
    font-weight: 800;
}

.practice-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.practice-actions-editor {
    display: grid;
    gap: 8px;
}

.practice-action-editor-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.practice-empty {
    padding: 22px;
    text-align: center;
    color: var(--text-sub);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.practice-student-card {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.practice-progress-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.practice-choice {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    font-weight: 900;
    cursor: pointer;
}

.practice-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.practice-choice:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.practice-check-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.practice-status {
    min-height: 20px;
    color: var(--text-sub);
    font-size: 0.88rem;
}

.practice-status.error {
    color: #ef4444;
}

.practice-status.ok {
    color: #22c55e;
}

.practice-table {
    width: 100%;
    border-collapse: collapse;
}

.practice-table th,
.practice-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.practice-table th {
    color: var(--text-sub);
    font-size: 0.78rem;
    font-weight: 900;
}

body.practice-records-student-page {
    min-height: 100vh;
    background: var(--bg);
    background-image: var(--bg-grad);
    background-attachment: fixed;
    overflow-x: hidden;
}

body.practice-records-student-page .practice-student-shell {
    max-width: 720px;
    padding: 0 16px 32px;
}

body.practice-records-student-page .practice-student-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    margin: 0 -16px 16px;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

body.practice-records-student-page .practice-student-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.practice-records-student-page .practice-home-icon {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 1.15rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.practice-records-student-page .practice-title {
    font-size: 1.15rem;
}

body.practice-records-student-page .practice-kicker {
    max-width: 54vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.practice-records-student-page .practice-overview {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-bg) 92%, var(--primary) 8%);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14);
}

body.practice-records-student-page .practice-overview-copy {
    display: grid;
    gap: 4px;
}

body.practice-records-student-page .practice-overview-kicker {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
}

body.practice-records-student-page .practice-overview-copy strong {
    color: var(--text-main);
    font-size: 1.35rem;
    line-height: 1.25;
}

body.practice-records-student-page .practice-overview-copy p {
    margin: 0;
    color: var(--text-sub);
    font-size: 0.92rem;
    font-weight: 700;
}

body.practice-records-student-page .practice-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.practice-records-student-page .practice-stat-card {
    display: grid;
    gap: 5px;
    align-content: center;
    min-height: 72px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    text-align: center;
}

body.practice-records-student-page .practice-stat-label {
    color: var(--text-sub);
    font-size: 0.75rem;
    font-weight: 900;
}

body.practice-records-student-page .practice-stat-value {
    color: var(--text-main);
    font-size: 1.12rem;
    line-height: 1.2;
    word-break: keep-all;
}

body.practice-records-student-page .practice-stat-value.is-good {
    color: var(--success);
}

body.practice-records-student-page .practice-student-card {
    gap: 16px;
}

body.practice-records-student-page .practice-record-card {
    padding: 0;
    overflow: hidden;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
}

body.practice-records-student-page .practice-record-hero {
    display: grid;
    gap: 12px;
    padding: 18px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--primary-soft) 70%, transparent),
            color-mix(in srgb, var(--success-soft, rgba(34, 197, 94, 0.18)) 62%, transparent));
    border-bottom: 1px solid var(--border);
}

body.practice-records-student-page .practice-record-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.practice-records-student-page .practice-record-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-bg) 82%, var(--primary) 18%);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
}

body.practice-records-student-page .practice-record-title {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.35rem, 4.8vw, 2rem);
    line-height: 1.22;
    word-break: keep-all;
}

body.practice-records-student-page .practice-record-description {
    margin: 0;
    color: var(--text-sub);
    font-size: 0.94rem;
    line-height: 1.55;
}

body.practice-records-student-page .practice-record-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

body.practice-records-student-page .practice-record-meta-grid span {
    display: grid;
    gap: 3px;
    min-height: 54px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-bg) 90%, transparent);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
    align-content: center;
}

body.practice-records-student-page .practice-record-meta-grid b {
    color: var(--text-sub);
    font-size: 0.7rem;
    font-weight: 900;
}

body.practice-records-student-page .practice-record-form {
    padding: 18px;
}

body.practice-records-student-page .practice-field {
    gap: 8px;
}

body.practice-records-student-page .practice-field label {
    font-size: 0.88rem;
}

body.practice-records-student-page .practice-goal-field {
    gap: 10px;
}

body.practice-records-student-page .practice-goal-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.practice-records-student-page .practice-goal-open-btn {
    white-space: nowrap;
}

body.practice-records-student-page .practice-goal-card {
    display: grid;
    gap: 7px;
    min-height: 70px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary-soft) 42%, var(--card-bg));
}

body.practice-records-student-page .practice-goal-card strong {
    color: var(--text-main);
    font-size: 1.02rem;
    line-height: 1.45;
    word-break: keep-all;
}

body.practice-records-student-page .practice-goal-card span,
body.practice-records-student-page .practice-goal-kicker {
    color: var(--text-sub);
    font-size: 0.78rem;
    font-weight: 900;
}

body.practice-records-student-page .practice-goal-card.is-empty {
    border-style: dashed;
    background: var(--card-bg);
}

body.practice-records-student-page .practice-input,
body.practice-records-student-page .practice-textarea {
    min-height: 46px;
    border-radius: 8px;
}

body.practice-records-student-page .practice-textarea {
    min-height: 110px;
}

body.practice-records-student-page .practice-progress-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.practice-records-student-page .practice-choice {
    flex-direction: column;
    gap: 7px;
    min-height: 78px;
    padding: 10px 8px;
    border-radius: 8px;
    text-align: center;
    line-height: 1.2;
}

body.practice-records-student-page .practice-choice-icon {
    font-size: 1.35rem;
}

body.practice-records-student-page .practice-choice:has(input:checked) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

body.practice-records-student-page .practice-choice-good:has(input:checked) {
    border-color: var(--success);
    color: var(--success);
}

body.practice-records-student-page .practice-choice-mid:has(input:checked) {
    border-color: #f59e0b;
    color: #f59e0b;
}

body.practice-records-student-page .practice-choice-low:has(input:checked) {
    border-color: #ef4444;
    color: #ef4444;
}

body.practice-records-student-page .practice-check-list {
    gap: 9px;
}

body.practice-records-student-page .practice-action-card {
    grid-template-columns: 28px 1fr;
    min-height: 54px;
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
}

body.practice-records-student-page .practice-action-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.practice-records-student-page .practice-action-mark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg, var(--bg));
    position: relative;
}

body.practice-records-student-page .practice-action-card:has(input:checked) {
    border-color: var(--success);
    background: color-mix(in srgb, var(--success-soft, rgba(34, 197, 94, 0.18)) 55%, var(--card-bg));
}

body.practice-records-student-page .practice-action-card:has(input:checked) .practice-action-mark {
    border-color: var(--success);
    background: var(--success);
}

body.practice-records-student-page .practice-action-card:has(input:checked) .practice-action-mark::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.practice-records-student-page .practice-action-label {
    font-weight: 800;
    line-height: 1.35;
}

body.practice-records-student-page .practice-save-row {
    display: grid;
    grid-template-columns: 1fr;
}

body.practice-records-student-page .practice-save-btn {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: inherit;
    font-size: 1.04rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

body.practice-records-student-page .practice-save-btn:hover {
    transform: translateY(-1px);
}

body.practice-records-student-page .practice-save-icon {
    font-size: 1.3rem;
}

body.practice-records-student-page .practice-empty-card .practice-empty {
    display: grid;
    gap: 6px;
    padding: 28px 18px;
}

body.practice-records-student-page .practice-empty-card strong {
    color: var(--text-main);
    font-size: 1.05rem;
}

body.practice-records-student-page .practice-empty-card span {
    color: var(--text-sub);
}

body.practice-records-student-page .practice-goal-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.62);
}

body.practice-records-student-page .practice-goal-dialog-backdrop[hidden] {
    display: none;
}

body.practice-records-student-page .practice-goal-dialog {
    width: min(520px, 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    padding: 18px;
}

body.practice-records-student-page .practice-goal-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

body.practice-records-student-page .practice-goal-dialog-header h2 {
    margin: 0;
    font-size: 1.24rem;
    line-height: 1.25;
}

body.practice-records-student-page .practice-goal-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg, var(--bg));
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
}

body.practice-records-student-page .practice-goal-editor-label {
    color: var(--text-sub);
    font-size: 0.86rem;
    font-weight: 900;
}

body.practice-records-student-page .practice-goal-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .practice-shell {
        padding: 14px;
    }

    .practice-topbar,
    .practice-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .practice-actions {
        justify-content: stretch;
    }

    .practice-btn {
        width: 100%;
    }

    .practice-grid,
    .practice-progress-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body.practice-records-student-page .practice-student-topbar {
        grid-template-columns: 1fr auto;
    }

    body.practice-records-student-page .practice-overview {
        padding: 14px;
    }

    body.practice-records-student-page .practice-record-meta-grid {
        grid-template-columns: 1fr;
    }

    body.practice-records-student-page .practice-progress-options {
        grid-template-columns: 1fr;
    }
}
