 :root {
      --bg: #eef1f8;
      --surface: #ffffff;
      --surface2: #f4f6fb;
      --border: #e1e5f0;
      --border-strong: #cdd4e6;
      --text: #171b2e;
      --text-muted: #6b7285;
      --accent: #3b5bff;
      --accent-soft: rgba(59, 91, 255, 0.1);
      --accent2: #ff6b6b;
      --gold: #ffb020;
      --p1: #3b5bff;
      --p2: #ff6b6b;
      --p3: #ffb020;
      --p4: #12b886;
      --font: 'Inter', sans-serif;
      --disp: 'Sora', sans-serif;
      --r: 24px;
      --r-sm: 14px;
      --shadow-sm: 0 1px 3px rgba(23, 27, 46, 0.07);
      --shadow-md: 0 10px 28px rgba(23, 27, 46, 0.09);
      --shadow-lg: 0 24px 55px rgba(23, 27, 46, 0.14);
    }

    * {
      box-sizing: border-box;
      user-select: none;
      -webkit-user-select: none;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    html, body {
      height: 100%;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      overflow: hidden;
      width: 100vw;
      height: 100vh;
      height: 100dvh;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }

    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image:
        linear-gradient(rgba(59, 91, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 91, 255, 0.05) 1px, transparent 1px);
      background-size: 46px 46px;
      pointer-events: none;
      z-index: 0;
    }

    #bgCanvas {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 0;
    }

    .screen {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 20px;
      transition: opacity 0.4s ease, transform 0.4s ease;
      z-index: 10;
    }

    .hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateY(20px);
    }

    .panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: clamp(22px, 5vw, 40px) clamp(18px, 4.5vw, 32px);
      width: 100%;
      max-width: min(440px, 92vw);
      max-height: 92vh;
      max-height: 92dvh;
      overflow-y: auto;
      text-align: center;
      position: relative;
      box-shadow: var(--shadow-lg);
      clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
    }

    .logo-wrap {
      margin-bottom: 26px;
    }

    .logo-mark {
      font-family: var(--disp);
      font-size: clamp(1.7rem, 7vw, 2.6rem);
      font-weight: 800;
      letter-spacing: -1px;
      line-height: 1;
      background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block;
    }

    .logo-sub {
      display: block;
      margin-top: 8px;
      font-family: var(--disp);
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 3px;
      color: var(--text-muted);
      text-transform: uppercase;
    }

    .tab-hint {
      color: var(--text-muted);
      font-size: 0.9rem;
      line-height: 1.5;
      margin-bottom: 20px;
      text-align: center;
    }

    .btn-prime {
      width: 100%;
      background: linear-gradient(135deg, var(--accent) 0%, #6a3bff 100%);
      color: #fff;
      font-weight: 700;
      border: none;
      padding: 16px;
      font-size: 1rem;
      letter-spacing: 0.5px;
      border-radius: 14px;
      cursor: pointer;
      margin-top: 6px;
      font-family: var(--disp);
      transition: all 0.2s ease;
      box-shadow: 0 10px 24px rgba(59, 91, 255, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-prime:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 30px rgba(59, 91, 255, 0.38);
    }

    .btn-prime:active {
      transform: translateY(0px);
      box-shadow: 0 6px 14px rgba(59, 91, 255, 0.28);
    }

    .btn-prime.secondary {
      background: var(--surface2);
      color: var(--text);
      box-shadow: none;
      border: 1px solid var(--border-strong);
    }

    .btn-prime.secondary:hover {
      border-color: var(--accent);
      color: var(--accent);
      box-shadow: var(--shadow-sm);
    }

    .menu-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    /* Game screen */
    #game-screen {
      justify-content: flex-start;
      padding-top: 14px;
    }

    #level-badge {
      font-family: var(--disp);
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 1px;
      color: var(--accent);
      background: var(--accent-soft);
      border: 1px solid rgba(59, 91, 255, 0.25);
      border-radius: 20px;
      padding: 6px 16px;
      margin-bottom: 8px;
      z-index: 20;
      text-align: center;
    }

    #game-hud {
      width: 100%;
      max-width: 580px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 5px;
      z-index: 20;
      gap: 12px;
    }

    .hud-scores {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .score-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-top: 3px solid var(--border);
      border-radius: 12px;
      padding: 5px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-width: 78px;
      transition: 0.3s;
      box-shadow: var(--shadow-sm);
    }

    .score-card.active {
      border-top-color: var(--score-color, var(--accent));
      box-shadow: var(--shadow-md);
      transform: translateY(-3px);
    }

    .score-card .name {
      font-family: var(--disp);
      font-size: 0.62rem;
      color: var(--text-muted);
      margin-bottom: 3px;
      text-transform: uppercase;
      font-weight: 600;
    }

    .score-card .score {
      font-family: var(--disp);
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
    }

    .hud-controls {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .btn-icon {
      position: relative;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text-muted);
      width: 42px;
      height: 42px;
      border-radius: 12px;
      cursor: pointer;
      font-size: 1.1rem;
      transition: 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow-sm);
      flex-shrink: 0;
    }

    .btn-icon:hover {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    .btn-icon:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .hint-badge {
      position: absolute;
      top: -5px;
      right: -5px;
      background: var(--accent2);
      color: #fff;
      font-family: var(--disp);
      font-size: 0.58rem;
      font-weight: 700;
      border-radius: 50%;
      width: 16px;
      height: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow-sm);
    }

    #turn-bar {
      width: 100%;
      max-width: 580px;
      margin-bottom: 10px;
      height: 5px;
      background: var(--border);
      border-radius: 5px;
      overflow: hidden;
      z-index: 20;
    }

    #turn-fill {
      height: 100%;
      border-radius: 5px;
      transition: width 0.4s, background 0.3s;
    }

    #canvas-container {
      position: relative;
      width: 100%;
      max-width: 580px;
      max-height: 100%;
      aspect-ratio: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      flex: 1 1 auto;
      min-height: 0;
    }

    canvas#gameCanvas {
      background: var(--surface);
      border-radius: 22px;
      border: 1px solid var(--border);
      width: 100%;
      height: 100%;
      max-width: 100%;
      max-height: 100%;
      touch-action: none;
      display: block;
      box-shadow: var(--shadow-md);
      object-fit: contain;
    }

    #ai-thinking {
      position: absolute;
      top: 14px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--surface);
      border: 1px solid var(--accent2);
      border-radius: 20px;
      padding: 8px 20px;
      font-family: var(--disp);
      font-size: 0.68rem;
      color: var(--accent2);
      letter-spacing: 1.5px;
      display: none;
      align-items: center;
      gap: 8px;
      box-shadow: var(--shadow-md);
      z-index: 50;
      font-weight: 700;
      white-space: nowrap;
    }

    #ai-thinking.show {
      display: flex;
    }

    .think-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent2);
      animation: blink 1.2s infinite;
    }

    .think-dot:nth-child(2) {
      animation-delay: 0.2s;
    }

    .think-dot:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 0.25
      }

      50% {
        opacity: 1
      }
    }

    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(23, 27, 46, 0.35);
      backdrop-filter: blur(6px);
      z-index: 100;
      display: flex;
      justify-content: center;
      align-items: center;
      opacity: 0;
      pointer-events: none;
      transition: 0.35s;
      padding: 20px;
    }

    .overlay.visible {
      opacity: 1;
      pointer-events: auto;
    }

    .btn-ghost {
      width: 100%;
      background: transparent;
      color: var(--text-muted);
      border: 1px solid var(--border-strong);
      padding: 13px;
      font-size: 0.82rem;
      font-weight: 700;
      border-radius: 12px;
      cursor: pointer;
      margin-top: 12px;
      font-family: var(--disp);
      letter-spacing: 1px;
      transition: 0.2s;
    }

    .btn-ghost:hover {
      background: var(--surface2);
      color: var(--text);
      border-color: var(--text-muted);
    }

    .score-breakdown {
      display: flex;
      gap: 10px;
      margin: 12px 0 24px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .score-pill {
      padding: 7px 16px;
      border-radius: 20px;
      font-weight: 700;
      font-family: var(--disp);
      background: var(--surface2);
      border: 1px solid currentColor;
      font-size: 0.85rem;
    }

    .star-row {
      display: flex;
      justify-content: center;
      gap: 6px;
      margin: 14px 0 4px;
    }

    .star-row .star {
      font-size: 1.8rem;
      color: var(--border-strong);
      transition: all 0.3s ease;
    }

    .star-row .star.filled {
      color: var(--gold);
      text-shadow: 0 2px 8px rgba(255, 176, 32, 0.5);
    }

    #toast {
      position: fixed;
      top: calc(20px + env(safe-area-inset-top));
      left: 50%;
      transform: translateX(-50%) translateY(-80px);
      background: var(--surface);
      border: 1px solid var(--accent);
      border-radius: 30px;
      padding: 12px 26px;
      font-family: var(--disp);
      font-size: 0.78rem;
      letter-spacing: 0.5px;
      color: var(--accent);
      z-index: 999;
      transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      box-shadow: var(--shadow-md);
      white-space: nowrap;
      font-weight: 700;
      max-width: 90vw;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #toast.show {
      transform: translateX(-50%) translateY(0);
    }

    /* Preloader */
    .preloader-content {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .progress-track {
      width: 200px;
      max-width: 60vw;
      height: 5px;
      margin: 18px auto 12px;
      overflow: hidden;
      border-radius: 4px;
      background: var(--border);
    }

    .progress-fill {
      width: 0%;
      height: 100%;
      border-radius: 4px;
      background: linear-gradient(90deg, var(--accent), var(--accent2));
    }

    .load-text {
      font-family: var(--disp);
      color: var(--text-muted);
      letter-spacing: 1.5px;
      font-size: 0.8rem;
      font-weight: 600;
    }

    /* How to play */
    .section-title {
      margin-bottom: 4px;
      font-size: clamp(1.15rem, 4.5vw, 1.4rem);
      font-family: var(--disp);
      color: var(--text);
      font-weight: 800;
    }

    .howto-content {
      margin: 18px 0 20px;
      text-align: left;
      overflow-y: auto;
    }

    .step-item {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 16px;
    }

    .step-number {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      flex-shrink: 0;
      font-family: var(--disp);
      font-size: 0.9rem;
    }

    .step-title {
      margin: 0 0 3px;
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text);
    }

    .step-desc {
      color: var(--text-muted);
      margin: 0;
      font-size: 0.85rem;
      line-height: 1.4;
    }

    .p1bg {
      background: var(--p1);
      color: #fff;
    }

    .p2bg {
      background: var(--p2);
      color: #fff;
    }

    .p3bg {
      background: var(--p3);
      color: #1b1b1b;
    }

    .p4bg {
      background: var(--p4);
      color: #fff;
    }

    /* Game over */
    .win-emoji {
      font-size: 2.6rem;
      margin-bottom: 8px;
    }

    .win-title {
      font-family: var(--disp);
      font-weight: 800;
      font-size: 1.4rem;
    }

    .win-subtitle {
      margin-bottom: 8px;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

    /* Level select */
    .level-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
      gap: 8px;
    }

    .level-panel-header .section-title {
      margin: 0;
    }

    .level-progress-bar {
      width: 100%;
      height: 8px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 6px;
    }

    .level-progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--accent), var(--p4));
      border-radius: 8px;
      transition: width 0.4s;
    }

    .level-progress-text {
      font-family: var(--disp);
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 1px;
      color: var(--text-muted);
      text-align: center;
      margin-bottom: 16px;
    }

    .level-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
    }

    .level-tile {
      aspect-ratio: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 12px;
      font-family: var(--disp);
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--text);
      cursor: pointer;
      position: relative;
      transition: 0.15s;
      clip-path: polygon(0 0, 100% 0, 100% 100%, 18% 100%, 0 82%);
    }

    .level-tile:hover:not(.locked) {
      transform: translateY(-3px);
      box-shadow: var(--shadow-md);
      border-color: var(--accent);
      color: var(--accent);
    }

    .level-tile.locked {
      color: var(--text-muted);
      cursor: not-allowed;
      opacity: 0.5;
    }

    .level-tile.current {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
      color: var(--accent);
    }

    .level-tile.completed {
      background: rgba(18, 184, 134, 0.1);
      border-color: var(--p4);
      color: #0d9668;
    }

    .tile-stars {
      display: flex;
      gap: 1px;
      margin-top: 2px;
      font-size: 0.5rem;
      color: var(--gold);
      letter-spacing: -1px;
    }

    /* Settings */
    .settings-content {
      margin: 18px 0 4px;
      text-align: left;
    }

    .setting-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 4px;
      border-bottom: 1px solid var(--border);
    }

    .setting-row:last-child {
      border-bottom: none;
    }

    .setting-label {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .setting-title {
      font-weight: 700;
      font-size: 0.9rem;
      color: var(--text);
    }

    .setting-desc {
      font-size: 0.76rem;
      color: var(--text-muted);
    }

    .toggle-switch {
      position: relative;
      width: 48px;
      height: 28px;
      background: var(--border-strong);
      border-radius: 20px;
      cursor: pointer;
      transition: 0.25s;
      flex-shrink: 0;
      border: none;
    }

    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 22px;
      height: 22px;
      background: #fff;
      border-radius: 50%;
      transition: 0.25s;
      box-shadow: var(--shadow-sm);
    }

    .toggle-switch.on {
      background: var(--accent);
    }

    .toggle-switch.on::after {
      transform: translateX(20px);
    }

    /* Quick match selector */
    .qm-section {
      margin-bottom: 18px;
      text-align: left;
    }

    .qm-label {
      font-family: var(--disp);
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: var(--text-muted);
      margin-bottom: 8px;
    }

    .qm-option-row {
      display: flex;
      gap: 8px;
    }

    .qm-option {
      flex: 1;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      font-family: var(--disp);
      font-weight: 700;
      font-size: 0.72rem;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      transition: 0.15s;
    }

    .qm-option:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .qm-option.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent) inset;
    }

    /* Combo popup */
    .combo-popup {
      position: absolute;
      top: 40%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.6);
      font-family: var(--disp);
      font-weight: 800;
      font-size: 1.6rem;
      opacity: 0;
      pointer-events: none;
      z-index: 60;
      text-shadow: 0 4px 16px rgba(0,0,0,0.15);
      transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s;
      white-space: nowrap;
    }

    .combo-popup.show {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    @keyframes shake {
      0%, 100% { transform: translate(0, 0); }
      20% { transform: translate(-3px, 2px); }
      40% { transform: translate(3px, -2px); }
      60% { transform: translate(-2px, -2px); }
      80% { transform: translate(2px, 2px); }
    }

    #canvas-container.shake {
      animation: shake 0.28s ease;
    }

    /* Responsive */
    @media (max-width: 480px) {
      .panel {
        padding: 26px 18px;
      }

      .level-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
      }

      .level-tile {
        font-size: 0.8rem;
      }

      .score-card {
        min-width: 62px;
        padding: 4px 7px;
      }

      .score-card .score {
        font-size: 0.85rem;
      }

      .score-card .name {
        font-size: 0.55rem;
      }

      .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
      }

      #level-badge {
        font-size: 0.58rem;
        padding: 5px 10px;
        letter-spacing: 0.5px;
      }
    }

    @media (max-width: 340px) {
      .level-grid {
        grid-template-columns: repeat(3, 1fr);
      }

      .hud-controls {
        gap: 5px;
      }

      .btn-icon {
        width: 32px;
        height: 32px;
      }

      .score-card {
        min-width: 50px;
        padding: 3px 5px;
      }
    }

    @media (min-width: 700px) {
      .panel {
        max-width: min(480px, 90vw);
      }

      .level-panel {
        max-width: min(620px, 90vw);
      }

      .level-grid {
        grid-template-columns: repeat(6, 1fr);
      }

      #game-hud,
      #turn-bar,
      #canvas-container {
        max-width: 640px;
      }
    }

    @media (max-height: 720px) {
      #game-screen {
        padding-top: 6px;
      }

      #level-badge {
        margin-bottom: 4px;
      }

      #game-hud {
        margin-bottom: 3px;
      }

      #turn-bar {
        margin-bottom: 6px;
      }
    }

    /* Landscape phones: put HUD beside the board instead of stacking */
    @media (max-height: 480px) and (orientation: landscape) {
      #game-screen {
        flex-direction: row;
        flex-wrap: wrap;
        align-content: center;
        justify-content: center;
        padding-top: 8px;
        gap: 6px 14px;
      }

      #level-badge {
        width: 100%;
        margin-bottom: 2px;
      }

      #game-hud {
        width: auto;
        max-width: 130px;
        flex-direction: column;
        align-items: stretch;
        order: 1;
      }

      .hud-scores {
        flex-direction: column;
      }

      .hud-controls {
        justify-content: flex-start;
      }

      #turn-bar {
        display: none;
      }

      #canvas-container {
        width: auto;
        height: 92vh;
        height: 92dvh;
        max-width: none;
        order: 2;
      }

      canvas#gameCanvas {
        width: auto;
        height: 100%;
      }
    }

    @media (max-width: 480px) and (max-height: 380px) {
      .panel {
        padding: 16px 16px;
        max-height: 96vh;
        max-height: 96dvh;
      }

      .logo-wrap {
        margin-bottom: 12px;
      }

      .tab-hint {
        margin-bottom: 12px;
      }
    }

    /* Icon system */
    .icon {
      width: 18px;
      height: 18px;
      display: block;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .icon-sm {
      width: 12px;
      height: 12px;
    }

    /* Accessible focus states */
    button:focus-visible,
    .level-tile:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    /* Score pop feedback */
    .score-card .score.pop {
      animation: scorePop 0.35s ease;
    }

    @keyframes scorePop {
      0% {
        transform: scale(1);
      }

      40% {
        transform: scale(1.35);
        color: var(--score-color, var(--accent));
      }

      100% {
        transform: scale(1);
      }
    }

    /* Level tile stagger-in */
    .level-tile {
      animation: tileIn 0.3s ease backwards;
    }

    @keyframes tileIn {
      from {
        opacity: 0;
        transform: translateY(6px) scale(0.94);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    /* Confirm modal */
    .confirm-box {
      max-width: 320px;
      padding: 30px 26px;
    }

    .confirm-icon {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      background: var(--accent-soft);
      color: var(--accent2);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 16px;
    }

    .confirm-icon .icon {
      width: 22px;
      height: 22px;
    }

    .confirm-title {
      font-family: var(--disp);
      font-weight: 800;
      font-size: 1.1rem;
      margin-bottom: 6px;
    }

    .confirm-text {
      color: var(--text-muted);
      font-size: 0.85rem;
      margin-bottom: 20px;
      line-height: 1.5;
    }

    .confirm-actions {
      display: flex;
      gap: 10px;
    }

    .confirm-actions .btn-ghost,
    .confirm-actions .btn-danger {
      margin-top: 0;
      flex: 1;
    }

    .btn-danger {
      background: var(--accent2);
      color: #fff;
      border: none;
      padding: 13px;
      font-size: 0.82rem;
      font-weight: 700;
      border-radius: 12px;
      cursor: pointer;
      font-family: var(--disp);
      letter-spacing: 0.5px;
      transition: 0.2s;
      width: 100%;
    }

    .btn-danger:hover {
      filter: brightness(0.94);
    }

    .app-footer {
      margin-top: 22px;
      font-size: 0.66rem;
      letter-spacing: 1px;
      color: var(--text-muted);
      font-family: var(--disp);
      font-weight: 600;
      text-align: center;
      opacity: 0.7;
    }

    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
      }
    }