
    :root {
      --bg: #b0b8bc;
      --phone: #0b1220;
      --panel: #10192b;
      --panel-2: #17233a;
      --line: rgba(255, 255, 255, 0.08);
      --text: #f8fafc;
      --muted: #bfd0e0;
      --blue: #3b82f6;
      --yellow: #f59e0b;
      --green: #22c55e;
      --red: #d14a39;
      --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      background: linear-gradient(180deg, #22323d, #1d2b36);
      color: var(--text);
      font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    }

    .phone {
      width: min(100vw, 430px);
      min-height: 100vh;
      background: radial-gradient(circle at center, #101c33 0%, #060b14 100%);
      box-shadow: var(--shadow);
      overflow: hidden;
      position: relative;
    }

    .hidden { display: none !important; visibility: hidden !important; }
#screen-drive .card.hidden,
#screen-drive .drive-wrap.hidden { display: none !important; }

    .landing {
      position: absolute; 
      inset: 0; 
      height: 100%; 
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 28px 22px;
      background: radial-gradient(circle at center, #14233c 0%, #060a12 100%);
      z-index: 250; 
      overflow: hidden;
      text-align: center;
    }

    .card, .watch-item, .option {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    .landing::before,
    .landing::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      filter: blur(10px);
    }

    .landing::before {
      width: 180px;
      height: 180px;
      background: rgba(59, 130, 246, 0.14);
      top: -36px;
      right: -40px;
    }

    .landing::after {
      width: 140px;
      height: 140px;
      background: rgba(250, 204, 21, 0.1);
      left: -34px;
      bottom: 80px;
    }

    .landing h1 {
      margin: 0;
      font-size: 34px;
      line-height: 1.12;
      letter-spacing: -0.05em;
      word-break: keep-all;
      position: relative;
      z-index: 1;
      text-align: center;
      font-weight: 900;
      text-shadow: 0 2px 14px rgba(59, 130, 246, 0.12);
    }

    .landing-subtitle {
      margin: 12px 0 0;
      color: #dbeafe;
      font-size: 19px;
      line-height: 1.5;
      font-weight: 900;
      position: relative;
      z-index: 1;
      text-align: center;
      letter-spacing: -0.03em;
    }

    .landing-copy {
      margin: 16px 0 0;
      color: #c6d6e8;
      font-size: 15px;
      line-height: 1.75;
      word-break: keep-all;
      position: relative;
      z-index: 1;
      text-align: center;
    }

    .landing-brand, .advanced-brand-btn {
      margin: 34px 0 0;
      padding: 6px 12px;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 14px; 
      position: relative;
      z-index: 1;
      cursor: pointer; 
      border-radius: 16px;
      background: #10192b !important;
      border: 2px solid #fde68a !important;
      animation: blink-gold-excel 1s infinite alternate !important;
    }

    @keyframes blink-gold-excel {
      0% {
        transform: scale(1.0);
        filter: brightness(1.0);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 2px #ffffff !important;
        border-color: #cca43b !important;
      }
      100% {
        transform: scale(1.10);  
        filter: brightness(1.8); 
        box-shadow: 0 0 40px #f59e0b, inset 0 0 15px #ffffff !important;
        border-color: #fde68a !important;
      }
    } 

    .landing-logo-wrap {
      width: 100px !important;
      height: 100px !important;
      border-radius: 0px;
      background: transparent !important; 
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0px !important; 
    }

    .landing-logo {
      width: 80% !important;
      height: 80% !important;
      object-fit: contain !important;
      border-radius: 0px !important; 
      mix-blend-mode: normal !important; 
    }

    .landing-brand-text strong {
      display: block;
      font-size: 26px; 
      line-height: 1.15;
      letter-spacing: -0.02em;
      margin-bottom: 0;
      text-align: center;
      white-space: nowrap;
      font-weight: 900;
      background: linear-gradient(180deg, #f7dfaf 0%, #cca43b 50%, #997322 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.6));
    }

    .landing button {
      width: 100%;
      margin: 2px 0 4px 0; 
      min-height: 48px;    
      border: 0;
      border-radius: 14px;
      background: linear-gradient(180deg, #3b82f6, #2563eb);
      color: white;
      font: inherit;
      font-size: 20px;      
      font-weight: 900;
      cursor: pointer;
      box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12), 0 8px 16px rgba(37, 99, 235, 0.22);
      position: relative;
      z-index: 1;
    }

    .landing-bottom {
      display: none;
    }

    .landing-menu-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin: 6px 0 !important; 
      width: 100%;
    }

    .landing-menu-item {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 20px;
      padding: 8px 4px !important; 
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 10px 25px rgba(0,0,0,0.3);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .landing-menu-item.active {
      border: 1px solid #cca43b;
      box-shadow: inset 0 0 8px rgba(204, 164, 59, 0.3), 0 10px 25px rgba(0,0,0,0.4);
    }

    .landing-menu-icon {
      font-size: 28px; 
      background: linear-gradient(180deg, #f7dfaf 0%, #cca43b 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .landing-menu-text {
      font-size: 14px;
      font-weight: 900;
      color: #bfd0e0;
    }
    
    .landing-menu-item.active .landing-menu-text {
      background: linear-gradient(180deg, #f7dfaf 0%, #cca43b 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .topbar {
      background: #0d3b66;
      color: #facc15;
      text-align: center;
      font-size: 11px;
      line-height: 1.35;
      font-weight: 800;
      padding: 8px 12px 7px;
      border-bottom: 2px solid #facc15;
    }

    .title {
      padding: 11px 14px 10px;
      border-bottom: 1px solid var(--line);
    }

    .title h1 {
      margin: 0;
      font-size: 18px;
      line-height: 1.2;
      letter-spacing: -0.03em;
    }

    .tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr); 
      gap: 6px;
      padding: 6px 4px;
    }

    .tab-btn {
      height: 36px;
      min-height: 36px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.08);
      background: #18253b;
      color: var(--muted);
      font: inherit;
      font-size: 13px; 
      font-weight: 900;
      cursor: pointer;
      padding: 0 4px;
    }

    .tab-btn.active {
      background: var(--blue);
      color: white;
    }

    .screen {
      display: none;
      padding: 0 12px 16px;
    }

    .screen.active { display: block; }

    .card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
      margin-bottom: 10px;
    }

    .card h2,
    .card h3 {
      margin: 0 0 10px;
      line-height: 1.28;
      letter-spacing: -0.02em;
    }

    .card h2 { font-size: 19px; }
    .card h3 { font-size: 16px; }

    .card p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .video-wrap {
      margin-top: 10px;
      border-radius: 18px;
      overflow: hidden;
      background: #05080f;
      border: 1px solid var(--line);
    }

    video {
      display: block;
      width: 100%;
      aspect-ratio: 16 / 9;
      background: black;
    }

    .watch-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .watch-item {
      background: #1a2740;
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 14px;
      padding: 10px 11px;
      font-size: 14px;
      line-height: 1.5;
      font-weight: 800;
      word-break: keep-all;
    }

    .row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;                    
      margin-top: 8px;
      width: 100%;                  
    }

    .btn {
      border: 0;
      border-radius: 12px;
      min-height: 46px;
      font: inherit;
      font-size: 16px;
      font-weight: 900;
      cursor: pointer;
      touch-action: manipulation;
      transition: all 0.2s ease;
    }

    .btn-primary, .landing button, #btn-gate-confirm { 
      background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important; 
      color: #0c1424 !important; 
      border: 1px solid rgba(255, 255, 255, 0.15) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px rgba(0, 0, 0, 0.4) !important;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    .btn-dark { background: #263752; color: white; }
    .btn-green { background: #2eaf61; color: white; }
    .row .btn {
      min-height: 42px !important; 
      font-size: 15px; 
    }

    .quiz-head {
      text-align: center;
      margin-bottom: 10px;
    }

    .quiz-step {
      display: inline-block;
      padding: 7px 11px;
      border-radius: 999px;
      background: #20324f;
      color: #bfdbfe;
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 10px;
    }

    .quiz-question {
      margin: 0;
      font-size: 18px;
      line-height: 1.38;
      letter-spacing: -0.03em;
      word-break: keep-all;
    }

    .quiz-image {
      height: auto;
      max-height: 40dvh;
      aspect-ratio: 16 / 10;
      object-fit: contain;
    }

    .options {
      display: grid;
      gap: 8px;
    }

    .option {
      width: 100%;
      min-height: 42px !important; 
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.08);
      background: #18243a;
      color: white;
      font: inherit;
      font-size: 15px;
      line-height: 1.35;
      font-weight: 900;
      padding: 8px 11px !important; 
      cursor: pointer;
      text-align: left;
      word-break: keep-all;
    }

    .option.correct {
      background: rgba(34, 197, 94, 0.18);
      border-color: rgba(34, 197, 94, 0.34);
    }

    .option.wrong {
      background: rgba(239, 68, 68, 0.18);
      border-color: rgba(239, 68, 68, 0.34);
    }

  .feedback {
      display: none;
      margin-top: 10px;
      border-radius: 14px;
      padding: 4px 12px;
      font-size: 14px;
      line-height: 1.35; 
      font-weight: 800;
      word-break: keep-all;
    }

    .feedback.good {
      display: block;
      background: rgba(34, 197, 94, 0.14);
      color: #dcfce7;
    }

    .feedback.bad {
      display: block;
      background: rgba(239, 68, 68, 0.14);
      color: #fee2e2;
    }

    .quiz-nav {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 10px;
    }

    .hint {
      margin-top: 8px;
      color: var(--muted);
      text-align: center;
      font-size: 12px;
      line-height: 1.5;
    }

    .drive-wrap {
      background-color: #2c3e50;
      border: 3px solid #111;
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 12px 24px rgba(0,0,0,0.26);
      position: relative;
    }

    .drive-head {
      position: relative;
      z-index: 100;
      background-color: rgba(0, 0, 0, 0.92);
      color: #f1c40f;
      padding: 4px 8px;
      font-size: 13px; 
      font-weight: 900;
      text-align: center;
      border-bottom: 2px solid #111;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 6px;
      height: 36px;
      box-sizing: border-box;
      flex-wrap: nowrap !important;
    }

    .nav-btn {
      background-color: #f1c40f;
      color: #000;
      border: none;
      padding: 0 8px;
      height: 28px !important;
      min-height: 28px !important;
      font-size: 11px;
      font-weight: 900;
      border-radius: 6px;
      cursor: pointer;
      min-width: 52px;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
    }

    .drive-map {
      position: relative;
      width: 100%;
      height: 350px;
      background-color: #34495e;
      overflow: hidden;
    }

    .road-vertical { position: absolute; top: 0; left: 30%; width: 40%; height: 100%; background-color: #808a8f; }
    .road-horizontal { position: absolute; top: 8%; left: 0; width: 100%; height: 35%; background-color: #808a8f; }
    .intersection-center { position: absolute; top: 8%; left: 30%; width: 40%; height: 35%; background-color: #808a8f; }
    .center-line-v { position: absolute; top: 0; left: 50%; width: 4px; height: 100%; border-left: 2px solid #f1c40f; border-right: 2px solid #f1c40f; transform: translateX(-50%); }
    .center-line-h { position: absolute; top: 50%; left: 0; width: 100%; height: 4px; border-top: 2px solid #f1c40f; border-bottom: 2px solid #f1c40f; transform: translateY(-50%); }

    #main-stop-line { position: absolute; bottom: 40%; left: 50%; width: 20%; height: 5px; background-color: #fff; z-index: 5; }
    .crosswalk-h { position: absolute; width: 40%; height: 40px; display: flex; justify-content: space-around; padding: 2px; z-index: 5; }
    .crosswalk-h .stripe { width: 12px; height: 100%; background-color: #fff; }
    .crosswalk-v { position: absolute; width: 40px; height: 35%; display: flex; flex-direction: column; justify-content: space-around; padding: 2px; z-index: 5; }
    .crosswalk-v .stripe { width: 100%; height: 12px; background-color: #fff; }

    #bottom-crosswalk { top: 44%; left: 30%; }
    #top-crosswalk { top: 1%; left: 30%; }
    #left-crosswalk { top: 8%; left: 20%; }
    #right-crosswalk { top: 8%; right: 14%; }

    .plaza-area { position: absolute; width: 30%; height: 57%; bottom: 0; z-index: 4; background-color: transparent; }
    #left-plaza { left: 0; border-top-right-radius: 60px; border-top: 5px solid #facc15; border-right: 5px solid #facc15; }
    #right-plaza { right: 0; border-top-left-radius: 60px; border-top: 5px solid #facc15; border-left: 5px solid #facc15; }
    .top-plaza-left { position: absolute; top: 0; left: 0; width: 30%; height: 8%; background-color: #161d28; z-index: 4; border-bottom-right-radius: 45px; }

    #top-park {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 12%;
      background-color: #2c3e50; 
      z-index: 5; 
      display: none;
      align-items: center;
      justify-content: space-around;
      padding: 0 10%;
    }
    #top-park .park-tree {
      width: 40px;
      height: 40px;
      background-color: #1b4332;
      border-radius: 50%;
      box-shadow: 0 4px 6px rgba(0,0,0,0.3);
      position: relative;
    }
    #top-park .park-tree::after {
      content: "";
      position: absolute;
      bottom: -4px;
      left: 50%;
      transform: translateX(-50%);
      width: 8px;
      height: 12px;
      background-color: #7f5539;
      border-radius: 2px;
    }
    .top-plaza-right { position: absolute; top: 0; right: 0; width: 30%; height: 8%; background-color: #161d28; z-index: 4; border-bottom-left-radius: 45px; }

    .tree {
      position: absolute;
      width: 24px;
      height: 24px;
      background: #14532d;
      border-radius: 50%;
      box-shadow: inset -4px -4px 0 rgba(0,0,0,0.2);
    }
    .tree::after {
      content: "";
      position: absolute;
      width: 6px;
      height: 10px;
      background: #5c3a1a;
      bottom: -8px;
      left: 9px;
      z-index: -1;
    }

    .bench {
      position: absolute;
      width: 40px;
      height: 14px;
      background: #b45309;
      border-radius: 2px;
    }
    .bench::before, .bench::after {
      content: "";
      position: absolute;
      width: 4px;
      height: 6px;
      background: #1f2937;
      bottom: -6px;
    }
    .bench::before { left: 4px; }
    .bench::after { right: 4px; }

    .person-stand { position: absolute; width: 12px; height: 28px; }
    .person-stand .head,
    .person-sit .head {
      position: absolute;
      width: 10px;
      height: 10px;
      background: #ffcc99;
      border-radius: 50%;
      top: 0;
      left: 1px;
    }
    .person-stand .body,
    .person-sit .body {
      position: absolute;
      width: 12px;
      height: 12px;
      background: var(--shirt);
      top: 10px;
      left: 0;
      border-radius: 3px;
    }
    .person-stand .legs,
    .person-sit .legs {
      position: absolute;
      width: 4px;
      height: 8px;
      background: #2c3e50;
      top: 22px;
      left: 1px;
      box-shadow: 6px 0 0 #2c3e50;
    }

    .person-sit { position: absolute; width: 12px; height: 20px; top: -12px; }
    .person-sit .legs { height: 6px; }

    .light-box {
      position: absolute;
      background-color: #111827;
      border-radius: 6px;
      z-index: 10;
      border: 2px solid #0f172a;
      display: flex;
      padding: 4px;
      gap: 4px;
    }
    .light-box.horizontal { 
      top: 28%; 
      right: 32%; 
      flex-direction: row; 
      border: 2px solid #facc15; 
      background-color: #111; 
      padding: 3px 5px; 
      border-radius: 4px; 
    }
    .light-box.vertical { 
      top: 1%; 
      right: 15%; 
      flex-direction: column; 
      border: 2px solid #facc15; 
      padding: 4px 3px; 
    }
    .light { 
      width: clamp(20px, 5vw, 24px); 
      height: clamp(20px, 5vw, 24px); 
      border-radius: 50%; 
      background-color: #222; 
    }
    .ped-light { width: 15px; height: 22px; border-radius: 3px; background-color: #374151; }
    .light.red.active, .ped-light.red.active { background-color: #ef4444; box-shadow: 0 0 14px rgba(239,68,68,0.65); }
    .light.green.active, .ped-light.green.active { background-color: #22c55e; box-shadow: 0 0 14px rgba(34,197,94,0.65); }
    .light.yellow.active { background-color: #eab308; box-shadow: 0 0 14px rgba(234,179,8,0.65); }

    .rt-signal-box {
      position: absolute;
      top: 53%;
      right: 22%;
      background: #111111;
      border: 2px solid #facc15;
      padding: 6px 4px;
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      z-index: 20;
      box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    }
    .rt-light { 
      width: 22px; 
      height: 22px; 
      border-radius: 50%; 
      background: #222222; 
      font-size: 14px; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      font-weight: 900; 
      color: transparent; 
      transition: all 0.1s ease;
    }
    .rt-light.red.active { 
      background: #ef4444 !important; 
      box-shadow: 0 0 14px #ef4444; 
    }
    .rt-light.arrow.active { 
      background: transparent !important; 
      color: #22c55e !important; 
      font-size: 16px !important;
      font-weight: 900 !important;
      filter: drop-shadow(0 0 5px #22c55e); 
    }

    .school-zone-sign {
      position: absolute;
      bottom: 73%;
      left: 32%;
      background: #ef4444;
      color: #fff;
      font-weight: 900;
      padding: 6px 12px;
      border-radius: 4px;
      border: 1px solid #fff;
      z-index: 10;
      box-shadow: 0 2px 4px rgba(0,0,0,0.3);
      text-align: center !important; 
      line-height: 1.3 !important;   
    }

    .school-zone-sign .top-line {
      font-size: 12px !important;
      font-weight: bold !important;
      display: block;
    }

    .school-zone-sign .bottom-line {
      font-size: 14px !important;
      font-weight: 900 !important;
      display: block;
    }

    #practice-player-car {
      position: absolute;
      bottom: 5%;
      left: 65%;
      width: 22px;
      height: 40px;
      background-color: #e74c3c;
      border-radius: 5px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.4);
      z-index: 15;
      transform: translate(-50%, 0) rotate(0deg);
      transform-origin: center center;
    }
    #practice-player-car::before {
      content: "";
      position: absolute;
      top: 9px;
      left: 2px;
      width: 18px;
      height: 8px;
      background-color: #2c3e50;
      border-radius: 2px 2px 1px 1px;
    }
    #practice-player-car::after {
      content: "";
      position: absolute;
      bottom: 7px;
      left: 2px;
      width: 18px;
      height: 5px;
      background-color: #2c3e50;
      border-radius: 1px 1px 2px 2px;
    }

    .car-details { position: absolute; inset: 0; }
    .roof { position: absolute; top: 16px; left: 2px; width: 18px; height: 10px; background-color: #c0392b; }
    .lights-front::before, .lights-front::after {
      content: "";
      position: absolute;
      top: 0;
      width: 3px;
      height: 1.5px;
      background-color: #f1c40f;
    }
    .lights-front::before { left: 2px; }
    .lights-front::after { right: 2px; }
    .wheel { position: absolute; width: 2.5px; height: 7px; background-color: #facc15; border-radius: 1px; }
    .wheel.tl { top: 5px; left: -2.5px; }
    .wheel.tr { top: 5px; right: -2.5px; }
    .wheel.bl { bottom: 5px; left: -2.5px; }
    .wheel.br { bottom: 5px; right: -2.5px; }

    #practice-pedestrian {
      position: absolute;
      top: 10%;
      right: 20%;
      font-size: 34px;
      z-index: 16;
    }

    #practice-pedestrian-2 {
      position: absolute;
      top: 10%;
      right: 32%; 
      font-size: 34px;
      z-index: 16;
    }

    #practice-pedestrian-horiz {
      position: absolute;
      bottom: 44.5%;
      left: 65%;
      font-size: 34px;
      z-index: 16;
    }

    .drive-dashboard {
      background-color: #111;
      padding: 7px 10px;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      gap: 13px; /* 속도와 성공 문구 사이의 간격 (숫자로 조절 가능) */
      color: white;
      border-top: 3px solid #000;
      border-bottom: 1px solid #333;
      overflow: hidden;
      white-space: nowrap;
    }
    .drive-dashboard .speed-box {
      flex: 0 0 auto;
      font-size: clamp(11px, 3.2vw, 13px);
      font-weight: 900;
      color: #67e8f9;
      line-height: 1.25;
      white-space: nowrap;
    }

    #stop-timer { 
      flex: 1 1 auto;
      min-width: 0;
      font-size: clamp(11px, 3.4vw, 14px); 
      font-weight: 900; 
      color: #facc15; 
      line-height: 1.25;
      text-align: left; /* 오른쪽 끝이 아닌 속도 바로 옆으로 정렬 */
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-shadow: 0 0 10px #facc15; 
      animation: flash-blink 0.4s infinite alternate; 
    }

    @keyframes flash-blink {
      0% { opacity: 0.3; text-shadow: 0 0 4px #facc15; }
      100% { opacity: 1; text-shadow: 0 0 15px #facc15, 0 0 25px #facc15; }
    }

    @keyframes blink-4-times {
      0% { opacity: 0; transform: translate(-50%, 0) scale(0.9); }
      15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
      30% { opacity: 0.2; transform: translate(-50%, 0) scale(1.0); }
      45% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
      60% { opacity: 0.2; transform: translate(-50%, 0) scale(1.0); }
      75% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
      85% { opacity: 0.2; transform: translate(-50%, 0) scale(1.0); }
      95%, 100% { opacity: 1; transform: translate(-50%, 0) scale(1.0); }
    }
    .animate-blink-3 {
      animation: blink-4-times 4s ease-in-out forwards;
    }

    .tutorial {
      margin: 8px 10px;
      border-radius: 12px;
      padding: 10px;
      background: rgba(250, 204, 21, 0.12);
      border: 1px solid rgba(250, 204, 21, 0.2);
      color: #fde68a;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 800;
      word-break: keep-all;
    }

    .pedals {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      padding: 0 10px 10px;
    }

    .pedal {
      position: relative;
      min-height: 68px;
      border: 0;
      border-radius: 16px;
      color: white;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
      overflow: hidden;
      box-shadow: inset 0 -4px 0 rgba(0,0,0,0.16);
      touch-action: none;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    .pedal::before {
      content: "";
      position: absolute;
      inset: 10px auto 10px 14px;
      width: 28px;
      border-radius: 18px;
      background: rgba(255,255,255,0.16);
      box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
      transform: perspective(120px) rotateX(18deg);
    }
    .pedal::after {
      content: "";
      position: absolute;
      inset: 15px auto 15px 23px;
      width: 10px;
      border-radius: 10px;
      background: rgba(255,255,255,0.28);
      transform: perspective(120px) rotateX(18deg);
    }
    .pedal.active { transform: translateY(10px); }
    .pedal.brake { background: linear-gradient(180deg, #d24a3a, #bd3c30); }
    .pedal.accel { background: linear-gradient(180deg, #2fb463, #239451); }
    .pedal.accel.highlight-gold {
      animation: blink-gold 0.6s infinite alternate;
      box-shadow: 0 0 20px #f59e0b, inset 0 0 10px #ffffff;
      border: 2px solid #fde68a !important;
    }
    @keyframes blink-gold {
      0% { filter: brightness(1.0); transform: scale(1.0); }
      100% { filter: brightness(1.4); transform: scale(1.15); }
    }
    .pedal-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      gap: 14px;
      padding: 0 10px;
      pointer-events: none;
    }

    .pedal-capsule {
      width: 22px;
      height: 44px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.2);
      border: 2px solid rgba(255, 255, 255, 0.3);
      box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
      flex-shrink: 0;
    }

    .pedal-labels {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
    }

    /* 페달 큰 글자 (브레이크 / 엑셀) 크기 설정 */
    .pedal-title {
      font-size: 19px !important; /* 원하는 크기로 숫자 변경 가능 */
      font-weight: 900;
      color: #ffffff;
      line-height: 1.1;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }

    /* 페달 작은 글자 (길게 누르기) 크기 설정 */
    .pedal-sub {
      font-size: 13px !important; /* 원하는 크기로 숫자 변경 가능 */
      font-weight: 800;
      color: rgba(255, 255, 255, 0.9);
      line-height: 1.1;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    #countdown-overlay {
      position: absolute;
      top: 51px;
      left: 0;
      width: 100%;
      height: 350px;
      background: rgba(11, 18, 32, 0.0); 
      backdrop-filter: none; 
      -webkit-backdrop-filter: none;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 20px;
      z-index: 99;
      text-align: center;
      pointer-events: auto;
    }
    .countdown-title {
      font-size: 15px;
      font-weight: 800;
      color: #3b82f6;
      margin-bottom: 5px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .countdown-scenario-box {
      font-size: clamp(13px, 3.8vw, 16px);
      font-weight: 900;
      margin: 4px 0 8px 0 !important;
      line-height: 1.35;
      word-break: keep-all;
      background: rgba(0, 0, 0, 0.45) !important; 
      padding: 8px 12px !important;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.15);
      width: 95%;
    }
    .countdown-box-title {
      display: block;
      color: #f1c40f; 
      font-size: 19px;
      margin-bottom: 8px;
    }
    .countdown-box-detail {
      display: block;
      color: #ffffff; 
      font-size: 15px;
      font-weight: 800;
    }
  .countdown-start-btn {
      background: linear-gradient(180deg, #22c55e, #16a34a);
      color: white;
      border: 2px solid #fde68a !important;
      font-size: clamp(14px, 4vw, 17px);
      font-weight: 900;
      padding: 8px 16px !important;
      min-height: 40px !important;
      border-radius: 14px;
      cursor: pointer;
      width: 80%;
      animation: blink-gold-soft 0.7s infinite alternate !important;
      box-shadow: 0 0 16px #f59e0b, inset 0 0 8px #ffffff;
      transition: background 0.2s;
    }
    @keyframes blink-gold-soft {
      0% { filter: brightness(1.0); transform: scale(1.0); box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
      100% { filter: brightness(1.35); transform: scale(1.06); box-shadow: 0 0 24px #f59e0b, inset 0 0 10px #ffffff; }
    }
    .countdown-start-btn:active {
      transform: translateY(1px);
    }

    .modal {
      position: absolute; 
      inset: 0;
      display: none;
      justify-content: center;
      align-items: center;
      background: rgba(0,0,0,0.68);
      padding: 20px;
      z-index: 400; 
    }
    .modal.show { display: flex; }
    .modal-card {
      width: 100%;
      background: #0f1728;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 20px;
      padding: 18px;
    }
    .modal-card h3 { margin: 0 0 8px; font-size: 22px; }
    .modal-card p { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.6; }
    .result-list {
      display: grid;
      gap: 8px;
      list-style: none;
      margin: 0 0 14px;
      padding: 0;
    }
    .result-list li {
      background: #18243a;
      border-radius: 14px;
      padding: 12px;
      font-size: 14px;
      line-height: 1.55;
      color: #e6edf7;
    }
    .modal-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    #intersection-map.school-zone-mode .stripe {
      background-color: #facc15 !important;
    }

    .copyright-overlay {
      position: absolute;
      inset: 0;
      background: rgba(6, 11, 20, 0.95);
      z-index: 500; 
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }
    .copyright-card {
      width: 100%;
      background: #0f172a;
      border: 2px solid rgba(255, 255, 255, 0.15);
      border-radius: 20px;
      padding: 24px 20px;
      text-align: center;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    .copyright-title {
      font-size: 16px;
      font-weight: bold;
      color: #94a3b8;
      margin-bottom: 12px;
      letter-spacing: -0.02em;
    }
    .copyright-content {
      font-size: 14px;
      line-height: 1.6;
      color: #e2e8f0;
      margin-bottom: 24px;
      word-break: keep-all;
    }
    .copyright-highlight {
      color: #facc15;
      font-weight: 800;
      display: block;
      margin-top: 10px;
    }
    .copyright-btn {
      width: 100%;
      min-height: 50px;
      border: 0;
      border-radius: 14px;
      background: linear-gradient(180deg, #3b82f6, #2563eb);
      color: white;
      font-size: 18px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }
  