/* ??? (??) - ???? ?? ?? ? */
    :root, [data-theme="night"] {
      --bg: #0f1419;
      --bg-soft: #151c23;
      --card: #1a222c;
      --card-hover: #1f2935;
      --accent: #4ade80;
      --accent-dim: rgba(74, 222, 128, 0.16);
      --accent-glow: rgba(74, 222, 128, 0.28);
      --gold: #fcd34d;
      --gold-dim: rgba(252, 211, 77, 0.18);
      --text: #e2e8f0;
      --text-muted: #94a3b8;
      --goal: 10000;
      --radius: 1rem;
      --radius-lg: 1.25rem;
      --shadow: 0 4px 20px rgba(0,0,0,0.3);
      --shadow-glow: 0 0 28px var(--accent-glow);
      --rarity-common: #94a3b8;
      --rarity-rare: #60a5fa;
      --rarity-epic: #a78bfa;
      --rarity-legend: #fcd34d;
    }
    /* ?? - ??? ?? ? */
    [data-theme="morning"] {
      --bg: #f0f7f0;
      --bg-soft: #f7fbf7;
      --card: #ffffff;
      --card-hover: #ecf5ec;
      --accent: #16a34a;
      --accent-dim: rgba(22, 163, 74, 0.12);
      --accent-glow: rgba(22, 163, 74, 0.22);
      --gold: #ca8a04;
      --gold-dim: rgba(202, 138, 4, 0.15);
      --text: #14532d;
      --text-muted: #4d7c5c;
      --shadow: 0 2px 16px rgba(0,0,0,0.06);
      --shadow-glow: 0 0 20px var(--accent-glow);
      --rarity-common: #64748b;
      --rarity-rare: #2563eb;
      --rarity-epic: #7c3aed;
      --rarity-legend: #ca8a04;
    }
    [data-theme="morning"] body::before {
      background: radial-gradient(ellipse 85% 60% at 50% -10%, rgba(22,163,74,0.1), transparent 50%);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Outfit', -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      min-height: 100dvh;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 0 0 5.5rem;
      padding-right: max(0, env(safe-area-inset-right, 0));
      overflow-x: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      top: 0; left: 0; right: 0;
      height: 55vh;
      background: radial-gradient(ellipse 90% 70% at 50% -15%, var(--accent-dim), transparent 55%);
      pointer-events: none;
      z-index: 0;
    }

    .container { width: 100%; max-width: 420px; position: relative; z-index: 1; padding-left: 1rem; padding-right: max(1rem, env(safe-area-inset-right, 0)); box-sizing: border-box; }

    header { text-align: center; margin-bottom: 1rem; padding-top: 0.75rem; position: relative; }
    h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
    .subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; font-weight: 400; }
    .header-level { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem; padding: 0.35rem 0.75rem; background: var(--card); border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; font-weight: 600; color: var(--accent); }
    .header-level .lv-num { font-size: 1rem; }
    .level-bar-wrap { width: 120px; height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-left: 0.25rem; }
    .level-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #10b981); border-radius: 999px; transition: width 0.3s ease; }
    .header-right { position: absolute; top: 0.75rem; right: 0; display: flex; align-items: center; gap: 0.5rem; }
    .theme-toggle { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: var(--card); color: var(--text-muted); font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    [data-theme="morning"] .theme-toggle { border-color: rgba(0,0,0,0.1); }
    .gold-display { font-size: 0.85rem; font-weight: 700; color: var(--gold); display: flex; align-items: center; gap: 0.25rem; }
    .header-auth-btn { font-size: 0.7rem; padding: 0.3rem 0.5rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.2); background: var(--card); color: var(--text-muted); cursor: pointer; font-family: inherit; font-weight: 500; }
    .header-auth-btn:hover { color: var(--accent); border-color: var(--accent); }
    .header-auth-btn.logged-in { border-color: var(--accent); color: var(--accent); }
    .header-logout-btn { font-size: 0.7rem; padding: 0.3rem 0.5rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.2); background: var(--card); color: var(--text-muted); cursor: pointer; font-family: inherit; font-weight: 500; }
    .header-logout-btn:hover { color: #ef4444; border-color: #ef4444; }
    .auth-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; transition: opacity 0.3s ease, visibility 0.3s ease; }
    .auth-overlay.fade-out { opacity: 0; visibility: hidden; }
    .auth-modal { background: var(--card); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 320px; width: 100%; border: 1px solid rgba(255,255,255,0.08); box-shadow: var(--shadow); position: relative; transition: transform 0.3s ease, opacity 0.3s ease; max-height: 90vh; overflow-y: auto; }
    .auth-overlay.fade-out .auth-modal { transform: scale(0.95); opacity: 0; }
    #profileModal { max-width: 400px; }
    .auth-loading { display: none; text-align: center; padding: 2rem; }
    .auth-loading.active { display: block; }
    .auth-loading-spinner { width: 40px; height: 40px; border: 3px solid var(--accent-dim); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 1rem; animation: spin 0.8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .tutorial-modal { display: flex; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 400; align-items: center; justify-content: center; padding: 1rem; }
    .welcome-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 300; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn 0.25s ease; }
    .welcome-modal.show { display: flex; }
    .welcome-content { background: var(--card); border-radius: var(--radius-lg); padding: 2rem; max-width: 320px; width: 100%; text-align: center; border: 1px solid rgba(255,255,255,0.08); box-shadow: var(--shadow); }
    .welcome-icon { font-size: 4rem; margin-bottom: 1rem; }
    .welcome-title { font-size: 1.25rem; font-weight: 600; color: var(--accent); margin-bottom: 0.5rem; }
    .welcome-message { color: var(--text-muted); margin-bottom: 1.5rem; }
    .btn-welcome-close { background: var(--accent); color: var(--bg); border: none; border-radius: var(--radius); padding: 0.75rem 2rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
    .btn-welcome-close:active { transform: scale(0.95); }
    /* ?? ??? ?? */
    .codex-fab {
      position: fixed;
      right: 1.2rem;
      bottom: 5.2rem;
      width: 52px;
      height: 52px;
      border-radius: 999px;
      border: none;
      background: linear-gradient(135deg, var(--accent), #22c55e);
      color: var(--bg);
      font-size: 1.6rem;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 25px rgba(0,0,0,0.35);
      cursor: pointer;
      z-index: 250;
    }
    .codex-fab:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0,0,0,0.4); }
    .codex-fab:active { transform: translateY(1px) scale(0.97); box-shadow: 0 6px 15px rgba(0,0,0,0.3); }
    /* ?? ?? */
    .codex-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      z-index: 350;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }
    .codex-overlay.show { display: flex; }
    .codex-modal {
      background: var(--card);
      border-radius: var(--radius-lg);
      padding: 1.25rem 1.25rem 1rem;
      max-width: 380px;
      width: 100%;
      box-shadow: var(--shadow);
      position: relative;
      max-height: calc(100vh - 3rem);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .codex-close {
      position: absolute;
      top: 0.6rem;
      right: 0.7rem;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      border: none;
      background: var(--bg-soft);
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.9rem;
    }
    .codex-title {
      font-size: 1.05rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 0.25rem;
    }
    .codex-tabs {
      display: flex;
      gap: 0.35rem;
      margin-bottom: 0.25rem;
    }
    .codex-tab {
      flex: 1;
      padding: 0.45rem 0.6rem;
      border-radius: 999px;
      border: none;
      background: var(--bg-soft);
      color: var(--text-muted);
      font-size: 0.8rem;
      cursor: pointer;
    }
    .codex-tab.active {
      background: var(--accent-dim);
      color: var(--accent);
      font-weight: 600;
    }
    .codex-body {
      flex: 1;
      overflow-y: auto;
      margin-top: 0.25rem;
    }
    .codex-section-title {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-muted);
      margin-bottom: 0.5rem;
    }
    .codex-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
      gap: 0.6rem;
    }
    .codex-card {
      background: var(--bg-soft);
      border-radius: var(--radius);
      padding: 0.6rem 0.45rem 0.5rem;
      text-align: center;
      border: 1px solid rgba(255,255,255,0.05);
      font-size: 0.75rem;
    }
    .codex-card.owned {
      border-color: var(--accent-dim);
      box-shadow: 0 0 0 1px rgba(148,163,184,0.25);
    }
    .codex-card .codex-emoji {
      font-size: 1.8rem;
      margin-bottom: 0.25rem;
    }
    .codex-card .codex-name {
      font-weight: 600;
      margin-bottom: 0.15rem;
    }
    .codex-card .codex-meta {
      font-size: 0.7rem;
      color: var(--text-muted);
    }
    .auth-tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
    .auth-tab { flex: 1; padding: 0.5rem; border: none; border-radius: var(--radius); background: var(--bg-soft); color: var(--text-muted); font-size: 0.85rem; font-family: inherit; cursor: pointer; }
    .auth-tab.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
    .auth-title { font-size: 1rem; margin-bottom: 1rem; color: var(--text); }
    .auth-panel label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; margin-bottom: 0.25rem; }
    .auth-panel input { width: 100%; padding: 0.6rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.15); background: var(--bg-soft); color: var(--text); font-size: 0.9rem; box-sizing: border-box; }
    .btn-auth-submit { width: 100%; margin-top: 1rem; padding: 0.65rem; border: none; border-radius: var(--radius); background: linear-gradient(145deg, var(--accent), #10b981); color: var(--bg); font-weight: 600; font-family: inherit; cursor: pointer; font-size: 0.9rem; }
    .auth-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.75rem; }
    .auth-link-btn { font-size: 0.8rem; }
    .auth-divider { display: flex; align-items: center; margin: 1rem 0; text-align: center; }
    .auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1); }
    .auth-divider span { padding: 0 0.75rem; color: var(--text-muted); font-size: 0.75rem; }
    .btn-social { width: 100%; padding: 0.65rem; border: none; border-radius: var(--radius); font-weight: 600; font-family: inherit; cursor: pointer; font-size: 0.9rem; margin-top: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
    .btn-kakao { background: #FEE500; color: #000; }
    .btn-kakao:hover { background: #FDD835; }
    .btn-google { background: #fff; color: #000; border: 1px solid rgba(255,255,255,0.2); }
    .btn-google:hover { background: #f5f5f5; }
    .auth-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 28px; height: 28px; border: none; border-radius: 50%; background: var(--bg-soft); color: var(--text-muted); cursor: pointer; font-size: 1rem; line-height: 1; }
    .auth-overlay.auth-gate { align-items: center; justify-content: center; }
    .auth-overlay.auth-gate .auth-close { display: none; }
    .pet-section { background: var(--card); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.08); }
    .pet-display { text-align: center; }
    .pet-preview { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 1rem; }
    .pet-emoji { font-size: 4rem; line-height: 1; }
    .pet-info { width: 100%; }
    .pet-name { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
    .pet-level { font-size: 0.9rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
    .pet-exp-bar { width: 100%; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-bottom: 0.5rem; }
    .pet-exp-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #10b981); border-radius: 999px; transition: width 0.3s ease; }
    .pet-exp-text { font-size: 0.75rem; color: var(--text-muted); }
    .btn-select-pet { width: 100%; padding: 0.65rem; border: none; border-radius: var(--radius); background: linear-gradient(145deg, var(--accent), #10b981); color: var(--bg); font-weight: 600; font-family: inherit; cursor: pointer; font-size: 0.9rem; }
    .pet-select-modal { background: var(--card); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 400px; width: 100%; border: 1px solid rgba(255,255,255,0.08); box-shadow: var(--shadow); }
    .pet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
    .pet-item { background: var(--bg-soft); border: 2px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 1rem; cursor: pointer; transition: all 0.2s; text-align: center; }
    .pet-item:hover { border-color: var(--accent); background: var(--accent-dim); }
    .pet-item.selected { border-color: var(--accent); background: var(--accent-dim); }
    .pet-item-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; }
    .pet-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
    .pet-item-desc { font-size: 0.7rem; color: var(--text-muted); }
    #appMain { display: block; }
    #appMain.hidden { display: none !important; }
    .attendance-card { background: linear-gradient(145deg, var(--card), rgba(251,191,36,0.06)); border: 1px solid rgba(251,191,36,0.2); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
    .attendance-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
    .attendance-status { font-size: 0.9rem; color: var(--text); margin-bottom: 0.5rem; }
    .btn-attendance { width: 100%; padding: 0.65rem; border: none; border-radius: var(--radius); background: linear-gradient(145deg, var(--gold), #d97706); color: #1a1a1a; font-weight: 700; font-family: inherit; cursor: pointer; font-size: 0.9rem; }
    .title-badge { font-size: 0.7rem; color: var(--accent); margin-top: 0.35rem; font-weight: 600; }
    .walk-stat.walk-total { grid-column: 1 / -1; }

    /* ? ????? */
    .tab-nav {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.35rem;
      background: var(--card);
      border-radius: var(--radius);
      padding: 0.5rem;
      margin-bottom: 1.25rem;
      border: 1px solid rgba(255,255,255,0.06);
      box-shadow: var(--shadow);
    }
    .tab-btn {
      min-width: 3rem;
      padding: 0.4rem 0.2rem;
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-size: 0.65rem;
      font-family: inherit;
      font-weight: 500;
      cursor: pointer;
      border-radius: 0.65rem;
      transition: all 0.25s ease;
    }
    .tab-btn:hover { color: var(--text); }
    .tab-btn.active { background: linear-gradient(135deg, var(--accent-dim), rgba(52,211,153,0.08)); color: var(--accent); font-weight: 600; box-shadow: 0 0 0 1px rgba(52,211,153,0.2); }
    .tab-btn .tab-emoji { display: block; font-size: 1.15rem; margin-bottom: 0.2rem; }

    .page { display: none; width: 100%; animation: fadeIn 0.25s ease; }
    .page.active { display: block; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes slideDown { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
    @keyframes slideUp { from { transform: translateX(-50%) translateY(0); opacity: 1; } to { transform: translateX(-50%) translateY(-20px); opacity: 0; } }
    .wild-animal-notification { animation: slideDown 0.3s ease; }

    /* ===== ?? ?? ===== */
    .step-card, .walk-card, .avatar-section, .story-section {
      background: var(--card);
      border-radius: var(--radius-lg);
      padding: 1.5rem;
      margin-bottom: 1.25rem;
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: var(--shadow);
      transition: all 0.2s ease;
    }
    .step-card:hover, .walk-card:hover, .avatar-section:hover { 
      box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.05); 
      transform: translateY(-1px);
    }
    .story-section { min-height: 200px; }

    /* ===== ?? ? ===== */
    .step-value-wrap { display: flex; align-items: baseline; justify-content: center; gap: 0.3rem; margin-bottom: 0.3rem; }
    .step-value { font-size: 3.25rem; font-weight: 700; letter-spacing: -0.04em; background: linear-gradient(135deg, var(--accent), #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
    .step-unit { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }
    .step-label { text-align: center; font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
    .lifetime-hint { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }
    .progress-wrap { margin-top: 1.25rem; }
    .progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.45rem; font-size: 0.8rem; color: var(--text-muted); }
    .progress-bar-bg { height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
    .progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #10b981); border-radius: 999px; width: 0%; transition: width 0.45s ease; box-shadow: 0 0 12px var(--accent-glow); }
    .manual-area { text-align: center; margin-top: 1.25rem; }
    .btn-add {
      width: 60px; height: 60px; border-radius: 50%; border: none; background: linear-gradient(145deg, var(--accent), #10b981); color: #ffffff;
      font-size: 1.6rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 20px var(--accent-glow);
      transition: all 0.2s ease; font-family: inherit; line-height: 1;
    }
    .btn-add:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 6px 28px var(--accent-glow); }
    .btn-add:active { transform: scale(0.95); }
    .manual-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
    .status { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 0.75rem; }
    .status.sensor-ok { color: var(--accent); }
    .actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1rem; }
    .btn-reset {
      padding: 0.55rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.04); color: var(--text-muted); font-size: 0.8rem; font-family: inherit; cursor: pointer; transition: all 0.2s;
    }
    .btn-reset:hover { color: var(--text); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); }
    .goal-badge { display: none; text-align: center; margin-top: 0.75rem; padding: 0.45rem 1rem; background: var(--accent-dim); color: var(--accent); border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
    .step-card.goal-reached .goal-badge { display: block; }
    .step-card.goal-reached .step-value { animation: pulse 1.5s ease infinite; }
    @keyframes pulse { 50% { opacity: 0.9; } }

    /* ===== ??? ? ===== */
    /* ??? ??? 3D ??? ?? (??????) */
    .avatar-3d-placeholder {
      width: 100%; min-height: 220px; margin: 0 auto 1rem;
      background: linear-gradient(180deg, rgba(52,211,153,0.06) 0%, rgba(0,0,0,0.2) 100%);
      border: 2px dashed rgba(52,211,153,0.35);
      border-radius: var(--radius-lg);
      display: flex; align-items: center; justify-content: center;
      flex-direction: column;
      color: var(--text-muted);
      font-size: 0.85rem;
      text-align: center;
      padding: 1.5rem;
    }
    .avatar-3d-placeholder .ph-title { color: var(--accent); font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
    .avatar-3d-placeholder .ph-desc { font-size: 0.75rem; opacity: 0.9; }
    .avatar-preview-wrap {
      width: 150px; height: 200px; margin: 0 auto 1.25rem;
      background: linear-gradient(180deg, rgba(52,211,153,0.08) 0%, rgba(255,255,255,0.03) 100%); border-radius: var(--radius-lg);
      display: flex; align-items: flex-end; justify-content: center;
      position: relative;
      border: 1px solid rgba(255,255,255,0.06);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }
    .avatar-preview {
      width: 80px; height: 120px;
      position: relative;
    }
    /* ??? ??? ??: ?? ??, ? ?? */
    .avatar-body { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 42px; height: 48px; border-radius: 21px 21px 8px 8px; }
    .avatar-head { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); width: 44px; height: 44px; border-radius: 50%; }
    .avatar-hair { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); width: 52px; height: 22px; border-radius: 50% 50% 0 0; }
    .avatar-armor { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 46px; height: 42px; border-radius: 20px 20px 8px 8px; pointer-events: none; }
    .avatar-weapon { position: absolute; bottom: 28px; right: -26px; font-size: 1.4rem; }
    .avatar-hat { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; }
    .avatar-name { text-align: center; font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--accent); }
    .customize-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; flex-wrap: wrap; }
    .customize-row label { font-size: 0.8rem; color: var(--text-muted); min-width: 3.5rem; font-weight: 500; }
    .customize-row select, .customize-row input[type="text"] {
      flex: 1; min-width: 0; padding: 0.5rem 0.75rem; border-radius: 0.6rem;
      border: 1px solid rgba(255,255,255,0.1); background: var(--bg-soft); color: var(--text);
      font-size: 0.85rem; font-family: inherit;
    }
    .color-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); cursor: pointer; flex-shrink: 0; transition: transform 0.2s, box-shadow 0.2s; }
    .color-swatch:hover { transform: scale(1.08); }
    .color-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim), 0 0 12px var(--accent-glow); }

    /* ===== ??? ? ===== */
    .route-list { display: flex; flex-direction: column; gap: 0.65rem; }
    .route-card {
      background: var(--card);
      border-radius: var(--radius);
      padding: 1rem 1.25rem;
      border: 1px solid rgba(255,255,255,0.06);
      display: flex; align-items: center; gap: 1rem;
      transition: background 0.2s, border-color 0.2s;
    }
    .route-card:not(.locked):hover { background: var(--card-hover); border-color: rgba(52,211,153,0.15); }
    .route-card.locked { opacity: 0.6; }
    .route-icon { font-size: 2rem; width: 48px; text-align: center; flex-shrink: 0; }
    .route-info { flex: 1; min-width: 0; }
    .route-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; }
    .route-steps { font-size: 0.8rem; color: var(--text-muted); }
    .route-reward { font-size: 0.8rem; color: var(--accent); margin-top: 0.25rem; }
    .route-status { font-size: 0.72rem; padding: 0.4rem 0.65rem; border-radius: 999px; flex-shrink: 0; font-weight: 500; }
    .route-status.locked { background: var(--bg-soft); color: var(--text-muted); }
    .route-status.claim { background: var(--accent-dim); color: var(--accent); }
    .route-status.done { background: rgba(52,211,153,0.2); color: var(--accent); }

    /* ===== ?? ? ===== */
    .equipped-section { margin-bottom: 1.25rem; }
    .equipped-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
    .equipped-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .equipped-slot {
      min-height: 4.2rem; background: var(--bg-soft); border-radius: var(--radius);
      border: 1px dashed rgba(255,255,255,0.12); display: flex; flex-direction: column; align-items: center; justify-content: center;
      font-size: 1.5rem; cursor: pointer; transition: all 0.2s; position: relative; padding: 0.5rem 0.35rem 0.4rem;
      gap: 0.2rem;
    }
    .equipped-slot:hover { border-color: rgba(52,211,153,0.3); background: var(--card-hover); }
    .equipped-slot.filled { border-style: solid; border-color: rgba(52,211,153,0.4); background: var(--accent-dim); }
    .equipped-slot .slot-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
    .equipped-slot .slot-item-name { font-size: 0.7rem; color: var(--text); font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
    .equipped-slot .inv-tier { font-size: 0.6rem; font-weight: 600; color: var(--text-muted); }
    .equipped-slot.tier-standard .inv-tier { color: #94a3b8; }
    .equipped-slot.tier-pro .inv-tier { color: #60a5fa; }
    .equipped-slot.tier-prime .inv-tier { color: #a78bfa; }
    .equipped-slot.tier-signature .inv-tier { color: #fbbf24; }
    .inventory-title { font-size: 0.8rem; color: var(--text-muted); margin: 1rem 0 0.5rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
    .inventory-slot-section { margin-bottom: 1rem; }
    .inventory-slot-section h4 { font-size: 0.8rem; color: var(--accent); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.35rem; }
    .inventory-slot-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .inventory-slot-list .inv-item { width: calc(25% - 0.4rem); min-width: 72px; box-sizing: border-box; }
    .inventory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .inv-item {
      aspect-ratio: 1; background: var(--card); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.08);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      font-size: 1.4rem; cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; position: relative;
    }
    .inv-item:hover { transform: scale(1.05); border-color: rgba(52,211,153,0.25); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
    .inv-item .inv-name { font-size: 0.58rem; color: var(--text-muted); margin-top: 0.2rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .inv-item.equipped { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px rgba(52,211,153,0.3); }
    .inv-item-kit .inv-open { font-size: 0.55rem; color: var(--accent); margin-top: 0.1rem; font-weight: 600; }
    .storage-actions { display: flex; gap: 0.35rem; margin-top: 0.4rem; justify-content: center; flex-wrap: wrap; }
    .btn-storage-inv, .btn-storage-open { padding: 0.35rem 0.6rem; font-size: 0.7rem; border-radius: 0.5rem; border: none; cursor: pointer; font-family: inherit; font-weight: 600; }
    .btn-storage-inv { background: var(--bg-soft); color: var(--text); border: 1px solid rgba(255,255,255,0.15); }
    .btn-storage-open { background: linear-gradient(145deg, var(--accent), #10b981); color: var(--bg); }
    .inv-item .rarity-dot { position: absolute; top: 0.2rem; right: 0.2rem; width: 6px; height: 6px; border-radius: 50%; }
    .inv-item.rarity-common .rarity-dot { background: var(--rarity-common); }
    .inv-item.rarity-rare .rarity-dot { background: var(--rarity-rare); box-shadow: 0 0 6px var(--rarity-rare); }
    .inv-item.rarity-epic .rarity-dot { background: var(--rarity-epic); box-shadow: 0 0 8px var(--rarity-epic); }
    .inv-item.rarity-legend .rarity-dot { background: var(--rarity-legend); box-shadow: 0 0 10px var(--rarity-legend); }
    .inv-item.rarity-rare { border-color: rgba(96,165,250,0.4); }
    .inv-item.rarity-epic { border-color: rgba(167,139,250,0.5); box-shadow: 0 0 12px rgba(167,139,250,0.2); }
    .inv-item.rarity-legend { border-color: rgba(251,191,36,0.6); box-shadow: 0 0 16px rgba(251,191,36,0.25); }
    /* ??(??)? ?? ??? */
    .inv-item .inv-tier { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }
    .inv-item .inv-enhance { font-size: 0.85rem; font-weight: 800; color: var(--accent); margin-top: 0.1rem; }
    .inv-item.tier-standard { border-color: rgba(148,163,184,0.4); }
    .inv-item.tier-standard .inv-tier { color: #94a3b8; }
    .inv-item.tier-pro { border-color: rgba(96,165,250,0.5); box-shadow: 0 0 10px rgba(96,165,250,0.15); }
    .inv-item.tier-pro .inv-tier { color: #60a5fa; }
    .inv-item.tier-prime { border-color: rgba(167,139,250,0.6); box-shadow: 0 0 14px rgba(167,139,250,0.2); }
    .inv-item.tier-prime .inv-tier { color: #a78bfa; }
    .inv-item.tier-signature { border-color: rgba(251,191,36,0.7); box-shadow: 0 0 18px rgba(251,191,36,0.25); background: linear-gradient(145deg, var(--card), rgba(251,191,36,0.06)); }
    .inv-item.tier-signature .inv-tier { color: #fbbf24; }
    .equipped-slot.tier-standard.filled { border-color: rgba(148,163,184,0.5); }
    .equipped-slot.tier-pro.filled { border-color: rgba(96,165,250,0.5); box-shadow: 0 0 8px rgba(96,165,250,0.2); }
    .equipped-slot.tier-prime.filled { border-color: rgba(167,139,250,0.5); box-shadow: 0 0 10px rgba(167,139,250,0.25); }
    .equipped-slot.tier-signature.filled { border-color: rgba(251,191,36,0.6); box-shadow: 0 0 12px rgba(251,191,36,0.3); }

    /* ===== ??? ? ===== */
    .story-title { font-size: 0.95rem; color: var(--accent); margin-bottom: 0.75rem; font-weight: 600; }
    .story-text { font-size: 0.9rem; line-height: 1.7; color: var(--text); font-weight: 400; white-space: pre-line; }
    .story-milestone { font-size: 0.78rem; color: var(--text-muted); margin-top: 1rem; }

    /* ?? ?? */
    .toast {
      position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%) translateY(100px);
      background: var(--card); border: 1px solid var(--accent);
      color: var(--accent); padding: 0.8rem 1.35rem; border-radius: var(--radius);
      font-size: 0.9rem; font-weight: 600; z-index: 100; opacity: 0;
      transition: transform 0.3s ease, opacity 0.3s ease;
      box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
    }
    .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

    /* ??? ??? */
    .quest-card { background: var(--card); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06); box-shadow: var(--shadow); }
    .quest-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
    .quest-list { display: flex; flex-direction: column; gap: 0.5rem; }
    .quest-item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.75rem; background: var(--bg-soft); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.06); }
    .quest-item.done { border-color: rgba(52,211,153,0.3); background: var(--accent-dim); }
    .quest-item .quest-info { flex: 1; min-width: 0; }
    .quest-item .quest-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
    .quest-item .quest-progress { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
    .quest-item .quest-reward { font-size: 0.8rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
    .quest-item .btn-claim { padding: 0.35rem 0.65rem; font-size: 0.75rem; border-radius: 0.5rem; border: none; background: linear-gradient(145deg, var(--gold), #d97706); color: #1a1a1a; font-weight: 600; cursor: pointer; font-family: inherit; }
    .quest-item .quest-done-label { font-size: 0.75rem; color: var(--accent); font-weight: 600; }

    /* ===== ?? ? (?? + GPS) ===== */
    .walk-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--accent); }
    .course-set { margin-bottom: 1rem; }
    .course-label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.4rem; font-weight: 500; }
    .course-input { width: 100%; padding: 0.65rem 0.85rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); background: var(--bg-soft); color: var(--text); font-size: 1rem; }
    .walk-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
    .btn-walk-start, .btn-walk-stop { flex: 1; padding: 0.85rem; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; font-family: inherit; cursor: pointer; border: none; transition: all 0.2s ease; }
    .btn-walk-start { background: linear-gradient(145deg, var(--accent), #10b981); color: #ffffff; box-shadow: 0 4px 16px var(--accent-glow); }
    .btn-walk-start:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 24px var(--accent-glow); }
    .btn-walk-stop { background: rgba(248,113,113,0.2); color: #f87171; border: 1px solid rgba(248,113,113,0.4); }
    .btn-walk-stop:hover:not(:disabled) { transform: translateY(-2px); background: rgba(248,113,113,0.3); box-shadow: 0 4px 12px rgba(248,113,113,0.2); }
    .btn-walk-start:disabled, .btn-walk-stop:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .walk-live { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.75rem; }
    .walk-stat { background: var(--bg-soft); border-radius: 0.6rem; padding: 0.65rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.05); }
    .walk-stat-value { color: var(--accent); font-weight: 700; font-size: 1.15rem; }
    .walk-next { grid-column: 1 / -1; font-size: 0.8rem; color: var(--gold); text-align: center; font-weight: 500; }
    .walk-status { font-size: 0.8rem; color: var(--text-muted); text-align: center; }
    .walk-route-select { margin-bottom: 1rem; }
    .walk-route-select label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.4rem; font-weight: 500; }
    .walk-route-select select { width: 100%; padding: 0.65rem 0.85rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); background: var(--bg-soft); color: var(--text); font-size: 0.95rem; }
    .btn-add-route { width: 100%; padding: 0.6rem; margin-top: 0.5rem; border-radius: var(--radius); border: 1px dashed rgba(52,211,153,0.5); background: transparent; color: var(--accent); font-size: 0.85rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; }
    .btn-add-route:hover { background: var(--accent-dim); }
    #walkMap { width: 100%; height: 220px; border-radius: var(--radius-lg); margin-top: 1rem; overflow: hidden; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 4px 20px rgba(0,0,0,0.2); background: linear-gradient(180deg, var(--bg-soft) 0%, var(--card) 100%); }
    .our-map-wrap { width: 100%; height: 100%; position: relative; border-radius: inherit; }
    .our-map-wrap svg { width: 100%; height: 100%; display: block; }
    .our-map-path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; filter: drop-shadow(0 0 6px var(--accent-glow)); transition: d 0.2s ease; }
    [data-theme="morning"] .our-map-path { stroke: var(--accent); filter: drop-shadow(0 0 4px rgba(22,163,74,0.35)); }
    /* ?? ?? ???? ?? ??? ? ?? ?? ?? ??? ?? */
    .routes-map-box .our-map-path { stroke: var(--gold); stroke-width: 4; filter: drop-shadow(0 0 6px var(--gold-dim)); }
    .our-map-char { transition: transform 0.2s ease-out; }
    .our-map-char .char-body { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
    .our-map-char .char-head { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
    .our-map-char .char-shadow { fill: rgba(0,0,0,0.2); }
    .our-map-grid line { stroke: rgba(255,255,255,0.06); stroke-width: 0.4; stroke-dasharray: 3 4; }
    [data-theme="morning"] .our-map-grid line { stroke: rgba(0,0,0,0.08); stroke-dasharray: 3 4; }
    .our-map-label { position: absolute; bottom: 10px; left: 12px; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
    .routes-map-box { border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--card) 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
    .route-create-card { margin-bottom: 1rem; padding: 1rem; background: var(--card); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.06); }
    .route-create-card input { margin-bottom: 0.5rem; }
    .achievement-section { margin-bottom: 1.25rem; }
    .achievement-title { font-size: 0.9rem; font-weight: 600; color: var(--accent); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
    .achievement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .achievement-item { background: var(--bg-soft); border-radius: var(--radius); padding: 0.75rem; border: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 0.6rem; }
    .achievement-item.unlocked { border-color: rgba(52,211,153,0.3); background: var(--accent-dim); }
    .achievement-item .ach-icon { font-size: 1.75rem; width: 40px; text-align: center; flex-shrink: 0; }
    .achievement-item.locked .ach-icon { filter: grayscale(1); opacity: 0.6; }
    .achievement-item .ach-name { font-size: 0.8rem; font-weight: 600; }
    .achievement-item .ach-desc { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

    /* ??(?? ??) */
    .gacha-card { background: var(--card); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06); text-align: center; box-shadow: var(--shadow); }
    .gacha-gold { font-size: 1.5rem; font-weight: 700; color: var(--gold); margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
    .gacha-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 0.75rem; }
    .btn-gacha { padding: 0.85rem 1.5rem; border-radius: var(--radius); background: linear-gradient(145deg, var(--gold), #d97706); color: #1a1a1a; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer; font-family: inherit; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(202, 138, 4, 0.25); }
    .btn-gacha:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(202, 138, 4, 0.35); }
    .btn-gacha:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .btn-gacha-premium { padding: 0.85rem 1.5rem; border-radius: var(--radius); background: linear-gradient(145deg, #a78bfa, #7c3aed); color: #fff; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer; font-family: inherit; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(167, 139, 250, 0.25); }
    .btn-gacha-premium:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(167, 139, 250, 0.35); }
    .btn-gacha-premium:disabled { opacity: 0.5; cursor: not-allowed; }
    .gacha-cost { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }
    .share-card { background: var(--card); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06); text-align: center; }
    .btn-share { width: 100%; padding: 0.8rem; border-radius: var(--radius); background: #fee500; color: #191919; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer; font-family: inherit; }
    .payment-card { background: var(--card); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06); }
    .payment-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
    .payment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
    .payment-item-card { background: var(--bg-soft); border-radius: var(--radius); padding: 1rem; text-align: center; border: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 0.35rem; align-items: center; }
    .payment-item-card.highlight { border-color: rgba(251,191,36,0.4); background: linear-gradient(145deg, var(--bg-soft), rgba(251,191,36,0.06)); }
    .payment-amount { font-size: 1.1rem; font-weight: 700; color: var(--gold); }
    .payment-price { font-size: 0.7rem; color: var(--text-muted); }
    .btn-payment { padding: 0.45rem 0.75rem; font-size: 0.8rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: var(--text-muted); cursor: not-allowed; font-family: inherit; }

    /* ?? ?? */
    .enhance-section { margin-bottom: 1rem; }
    .enhance-select { width: 100%; padding: 0.65rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); background: var(--bg-soft); color: var(--text); margin-bottom: 0.5rem; font-size: 0.9rem; }
    .btn-enhance { width: 100%; padding: 0.75rem; border-radius: var(--radius); background: linear-gradient(145deg, var(--rarity-epic), #7c3aed); color: #fff; font-weight: 600; border: none; cursor: pointer; font-family: inherit; }
    .btn-enhance:disabled { opacity: 0.5; cursor: not-allowed; }
    .enhance-warn { font-size: 0.75rem; color: #f87171; margin-top: 0.5rem; }
    .enhance-table-wrap { margin: 1rem 0; overflow-x: auto; }
    .enhance-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
    .enhance-table th, .enhance-table td { padding: 0.5rem 0.6rem; text-align: center; border: 1px solid rgba(255,255,255,0.08); }
    .enhance-table .enhance-col { font-size: 1rem; font-weight: 700; color: var(--accent); }
    .enhance-table th { background: var(--bg-soft); color: var(--text-muted); font-weight: 600; }
    .enhance-table tr:nth-child(even) { background: rgba(255,255,255,0.02); }
    .enhance-table .rate-ok { color: var(--accent); }
    .enhance-table .rate-mid { color: var(--gold); }
    .enhance-table .rate-low { color: #f87171; }
    .enhance-note { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.5rem; line-height: 1.5; }
    .equip-bonus-summary { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; padding: 0.6rem; background: var(--bg-soft); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.06); }
    .equip-bonus-summary strong { color: var(--accent); }

    /* 2D ??? ??? - ???? ??? ??? */
    .avatar-human { width: 100px; height: 168px; margin: 0 auto; position: relative; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2)); }
    .avatar-human .ah-head { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; border-radius: 50%; box-shadow: inset -2px -1px 0 rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.12); }
    .avatar-human .ah-face { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 24px; height: 10px; display: flex; justify-content: space-between; align-items: center; }
    .avatar-human .ah-face .eye { width: 4px; height: 4px; border-radius: 50%; background: rgba(0,0,0,0.5); }
    .avatar-human .ah-neck { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); width: 10px; height: 12px; border-radius: 0 0 4px 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
    .avatar-human .ah-torso { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); width: 46px; height: 44px; border-radius: 12px 12px 8px 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1); }
    .avatar-human .ah-arm-l, .avatar-human .ah-arm-r { position: absolute; top: 52px; width: 10px; height: 34px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
    .avatar-human .ah-arm-l { left: 0; transform-origin: top right; }
    .avatar-human .ah-arm-r { right: 0; transform-origin: top left; }
    .avatar-human .ah-leg-l, .avatar-human .ah-leg-r { position: absolute; top: 90px; width: 14px; height: 44px; border-radius: 0 0 8px 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
    .avatar-human .ah-leg-l { left: 24px; }
    .avatar-human .ah-leg-r { right: 24px; }
    .avatar-human .ah-slot-head { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 1.35rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }
    .avatar-human .ah-slot-accessory { position: absolute; top: 6px; right: -12px; font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }
    .avatar-preview-wrap { padding: 1.25rem; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--card) 100%); border-radius: var(--radius-lg); margin-bottom: 1.25rem; border: 1px solid rgba(255,255,255,0.06); }
    .avatar-section .customize-row { margin-bottom: 1rem; }
    .avatar-section .customize-row label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
    .avatar-section .customize-section-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin: 1.25rem 0 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .avatar-section .customize-section-title:first-of-type { margin-top: 0; }

    /* ??? ??? */
    @media (max-width: 480px) {
      .container { padding-left: 0.75rem; padding-right: 0.75rem; }
      header { padding-top: 0.5rem; }
      h1 { font-size: 1.3rem; }
      .step-value { font-size: 2.75rem; }
      .btn-add { width: 64px; height: 64px; font-size: 1.8rem; }
      .tab-btn { min-width: 2.5rem; padding: 0.5rem 0.25rem; font-size: 0.7rem; }
      .tab-btn .tab-emoji { font-size: 1.25rem; }
      .step-card, .walk-card, .avatar-section, .story-section { padding: 1.25rem; }
      .auth-modal { padding: 1.25rem; max-width: 100%; }
      .btn-auth-submit, .btn-gacha, .btn-gacha-premium, .btn-share, .btn-attendance { min-height: 44px; padding: 0.75rem; }
      .btn-reset, .btn-claim { min-height: 36px; padding: 0.5rem 0.9rem; }
      .header-auth-btn { min-height: 36px; padding: 0.4rem 0.6rem; font-size: 0.75rem; }
      .theme-toggle { width: 40px; height: 40px; }
      input[type="text"], input[type="password"], input[type="number"], select { min-height: 44px; font-size: 16px; }
      .inv-item { min-height: 80px; }
      .equipped-slot { min-height: 5rem; }
    }
    @media (hover: none) and (pointer: coarse) {
      .btn-add:hover, .btn-reset:hover, .tab-btn:hover, .header-auth-btn:hover { transform: none; }
      .btn-add:active { transform: scale(0.95); }
      .btn-reset:active, .tab-btn:active { opacity: 0.7; }
    }
    html { -webkit-overflow-scrolling: touch; height: 100%; }
    body { -webkit-tap-highlight-color: transparent; height: 100%; overflow-y: auto; }
    button, a, input, select, .tab-btn, .inv-item, .equipped-slot { -webkit-tap-highlight-color: rgba(255,255,255,0.1); touch-action: manipulation; }
    input, textarea, select { font-size: 16px; }
    @supports (-webkit-touch-callout: none) {
      input, textarea, select { font-size: 16px; }
    }
    @media (max-width: 480px) {
      .auth-overlay { padding: 0.5rem; align-items: flex-start; padding-top: max(1rem, env(safe-area-inset-top)); }
      .auth-modal { margin-top: auto; margin-bottom: auto; max-height: calc(100vh - 2rem); overflow-y: auto; }
    }

    /* ===== ??/?? ? ===== */
    .social-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; border-bottom: 2px solid rgba(255,255,255,0.08); }
    .social-tab-btn { flex: 1; padding: 0.85rem 0.5rem; border: none; background: transparent; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s ease; position: relative; }
    .social-tab-btn:hover { color: var(--text); }
    .social-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
    .social-content { animation: fadeIn 0.25s ease; }
    .friend-item, .chat-item { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--bg-soft); border-radius: var(--radius); margin-bottom: 0.75rem; border: 1px solid rgba(255,255,255,0.06); transition: all 0.2s ease; }
    .friend-item:hover, .chat-item:hover { background: var(--card-hover); border-color: rgba(255,255,255,0.12); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
    .friend-info, .chat-info { flex: 1; min-width: 0; }
    .friend-name, .chat-name { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.3rem; }
    .friend-status, .chat-last-message { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
    .friend-actions, .chat-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
    .btn-friend-action { padding: 0.5rem 1rem; border-radius: 0.6rem; border: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s ease; }
    .btn-friend-accept { background: linear-gradient(145deg, var(--accent), #10b981); color: #ffffff; box-shadow: 0 2px 8px rgba(74, 222, 128, 0.25); }
    .btn-friend-reject { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
    .btn-friend-chat { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(74,222,128,0.3); }
    .btn-friend-action:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
    .btn-friend-accept:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(74, 222, 128, 0.35); }
    .btn-friend-action:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .chat-message { margin-bottom: 0.75rem; display: flex; flex-direction: column; max-width: 75%; }
    .chat-message.sent { align-items: flex-end; margin-left: auto; }
    .chat-message.received { align-items: flex-start; }
    .chat-message-content { padding: 0.6rem 0.85rem; border-radius: 1rem; word-wrap: break-word; line-height: 1.4; display: inline-block; max-width: 100%; }
    .chat-message.sent .chat-message-content { background: linear-gradient(135deg, var(--accent), #10b981); color: #ffffff; border-bottom-right-radius: 0.25rem; box-shadow: 0 2px 8px rgba(74, 222, 128, 0.25); }
    .chat-message.received .chat-message-content { background: var(--bg-soft); color: var(--text); border-bottom-left-radius: 0.25rem; border: 1px solid rgba(255,255,255,0.08); }
    .chat-message-time { font-size: 0.65rem; margin-top: 0.25rem; padding: 0 0.5rem; }
    .chat-message.sent .chat-message-time { color: rgba(255,255,255,0.6); text-align: right; }
    .chat-message.received .chat-message-time { color: var(--text-muted); text-align: left; }
    #chatMessages { display: flex; flex-direction: column; gap: 0.25rem; }
    .party-member { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--bg-soft); border-radius: var(--radius); margin-bottom: 0.75rem; border: 1px solid rgba(255,255,255,0.06); transition: all 0.2s ease; }
    .party-member:hover { background: var(--card-hover); border-color: rgba(255,255,255,0.12); }
    .party-member-leader { border: 1px solid var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.2); }
    .party-member-info { display: flex; align-items: center; flex: 1; }
    .party-member-name { font-size: 0.95rem; font-weight: 600; color: var(--text); }
    .party-member-role { font-size: 0.75rem; color: var(--accent); margin-left: 0.5rem; padding: 0.2rem 0.5rem; background: rgba(74, 222, 128, 0.15); border-radius: 0.4rem; font-weight: 600; }
    .empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
    .empty-state::before { content: '??'; display: block; font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }
    .btn-chat-close { 
      padding: 0.35rem 0.65rem !important; 
      border-radius: 0.5rem; 
      border: 1px solid rgba(248,113,113,0.4); 
      background: rgba(248,113,113,0.15); 
      color: #f87171; 
      font-size: 0.75rem !important; 
      font-weight: 600; 
      cursor: pointer; 
      font-family: inherit; 
      transition: all 0.2s ease; 
      flex-shrink: 0;
      min-width: auto;
      width: auto;
      height: auto;
    }
    .btn-chat-close:hover { background: rgba(248,113,113,0.25); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(248,113,113,0.2); }