.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #8a72d6; text-align: left; padding: 0 2px; min-width: 0; }
.brand-text { font-weight: 1000; font-size: 20px; line-height: .92; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(255,255,255,.86); }
.main-nav { display: flex; align-items: center; gap: 4px; justify-content: flex-start; min-width: 0; }
.nav-item { border: 0; background: transparent; color: #9a93ad; font-weight: 700; padding: 9px 15px; border-radius: 14px; display: flex; align-items: center; gap: 7px; transition: .16s; white-space: nowrap; font-size: 15px; }
.nav-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; color: currentColor; }
.nav-icon svg, .icon-btn svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon circle[fill], .nav-icon circle:not([r="8.2"]):not([r="4.3"]) { fill: currentColor; stroke: none; }
.nav-item:hover, .nav-item.active { color: #7b5fd0; background: #ece4fb; box-shadow: none; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; color: #9a92ac; position: relative; padding: 0; }
.icon-btn i { position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: #f87c9a; border: 1.5px solid white; }
.profile-chip { min-width: 174px; display: flex; align-items: center; gap: 9px; border: 0; background: #f5f1fc; border-radius: 16px; padding: 6px 12px 6px 6px; color: var(--ink); text-align: left; }
.profile-chip b { display: block; color: #5f5878; font-size: 14px; line-height: 1.05; }
.profile-chip small { display: flex; align-items: center; gap: 6px; color: #a49cb8; font-size: 10px; line-height: 1.15; }
.profile-chip small i { display: inline-block; width: 62px; height: 5px; border-radius: 99px; background: linear-gradient(90deg, #9070d6 62%, #e6e0f2 62%); }
.profile-chip strong { margin-left: auto; color: #a49cb8; font-size: 14px; }
.avatar-bubble { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #cdbcf0, #a98fe6); box-shadow: inset 0 -3px 6px rgba(0,0,0,.08); }
.avatar-bubble .tiny-face { transform: scale(.7); opacity: .8; }
.google-btn { height: 40px; border: 1.5px solid #ece7f5; background: #fff; color: #5f5878; border-radius: 14px; padding: 0 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 9px; box-shadow: 0 3px 8px rgba(150,135,200,.1); white-space: nowrap; font-size: 14px; }
.google-btn span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#4285f4, #34a853, #fbbc05, #ea4335, #4285f4); color: white; font-weight: 1000; font-size: 12px; }

.customizer { padding: 26px 24px 20px; }
.section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.section-title > span { color: var(--violet); font-size: 30px; line-height: 1; }
h2, h3, p { margin: 0; }
h2 { color: #6f62e6; font-size: 25px; line-height: 1.1; letter-spacing: -.03em; }
.section-title p, .panel-head p { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 5px; }
.character-editor { display: grid; grid-template-columns: 1fr 96px; gap: 22px; align-items: center; }
.editor-stage {
  height: 320px;
  border: 1px solid rgba(155, 147, 210, .22);
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.48), rgba(247,246,255,.72));
  box-shadow: inset 0 -28px 60px rgba(151,139,219,.08);
  overflow: hidden;
}
.tool-tabs { display: grid; gap: 14px; }
.tool { height: 46px; border-radius: 13px; border: 1px solid rgba(143,137,201,.22); background: rgba(255,255,255,.72); color: #8580bc; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--soft-shadow); transition: .2s; }
.tool.active, .tool:hover { border-color: rgba(119,103,232,.72); color: var(--violet); background: rgba(255,255,255,.96); transform: translateY(-1px); }
.skin-row { margin-top: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skin-card { height: 92px; border: 1px solid rgba(143,137,201,.25); border-radius: 15px; background: rgba(255,255,255,.64); display: grid; place-items: center; position: relative; box-shadow: var(--soft-shadow); overflow: hidden; }
.skin-card img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 8px 9px rgba(117,103,190,.14)); }
.skin-card.selected { border-color: #8475ff; box-shadow: inset 0 0 0 2px rgba(119,103,232,.45), var(--soft-shadow); }
.skin-card.selected::after { content: '✓'; position: absolute; right: 7px; top: 7px; width: 22px; height: 22px; border-radius: 50%; color: white; display: grid; place-items: center; background: linear-gradient(135deg, #7767e8, #a99bff); font-size: 13px; font-weight: 1000; }
.skin-thumb { width: 52px; height: 62px; border-radius: 22px 22px 18px 18px; background: linear-gradient(#fff, #ece8ff); box-shadow: inset 0 -10px 18px rgba(137,123,211,.18); position: relative; }
.skin-thumb::before { content: ''; position: absolute; left: 13px; top: 24px; width: 5px; height: 5px; border-radius: 50%; background: #171c35; box-shadow: 20px 0 #171c35; }
.skin-thumb::after { content: ''; position: absolute; left: 22px; top: -7px; width: 13px; height: 16px; border-radius: 80% 80% 50% 50%; background: #c4b6ff; transform: rotate(-18deg); box-shadow: 10px 3px #d6ccff; }
.skin-thumb.explorer { background: linear-gradient(#fff, #e7dfd6); }
.skin-thumb.explorer::after { width: 46px; height: 13px; left: 3px; top: -4px; border-radius: 50%; background: #876444; box-shadow: none; transform: none; }
.skin-thumb.dino { background: linear-gradient(#dff5ff, #86c8ff); }
.skin-thumb.dino::after { width: 42px; height: 22px; top: -4px; left: 5px; border-radius: 18px 18px 8px 8px; background: #8bc7ff; box-shadow: none; transform: none; }
.palette { margin-top: 26px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 3px solid white; background: var(--sw); box-shadow: 0 8px 18px rgba(110,102,171,.14), inset 0 0 0 1px rgba(0,0,0,.04); position: relative; }
.swatch.active::after { content: '✓'; position: absolute; left: 2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; color: white; background: #7767e8; display: grid; place-items: center; font-size: 11px; }
.swatch.rainbow { background: conic-gradient(#fa81a8, #ffd875, #72dec3, #86c8ff, #a99bff, #fa81a8); }
.save-style { margin-top: 20px; width: 100%; height: 50px; border: 0; border-radius: 13px; color: white; font-weight: 1000; background: linear-gradient(135deg, #7162e9, #8b7cf6); box-shadow: 0 16px 28px rgba(119,103,232,.28); }

.right-rail { display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.rooms-panel, .friends-panel { padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.panel-head h3 { font-size: 17px; color: #6b63dc; display: flex; align-items: center; gap: 10px; }
.panel-head button { height: 34px; border-radius: 10px; border: 1px solid rgba(139,132,198,.2); background: rgba(255,255,255,.62); color: #6f66dd; font-weight: 900; padding: 0 13px; }
.online-faces { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.bot-face-row { flex-wrap: nowrap; }
.bot-avatar { width: 43px; height: 43px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#fff, #ebe6ff); border: 3px solid rgba(255,255,255,.92); box-shadow: 0 8px 16px rgba(105,98,171,.15); overflow: hidden; flex: 0 0 auto; }
.bot-avatar img { width: 115%; height: 115%; object-fit: contain; transform: translateY(8%); }
.face { width: 43px; height: 43px; border-radius: 50%; background: linear-gradient(#fff, #eae5ff); border: 3px solid rgba(255,255,255,.92); box-shadow: 0 8px 16px rgba(105,98,171,.15); position: relative; flex: 0 0 auto; }
.face::before { content: ''; position: absolute; left: 12px; top: 18px; width: 4px; height: 4px; border-radius: 50%; background: #171c35; box-shadow: 13px 0 #171c35; }
.face::after { content: ''; position: absolute; left: 16px; top: 25px; width: 10px; height: 4px; border-radius: 0 0 10px 10px; border-bottom: 2px solid #171c35; }
.face.active { outline: 3px solid #7f70f0; }
.face.pink { background: linear-gradient(#fff, #ffdce9); } .face.blue { background: linear-gradient(#fff, #bfe8ff); } .face.peach { background: linear-gradient(#fff, #ffe0c4); } .face.green { background: linear-gradient(#fff, #c7f3d7); } .face.dark { background: linear-gradient(#f0f2f6, #5c6476); } .face.gray { background: linear-gradient(#fff, #c9ced8); } .face.brown { background: linear-gradient(#fff, #caa37f); } .face.lavender { background: linear-gradient(#fff, #dcd3ff); }
.more { width: 47px; height: 47px; border-radius: 50%; display: grid; place-items: center; background: #e9e7ff; color: #6d64d9; font-weight: 1000; }
.room-list { display: grid; gap: 12px; }
.room-card { display: grid; grid-template-columns: 1fr 50px 82px; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border: 1px solid rgba(139,132,198,.18); background: rgba(255,255,255,.56); border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.room-card b, .friend-list b { display: block; font-size: 13px; color: #6d63df; }
.room-card small, .friend-list small { display: block; color: #9090ad; font-size: 11px; margin-top: 4px; font-weight: 800; }
.room-card > span { font-weight: 900; color: #62617e; font-size: 12px; }
.room-card button, .friend-list button { height: 34px; border: 0; border-radius: 9px; color: white; font-weight: 1000; background: linear-gradient(135deg, #7666e8, #8f7cf4); box-shadow: 0 10px 18px rgba(119,103,232,.24); }
.create-room { margin-top: 18px; width: 100%; height: 47px; border-radius: 14px; border: 1px solid rgba(119,103,232,.34); color: #6c62dc; background: rgba(255,255,255,.46); font-weight: 1000; }
.friend-list { display: grid; gap: 11px; }
.friend-list article { display: grid; grid-template-columns: 45px 1fr 10px 68px; gap: 12px; align-items: center; }
.friend-list i { width: 8px; height: 8px; border-radius: 50%; background: #21d077; }
.friend-list .offline { opacity: .52; } .friend-list .offline i { background: transparent; border: 1px solid #77809d; } .friend-list button:disabled { background: #d7d2ff; box-shadow: none; }

.mode-section { grid-column: 1 / 3; padding-left: 122px; }
.mode-section h3 { color: #7a70de; margin: 0 0 12px 2px; font-size: 16px; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 16px; }
.mode-card { min-height: 156px; border: 1px solid rgba(139,132,198,.2); border-radius: 22px; background: rgba(255,255,255,.68); box-shadow: var(--soft-shadow); padding: 26px 30px; display: grid; grid-template-columns: 1fr 130px; align-items: center; overflow: hidden; position: relative; }
.mode-card b { color: #6e63df; font-size: 22px; } .mode-card p { color: #8b89a9; font-size: 13px; margin-top: 8px; font-weight: 800; } .mode-card span { display: inline-grid; place-items: center; margin-top: 17px; min-width: 58px; height: 31px; border-radius: 10px; color: #38a6a5; border: 1px solid rgba(49,201,185,.35); background: rgba(255,255,255,.42); font-weight: 900; }
.mode-card.mint { background: linear-gradient(135deg, #d6fff3, #b5f7ee 55%, #eff7ff); }
.mode-card.lavender-card { background: linear-gradient(135deg, #fbfaff, #efeaff); }
.mode-card.trophy-card { background: linear-gradient(135deg, #fffafd, #f0eaff); }
.lock-art, .trophy-art, .mode-art.two-buddies { height: 126px; min-width: 120px; background-repeat: no-repeat; background-position: center; background-size: contain; filter: drop-shadow(0 16px 18px rgba(119,103,232,.15)); text-indent: -999px; overflow: hidden; }
.lock-art { background-image: url('/assets/decorations/cropped/Untitled-design-4.PNG?v=20260622-lobby-assets-1'); }
.trophy-art { background-image: url('/assets/decorations/cropped/Untitled-design-3.PNG?v=20260622-lobby-assets-1'); }
.mode-art.two-buddies { background-image: url('/assets/decorations/cropped/Untitled-design-8.PNG?v=20260622-lobby-assets-1'); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 50; min-width: 260px; padding: 14px 18px; border-radius: 16px; color: white; text-align: center; font-weight: 1000; background: linear-gradient(135deg, #7162e9, #9b8cff); box-shadow: 0 20px 50px rgba(95,78,210,.32); transition: .24s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal-root[hidden], .game-overlay[hidden] { display: none; }
.modal-root, .game-overlay { position: fixed; inset: 0; z-index: 80; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(42, 38, 74, .26); backdrop-filter: blur(8px); }
.modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(205,188,239,.7);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 80px rgba(80, 67, 150, .28);
  padding: 24px;
}
.modal-card h2 { color: #5f5878; font-size: 22px; margin: 0 34px 6px 0; }
.modal-subtitle { color: #9a93ad; font-weight: 700; font-size: 13px; margin-bottom: 18px; }
.modal-close { position: absolute; right: 15px; top: 13px; width: 34px; height: 34px; border: 0; border-radius: 12px; color: #8a72d6; background: #f3eefc; font-size: 24px; line-height: 1; }
.modal-body { color: #68617f; font-weight: 700; line-height: 1.55; }
.modal-body pre { white-space: pre-wrap; padding: 14px; border-radius: 14px; background: #f6f1ff; color: #5f5878; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-action, .route-grid button, .shop-grid button, .custom-option-grid button, .room-modal-list button, .friend-modal-list button, .room-mode-row button {
  border: 1px solid #ece7f5;
  border-radius: 14px;
  background: #fff;
  color: #6a5ccf;
  padding: 11px 14px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(150,135,200,.1);
}
.modal-action.primary { color: white; border: 0; background: linear-gradient(180deg,#a98fe6,#9070d6); }
.route-grid, .shop-grid, .custom-option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rank-list, .mission-list { margin: 0; padding-left: 22px; }
.profile-stats { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; align-items: center; }
.profile-stats b { color: #8a72d6; font-size: 24px; }
.field-label { display: grid; gap: 8px; color: #6a6385; }
.field-label input { height: 42px; border: 1px solid #e7ddfa; border-radius: 12px; padding: 0 12px; font: inherit; }
.room-mode-row { display: flex; gap: 10px; margin-top: 12px; }
.room-mode-row button.active { background: #ece4fb; }
.room-modal-list, .friend-modal-list { display: grid; gap: 9px; }
.room-modal-list button, .friend-modal-list button { text-align: left; display: grid; gap: 3px; }
.room-modal-list small, .friend-modal-list small { color: #a49cb8; font-size: 12px; }
.friend-modal-list button:disabled { opacity: .45; }

.game-overlay { background: rgba(34, 30, 64, .34); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 18px; }
.game-card { width: min(1040px, calc(100vw - 24px)); border-radius: 28px; background: #fff; box-shadow: 0 30px 90px rgba(50,42,110,.32); padding: 18px; border: 1px solid rgba(205,188,239,.7); }
.game-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; margin-bottom: 12px; }
.game-head b { color: #5f5878; font-size: 20px; display: block; }
.game-head small { color: #a49cb8; font-weight: 800; }
.game-score { display: flex; align-items: center; gap: 14px; color: #8a72d6; font-size: 20px; font-weight: 1000; }
.player-hp, .bot-hp { color: #f87c9a; letter-spacing: 2px; }
.game-close, .charge-button, .reset-game, .angle-pad button { height: 42px; border-radius: 14px; border: 0; padding: 0 16px; font-weight: 1000; }
.game-close, .reset-game { background: #f3eefc; color: #8a72d6; }
.charge-button { color: white; min-width: 190px; touch-action: none; user-select: none; background: linear-gradient(180deg,#ffe375,#ffc23c); text-shadow: 0 1px 0 #d99c28; box-shadow: 0 8px 18px rgba(220,160,45,.25); }
.charge-button:active { transform: translateY(1px) scale(.99); }
.game-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  min-height: 360px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 85%, rgba(255,255,255,.68), rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #dceffb 0%, #e7ddf7 58%, #f6dcec 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.68), 0 12px 30px rgba(98,86,170,.12);
}
.game-3d-stage,
.game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.game-3d-stage canvas,
.game-canvas { display: block; }
.game-canvas { z-index: 2; pointer-events: none; }
.game-3d-stage { z-index: 1; }
.game-3d-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7369df;
  font-weight: 1000;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.08));
}
.game-3d-loading.error { color: #d65f86; }
.game-controls { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; margin-top: 12px; }
.game-controls label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: #6a6385; font-weight: 900; }
.game-controls input { accent-color: #9070d6; }
.game-status { margin: 12px 0 0; text-align: center; color: #7a7197; font-weight: 900; }
.angle-pad { display: grid; grid-template-columns: 48px 72px 48px; gap: 8px; align-items: center; }
.angle-pad strong { color: #6a5ccf; text-align: center; font-size: 20px; }
.angle-pad button { color: #6a5ccf; background: #f3eefc; font-size: 18px; touch-action: manipulation; }
.power-panel { display: grid; grid-template-columns: auto 1fr 54px; gap: 10px; align-items: center; color: #6a6385; font-weight: 900; }
.power-meter { height: 16px; border-radius: 999px; background: #ece7f5; overflow: hidden; box-shadow: inset 0 1px 3px rgba(80,70,130,.12); }
.power-fill { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #7de0c7, #ffd85f, #ff8fb8); transition: width .04s linear; }
.status-pill { min-height: 42px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 18px; color: #6d64d9; font-weight: 1000; background: #ece4fb; }
