:root {
        --bg: #fff5f4;
        --panel: #ffffff;
        --accent: #ff7aa8;
        --accent-2: #ffb6c8;
        --text: #2a1f25;
        --muted: #7b6d74;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family: "IBM Plex Sans KR", sans-serif;
        background: radial-gradient(900px 520px at 15% -10%, #ffe3e9, transparent 60%),
          radial-gradient(900px 700px at 85% 10%, #f6d2e1, transparent 55%),
          linear-gradient(180deg, var(--bg), #fff0f3 60%, #f8e5ea);
        color: var(--text);
        min-height: 100vh;
      }

      .page {
        max-width: 1120px;
        margin: 0 auto;
        padding: 40px 20px 60px;
      }

      .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 24px;
        gap: 16px;
      }

      .logo {
        font-family: "DM Serif Display", serif;
        font-size: 22px;
        letter-spacing: 0.5px;
        color: var(--text);
        text-decoration: none;
      }

      .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        font-size: 13px;
      }

      .nav-links a {
        color: var(--muted);
        text-decoration: none;
        padding-bottom: 2px;
        border-bottom: 1px solid transparent;
      }

      .nav-links a:hover {
        color: var(--text);
        border-bottom-color: rgba(255, 122, 168, 0.5);
      }

      .hero {
        display: grid;
        gap: 24px;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        align-items: center;
        margin-bottom: 28px;
      }

      .title {
        font-size: clamp(34px, 6vw, 58px);
        font-family: "DM Serif Display", serif;
        letter-spacing: 0.5px;
        margin: 0 0 12px;
      }

      .subtitle {
        font-size: 17px;
        color: var(--muted);
        line-height: 1.6;
        margin: 0 0 18px;
      }

      .panel {
        background: linear-gradient(140deg, #ffffff, #fff7f9);
        border: 1px solid rgba(255, 122, 168, 0.15);
        border-radius: 20px;
        padding: 18px;
        box-shadow: 0 20px 40px rgba(84, 40, 61, 0.12);
      }

      .live-area {
        position: relative;
        overflow: hidden;
        border-radius: 18px;
        background: #f9e8ef;
        aspect-ratio: 4 / 3;
        min-height: 280px;
        width: 100%;
      }

      video,
      canvas {
        position: absolute;
        inset: auto;
        left: 50%;
        top: 50%;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: translate(-50%, -50%);
      }

      .best-frame {
        position: absolute;
        inset: auto;
        left: 50%;
        top: 50%;
        display: none;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: translate(-50%, -50%);
      }

      .live-overlay {
        position: absolute;
        inset: 0;
        padding: 14px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        pointer-events: none;
      }

      .loading-indicator {
        position: absolute;
        inset: 0;
        z-index: 4;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: rgba(18, 14, 17, 0.34);
        color: #fff8fb;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0.2px;
      }

      .loading-indicator.show {
        display: flex;
      }

      .loading-spinner {
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: preview-spin 0.85s linear infinite;
      }

      @keyframes preview-spin {
        from {
          transform: rotate(0deg);
        }
        to {
          transform: rotate(360deg);
        }
      }

      .live-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 999px;
        font-size: 12px;
        color: var(--muted);
        border: 1px solid rgba(255, 122, 168, 0.2);
      }

      .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--accent);
        box-shadow: 0 0 8px rgba(255, 122, 168, 0.6);
      }

      .controls {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 14px;
      }

      .mode-select {
        display: inline-flex;
        gap: 8px;
      }

      .upload-input {
        display: none;
      }

      .share-wrap {
        margin-left: auto;
        display: inline-flex;
        gap: 8px;
        align-items: center;
      }

      button {
        border: none;
        border-radius: 999px;
        padding: 10px 18px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        font-family: inherit;
      }

      button.primary {
        background: linear-gradient(120deg, var(--accent), #ffd1df);
        color: #3b1f2a;
      }

      button.ghost {
        background: rgba(255, 255, 255, 0.7);
        color: var(--text);
        border: 1px solid rgba(255, 122, 168, 0.2);
      }

      button.ghost.active {
        background: rgba(255, 122, 168, 0.15);
        border-color: rgba(255, 122, 168, 0.4);
      }

      button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
      }

      .lang-select {
        border-radius: 999px;
        padding: 8px 14px;
        border: 1px solid rgba(255, 122, 168, 0.25);
        background: rgba(255, 255, 255, 0.85);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
        cursor: pointer;
      }

      .score-board {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
      }

      .score-card {
        padding: 18px;
        border-radius: 16px;
        background: #fff9fb;
        border: 1px solid rgba(255, 122, 168, 0.12);
      }

      .score-value {
        font-family: "DM Serif Display", serif;
        font-size: clamp(40px, 6vw, 68px);
        letter-spacing: 1px;
        margin: 0;
      }

      .score-label {
        margin: 0;
        color: var(--muted);
        font-size: 14px;
      }

      .comment {
        font-size: 17px;
        margin: 10px 0 0;
        line-height: 1.5;
      }

      .signals {
        margin-top: 18px;
        display: grid;
        gap: 10px;
      }

      .signal-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: center;
      }

      .signal-cell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        padding: 6px 10px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(255, 122, 168, 0.12);
      }

      .signal-label {
        font-size: 13px;
        color: var(--muted);
      }

      .signal-value {
        font-weight: 600;
        color: var(--text);
        font-size: 13px;
      }

      footer {
        margin-top: 30px;
        color: var(--muted);
        font-size: 12px;
        text-align: center;
      }

      .footer-links {
        margin-top: 10px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
      }

      .footer-links a {
        color: var(--muted);
        text-decoration: none;
      }

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