    :root {
      --bg-dark: #111216;
      --card-bg: #232527;
      --input-bg: #393b3d;
      --input-border: #55585c;
      --text-main: #ffffff;
      --text-sub: #bdbebe;
      --accent-cyan: #00e5ff;
      --accent-purple: #8b5cf6;
      --accent-green: #00b06f;
      --danger: #ff4757;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      width: 100%;
      min-height: 100vh;
      font-family: 'Outfit', 'Noto Sans JP', sans-serif;
      background-color: var(--bg-dark);
      color: var(--text-main);
      overflow-x: hidden;
    }

    .auth-bg {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      z-index: 0;
      overflow: hidden;
      background: #0d0e11;
      pointer-events: none;
    }

    .tile-grid {
      position: absolute;
      top: -25%;
      left: -25%;
      width: 150%;
      height: 150%;
      display: grid;
      grid-template-columns: repeat(6, minmax(120px, 1fr));
      gap: 16px;
      transform: rotate(-12deg);
      opacity: 0.35;
    }

    .bg-tile {
      border-radius: 14px;
      min-height: 110px;
      background: linear-gradient(135deg, #1f232b, #2c313d);
      border: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 1rem;
      color: rgba(255, 255, 255, 0.28);
      letter-spacing: 1px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }

    .bg-tile:nth-child(3n) {
      background: linear-gradient(135deg, #1a2936, #004e64);
    }
    .bg-tile:nth-child(4n) {
      background: linear-gradient(135deg, #2a1b3d, #44318d);
    }
    .bg-tile:nth-child(5n) {
      background: linear-gradient(135deg, #16302b, #007a5e);
    }

    .auth-vignette {
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at center, rgba(17, 18, 22, 0.42) 0%, rgba(11, 12, 15, 0.92) 88%);
    }

    .screen {
      display: none;
      position: relative;
      z-index: 1;
      width: 100%;
      min-height: 100vh;
    }

    .screen.active {
      display: block;
    }

    .center-stage {
      min-height: 100vh;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 36px 16px;
    }

    .brand-logo {
      font-family: 'Outfit', sans-serif;
      font-size: 2.4rem;
      font-weight: 900;
      letter-spacing: 3px;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-shadow: 0 4px 20px rgba(0, 229, 255, 0.35);
      user-select: none;
    }

    .brand-logo span.sq {
      display: inline-block;
      width: 24px;
      height: 24px;
      border: 5px solid #fff;
      transform: rotate(15deg);
      margin: 0 2px;
      box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
    }

    .auth-card {
      width: 100%;
      max-width: 420px;
      background-color: var(--card-bg);
      border-radius: 10px;
      padding: 26px 26px 22px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .auth-title {
      text-align: center;
      font-size: 1.4rem;
      font-weight: 800;
      margin-bottom: 20px;
      letter-spacing: 0.5px;
    }

    .form-group {
      margin-bottom: 14px;
    }

    .form-label {
      display: block;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-sub);
      margin-bottom: 6px;
    }

    .auth-input {
      width: 100%;
      height: 42px;
      background-color: var(--input-bg);
      border: 1px solid var(--input-border);
      border-radius: 6px;
      padding: 0 12px;
      color: var(--text-main);
      font-size: 0.92rem;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s, background-color 0.2s;
    }

    .auth-input::placeholder {
      color: #9fa1a3;
    }

    .auth-input:focus {
      border-color: #ffffff;
      background-color: #424548;
    }

    .dob-row {
      display: grid;
      grid-template-columns: 1.2fr 1fr 1fr;
      gap: 8px;
    }

    .auth-select {
      height: 40px;
      background-color: var(--input-bg);
      border: 1px solid var(--input-border);
      border-radius: 6px;
      padding: 0 10px;
      color: var(--text-main);
      font-size: 0.88rem;
      font-family: inherit;
      outline: none;
      cursor: pointer;
    }

    .auth-select:focus {
      border-color: #fff;
    }

    .gender-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      border: 1px solid var(--input-border);
      border-radius: 6px;
      overflow: hidden;
      background-color: var(--input-bg);
    }

    .gender-btn {
      height: 40px;
      background: transparent;
      border: none;
      color: var(--text-sub);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background-color 0.2s, color 0.2s;
    }

    .gender-btn:first-child {
      border-right: 1px solid var(--input-border);
    }

    .gender-btn.selected {
      background-color: #55595e;
      color: #ffffff;
    }

    .btn-login-outline {
      width: 100%;
      height: 42px;
      margin-top: 6px;
      background: transparent;
      border: 1px solid #ffffff;
      border-radius: 6px;
      color: #ffffff;
      font-size: 0.95rem;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      transition: background-color 0.2s, transform 0.1s;
    }

    .btn-login-outline:hover {
      background-color: rgba(255, 255, 255, 0.12);
    }

    .btn-signup-solid {
      width: 100%;
      height: 42px;
      margin-top: 10px;
      background-color: #ffffff;
      border: none;
      border-radius: 6px;
      color: #111216;
      font-size: 0.95rem;
      font-weight: 800;
      font-family: inherit;
      cursor: pointer;
      transition: opacity 0.2s, transform 0.1s;
    }

    .btn-signup-solid:hover {
      opacity: 0.9;
    }

    .forgot-link {
      display: block;
      text-align: center;
      margin-top: 16px;
      font-size: 0.85rem;
      color: #ffffff;
      text-decoration: none;
      cursor: pointer;
    }

    .forgot-link:hover {
      text-decoration: underline;
    }

    .terms-text {
      font-size: 0.72rem;
      color: var(--text-sub);
      line-height: 1.5;
      margin-top: 12px;
    }

    .terms-text span {
      color: #4da3ff;
      cursor: pointer;
    }

    .auth-footer {
      margin-top: 20px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
      font-size: 0.88rem;
      color: var(--text-sub);
    }

    .auth-switch-btn {
      background: none;
      border: none;
      color: #ffffff;
      font-weight: 700;
      font-size: 0.88rem;
      font-family: inherit;
      cursor: pointer;
      margin-left: 4px;
      text-decoration: underline;
    }

    .role-header {
      text-align: center;
      margin-bottom: 32px;
    }

    .role-welcome {
      font-size: 0.95rem;
      color: var(--accent-cyan);
      font-weight: 700;
      margin-bottom: 6px;
    }

    .role-heading {
      font-size: 1.9rem;
      font-weight: 900;
    }

    .role-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
      gap: 24px;
      width: 100%;
      max-width: 660px;
    }

    .role-card {
      background: rgba(35, 37, 39, 0.92);
      border: 2px solid rgba(255, 255, 255, 0.12);
      border-radius: 16px;
      padding: 30px 24px;
      text-align: center;
      cursor: pointer;
      transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
    }

    .role-card:hover {
      transform: translateY(-6px);
    }

    .role-card.creator:hover {
      border-color: var(--accent-purple);
      box-shadow: 0 12px 32px rgba(139, 92, 246, 0.3);
    }

    .role-card.player:hover {
      border-color: var(--accent-cyan);
      box-shadow: 0 12px 32px rgba(0, 229, 255, 0.3);
    }

    .role-icon {
      width: 66px;
      height: 66px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
    }

    .role-card.creator .role-icon {
      background: rgba(139, 92, 246, 0.18);
      color: var(--accent-purple);
    }

    .role-card.player .role-icon {
      background: rgba(0, 229, 255, 0.18);
      color: var(--accent-cyan);
    }

    .role-card-title {
      font-size: 1.4rem;
      font-weight: 900;
      margin-bottom: 10px;
    }

    .role-card-desc {
      font-size: 0.88rem;
      color: var(--text-sub);
      line-height: 1.5;
      margin-bottom: 20px;
    }

    .role-card-btn {
      width: 100%;
      padding: 12px;
      border-radius: 8px;
      border: none;
      font-weight: 800;
      font-size: 0.95rem;
      font-family: inherit;
      cursor: pointer;
      color: #fff;
    }

    .role-card.creator .role-card-btn {
      background: var(--accent-purple);
    }

    .role-card.player .role-card-btn {
      background: var(--accent-cyan);
      color: #0b0c0f;
    }

    .modal-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 100;
      background: rgba(0, 0, 0, 0.78);
      backdrop-filter: blur(6px);
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .modal-backdrop.active {
      display: flex;
    }

    .confirm-box {
      width: 100%;
      max-width: 460px;
      background: #1e2024;
      border: 1px solid rgba(139, 92, 246, 0.5);
      border-radius: 14px;
      padding: 28px 24px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
      text-align: center;
    }

    .confirm-badge {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 999px;
      background: rgba(139, 92, 246, 0.2);
      color: #c4b5fd;
      font-size: 0.78rem;
      font-weight: 800;
      margin-bottom: 14px;
    }

    .confirm-message {
      font-size: 1.08rem;
      font-weight: 700;
      line-height: 1.65;
      color: #ffffff;
      margin-bottom: 24px;
    }

    .confirm-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .btn-play-instead {
      padding: 12px 14px;
      border-radius: 8px;
      border: 1px solid var(--accent-cyan);
      background: rgba(0, 229, 255, 0.12);
      color: var(--accent-cyan);
      font-weight: 800;
      font-size: 0.9rem;
      font-family: inherit;
      cursor: pointer;
    }

    .btn-confirm-create {
      padding: 12px 14px;
      border-radius: 8px;
      border: none;
      background: var(--accent-purple);
      color: #ffffff;
      font-weight: 800;
      font-size: 0.9rem;
      font-family: inherit;
      cursor: pointer;
    }

    .top-nav {
      width: 100%;
      height: 60px;
      background: #191b1f;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding: 0 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 20;
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .nav-logo {
      font-family: 'Outfit', sans-serif;
      font-size: 1.35rem;
      font-weight: 900;
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
    }

    .nav-logo span.sq {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 4px solid var(--accent-cyan);
      transform: rotate(15deg);
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .user-pill {
      background: #2b2e34;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 0.82rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .user-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent-green);
    }

    .nav-btn {
      background: #2b2e34;
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #fff;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
    }

    .nav-btn:hover {
      background: #383c44;
    }

    .platform-screen {
      background: #121316;
    }

    .player-container {
      width: 100%;
      max-width: 1180px;
      margin: 0 auto;
      padding: 28px 20px;
    }

    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      flex-wrap: wrap;
      gap: 12px;
    }

    .section-title {
      font-size: 1.4rem;
      font-weight: 900;
    }

    .game-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 20px;
    }

    .game-card {
      background: #1e2025;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: transform 0.2s, border-color 0.2s;
      cursor: pointer;
    }

    .play-modal-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .play-modal-box:fullscreen {
      max-width: none;
      width: 100vw;
      height: 100vh;
      border-radius: 0;
      display: flex;
      flex-direction: column;
    }

    .play-modal-box:fullscreen .play-iframe {
      flex: 1;
      height: auto;
    }

    .game-card:hover {
      transform: translateY(-4px);
      border-color: var(--accent-cyan);
    }

    .game-thumb {
      height: 140px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.5rem;
      font-weight: 900;
      position: relative;
    }

    .game-badge {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(0, 0, 0, 0.65);
      padding: 3px 8px;
      border-radius: 6px;
      font-size: 0.7rem;
      font-weight: 700;
      color: var(--accent-cyan);
    }

    .game-info {
      padding: 14px;
    }

    .game-name {
      font-size: 1.05rem;
      font-weight: 800;
      margin-bottom: 4px;
    }

    .game-author {
      font-size: 0.78rem;
      color: var(--text-sub);
      margin-bottom: 12px;
    }

    .btn-play-game {
      width: 100%;
      padding: 8px;
      border-radius: 6px;
      border: none;
      background: var(--accent-green);
      color: #fff;
      font-weight: 800;
      font-family: inherit;
      cursor: pointer;
    }

    .studio-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      padding: 16px 24px 24px;
      min-height: calc(100vh - 60px);
    }

    @media (max-width: 860px) {
      .studio-container {
        grid-template-columns: 1fr;
      }
    }

    .studio-pane {
      background: #1a1c20;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .pane-header {
      background: #23262c;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      gap: 8px;
      flex-wrap: wrap;
    }

    .pane-title {
      font-size: 0.88rem;
      font-weight: 800;
      color: #e2e8f0;
    }

    .code-textarea {
      flex: 1;
      width: 100%;
      min-height: 360px;
      background: #131518;
      color: #a5f3fc;
      border: none;
      padding: 16px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.88rem;
      line-height: 1.55;
      resize: none;
      outline: none;
    }

    .preview-frame {
      flex: 1;
      width: 100%;
      min-height: 360px;
      border: none;
      background: #ffffff;
    }

    .publish-bar {
      padding: 12px 16px;
      background: #23262c;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      gap: 10px;
    }

    .publish-input {
      flex: 1;
      background: #131518;
      border: 1px solid #3f444e;
      border-radius: 6px;
      padding: 8px 12px;
      color: #fff;
      font-family: inherit;
      font-size: 0.85rem;
    }

    .btn-publish {
      background: var(--accent-purple);
      border: none;
      color: #fff;
      padding: 8px 16px;
      border-radius: 6px;
      font-weight: 800;
      font-family: inherit;
      cursor: pointer;
    }

    .play-modal-box {
      width: 100%;
      max-width: 900px;
      background: #1a1c20;
      border-radius: 14px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .play-modal-top {
      padding: 12px 18px;
      background: #23262c;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .play-iframe {
      width: 100%;
      height: 520px;
      border: none;
      background: #000;
    }

    .toast-container {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 999;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .toast {
      background: #23262c;
      color: #fff;
      border-left: 4px solid var(--accent-cyan);
      padding: 12px 16px;
      border-radius: 8px;
      font-size: 0.86rem;
      font-weight: 700;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }

    .toast.error {
      border-left-color: var(--danger);
    }