/*
 * 색·글꼴·공통 부품. 라이트/다크 색은 모두 이 파일 맨 위 변수에서만 정합니다.
 * 첫 방문은 기기 설정을 따르고, 사용자가 전환하면 <html data-theme="light|dark"> 로 고정됩니다.
 *
 * 기존 현자의 돌 사이트(윤리와 사상 포털)와 같은 느낌으로 맞췄습니다.
 *   다크: 거의 검정 바탕 #0B0B0D, 면 #17181C / #1E2024, 테두리 #2A2C31, 강조 금빛 주황 #D9A441
 *   라이트: 같은 계열을 밝게 뒤집은 색
 *   글꼴: Pretendard. 큰 상자 모서리 14px, 입력·버튼 8px.
 */

:root {
    color-scheme: light;

    --canvas: #f4f4f5;
    --surface: #ffffff;
    --surface-2: #f7f7f8;
    --surface-3: #ececee;
    --line: #e4e4e7;
    --line-strong: #d1d1d6;

    --ink: #17181c;
    --ink-2: #5f6066;
    --ink-3: #8e8e94;

    --accent: #d9a441;
    --accent-strong: #c8922c;
    --accent-ink: #94650f;
    --accent-soft: rgba(217, 164, 65, 0.16);
    --on-accent: #17130a;

    --primary: #d9a441;
    --primary-hover: #e2b154;
    --on-primary: #17130a;

    --ok: #1d8f57;
    --ok-soft: rgba(29, 143, 87, 0.11);
    --late: #9a6a00;
    --late-soft: rgba(217, 164, 65, 0.18);
    --bad: #d93a40;
    --bad-soft: rgba(229, 72, 77, 0.1);
    --makeup: #3a63c4;
    --makeup-soft: rgba(58, 99, 196, 0.1);

    --focus-ring: 0 0 0 3px rgba(217, 164, 65, 0.35);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.1);
    --backdrop: rgba(11, 11, 13, 0.5);

    --r-box: 14px;
    --r-ctl: 8px;
    --r-tag: 6px;
    --radius: 8px;
    --radius-sm: 6px;

    --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
        "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --canvas: #0b0b0d;
        --surface: #17181c;
        --surface-2: #1e2024;
        --surface-3: #26282d;
        --line: #2a2c31;
        --line-strong: #3a3c42;
        --ink: #f2f1ee;
        --ink-2: #9a9a9e;
        --ink-3: #6e6e73;
        --accent: #d9a441;
        --accent-strong: #d9a441;
        --accent-ink: #e3b45e;
        --accent-soft: rgba(217, 164, 65, 0.14);
        --primary: #d9a441;
        --primary-hover: #e4b459;
        --on-primary: #17130a;
        --ok: #3dd68c;
        --ok-soft: rgba(61, 214, 140, 0.12);
        --late: #e8c056;
        --late-soft: rgba(217, 164, 65, 0.16);
        --bad: #ff6b70;
        --bad-soft: rgba(229, 72, 77, 0.13);
        --makeup: #8fb3ff;
        --makeup-soft: rgba(143, 179, 255, 0.13);
        --focus-ring: 0 0 0 3px rgba(217, 164, 65, 0.3);
        --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45);
        --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.5);
        --backdrop: rgba(0, 0, 0, 0.65);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --canvas: #0b0b0d;
    --surface: #17181c;
    --surface-2: #1e2024;
    --surface-3: #26282d;
    --line: #2a2c31;
    --line-strong: #3a3c42;
    --ink: #f2f1ee;
    --ink-2: #9a9a9e;
    --ink-3: #6e6e73;
    --accent: #d9a441;
    --accent-strong: #d9a441;
    --accent-ink: #e3b45e;
    --accent-soft: rgba(217, 164, 65, 0.14);
    --primary: #d9a441;
    --primary-hover: #e4b459;
    --on-primary: #17130a;
    --ok: #3dd68c;
    --ok-soft: rgba(61, 214, 140, 0.12);
    --late: #e8c056;
    --late-soft: rgba(217, 164, 65, 0.16);
    --bad: #ff6b70;
    --bad-soft: rgba(229, 72, 77, 0.13);
    --makeup: #8fb3ff;
    --makeup-soft: rgba(143, 179, 255, 0.13);
    --focus-ring: 0 0 0 3px rgba(217, 164, 65, 0.3);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.5);
    --backdrop: rgba(0, 0, 0, 0.65);
}

/* ---------- 기본 ---------- */

[hidden] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.brand-mark {
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-mark .accent {
    color: var(--accent);
}

.icon {
    width: 16px;
    height: 16px;
    flex: none;
    display: inline-block;
    vertical-align: middle;
}

.num,
.tnum {
    font-variant-numeric: tabular-nums;
}

.nowrap {
    white-space: nowrap;
}

.muted {
    color: var(--ink-2);
}

.faint {
    color: var(--ink-3);
}

.small {
    font-size: 12.5px;
}

.strong {
    font-weight: 650;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- 버튼 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 550;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.btn:hover {
    background: var(--surface-2);
    border-color: var(--ink-3);
    text-decoration: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn .icon {
    width: 15px;
    height: 15px;
    color: var(--ink-2);
}

.btn-primary,
.btn-ink {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
}

.btn-primary .icon,
.btn-ink .icon {
    color: inherit;
}

.btn-primary:hover,
.btn-ink:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-accent {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: var(--on-accent);
    font-weight: 600;
}

.btn-accent:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-danger {
    color: var(--bad);
}

.btn-danger:hover {
    background: var(--bad-soft);
    border-color: var(--bad);
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--ink-2);
}

.btn-ghost:hover {
    background: var(--surface-3);
    border-color: transparent;
    color: var(--ink);
}

.btn-sm {
    height: 30px;
    padding: 0 10px;
    font-size: 12.5px;
}

.btn-xs {
    height: 25px;
    padding: 0 8px;
    border-radius: var(--r-tag);
    font-size: 12px;
}

.btn-icon {
    width: 34px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 30px;
}

.btn-icon.btn-xs {
    width: 25px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---------- 입력 ---------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field > label,
.label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.input-sm,
.select-sm {
    height: 30px;
    font-size: 13px;
    padding: 0 10px;
}

.select-sm {
    padding-right: 28px;
}

.textarea {
    height: auto;
    min-height: 90px;
    padding: 10px 12px;
    line-height: 1.65;
    resize: vertical;
}

.select {
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9591' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: var(--ink-3);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: var(--bad);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--ink-3);
}

.help {
    font-size: 12.5px;
    color: var(--ink-2);
}

.field-error {
    font-size: 12.5px;
    color: var(--bad);
}

.field-warn {
    font-size: 12.5px;
    color: var(--late);
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-strong);
    margin: 0;
    flex: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

/* ---------- 상자 ---------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-box);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
    font-size: 15px;
    font-weight: 650;
}

.panel-head .meta {
    font-size: 12.5px;
    color: var(--ink-3);
}

.panel-body {
    padding: 18px;
}

.panel-body.flush {
    padding: 0;
}

.panel-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--line);
}

/* 계속 보여야 하는 안내 한 줄 */
.callout {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font-size: 13.5px;
    line-height: 1.6;
}

.callout .icon {
    display: none;
}

.callout.is-bad {
    border-color: transparent;
    background: var(--bad-soft);
    color: var(--bad);
}

.callout.is-accent {
    border-color: transparent;
    background: var(--accent-soft);
}

.callout a {
    font-weight: 600;
    color: inherit;
}

/* ---------- 상태 글자 ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: var(--r-tag);
    background: var(--surface-3);
    font-size: 12px;
    font-weight: 550;
    line-height: 1.6;
    white-space: nowrap;
    color: var(--ink-2);
}

.badge.ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.badge.late {
    background: var(--late-soft);
    color: var(--late);
}

.badge.bad {
    background: var(--bad-soft);
    color: var(--bad);
}

.badge.makeup,
.badge.info {
    background: var(--makeup-soft);
    color: var(--makeup);
}

.badge.accent {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.count-dot {
    display: inline-block;
    min-width: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.new-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

/* ---------- 표 ---------- */

.table-scroll {
    overflow: auto;
    max-width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.table th,
.table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
    color: var(--ink-3);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover td {
    background: var(--surface-2);
}

.table td.num,
.table th.num {
    text-align: right;
}

.table td.center,
.table th.center {
    text-align: center;
}

.table td.wrap {
    white-space: normal;
}

.table .row-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.table .row-link:hover {
    color: var(--accent-ink);
}

.table .check-col {
    width: 40px;
    text-align: center;
}

.table tfoot th {
    position: static;
    border-top: 1px solid var(--line-strong);
    border-bottom: 0;
    color: var(--ink);
    font-size: 13.5px;
}

.panel > .table th:first-child,
.panel > .table td:first-child,
.panel > .table-scroll > .table th:first-child,
.panel > .table-scroll > .table td:first-child {
    padding-left: 18px;
}

.panel > .table th:last-child,
.panel > .table td:last-child,
.panel > .table-scroll > .table th:last-child,
.panel > .table-scroll > .table td:last-child {
    padding-right: 18px;
}

/* ---------- 빈 화면 ---------- */

.empty {
    padding: 32px 18px;
    text-align: center;
    color: var(--ink-3);
    font-size: 13.5px;
}

.empty strong {
    display: block;
    color: var(--ink);
    margin-bottom: 2px;
}

.empty .btn-row {
    justify-content: center;
    margin-top: 12px;
}

/* ---------- 페이지 번호·표 아래 안내 ---------- */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--ink-3);
}

/* ---------- 토스트 (우측 상단) ---------- */

.toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink);
    box-shadow: var(--shadow-pop);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-shown {
    opacity: 1;
    transform: none;
}

.toast.success {
    border-color: rgba(61, 214, 140, 0.3);
    background: color-mix(in srgb, var(--surface-2) 86%, #3dd68c);
    color: var(--ok);
}

.toast.error {
    border-color: rgba(229, 72, 77, 0.35);
    background: color-mix(in srgb, var(--surface-2) 86%, #e5484d);
    color: var(--bad);
}

.toast .toast-text {
    flex: 1;
}

.toast .toast-close {
    border: 0;
    background: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    line-height: 0;
}

/* ---------- 확인 창 / 편집 창 ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--backdrop);
}

.modal {
    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}

.modal.is-wide {
    width: min(980px, 100%);
}

.modal.is-mid {
    width: min(680px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    font-size: 16px;
    font-weight: 650;
}

.modal-body {
    padding: 18px;
    overflow: auto;
    line-height: 1.65;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.modal-foot .btn-danger {
    margin-right: auto;
}

body.has-modal {
    overflow: hidden;
}

/* ---------- 출석 상태 색 (수강생표·학생 화면 공용) ---------- */

.att-present {
    background: var(--ok-soft);
    color: var(--ok);
}

.att-late {
    background: var(--late-soft);
    color: var(--late);
}

.att-absent {
    background: var(--bad-soft);
    color: var(--bad);
}

.att-makeup {
    background: var(--makeup-soft);
    color: var(--makeup);
}

/* 진행 막대 */
.progress {
    height: 6px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 200ms linear;
}

/* 탭 (창 안의 전환) */
.tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: 16px;
    border-radius: var(--r-ctl);
    background: var(--surface-3);
}

.tabs button {
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--r-tag);
    background: none;
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
}

.tabs button[aria-selected="true"] {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-seg);
}

/* 학생 찾기 목록 (창 안) */
.pick-list {
    margin-top: 4px;
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-ctl);
    background: var(--surface);
}

.pick-item {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.pick-item:last-child {
    border-bottom: 0;
}

.pick-item:hover,
.pick-item:focus-visible {
    background: var(--surface-2);
}

.pick-item span {
    color: var(--ink-2);
}

.pick-empty {
    padding: 10px 12px;
    color: var(--ink-2);
    font-size: 13px;
}

.picked {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 38px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--surface-2);
    font-size: 13.5px;
}

/* 고른 것들 (알약 모양) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.chips li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px 3px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 13px;
}

.chips button {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--ink-2);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

/* 공지 본문 (관리자 미리보기·편집기·학생 화면 공용) */
.rich {
    font-size: 14.5px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.rich > :first-child {
    margin-top: 0;
}

.rich p,
.rich ul,
.rich ol,
.rich blockquote,
.rich h3,
.rich h4 {
    margin: 0 0 0.75em;
}

.rich h3 {
    font-size: 16.5px;
}

.rich h4 {
    font-size: 15px;
}

.rich ul,
.rich ol {
    padding-left: 1.4em;
}

.rich blockquote {
    padding-left: 14px;
    border-left: 3px solid var(--line-strong);
    color: var(--ink-2);
}

.rich a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rich hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1em 0;
}

/* 첨부 목록 */
.attach-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
}

.attach-list li {
    padding: 4px 0;
}

.attach-list a {
    font-weight: 550;
}

/* ---------- 영상 재생 상자 (학생 재생 화면·관리자 미리보기 공용) ---------- */

.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--r-box);
    background: #000;
    user-select: none;
    -webkit-user-select: none;
}

.player {
    position: absolute;
    inset: 0;
}

.watermark {
    position: absolute;
    inset: -20%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.wm-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 70px 40px;
    width: 100%;
    height: 100%;
    align-content: space-around;
    transform: rotate(-18deg);
    transition: transform 2s ease;
}

.wm-grid span {
    color: rgba(255, 255, 255, 0.16);
    font-size: clamp(12px, 1.8vw, 18px);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
}

/* ---------- 사이트 재생 막대 (YouTube 위를 덮고 직접 조작) ---------- */

.pc-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.pc-big {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: transform 150ms ease, opacity 150ms ease;
}

.pc-big svg {
    width: 32px;
    height: 32px;
    margin-left: 3px;
}

.pc-cover:hover .pc-big {
    transform: scale(1.05);
}

.pc-playing .pc-big {
    opacity: 0;
}

.pc-hint {
    margin: 0;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
}

/* 휴대폰에서 첫 재생만 YouTube 버튼을 직접 누르게: 가운데만 뚫고 위·아래 링크 자리는 계속 가림 */
.pc-pass .pc-cover {
    pointer-events: none;
}

.pc-pass .pc-big {
    opacity: 0;
}

.pc-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 18px 12px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    color: #fff;
    transition: opacity 200ms ease;
}

.pc-idle .pc-bar {
    opacity: 0;
    pointer-events: none;
}

.pc-idle .pc-cover {
    cursor: none;
}

.pc-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pc-space {
    flex: 1;
}

.pc-btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.pc-btn:hover,
.pc-btn:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.pc-btn svg {
    width: 22px;
    height: 22px;
}

.pc-time {
    margin-left: 6px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pc-seek,
.pc-vol {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    margin: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.pc-seek {
    --p: 0%;
    display: block;
    width: 100%;
    margin-bottom: 6px;
    background: linear-gradient(to right, #d9a441 var(--p), rgba(255, 255, 255, 0.3) var(--p));
}

.pc-vol {
    width: 84px;
    margin-right: 6px;
}

.pc-seek::-webkit-slider-thumb,
.pc-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.pc-seek::-moz-range-thumb,
.pc-vol::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.pc-rate {
    height: 30px;
    padding: 0 6px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.pc-rate option {
    color: #111;
}

@media (max-width: 520px) {
    .pc-skip,
    .pc-vol {
        display: none;
    }

    .pc-bar {
        padding: 14px 6px 4px;
    }

    .pc-big {
        width: 56px;
        height: 56px;
    }
}

.pf-exit {
    z-index: 6;
}

/* YouTube 제목·링크 복사(위쪽)와 YouTube 로고(오른쪽 아래)는 눌러도 아무 일 없게 */
.yt-shield {
    position: absolute;
    z-index: 3;
    background: transparent;
}

.yt-shield-top {
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    max-height: 20%;
}

.yt-shield-logo {
    right: 0;
    bottom: 0;
    width: 88px;
    height: 48px;
    max-height: 16%;
}

/* Vimeo 오른쪽 위 버튼(좋아요·나중에 보기·공유) 자리 */
.yt-shield-side {
    top: 0;
    right: 0;
    width: 64px;
    height: 170px;
    max-height: 60%;
}

.player-wrap:fullscreen .yt-shield-top,
.player-wrap.is-pseudo-full .yt-shield-top {
    height: 84px;
}

.player-wrap:fullscreen .yt-shield-logo,
.player-wrap.is-pseudo-full .yt-shield-logo {
    width: 120px;
    height: 64px;
}

.player-msg {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #9a9a9e;
    font-size: 14px;
    text-align: center;
}

.player-msg.is-error {
    color: #ff9297;
}

.player-wrap:fullscreen {
    border-radius: 0;
    aspect-ratio: auto;
}

.player-wrap.is-pseudo-full {
    position: fixed;
    inset: 0;
    z-index: 2000;
    aspect-ratio: auto;
    border-radius: 0;
}

.pf-exit {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font: inherit;
    font-size: 13px;
}

.player-wrap.is-pseudo-full .pf-exit {
    display: block;
}

.player-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
