/* modal.css — 상세 모달·모달 이동·개인 평점·관리자 편집·RT 점수 */
  /* ── MODAL ── */
  .modal-overlay {
    --modal-entry-x: 50vw;
    --modal-entry-y: 50vh;
    --modal-entry-accent-rgb: 201, 168, 76;
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    isolation: isolate;
  }
  .modal-overlay.open {
    display: flex;
    animation: modalOverlayIn 0.3s ease-out;
  }
  @keyframes modalOverlayIn {
    0% { background: rgba(0,0,0,0); }
    100% { background: rgba(0,0,0,0.88); }
  }

  /* 본편 카드에서 들어온 경우에만 클릭 지점의 페이즈 색이 한 번 번지고 사라진다. */
  .modal-overlay.from-work-card::before {
    content: '';
    position: fixed;
    left: var(--modal-entry-x);
    top: var(--modal-entry-y);
    width: min(36vw, 420px);
    aspect-ratio: 1;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--modal-entry-accent-rgb),0.3) 0%, rgba(var(--modal-entry-accent-rgb),0.1) 34%, transparent 70%);
    transform: translate(-50%,-50%) scale(0.24);
    opacity: 0;
  }
  .modal-overlay.from-work-card.open::before {
    animation: workCardDetailBloom 0.48s cubic-bezier(.2,.72,.28,1) both;
  }
  @keyframes workCardDetailBloom {
    0% { opacity: 0.9; transform: translate(-50%,-50%) scale(0.24); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.7); }
  }

  .modal {
    background:
      radial-gradient(120% 80% at 0% 0%, rgba(201,168,76,0.05), transparent 60%),
      linear-gradient(180deg, #171717, #121212);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-width: 1180px;
    width: 100%;
    display: flex;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    max-height: 94vh;
    box-shadow: 0 26px 70px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: modalPortalIn 0.4s ease-out;
    z-index: 1;
  }
  .modal-overlay.from-work-card .modal {
    border-color: rgba(var(--modal-entry-accent-rgb),0.48);
    animation: modalFromWorkCard 0.36s cubic-bezier(.2,.76,.28,1);
  }
  @keyframes modalFromWorkCard {
    0% { opacity: 0; transform: scale(0.965) translateY(10px); box-shadow: 0 12px 34px rgba(0,0,0,0.48); }
    58% { opacity: 1; }
    100% { opacity: 1; transform: scale(1) translateY(0); box-shadow: 0 26px 70px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.05); }
  }
  .modal-poster-col {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: rgba(0,0,0,0.28);
  }
  .modal-media-frame {
    width: 100%;
    flex-shrink: 0;
    position: relative;
    background: #0d0d0d;
  }
  @keyframes modalPortalIn {
    0% { opacity: 0; transform: scale(0.96) translateY(8px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
  }
  /* 포스터 높이 제한 (v2.12.8)
     포스터(2:3) + 전환 바 + 예고편이 합쳐지면 세로가 모달을 넘겨 상세 정보까지
     스크롤해야 했다. 화면 높이에 맞춰 포스터만 줄이고 나머지는 그대로 둔다.
     넓고 높은 화면에서는 aspect-ratio 가 먼저 걸려 기존 크기를 유지한다. */
  .modal-poster {
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 2/3;
    max-height: calc(94vh - 275px);
    object-fit: contain;
    background: #0d0d0d;
    opacity: 0;
    transform: scale(1.012);
    transition: opacity 0.3s ease, transform 0.42s cubic-bezier(.2,.72,.28,1);
  }
  .modal-poster.is-media-ready { opacity: 1; transform: scale(1); }
  .modal-poster-placeholder {
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 2/3;
    max-height: calc(94vh - 275px);
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #333;
  }
  .modal-poster.is-logo-media {
    object-fit: contain;
    object-position: center;
    padding: 1.25rem;
    box-sizing: border-box;
    background: #000;
  }
  .modal-media-controls {
    min-height: 54px;
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(201,168,76,0.22);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #121212, #0d0d0d);
    box-sizing: border-box;
  }
  .modal-media-controls[hidden] { display: none; }
  .modal-media-toggle {
    position: static;
    transform: none;
    width: max-content;
    min-width: 142px;
    min-height: 40px;
    max-width: 100%;
    padding: 0.52rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(201,168,76,0.72);
    background: rgba(8,8,8,0.9);
    box-shadow: 0 5px 20px rgba(0,0,0,0.56);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  }
  .modal-media-toggle .icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
  }
  .modal-media-toggle:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #111;
    transform: translateY(-1px);
  }
  .modal-media-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
  .modal-media-label {
    position: static;
    max-width: 100%;
    padding: 0.24rem 0.55rem;
    border: 1px solid rgba(201,168,76,0.32);
    border-radius: 20px;
    background: rgba(0,0,0,0.42);
    color: var(--gold);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    white-space: nowrap;
  }
  .modal-media-label:empty { display: none; }
  .modal-body {
    padding: 1.5rem 1.6rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
  }
  /* ── 본문 2단 (v2.12.8) ──
     정보가 한 줄로만 쌓여 스크롤이 길던 문제를 넓은 화면에서 2단으로 나눠 줄인다. */
  .modal-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.9rem 1.35rem;
    align-items: start;
  }
  .modal-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
  }
  .modal-col > div:empty { display: none; }
  /* 섹션 패널 — 메인 페이지 카드와 같은 질감.
     features.css 가 modal.css 보다 뒤에 로드되어 같은 특이도면 그쪽이 이긴다.
     `.modal` 을 앞에 붙여 특이도를 올려야 실제로 적용된다. 접두사를 빼지 말 것. */
  .modal .modal-rtinfo,
  .modal .modal-ph,
  .modal .modal-admin-tools,
  .modal .modal-note-edit {
    background: rgba(0,0,0,0.34);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 0.85rem;
    margin-top: 0;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    box-sizing: border-box;
  }

  /* ── 모달 이전·다음 이동 ── */
  .modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.4rem; line-height: 1;
    cursor: pointer; z-index: 6;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  }
  .modal-nav-btn:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
  .modal-nav-btn.prev { left: 10px; }
  .modal-nav-btn.next { right: 10px; }
  .modal-nav-btn:disabled { opacity: 0.25; cursor: default; }
  .modal-nav-pos {
    position: absolute; top: 0.9rem; left: 50%; transform: translateX(-50%);
    font-size: 0.62rem; letter-spacing: 0.08em; color: var(--muted);
    background: rgba(0,0,0,0.5); padding: 0.15rem 0.6rem; border-radius: 20px; z-index: 6;
  }

  /* ── Project H 개인 평점 ── */
  .modal-ph { margin-top: 0; border-top: none; }
  .modal-ph-label {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 0.6rem;
  }
  .ph-score-big { font-size: 1.5rem; font-weight: 700; color: var(--gold); }
  .ph-score-big small { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
  .ph-stars { color: var(--gold); font-size: 1rem; letter-spacing: 0.05em; }
  .ph-stars .off { color: #3a3a3a; }
  .ph-meta { font-size: 0.7rem; color: var(--muted); margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
  .ph-review { font-size: 0.82rem; color: var(--text); margin-top: 0.5rem; line-height: 1.5; font-style: italic; }
  /* 비교 바 (비평/관객/PH)
     .ph-cmp-fill 은 span 이고 부모 .ph-cmp-track 은 flex 컨테이너가 아니다.
     display 를 지정하지 않으면 inline 으로 남아 width/height 가 무시되고 게이지가
     0x0 으로 렌더된다(숫자만 보이고 막대는 안 보이는 증상). display:block 필수. */
  .ph-compare { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.42rem; }
  .ph-cmp-row { display: flex; align-items: center; gap: 0.55rem; font-size: 0.68rem; }
  .ph-cmp-name { width: 40px; flex-shrink: 0; color: var(--muted); letter-spacing: 0.04em; }
  .ph-cmp-track {
    flex: 1;
    height: 9px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 999px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .ph-cmp-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .ph-cmp-fill.crit { background: linear-gradient(90deg, #b5271c, #E24136); }
  .ph-cmp-fill.aud  { background: linear-gradient(90deg, #9c7f2e, #C9A84C); }
  .ph-cmp-fill.ph   { background: linear-gradient(90deg, #2f6ba8, #4a8fd6); }
  .ph-cmp-fill.is-na { min-width: 0; background: none; }
  .ph-cmp-val { width: 42px; flex-shrink: 0; text-align: right; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
  /* 관리자 편집 — 세로로 길어지지 않도록 압축한다(v2.12.8). */
  .ph-edit { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.4rem; }
  .ph-edit-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.7rem; color: var(--muted); }
  .ph-edit-row label { font-size: 0.64rem; color: var(--muted); min-width: 52px; }
  .modal .ph-edit-row > span { font-size: 0.62rem; }
  .modal .ph-edit textarea { min-height: 38px; padding: 0.42rem 0.5rem; font-size: 0.75rem; }
  .modal .ph-edit select,
  .modal .ph-edit input[type="date"],
  .modal .ph-edit input[type="number"] { padding: 0.22rem 0.35rem; font-size: 0.7rem; }
  .modal .ph-edit input[type="number"] { width: 60px; }
  .ph-edit select, .ph-edit input[type="date"], .ph-edit input[type="number"] {
    background: #1a1a1a; border: 1px solid var(--border); color: var(--text);
    border-radius: 4px; padding: 0.25rem 0.4rem; font-size: 0.72rem; font-family: inherit;
  }
  .ph-edit textarea {
    background: #1a1a1a; border: 1px solid var(--border); color: var(--text);
    border-radius: 6px; padding: 0.5rem; font-size: 0.78rem; font-family: inherit;
    resize: vertical; min-height: 44px; width: 100%;
  }

  /* ── 모달 버튼 통일 (v2.12.8) ──
     메인 페이지 빠른 기능(.ranking-trigger-btn)·아카이브 기능(.archive-feature-btn)의
     어두운 카드 + 금색 호버 + 살짝 떠오르는 모션을 상세 모달에도 그대로 적용한다. */
  .modal .modal-actions .wl-modal-btn,
  .modal .modal-actions .cmp-modal-btn,
  .modal .modal-actions .ph-save-btn,
  .modal .modal-actions .ph-delete-btn,
  .modal .modal-admin-tools button,
  .modal .modal-note-edit-buttons button,
  .modal .modal-src-edit .ph-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.44rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(0,0,0,0.4);
    color: var(--text);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  }
  .modal .modal-actions .wl-modal-btn .icon,
  .modal .modal-actions .cmp-modal-btn .icon,
  .modal .modal-admin-tools button .icon {
    width: 1rem; height: 1rem; flex: 0 0 auto; color: var(--red);
    transition: color 0.2s ease;
  }
  .modal .modal-actions .wl-modal-btn:hover,
  .modal .modal-actions .cmp-modal-btn:hover,
  .modal .modal-admin-tools button:hover,
  .modal .modal-note-edit-buttons button:hover,
  .modal .modal-src-edit .ph-save-btn:hover,
  .modal .modal-actions .ph-save-btn:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    background: rgba(201,168,76,0.1);
    color: var(--gold);
  }
  .modal .modal-actions .wl-modal-btn:hover .icon,
  .modal .modal-actions .cmp-modal-btn:hover .icon,
  .modal .modal-admin-tools button:hover .icon { color: var(--gold); }
  /* 담긴 상태 = 메인 페이지 .active 와 동일한 표현 */
  .modal .modal-actions .wl-modal-btn.on,
  .modal .modal-actions .cmp-modal-btn.on,
  .modal .modal-admin-tools button.tool-primary {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201,168,76,0.12);
  }
  .modal .modal-actions .wl-modal-btn.on .icon,
  .modal .modal-actions .cmp-modal-btn.on .icon,
  .modal .modal-admin-tools button.tool-primary .icon { color: var(--gold); }
  /* 저장 = 주요 동작만 금색 채움 */
  .modal .modal-actions .ph-save-btn,
  .modal .modal-note-edit-buttons .note-save-btn,
  .modal .modal-src-edit .ph-save-btn {
    background: linear-gradient(180deg, #d8b757, var(--gold));
    border-color: var(--gold);
    color: #1a1500;
  }
  .modal .modal-actions .ph-save-btn:hover,
  .modal .modal-note-edit-buttons .note-save-btn:hover,
  .modal .modal-src-edit .ph-save-btn:hover {
    background: linear-gradient(180deg, #e6c86a, #d8b757);
    color: #1a1500;
  }
  /* 삭제 = 붉은 외곽선 */
  .modal .modal-actions .ph-delete-btn,
  .modal .modal-note-edit-buttons .note-delete-btn {
    background: rgba(0,0,0,0.4);
    border-color: rgba(226,65,54,0.55);
    color: var(--red);
  }
  .modal .modal-actions .ph-delete-btn:hover,
  .modal .modal-note-edit-buttons .note-delete-btn:hover {
    transform: translateY(-2px);
    background: rgba(226,65,54,0.12);
    border-color: var(--red);
    color: #ff8a80;
  }
  /* 입력 영역도 세로를 아껴 스크롤 없이 들어가게 한다(v2.12.8). */
  .modal .modal-note-edit textarea { min-height: 46px; padding: 0.45rem 0.6rem; font-size: 0.76rem; }
  .modal .modal-note-edit-buttons { margin-top: 0.4rem; }
  .modal .modal-admin-tools { gap: 0.4rem; row-gap: 0.4rem; }
  .modal .modal-admin-tools input[type="number"] { padding: 0.24rem 0.35rem; }
  .modal .modal-rtinfo { gap: 0.22rem; font-size: 0.7rem; }
  .modal .modal-src-edit { margin-top: 0.35rem; }

  .modal .modal-actions .wl-modal-btn:focus-visible,
  .modal .modal-actions .cmp-modal-btn:focus-visible,
  .modal .modal-actions .ph-save-btn:focus-visible,
  .modal .modal-actions .ph-delete-btn:focus-visible,
  .modal .modal-admin-tools button:focus-visible,
  .modal .modal-note-edit-buttons button:focus-visible,
  .modal .modal-src-edit .ph-save-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  .ph-save-btn { background: var(--gold); color: #1a1500; border: none; border-radius: 5px; padding: 0.35rem 0.8rem; font-weight: 700; font-size: 0.72rem; cursor: pointer; }
  .ph-delete-btn { background: none; border: 1px solid var(--red); color: var(--red); border-radius: 5px; padding: 0.35rem 0.8rem; font-size: 0.72rem; cursor: pointer; }
  .modal-phase-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
  }
  /* 헤더는 스크롤을 줄이기 위해 여백을 조인다(v2.12.8). */
  .modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.72rem;
    letter-spacing: 0.05em;
    line-height: 1.08;
    margin-bottom: 0.25rem;
  }
  .modal-subtitle {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
  }
  .modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0;
  }
  .modal-head .modal-phase-tag { margin-bottom: 0.3rem; }
  .meta-chip {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-transform: uppercase;
  }
  .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    transition: background 0.2s;
  }
  .modal-close:hover { background: rgba(255,255,255,0.15); }


  /* ── RT SCORE ── */
  .rt-score {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.3rem;
  }
  .rt-tomato {
    font-size: 0.7rem;
  }
  .rt-pct {
    font-size: 0.72rem;
    font-weight: 700;
  }
  .rt-fresh  { color: #FA320A; }
  .rt-rotten { color: #7DB631; }

  .rt-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
  }
  .rt-label {
    font-size: 0.58rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    min-width: 30px;
  }
  .audience-pct {
    font-size: 0.72rem;
    font-weight: 700;
  }
  /* PH(개인) 평점 — 비평·관객은 남의 점수지만 이건 내가 매긴 점수다.
     한눈에 구분되도록 왼쪽 금색 띠와 옅은 금색 바탕으로 강조한다.
     아직 평점이 없는 카드까지 요란해지면 시선만 분산되므로,
     강조는 refreshCardPHScores() 가 붙이는 .is-rated 일 때만 켜진다. */
  .ph-row {
    margin-top: 0.28rem;
    padding: 0.14rem 0.32rem;
    border-left: 2px solid transparent;
    border-radius: 3px;
  }
  .ph-row .rt-label { font-weight: 800; }
  .ph-row.is-rated {
    border-left-color: var(--gold);
    background: linear-gradient(90deg, rgba(201, 168, 76, 0.18), rgba(201, 168, 76, 0));
  }
  .ph-row.is-rated .rt-label { color: var(--gold); }
  .ph-row.is-rated .rt-tomato { color: var(--gold); }
  .ph-pct { font-size: 0.72rem; font-weight: 700; color: var(--muted); }
  .ph-row.is-rated .ph-pct { font-size: 0.84rem; font-weight: 800; letter-spacing: 0.01em; }
  .ph-good { color: var(--gold); text-shadow: 0 0 7px rgba(201, 168, 76, 0.45); }
  .ph-low  { color: #c2c2c2; }

  .audience-fresh  { color: #7DB631; }
  .audience-rotten { color: #888; }

/* v2.36.1 — detail workspace: quiet surfaces, aligned fields, local actions. */
.modal .modal-body { padding: 2.4rem 2rem 1.8rem; gap: 1.4rem; }
.modal .modal-head { padding-bottom: 1.2rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.modal .modal-title { font-size: clamp(1.65rem, 2.4vw, 2.15rem); line-height: 1.25; letter-spacing: -.025em; }
.modal .modal-subtitle { margin: .4rem 0 .9rem; color: #a4a4a4; }
.modal .modal-meta { gap: .4rem; }
.modal .meta-chip { letter-spacing: .025em; line-height: 1.5; overflow-wrap: anywhere; }
.modal .modal-cols { gap: 1.2rem; }
.modal .modal-col { gap: 1rem; }
.modal .modal-rtinfo, .modal .modal-ph, .modal .modal-admin-tools, .modal .modal-note-edit {
  border-radius: 14px; border-color: rgba(255,255,255,.09); padding: 1.1rem;
  background: #141414; box-shadow: none;
}
.modal .modal-ph { border-color: rgba(201,168,76,.24); background: linear-gradient(145deg,rgba(201,168,76,.045),transparent 55%),#141414; }
.modal .modal-section-title, .modal .modal-ph-label, .modal .tool-label {
  display: flex; align-items: center; gap: .4rem; font-size: .76rem; line-height: 1.5;
  font-weight: 700; letter-spacing: .035em; color: #ddc47d; margin: 0 0 .9rem;
}
.modal .modal-section-title span, .modal .tool-label small { margin-left: auto; font-size: .55rem; letter-spacing: .09em; color: #a4a4a4; font-weight: 500; }
.modal .ph-score-big { font-size: 2rem; font-variant-numeric: tabular-nums; }
.modal .ph-score-big small { margin-left: .25rem; }
.modal .ph-compare { gap: .6rem; margin: .9rem 0 .2rem; }
.modal .ph-cmp-name { color: #aaa; }
.modal .ph-edit {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem .8rem;
  border-top: 1px solid rgba(255,255,255,.09); padding-top: 1rem; margin-top: 1.1rem;
}
.modal .ph-edit-row { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; min-width: 0; }
.modal .ph-edit-row label, .modal .ph-review-field label, .modal .modal-src-edit label, .modal .modal-score-fields label {
  font-size: .7rem; color: #b6b6b6; line-height: 1.5; letter-spacing: 0;
}
.modal .ph-edit-row > span { color: #aaa; font-size: .6rem; }
.modal .ph-review-field { order: 4; grid-column: 1 / -1; display: grid; gap: .4rem; }
.modal .ph-form-actions { order: 5; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .6rem; padding-top: .2rem; }
.modal .ph-edit select, .modal .ph-edit input[type="date"], .modal .ph-edit input[type="number"],
.modal .modal-admin-tools input[type="number"], .modal .modal-src-edit input,
.modal .ph-edit textarea, .modal .modal-note-edit textarea {
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 42px;
  padding: .6rem .7rem; border-radius: 8px; border: 1px solid #353535;
  background: #1d1d1d; color: #eee; font: inherit; font-size: .76rem; line-height: 1.5;
  color-scheme: dark; outline-offset: 3px;
}
.modal .ph-edit textarea, .modal .modal-note-edit textarea { min-height: 76px; resize: vertical; }
.modal input:focus-visible, .modal textarea:focus-visible, .modal select:focus-visible { outline: 2px solid var(--gold); border-color: var(--gold); }
.modal .modal-admin-tools { display: flex; flex-direction: column; align-items: stretch; gap: .8rem; }
.modal .modal-admin-tools .tool-label { margin-bottom: 0; }
.modal .modal-score-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.modal .modal-score-fields label { display: grid; gap: .4rem; }
.modal .modal-field-hint { color: #a0a0a0; font-size: .62rem; line-height: 1.7; }
.modal .modal-admin-tools button { align-self: flex-start; }
.modal .modal-admin-tools .modal-watched-toggle { align-self: stretch; justify-content: flex-start; border-color: #3e493e; }
.modal .modal-rtinfo { gap: .45rem; font-size: .71rem; line-height: 1.7; overflow-wrap: anywhere; }
.modal .modal-rtinfo .modal-section-title { margin-bottom: .35rem; }
.modal .modal-src-edit { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .5rem; margin-top: .65rem; padding-top: .85rem; border-top: 1px solid rgba(255,255,255,.08); }
.modal .modal-src-edit label { grid-column: 1 / -1; }
.modal .modal-src-edit button { white-space: nowrap; }
.modal .modal-actions { margin: 0; padding: .2rem 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.modal .modal-actions button { width: 100%; white-space: normal; }
.modal .modal-note-edit-buttons { display: flex; gap: .6rem; margin-top: .75rem; }
.modal .ph-form-actions button, .modal .modal-actions button, .modal .modal-admin-tools button,
.modal .modal-note-edit-buttons button, .modal .modal-src-edit button {
  min-height: 42px; padding: .6rem .8rem; font: inherit; font-size: .72rem; font-weight: 700;
  border-radius: 8px; letter-spacing: 0; line-height: 1.4;
}
.modal .ph-form-actions .ph-save-btn { background: #c9a84c; color: #17140b; border: 1px solid #c9a84c; }
.modal .ph-form-actions .ph-delete-btn, .modal .modal-note-edit-buttons .note-delete-btn { color: #db9993; border-color: #60403d; background: transparent; }
.modal .ph-form-actions button:hover { filter: brightness(1.12); }
.modal .ph-form-actions button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.modal .modal-detail-rows { margin-top: 0; padding-top: .1rem; border-top: 0; }
.modal .detail-row { padding: .3rem 0; line-height: 1.65; }
.modal .album-announcement,
.modal .album-work-history { display: block; overflow-wrap: anywhere; }
.modal .album-work-history { margin-top: .45rem; color: inherit; }
.modal .detail-value { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .modal .modal-cols { grid-template-columns: minmax(0,1fr); }
  .modal .modal-body { padding: 2.5rem 1.3rem 1.4rem; }
}
@media (max-width: 720px) {
  .modal .modal-body { padding: 1.3rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); }
  .modal .modal-rtinfo, .modal .modal-ph, .modal .modal-admin-tools, .modal .modal-note-edit { padding: 1rem; }
}
@media (max-width: 380px) {
  .modal .ph-edit, .modal .modal-score-fields { grid-template-columns: minmax(0,1fr); }
  .modal .modal-src-edit { grid-template-columns: minmax(0,1fr); }
  .modal .modal-src-edit button { justify-self: start; }
}

.box-record-date,.box-record-history{display:block;font-size:11px;line-height:1.65;font-weight:400;margin-top:5px;color:var(--text-muted,#a6a6ae)}
.box-record .detail-value{min-width:0;overflow-wrap:anywhere}

/* Award results share the catalog typeface; only confirmed wins shimmer. */
.modal .award-history { display: grid; gap: .45rem; min-width: 0; }
.modal .award-line { display: grid; grid-template-columns: 4.3em minmax(0, 1fr); gap: .65rem; align-items: start; color: #bcc0c9; }
.modal .award-won { color: #edcf91; }
.modal .award-nominated { color: #adc4e9; }
.modal .award-status { font-size: .82em; font-weight: 700; line-height: 2; opacity: .9; }
.modal .award-copy { position: relative; display: block; min-width: 0; }
.modal .award-won .award-text { text-shadow: 0 0 8px rgba(237, 207, 145, .24); }
.modal .award-glitch { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.modal .award-glitch-a { color: #f5e5bf; clip-path: inset(20% 0 66% 0); }
.modal .award-glitch-b { color: #bdcfdf; clip-path: inset(64% 0 22% 0); }
@keyframes award-glitch {
  0%, 88%, 91%, 100% { opacity: 0; transform: translateX(0); }
  89% { opacity: .28; transform: translateX(.7px); }
  90% { opacity: .18; transform: translateX(-.5px); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .modal-overlay.open .award-won .award-glitch { animation: award-glitch 7s linear infinite; }
  .modal-overlay.open .award-won .award-glitch-b { animation-delay: .12s; animation-direction: reverse; }
}
@media (prefers-reduced-motion: reduce) {
  .modal .award-glitch { display: none; animation: none; }
}
