﻿html, body { margin: 0; height: 100%; overflow: hidden; background: #111; font-family: Arial, sans-serif; color: #fff; }
    *, *::before, *::after { box-sizing: border-box; }
    html, body { width: 100%; overscroll-behavior: none; }
    #game { position: fixed; inset: 0; width: var(--kc-app-width, 100vw); height: var(--kc-app-height, 100dvh); overflow: hidden; }
    #game canvas { display: block; max-width: 100%; max-height: 100%; }
    .hud { position: fixed; inset: 0; width: var(--kc-app-width, 100vw); height: var(--kc-app-height, 100dvh); overflow: hidden; pointer-events: none; }
    .glass { background: rgba(8,13,15,.76); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; box-shadow: 0 16px 44px rgba(0,0,0,.34); backdrop-filter: blur(10px); }
    .topbar { position: fixed; left: 12px; right: 12px; top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; z-index: 9; }
    .top-left, .top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .top-left { flex: 1 1 auto; }
    .top-right { flex: 0 0 auto; }
    .top-right .pill, .top-right button, .user-pill { pointer-events: auto; }
    .brand, .pill, .user-pill { height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 13px; white-space: nowrap; }
    .brand { font-size: 22px; font-weight: 800; flex: 0 0 auto; }
    .market-pill { max-width: min(34vw, 260px); overflow: hidden; text-overflow: ellipsis; }
    .user-pill { border-radius: 8px; background: rgba(8,13,15,.76); border: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 800; cursor: pointer; }
    .user-pill.logged-in { cursor: default; color: #e7ffd9; border-color: rgba(142,234,92,.24); }
    .cart-pill { cursor: pointer; }
    .leaf { width: 29px; height: 29px; border-radius: 50%; background: #78ba2d; display: grid; place-items: center; color: #111; }
    .left-panel { position: fixed; left: 10px; top: 66px; width: 270px; padding: 12px; pointer-events: auto; transition: transform .18s ease, width .18s ease; }
    .left-panel.collapsed h3, .left-panel.collapsed .row, .left-panel.collapsed .nearby-status { display: none; }
    .left-panel.collapsed { width: 210px; }
    .market-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
    .market-tab { min-height: 32px; padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 12px; }
    .market-tab.active { background: rgba(112,198,64,.28); color: #e7ffd9; }
    .panel-toggle { margin-left: auto; min-height: 32px; padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.1); }
    .vendor-panel { position: fixed; right: max(10px, env(safe-area-inset-right)); top: 66px; width: min(330px, calc(100vw - 24px)); max-height: calc(var(--kc-app-height, 100dvh) - 150px); overflow: auto; padding: 16px; pointer-events: auto; transform: translateX(370px); transition: transform .18s ease; }
    .vendor-panel.open { transform: translateX(0); }
    h3 { margin: 0 0 13px; font-size: 14px; }
    .row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 14px; }
    .row:first-of-type { border-top: 0; }
    .row small { display: block; color: #c5cec8; font-size: 11px; margin-top: 3px; }
    .nearby-status { color: #c5cec8; font-size: 12px; line-height: 1.35; margin: -4px 0 8px; }
    .pin { color: #70c640; }
    .vendor-head { display: grid; grid-template-columns: 50px 1fr; gap: 10px; align-items: center; }
    .face { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(#f1c59a,#7b4b37); border: 2px solid rgba(255,255,255,.22); }
    .muted { color: #c5cec8; font-size: 13px; }
    .status { display: inline-flex; margin: 12px 0 8px; padding: 5px 10px; border-radius: 13px; background: rgba(91,170,61,.26); color: #dff7d6; font-size: 12px; }
    .vendor-trust { display: grid; gap: 8px; margin: 10px 0 12px; }
    .trust-strip { position: fixed; left: 50%; top: 62px; transform: translateX(-50%); display: flex; gap: 8px; padding: 7px 9px; pointer-events: none; z-index: 4; }
    .trust-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 7px; background: rgba(8,13,15,.72); border: 1px solid rgba(142,234,92,.22); color: #e9ffe5; font-size: 12px; white-space: nowrap; }
    .trust-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 0 10px; }
    .trust-metric { padding: 8px; border-radius: 7px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
    .trust-metric b { display: block; color: #fff; font-size: 13px; margin-bottom: 2px; }
    .rating-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #eef6ee; }
    .stars { color: #f7c94a; letter-spacing: 0; white-space: nowrap; }
    .badge-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .vendor-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; background: rgba(112,198,64,.22); color: #e8ffe1; border: 1px solid rgba(142,234,92,.24); font-size: 12px; }
    .review-list { display: grid; gap: 6px; margin-bottom: 12px; }
    .review { padding: 8px 9px; border-radius: 7px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); font-size: 12px; line-height: 1.35; }
    .review b { display: block; color: #fff; margin-bottom: 2px; }
    button { border: 0; min-height: 40px; padding: 0 14px; border-radius: 6px; color: white; font-weight: 700; cursor: pointer; font: inherit; }
    .green { background: linear-gradient(#65b84c,#3d8d2e); }
    .orange { background: linear-gradient(#e89b2b,#be7118); }
    .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 14px; }
    .sticky-actions { position: sticky; bottom: -16px; margin: 12px -16px -16px; padding: 10px 16px 12px; background: rgba(8,13,15,.92); border-top: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .sticky-actions button { min-height: 38px; padding: 0 8px; font-size: 13px; }
    .vendor-product-list { max-height: 236px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding-right: 6px; margin-right: -6px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
    .vendor-product-list::-webkit-scrollbar { width: 6px; }
    .vendor-product-list::-webkit-scrollbar-thumb { background: rgba(142,234,92,.45); border-radius: 999px; }
    .product { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; }
    .vendor-product-list .product:first-child { border-top: 0; }
    .product strong { display: block; font-size: 14px; }
    .product-meta { margin-top: 3px; color: #c5cec8; font-size: 11px; }
    .product-price { text-align: right; font-weight: 800; color: #fff; }
    .product-price small { display: block; margin-top: 4px; color: #8fea5c; font-weight: 700; }
    .cart-remove { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(160,42,28,.82); color: #fff; font-weight: 900; cursor: pointer; }
    .thumb { width: 32px; height: 32px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
    .apple { background: radial-gradient(circle at 35% 28%, #ffb9a9, #be2119 62%, #64110d); }
    .tomato { background: radial-gradient(circle at 35% 28%, #ff9c72, #d02c1c 62%, #70120d); }
    .cuke { background: linear-gradient(135deg,#82d454,#16551b); }
    .pepper { background: linear-gradient(135deg,#97db38,#367a1b); }
    .bottom-menu { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); height: 60px; display: flex; align-items: center; gap: 20px; padding: 0 18px; pointer-events: auto; z-index: 7; }
    .menu-item { min-width: 70px; display: grid; gap: 3px; place-items: center; font-size: 12px; cursor: pointer; }
    .menu-icon { font-size: 24px; }
    .joystick { position: fixed; right: max(46px, env(safe-area-inset-right) + 14px); left: auto; bottom: max(90px, env(safe-area-inset-bottom) + 76px); width: 148px; height: 148px; border-radius: 50%; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.18); pointer-events: auto; touch-action: none; }
    .knob { position: absolute; left: 47px; top: 47px; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #fff, #bfc5ca 72%); }
    .run, .interact { display: none; }
    .ride-button {
      position: fixed;
      left: max(14px, env(safe-area-inset-left) + 12px);
      right: auto;
      bottom: max(14px, env(safe-area-inset-bottom) + 12px);
      min-width: 168px;
      min-height: 54px;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 10px;
      padding: 7px 14px 7px 8px;
      pointer-events: auto;
      z-index: 10006;
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 18px;
      color: #fff;
      background:
        radial-gradient(circle at 20% 12%, rgba(255,255,255,.28), transparent 28%),
        linear-gradient(135deg, rgba(180,20,28,.96), rgba(37,12,15,.94));
      box-shadow: 0 16px 42px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.06) inset;
      backdrop-filter: blur(12px);
      transform: translateZ(0);
      transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
    }

    .stall-view-button {
      position: fixed;
      left: 50%;
      bottom: max(86px, env(safe-area-inset-bottom) + 78px);
      transform: translateX(-50%);
      min-width: 138px;
      min-height: 46px;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 0 16px;
      pointer-events: auto;
      z-index: 10005;
      border: 1px solid rgba(255,255,255,.2);
      border-radius: 14px;
      color: #fff;
      background: linear-gradient(135deg, rgba(39,132,86,.96), rgba(12,42,32,.94));
      box-shadow: 0 14px 36px rgba(0,0,0,.36), 0 0 0 1px rgba(255,255,255,.07) inset;
      backdrop-filter: blur(12px);
      font-weight: 900;
      font-size: 14px;
      line-height: 1;
      white-space: nowrap;
      touch-action: manipulation;
      user-select: none;
    }
    .stall-view-button.visible {
      display: inline-flex;
    }
    .stall-view-button:active {
      transform: translateX(-50%) translateY(1px) scale(.99);
    }

    .ride-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 20px 52px rgba(0,0,0,.44), 0 0 0 1px rgba(255,255,255,.08) inset;
    }
    .ride-button:active {
      transform: translateY(1px) scale(.99);
    }
    .ride-button * {
      pointer-events: none;
    }
    .ride-button-icon {
      width: 38px;
      height: 38px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      background: rgba(255,255,255,.16);
      box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset;
      font-size: 20px;
    }
    .ride-button-copy {
      display: grid;
      gap: 1px;
      text-align: left;
      line-height: 1.05;
    }
    .ride-button-copy b {
      font-size: 14px;
      font-weight: 950;
      letter-spacing: .1px;
      white-space: nowrap;
    }
    .ride-button-copy small {
      color: rgba(255,255,255,.72);
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }
    .ride-button.standby {
      opacity: .88;
      background:
        radial-gradient(circle at 20% 12%, rgba(255,255,255,.22), transparent 28%),
        linear-gradient(135deg, rgba(38,51,57,.92), rgba(10,17,20,.90));
    }
    .ride-button.scooter-mode {
      background:
        radial-gradient(circle at 20% 12%, rgba(255,255,255,.26), transparent 28%),
        linear-gradient(135deg, rgba(17,132,111,.96), rgba(9,45,42,.94));
    }
    .ride-button.exit {
      background:
        radial-gradient(circle at 20% 12%, rgba(255,255,255,.28), transparent 28%),
        linear-gradient(135deg, rgba(232,155,43,.98), rgba(133,56,20,.94));
      color: #fff8ea;
    }
    .car-hud { position: fixed; left: 50%; bottom: max(84px, env(safe-area-inset-bottom) + 78px); transform: translateX(-50%); width: min(238px, calc(100vw - 230px)); min-width: 188px; display: none; gap: 7px; padding: 10px 12px; pointer-events: none; z-index: 8; }
    .car-hud.visible { display: grid; }
    .car-hud.warn { border-color: rgba(255,184,74,.55); box-shadow: 0 0 24px rgba(255,184,74,.18), 0 16px 44px rgba(0,0,0,.34); }
    .car-speed-row { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
    .car-speed { font-size: 28px; line-height: .9; font-weight: 900; letter-spacing: .5px; }
    .car-speed small { font-size: 10px; opacity: .7; margin-left: 3px; font-weight: 700; }
    .car-gear { font-size: 18px; font-weight: 900; color: #8fea5c; min-width: 28px; text-align: right; }
    .car-rev { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); }
    .car-rev i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, #65b84c, #ffb84a 72%, #ff4e35); transition: transform .08s linear; }
    .car-mini { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: rgba(255,255,255,.72); }
    .car-heat { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); }
    .car-heat i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, #4fd2ff, #ffb84a 68%, #ff3b2f); transition: transform .12s linear; }
    .car-tune { display: none; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; pointer-events: auto; }
    .car-hud.tune .car-tune { display: grid; }
    .car-tune button { min-height: 24px; border-radius: 6px; padding: 0; border: 1px solid rgba(255,255,255,.14); background: rgba(8,13,15,.72); color: #eef7e6; font-size: 11px; font-weight: 800; }
    .car-tune .paint { font-size: 0; }
    .car-tune .paint.red { background: #b9151b; }
    .car-tune .paint.black { background: #050506; }
    .car-tune .paint.blue { background: #123f74; }
    .car-tune .paint.silver { background: #c7c9c4; }
    @media (max-width: 900px) {
      .car-hud { left: auto; right: 108px; transform: none; width: 174px; min-width: 0; bottom: max(84px, env(safe-area-inset-bottom) + 78px); padding: 9px 10px; }
      .car-speed { font-size: 23px; }
    }
    .look { position: fixed; right: 0; top: 0; width: 48vw; height: var(--kc-app-height, 100dvh); pointer-events: auto; touch-action: none; }
    .stack { position: fixed; right: 14px; bottom: 182px; width: min(380px, calc(100vw - 28px)); max-height: min(42dvh, 420px); overflow: auto; display: none; grid-template-columns: 1fr; gap: 8px; pointer-events: auto; z-index: 8; }
    .stack.open { display: grid; }
    .stack-close { position: sticky; top: 0; justify-self: end; z-index: 2; border: 1px solid rgba(255,255,255,.18); background: rgba(8,13,15,.88); color: #fff; border-radius: 8px; padding: 8px 12px; font-weight: 700; }
    .card { padding: 14px; min-height: 0; position: relative; }
    .card h2 { margin: 0 0 9px; font-size: 20px; }
    .product-photo { height: 72px; border-radius: 8px; background: radial-gradient(circle at 32% 30%, #ffc0b5, #c7251d 60%, #6d110d); margin-bottom: 8px; }
    .product-photo.apple { background: radial-gradient(circle at 32% 30%, #ffc0b5, #c7251d 60%, #6d110d); }
    .product-photo.tomato { background: radial-gradient(circle at 32% 30%, #ff9c72, #d02c1c 62%, #70120d); }
    .product-photo.cuke { background: linear-gradient(135deg,#82d454,#16551b); }
    .product-photo.pepper { background: linear-gradient(135deg,#97db38,#367a1b); }
    .tag { display: inline-block; padding: 4px 7px; border-radius: 6px; background: #b7deb0; color: #163814; font-size: 12px; margin-right: 4px; }
    .price { font-size: 22px; font-weight: 800; margin: 7px 0; }
    .chat { display: grid; gap: 8px; }
    .bubble { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.09); width: fit-content; }
    .me { margin-left: auto; background: #a8cceb; color: #101b22; }
    .toast { position: fixed; left: 50%; top: 62px; transform: translateX(-50%); min-width: 330px; text-align: center; padding: 12px 16px; opacity: 0; transition: opacity .16s ease; pointer-events: none; }
    .toast.show { opacity: 1; }
    .sound-toggle { pointer-events: auto; min-height: 40px; border-radius: 8px; background: rgba(8,13,15,.76); border: 1px solid rgba(255,255,255,.12); }
    .sound-toggle.on { background: linear-gradient(#65b84c,#3d8d2e); }
    .kc-city-map-overlay { position: fixed; inset: 0; z-index: 9998; display: none; align-items: center; justify-content: center; padding: 16px; pointer-events: auto; background: rgba(4, 8, 10, .78); backdrop-filter: blur(10px); }
    .kc-city-map-overlay.open { display: flex; }
    .kc-city-map-shell { width: min(1180px, calc(100vw - 24px)); height: min(86dvh, var(--kc-app-height, 820px), 820px); display: grid; grid-template-columns: minmax(0, 1fr) 318px; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border-radius: 8px; background: rgba(9, 15, 18, .96); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 78px rgba(0,0,0,.52); }
    .kc-city-map-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
    .kc-city-map-title { min-width: 0; }
    .kc-city-map-title b { display: block; font-size: 17px; }
    .kc-city-map-title span { display: block; margin-top: 3px; color: #c7d2ca; font-size: 12px; }
    .kc-city-map-head button { min-height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); border-radius: 6px; }
    .kc-city-map-stage { min-width: 0; min-height: 0; overflow: auto; background: #10171a; overscroll-behavior: contain; }
    .kc-city-map-stage svg { display: block; width: 100%; max-width: none; min-width: 780px; height: auto; background: linear-gradient(180deg, #162125, #0f171a); transform-origin: 0 0; }
    .kc-map-shape { vector-effect: non-scaling-stroke; cursor: pointer; transition: opacity .12s ease, stroke-width .12s ease; }
    .kc-map-shape.dimmed { opacity: .08; }
    .kc-map-shape.selected { stroke: #ffffff; stroke-width: 3; opacity: 1; }
    .kc-map-label { pointer-events: none; fill: #f7fbf4; font-size: 9px; font-weight: 900; paint-order: stroke; stroke: rgba(0,0,0,.7); stroke-width: 2.3px; letter-spacing: 0; }
    .kc-city-map-side { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); border-left: 1px solid rgba(255,255,255,.1); background: rgba(7, 12, 14, .82); }
    .kc-city-map-controls { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .kc-city-map-controls button { min-height: 30px; padding: 0 9px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 12px; }
    .kc-city-map-controls button.active { background: rgba(112,198,64,.3); border-color: rgba(142,234,92,.34); color: #e9ffe2; }
    .kc-city-map-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); color: #d9e3dc; font-size: 11px; }
    .kc-city-map-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
    .kc-city-map-legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; border: 1px solid rgba(255,255,255,.18); }
    .kc-city-map-list { overflow: auto; padding: 8px 12px 12px; }
    .kc-city-map-list h4 { margin: 10px 0 6px; font-size: 11px; color: #8fea5c; letter-spacing: 0; text-transform: uppercase; }
    .kc-map-row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: start; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.07); cursor: pointer; }
    .kc-map-row:first-child { border-top: 0; }
    .kc-map-row code { color: #fff; font-weight: 900; font-size: 11px; }
    .kc-map-row b { display: block; font-size: 12px; line-height: 1.25; }
    .kc-map-row small { display: block; margin-top: 2px; color: #aeb9b2; font-size: 10px; line-height: 1.25; }
    .kc-map-row.hidden { display: none; }
    .kc-map-row.selected b { color: #8fea5c; }
    @media (max-width: 900px) {
      .topbar { left: 8px; right: 8px; top: 6px; gap: 6px; }
      .top-left, .top-right { gap: 6px; }
      .brand, .pill, .user-pill, .sound-toggle { height: 38px; min-height: 38px; padding: 0 9px; border-radius: 8px; }
      .brand { font-size: 18px; max-width: 168px; }
      .leaf { width: 26px; height: 26px; }
      .market-pill { max-width: 128px; font-size: 13px; }
      .sound-toggle { font-size: 12px; max-width: 68px; }
      .cart-pill { font-size: 12px; }
      .user-pill { max-width: 96px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
      .left-panel { width: 238px; }
      .vendor-panel { width: 260px; }
      .trust-strip { display: none; }
      .stack { left: auto; right: 10px; bottom: 172px; width: min(340px, calc(100vw - 20px)); max-height: min(34dvh, 320px); }
      .kc-city-map-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) 260px; height: min(90dvh, var(--kc-app-height, 860px), 860px); }
      .kc-city-map-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
      .kc-city-map-stage svg { min-width: 720px; }
    }

    @media (max-width: 720px), (pointer: coarse) {
      html, body {
        position: fixed;
        inset: 0;
        height: var(--kc-app-height, 100dvh);
        min-width: 0;
        touch-action: none;
      }
      #game,
      .hud,
      #kcLoadScreen {
        width: var(--kc-app-width, 100vw);
        height: var(--kc-app-height, 100dvh);
        max-width: 100vw;
        max-height: 100dvh;
      }
      .topbar {
        left: max(6px, env(safe-area-inset-left) + 6px);
        right: max(6px, env(safe-area-inset-right) + 6px);
        top: max(6px, env(safe-area-inset-top) + 4px);
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 6px;
      }
      .top-left,
      .top-right {
        min-width: 0;
        gap: 5px;
      }
      .top-left {
        overflow: hidden;
      }
      .top-right {
        justify-content: flex-end;
        max-width: min(188px, 54vw);
        overflow: hidden;
      }
      .brand,
      .pill,
      .user-pill,
      .sound-toggle {
        height: 34px;
        min-height: 34px;
        padding: 0 7px;
      }
      .brand {
        max-width: 120px;
        min-width: 0;
        gap: 6px;
        overflow: hidden;
        font-size: 15px;
      }
      .leaf {
        width: 24px;
        height: 24px;
        flex: 0 0 auto;
      }
      #marketNamePill {
        display: none;
      }
      #soundToggle {
        width: 40px;
        flex: 0 0 40px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
      }
      #soundToggle::before {
        content: 'Ses';
        font-size: 11px;
      }
      #cartTopPill {
        width: 58px;
        flex: 0 0 58px;
        justify-content: center;
        gap: 4px;
        font-size: 11px;
      }
      #userTopPill {
        max-width: 78px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 11px;
      }
      .left-panel {
        left: max(8px, env(safe-area-inset-left) + 6px);
        top: max(48px, env(safe-area-inset-top) + 46px);
        width: min(214px, calc(100vw - 16px));
        padding: 10px;
      }
      .left-panel.collapsed {
        width: min(202px, calc(100vw - 16px));
      }
    }

  
    /* KC_PAZAR_COMMERCE_PANEL_V1 */
    .kc-commerce-note {
      margin: 10px 0 12px;
      padding: 11px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(142,234,92,.15), rgba(255,184,74,.10));
      border: 1px solid rgba(255,255,255,.13);
      color: rgba(255,255,255,.86);
      font-size: 12px;
      line-height: 1.42;
    }
    .kc-commerce-note b {
      color: #9eea59;
    }
    .kc-safe-strip,
    .kc-detail-safe-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 9px 0 10px;
    }
    .kc-safe-strip span,
    .kc-detail-safe-strip span {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-height: 24px;
      padding: 0 8px;
      border-radius: 999px;
      background: rgba(255,255,255,.08);
      border: 1px solid rgba(255,255,255,.12);
      color: rgba(255,255,255,.80);
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
    }
    .product.kc-product-line {
      grid-template-columns: 40px 1fr auto;
      padding: 11px 0;
    }
    .product.kc-product-line:hover {
      background: rgba(255,255,255,.045);
      margin-left: -8px;
      margin-right: -8px;
      padding-left: 8px;
      padding-right: 8px;
      border-radius: 14px;
    }
    .kc-product-mini-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 5px;
    }
    .kc-product-mini-badges em {
      font-style: normal;
      border-radius: 999px;
      padding: 2px 6px;
      background: rgba(142,234,92,.12);
      border: 1px solid rgba(142,234,92,.20);
      color: #dfffd4;
      font-size: 10px;
      font-weight: 800;
    }
    .kc-price-action {
      text-align: right;
      min-width: 92px;
    }
    .kc-price-action b {
      display: block;
      color: #fff;
      font-size: 13px;
    }
    .kc-price-action small {
      display: inline-flex;
      margin-top: 5px;
      color: #16210e;
      background: #9eea59;
      border-radius: 999px;
      padding: 3px 7px;
      font-weight: 900;
      font-size: 10px;
    }
    .kc-product-media-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 4px;
      margin-top: 6px;
    }
    .kc-product-media-actions button {
      min-height: 22px;
      border: 0;
      border-radius: 999px;
      padding: 3px 7px;
      background: rgba(255,255,255,.13);
      color: #fff;
      font-size: 10px;
      font-weight: 900;
      cursor: pointer;
    }
    .kc-media-viewer {
      position: fixed;
      inset: 0;
      z-index: 10020;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(0,0,0,.72);
    }
    .kc-media-viewer.open { display: flex; }
    .kc-media-card {
      width: min(860px, 94vw);
      max-height: min(90dvh, var(--kc-app-height, 720px));
      border-radius: 18px;
      padding: 16px;
      background: rgba(11,28,18,.96);
      border: 1px solid rgba(255,255,255,.16);
      box-shadow: 0 24px 70px rgba(0,0,0,.45);
    }
    .kc-media-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
      color: #fff;
      font-weight: 900;
    }
    .kc-media-head button {
      border: 0;
      border-radius: 999px;
      padding: 8px 12px;
      background: rgba(255,255,255,.12);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }
    .kc-media-body img,
    .kc-media-body video {
      width: 100%;
      max-height: min(72dvh, calc(var(--kc-app-height, 720px) - 150px));
      object-fit: contain;
      border-radius: 12px;
      background: #06100a;
    }
    .kc-detail-media-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 10px 0 12px;
    }
    .kc-detail-media-actions button {
      min-height: 32px;
      border: 0;
      border-radius: 999px;
      padding: 7px 12px;
      background: #9eea59;
      color: #14210d;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }
    .kc-detail-media-actions button.secondary {
      background: rgba(255,255,255,.14);
      color: #fff;
    }
    .kc-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin: 12px 0;
    }
    .kc-detail-box {
      padding: 10px;
      border-radius: 14px;
      background: rgba(255,255,255,.07);
      border: 1px solid rgba(255,255,255,.10);
    }
    .kc-detail-box b {
      display: block;
      color: #fff;
      font-size: 13px;
      margin-bottom: 3px;
    }
    .kc-detail-box span {
      color: rgba(255,255,255,.70);
      font-size: 11px;
      line-height: 1.35;
    }
    .kc-detail-assurance {
      margin: 10px 0;
      padding: 10px;
      border-radius: 14px;
      background: rgba(142,234,92,.10);
      border: 1px solid rgba(142,234,92,.18);
      color: rgba(255,255,255,.82);
      font-size: 12px;
      line-height: 1.45;
    }
    .kc-detail-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 10px;
    }
    .kc-detail-actions button {
      width: 100%;
    }
    @media (max-width: 720px) {
      .kc-detail-grid { grid-template-columns: 1fr; }
      .kc-detail-actions { grid-template-columns: 1fr; }
    }

  
    @media (max-width:720px) {
      .ride-button {
        left: max(10px, env(safe-area-inset-left) + 10px);
        right: auto;
        bottom: max(12px, env(safe-area-inset-bottom) + 10px);
        min-width: 146px;
        min-height: 50px;
        border-radius: 16px;
        padding-right: 11px;
      }

      .stall-view-button {
        bottom: max(76px, env(safe-area-inset-bottom) + 68px);
        min-width: 126px;
        min-height: 42px;
        max-width: calc(100vw - 220px);
        padding: 0 12px;
        font-size: 13px;
      }
      .ride-button-icon {
        width: 34px;
        height: 34px;
        border-radius: 12px;
      }
      .ride-button-copy b {
        font-size: 13px;
      }
    }
    #kcLoadScreen {
      position:fixed;inset:0;z-index:99999;background:#000;overflow:hidden;
      font-family:'Segoe UI',system-ui,sans-serif;
      transition:opacity .7s ease,visibility .7s ease;
    }
    #kcLoadScreen.fade-out{opacity:0;visibility:hidden}
    #kcLoadScreen.gone{display:none}
    #kcLoadScreen .kc-bg-video{position:absolute;inset:0;background:radial-gradient(ellipse 80% 60% at 50% 40%,rgba(10,40,18,.95) 0%,#000 100%)}
    #kcLoadScreen .kc-rays{position:absolute;inset:0;overflow:hidden;opacity:0;animation:kcRaysIn 2s 1.5s ease forwards}
    @keyframes kcRaysIn{to{opacity:1}}
    #kcLoadScreen .kc-ray{position:absolute;top:50%;left:50%;width:1px;height:350px;transform-origin:top center;background:linear-gradient(to bottom,rgba(92,186,58,.12),transparent)}
    #kcLoadScreen .kc-grain{position:absolute;inset:0;opacity:.035;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");animation:kcGrainA .15s steps(1) infinite}
    @keyframes kcGrainA{0%{transform:translate(0,0)}25%{transform:translate(-2%,-1%)}50%{transform:translate(1%,2%)}75%{transform:translate(-1%,1%)}100%{transform:translate(2%,-2%)}}
    #kcLoadScreen .kc-band-top,#kcLoadScreen .kc-band-bot{position:absolute;left:0;right:0;height:56px;background:#000;z-index:10}
    #kcLoadScreen .kc-band-top{top:0;transform:translateY(-100%);animation:kcBandIn .9s .1s cubic-bezier(.16,1,.3,1) forwards}
    #kcLoadScreen .kc-band-bot{bottom:0;transform:translateY(100%);animation:kcBandIn .9s .1s cubic-bezier(.16,1,.3,1) forwards}
    @keyframes kcBandIn{to{transform:translateY(0)}}
    #kcLoadScreen .kc-vig{position:absolute;inset:0;background:radial-gradient(ellipse 75% 75% at 50% 50%,transparent 45%,rgba(0,0,0,.75) 100%);pointer-events:none;z-index:4}
    #kcLoadScreen .kc-main{position:absolute;inset:56px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:5}
    #kcLoadScreen .kc-logo-scene{position:relative;width:220px;height:150px;display:flex;align-items:center;justify-content:center;margin-bottom:4px;opacity:0;animation:kcLogoReveal 1.4s 1s cubic-bezier(.16,1,.3,1) forwards}
    @keyframes kcLogoReveal{from{opacity:0;transform:scale(.5) translateY(40px)}to{opacity:1;transform:scale(1) translateY(0)}}
    #kcLoadScreen .kc-ring{position:absolute;border-radius:50%;border:1px solid rgba(92,186,58,.18);animation:kcRingOut 3.5s ease-out infinite}
    #kcLoadScreen .kc-ring1{width:110px;height:110px;animation-delay:2.2s}
    #kcLoadScreen .kc-ring2{width:150px;height:150px;animation-delay:2.6s;border-color:rgba(92,186,58,.1)}
    #kcLoadScreen .kc-ring3{width:200px;height:200px;animation-delay:3s;border-color:rgba(92,186,58,.05)}
    @keyframes kcRingOut{0%{transform:scale(.6);opacity:0}20%{opacity:1}100%{transform:scale(1.6);opacity:0}}
    #kcLoadScreen .kc-hex{width:88px;height:88px;position:relative;clip-path:polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);background:linear-gradient(145deg,#163c22,#2d7a44);display:flex;align-items:center;justify-content:center}
    #kcLoadScreen .kc-hex::before{content:'';position:absolute;inset:0;clip-path:polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);background:linear-gradient(145deg,rgba(255,255,255,.15),transparent);z-index:1}
    #kcLoadScreen .kc-hex-k{font-size:42px;font-weight:900;color:#fff;text-shadow:0 0 30px rgba(92,186,58,.9);z-index:2;position:relative}
    #kcLoadScreen .kc-hex-glow{position:absolute;width:110px;height:110px;clip-path:polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);background:rgba(92,186,58,.1);animation:kcHglow 2.5s ease-in-out infinite 2.5s;opacity:0}
    @keyframes kcHglow{0%,100%{opacity:0;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}
    #kcLoadScreen .kc-domain{font-size:11px;font-weight:700;color:rgba(92,186,58,.75);letter-spacing:5px;text-transform:uppercase;opacity:0;animation:kcFadeUp .7s 1.9s forwards;margin-bottom:8px}
    @keyframes kcFadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
    #kcLoadScreen .kc-title-wrap{text-align:center;opacity:0;animation:kcFadeUp .8s 2.1s forwards;margin-bottom:4px}
    #kcLoadScreen .kc-title-main{font-size:28px;font-weight:900;color:#fff;letter-spacing:3px;text-transform:uppercase;line-height:1.1;text-shadow:0 2px 40px rgba(0,0,0,.8)}
    #kcLoadScreen .kc-title-sub{font-size:13px;font-weight:400;color:rgba(255,255,255,.4);letter-spacing:8px;text-transform:uppercase;margin-top:6px}
    #kcLoadScreen .kc-sep{display:flex;align-items:center;gap:12px;opacity:0;animation:kcFadeUp .5s 2.5s forwards;margin:18px 0}
    #kcLoadScreen .kc-sep-line{height:1px;width:120px;background:linear-gradient(90deg,transparent,rgba(92,186,58,.5),transparent)}
    #kcLoadScreen .kc-sep-dot{width:4px;height:4px;border-radius:50%;background:rgba(92,186,58,.6)}
    #kcLoadScreen .kc-prog-wrap{width:320px;opacity:0;animation:kcFadeUp .5s 2.7s forwards;margin-bottom:6px}
    #kcLoadScreen .kc-prog-track{height:2px;background:rgba(255,255,255,.07);position:relative;overflow:visible;margin-bottom:14px}
    #kcLoadScreen .kc-prog-fill{height:100%;width:0%;background:linear-gradient(90deg,rgba(92,186,58,.4),#5cba3a,rgba(92,186,58,.4));transition:width .5s ease;position:relative;background-size:200%;animation:kcProgShimmer 2s linear infinite}
    @keyframes kcProgShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
    #kcLoadScreen .kc-prog-fill::after{content:'';position:absolute;right:-4px;top:-5px;width:12px;height:12px;border-radius:50%;background:#5cba3a;box-shadow:0 0 14px rgba(92,186,58,1),0 0 4px #fff}
    #kcLoadScreen .kc-prog-info{display:flex;justify-content:space-between;align-items:center}
    #kcLoadScreen .kc-prog-status{font-size:9px;color:rgba(255,255,255,.25);letter-spacing:3px;text-transform:uppercase}
    #kcLoadScreen .kc-prog-pct{font-size:11px;color:#5cba3a;font-weight:700;letter-spacing:1px}
    #kcLoadScreen .kc-tip{width:320px;border-left:1.5px solid rgba(92,186,58,.4);padding:10px 18px;opacity:0;animation:kcFadeUp .5s 3s forwards;margin-top:20px}
    #kcLoadScreen .kc-tip-label{font-size:8px;color:rgba(92,186,58,.55);letter-spacing:4px;text-transform:uppercase;margin-bottom:5px}
    #kcLoadScreen .kc-tip-text{font-size:12px;color:rgba(255,255,255,.42);line-height:1.65;transition:opacity .3s}
    #kcLoadScreen .kc-bottom{position:absolute;bottom:0;left:0;right:0;height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;z-index:10;opacity:0;animation:kcFadeUp .5s 2.8s forwards;border-top:1px solid rgba(255,255,255,.04)}
    #kcLoadScreen .kc-b-txt{font-size:8px;color:rgba(255,255,255,.18);letter-spacing:3px;text-transform:uppercase}
    #kcLoadScreen .kc-b-dots{display:flex;gap:5px;align-items:center}
    #kcLoadScreen .kc-bd{width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.1);transition:all .4s}
    #kcLoadScreen .kc-bd.on{background:#5cba3a;box-shadow:0 0 6px rgba(92,186,58,.6)}
    #kcLoadScreen .kc-bd.act{background:rgba(92,186,58,.5);animation:kcBdpulse .9s ease-in-out infinite}
    @keyframes kcBdpulse{0%,100%{transform:scale(1)}50%{transform:scale(1.6)}}
    /* Eski stiller — kcLoad controller hala bunlari kullaniyor */
    .kc-load-steps{display:none}

    @media (max-width: 720px), (pointer: coarse) {
      #kcLoadScreen {
        inset: 0 auto auto 0;
      }
      #kcLoadScreen .kc-band-top,
      #kcLoadScreen .kc-band-bot {
        height: max(44px, env(safe-area-inset-top));
      }
      #kcLoadScreen .kc-main {
        inset: max(44px, env(safe-area-inset-top)) 12px max(44px, env(safe-area-inset-bottom));
        justify-content: center;
      }
      #kcLoadScreen .kc-logo-scene {
        width: min(180px, 56vw);
        height: min(118px, 30dvh);
        margin-bottom: 2px;
      }
      #kcLoadScreen .kc-ring1 { width: 88px; height: 88px; }
      #kcLoadScreen .kc-ring2 { width: 122px; height: 122px; }
      #kcLoadScreen .kc-ring3 { width: 158px; height: 158px; }
      #kcLoadScreen .kc-hex {
        width: 74px;
        height: 74px;
      }
      #kcLoadScreen .kc-hex-k {
        font-size: 34px;
      }
      #kcLoadScreen .kc-domain {
        letter-spacing: 3px;
        font-size: 10px;
      }
      #kcLoadScreen .kc-title-main {
        font-size: clamp(20px, 6vw, 25px);
        letter-spacing: 1px;
      }
      #kcLoadScreen .kc-title-sub {
        font-size: 11px;
        letter-spacing: 3px;
      }
      #kcLoadScreen .kc-sep {
        margin: 12px 0;
      }
      #kcLoadScreen .kc-sep-line {
        width: min(82px, 24vw);
      }
      #kcLoadScreen .kc-prog-wrap,
      #kcLoadScreen .kc-tip {
        width: min(320px, calc(100vw - 40px));
      }
      #kcLoadScreen .kc-tip {
        padding: 9px 12px;
        margin-top: 14px;
      }
      #kcLoadScreen .kc-prog-status {
        max-width: calc(100vw - 96px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        letter-spacing: 1px;
      }
      #kcLoadScreen .kc-bottom {
        height: max(44px, env(safe-area-inset-bottom) + 34px);
        padding: 0 max(14px, env(safe-area-inset-left) + 10px);
      }
      #kcLoadScreen .kc-b-txt {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        letter-spacing: 1px;
      }
    }


    /* KC_MOBILE_PLAY_MODE_V1 */
    @media (max-width:720px), (pointer: coarse) {
      .kc-mobile-play-mode .vendor-panel {
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 0;
        width: auto;
        max-height: min(58dvh, var(--kc-app-height, 520px), 520px);
        padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
        border-radius: 16px 16px 0 0;
        transform: translateY(calc(100% + 24px));
        z-index: 10004;
      }
      .kc-mobile-play-mode .vendor-panel.open {
        transform: translateY(0);
      }
      .kc-mobile-play-mode .vendor-product-list {
        max-height: min(28dvh, 260px);
      }
      .kc-mobile-play-mode .sticky-actions {
        grid-template-columns: 1fr;
        bottom: calc(-14px - env(safe-area-inset-bottom));
      }
      .kc-mobile-play-mode .stack {
        left: 10px;
        right: 10px;
        bottom: 0;
        width: auto;
        max-height: min(68dvh, var(--kc-app-height, 560px), 560px);
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 16px 16px 0 0;
        z-index: 10007;
      }
      .kc-mobile-play-mode .stack.open {
        display: grid;
      }
      .kc-mobile-play-mode .stack-close {
        min-height: 42px;
        padding: 0 14px;
      }
      .kc-mobile-play-mode .bottom-menu {
        height: 52px;
        width: min(312px, calc(100vw - 20px));
        gap: 8px;
        padding: 0 10px;
        max-width: calc(100vw - 20px);
        overflow-x: auto;
        scrollbar-width: none;
      }
      .kc-mobile-play-mode .bottom-menu::-webkit-scrollbar {
        display: none;
      }
      .kc-mobile-play-mode .menu-item {
        min-width: 52px;
        font-size: 10px;
      }
      .kc-mobile-play-mode .menu-icon {
        font-size: 20px;
      }
      .kc-mobile-play-mode .joystick {
        width: 126px;
        height: 126px;
        right: max(18px, env(safe-area-inset-right) + 12px);
        bottom: max(82px, env(safe-area-inset-bottom) + 70px);
      }
      .kc-mobile-play-mode .knob {
        left: 40px;
        top: 40px;
        width: 46px;
        height: 46px;
      }
      .kc-mobile-play-mode .ride-button {
        min-width: 136px;
        min-height: 48px;
        bottom: max(68px, env(safe-area-inset-bottom) + 62px);
      }
      .kc-mobile-play-mode .ride-button-copy small {
        display: none;
      }
      .kc-mobile-play-mode .stall-view-button {
        bottom: max(122px, env(safe-area-inset-bottom) + 112px);
        max-width: calc(100vw - 190px);
      }
      .kc-mobile-play-mode .toast {
        top: 54px;
        min-width: 0;
        width: calc(100vw - 24px);
        padding: 10px 12px;
      }
    }



/* KC_GAME_INLINE_AUTH_MODAL_V1 */
.kc-game-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  pointer-events: auto;
  background: rgba(3, 9, 7, .62);
  backdrop-filter: blur(12px);
}
.kc-game-auth-overlay.open { display: flex; }
.kc-game-auth-card {
  width: min(430px, calc(100vw - 28px));
  max-height: min(88dvh, var(--kc-app-height, 720px), 720px);
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: rgba(9, 18, 15, .94);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 28px 90px rgba(0,0,0,.58);
}
.kc-game-auth-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}
.kc-game-auth-head b {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}
.kc-game-auth-head span {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.35;
}
.kc-game-auth-close {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 22px;
}
.kc-game-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.kc-game-auth-tabs button {
  min-height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.kc-game-auth-tabs button.active {
  background: linear-gradient(#65b84c,#3d8d2e);
  color: #fff;
}
.kc-game-auth-form {
  display: none;
  gap: 10px;
}
.kc-game-auth-form.active { display: grid; }
.kc-game-auth-form label {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 800;
}
.kc-game-auth-form input,
.kc-game-auth-form select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.09);
  color: #fff;
  padding: 0 12px;
  font: inherit;
}
.kc-game-auth-form select option { color: #111; }
.kc-game-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kc-game-auth-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  font-size: 13px !important;
}
.kc-game-auth-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
}
.kc-game-auth-primary {
  margin-top: 4px;
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(#65b84c,#3d8d2e);
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
}
.kc-game-auth-status {
  min-height: 18px;
  margin-top: 12px;
  color: #ffd28a;
  font-size: 13px;
  line-height: 1.35;
}
.kc-game-auth-status.good { color: #9dff87; }
@media (max-width:720px) {
  .kc-game-auth-overlay {
    align-items: end;
    padding: 0;
  }
  .kc-game-auth-card {
    width: 100%;
    max-height: min(86dvh, var(--kc-app-height, 720px));
    border-radius: 18px 18px 0 0;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  }
  .kc-game-auth-grid {
    grid-template-columns: 1fr;
  }
}
/* /KC_GAME_INLINE_AUTH_MODAL_V1 */



/* KC_GAME_SETTINGS_UI_V1 */
.kc-settings-popover {
  position: fixed;
  left: 50%;
  bottom: max(78px, env(safe-area-inset-bottom) + 72px);
  transform: translateX(-50%);
  z-index: 10030;
  display: none;
  min-width: 220px;
  padding: 8px;
  pointer-events: auto;
}
.kc-settings-popover.open {
  display: grid;
  gap: 6px;
}
.kc-settings-popover button {
  min-height: 38px;
  justify-content: flex-start;
  text-align: left;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}
.kc-settings-popover button.danger {
  background: rgba(160,42,28,.84);
}
.kc-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  pointer-events: auto;
  background: rgba(3, 8, 7, .62);
  backdrop-filter: blur(10px);
}
.kc-settings-overlay.open { display: flex; }
.kc-settings-panel {
  width: min(520px, calc(100vw - 28px));
  max-height: min(86dvh, var(--kc-app-height, 760px), 760px);
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
}
.kc-settings-panel header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.kc-settings-panel header b {
  display: block;
  font-size: 18px;
}
.kc-settings-panel header span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
}
.kc-settings-panel header button {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
}
.kc-settings-form {
  display: grid;
  gap: 10px;
}
.kc-settings-field {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 800;
}
.kc-settings-field input,
.kc-settings-field textarea {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 0 12px;
  font: inherit;
}
.kc-settings-field textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}
.kc-settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.kc-settings-status {
  min-height: 18px;
  color: #ffd28a;
  font-size: 13px;
}
.kc-settings-status.good {
  color: #9dff87;
}
.kc-settings-list {
  display: grid;
  gap: 8px;
}
.kc-settings-row,
.kc-settings-empty {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}
.kc-settings-row b,
.kc-settings-row span,
.kc-settings-row small,
.kc-settings-row strong {
  display: block;
}
.kc-settings-row span,
.kc-settings-row small {
  color: rgba(255,255,255,.72);
  margin-top: 3px;
}
@media (max-width:720px) {
  .kc-settings-popover {
    left: auto;
    right: 10px;
    bottom: max(68px, env(safe-area-inset-bottom) + 60px);
    transform: none;
    max-width: calc(100vw - 20px);
  }
  .kc-settings-overlay {
    align-items: end;
    padding: 0;
  }
  .kc-settings-panel {
    width: 100%;
    max-height: min(82dvh, var(--kc-app-height, 760px));
    border-radius: 18px 18px 0 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
/* /KC_GAME_SETTINGS_UI_V1 */
