  :root {
    --bg: #F5F0EB;
    --bg-card: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #6B6560;
    --text-tertiary: #9E9893;
    --accent: #E85D3A;
    --accent-hover: #D14E2D;
    --accent-light: #FFF0EC;
    --accent-glow: rgba(232, 93, 58, 0.15);
    --green: #2DB578;
    --green-light: #EDFBF3;
    --border: #E8E3DE;
    --shadow-sm: 0 1px 3px rgba(26, 26, 26, 0.04);
    --shadow-md: 0 4px 20px rgba(26, 26, 26, 0.06);
    --shadow-lg: 0 12px 40px rgba(26, 26, 26, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 999px;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  /* ============ PAGE: HOME ============ */
  .page { display: none; flex-direction: column; min-height: 100dvh; }
  .page.active { display: flex; }

  .home-page {
    padding: 0 24px;
    justify-content: center;
    align-items: center;
    gap: 48px;
  }

  .brand {
    text-align: center;
    animation: fadeUp 0.8s ease-out;
  }

  .brand-name {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 12px;
  }

  .brand-slogan {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
  }

  .input-area {
    width: 100%;
    animation: fadeUp 0.8s ease-out 0.15s both;
  }

  .input-label {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    padding-left: 4px;
  }

  .input-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border);
    padding: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: flex-end;
    gap: 4px;
  }

  .input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
  }

  .input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
    resize: none;
    padding: 14px 14px;
    line-height: 1.5;
    min-height: 52px;
    max-height: 120px;
  }

  .input-field::placeholder {
    color: var(--text-tertiary);
  }

  .send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
  }

  .send-btn:active {
    transform: scale(0.93);
    background: var(--accent-hover);
  }

  .send-btn:disabled {
    background: var(--border);
    cursor: not-allowed;
  }

  .send-btn svg {
    width: 20px;
    height: 20px;
  }

  .home-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    animation: fadeUp 0.8s ease-out 0.3s both;
  }

  /* ============ PAGE: RESULT ============ */
  .result-page {
    padding: 0 24px;
    padding-top: max(60px, env(safe-area-inset-top, 60px));
    gap: 28px;
  }

  .user-task {
    animation: fadeUp 0.5s ease-out;
  }

  .user-task-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 4px;
  }

  .user-task-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  /* Loading */
  .loading-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
  }

  .loading-dots {
    display: flex;
    gap: 6px;
  }

  .loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: bounce 1.2s ease-in-out infinite;
  }

  .loading-dots span:nth-child(2) { animation-delay: 0.15s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.3s; }

  .loading-text {
    font-size: 14px;
    color: var(--text-tertiary);
  }

  /* Suggestion Card */
  .suggestion-area {
    animation: fadeUp 0.6s ease-out;
  }

  .suggestion-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px 24px;
    text-align: center;
  }

  .suggestion-eyebrow {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 16px;
  }

  .suggestion-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 8px;
  }

  .suggestion-nudge {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 16px;
  }

  /* Action Buttons */
  .actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 4px;
    animation: fadeUp 0.6s ease-out 0.15s both;
  }

  .actions-slogan {
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    padding-bottom: 4px;
  }

  .btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 16px rgba(232, 93, 58, 0.3);
  }

  .btn-primary:active {
    background: var(--accent-hover);
  }

  .btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
  }

  .btn-secondary:active {
    background: var(--bg);
  }

  .btn-ghost {
    background: transparent;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 12px;
  }

  .btn-ghost:active {
    color: var(--text-secondary);
  }

  /* Swap limit message */
  .swap-limit {
    text-align: center;
    animation: fadeUp 0.6s ease-out;
  }

  .swap-limit-emoji {
    font-size: 48px;
    margin-bottom: 16px;
  }

  .swap-limit-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
  }

  .swap-limit-sub {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.5;
  }

  /* ============ PAGE: TIMER ============ */
  .timer-page {
    padding: 0 24px;
    justify-content: center;
    align-items: center;
    gap: 48px;
  }

  .timer-context {
    text-align: center;
    animation: fadeUp 0.5s ease-out;
  }

  .timer-task-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
  }

  .timer-task-text {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
  }

  .timer-display {
    text-align: center;
    animation: fadeUp 0.5s ease-out 0.1s both;
  }

  .timer-time {
    font-size: 72px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  .timer-time-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 10px;
  }

  .timer-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    margin: 0 auto 0;
    animation: pulse 2s ease-in-out infinite;
  }

  .timer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    animation: fadeUp 0.5s ease-out 0.2s both;
  }

  .btn-done {
    background: var(--green);
    color: white;
    box-shadow: 0 4px 16px rgba(45, 181, 120, 0.3);
  }

  .btn-done:active {
    background: #26A06A;
  }

  /* ============ PAGE: COMPLETE ============ */
  .complete-page {
    padding: 0 24px;
    justify-content: center;
    align-items: center;
    gap: 40px;
  }

  .complete-celebration {
    text-align: center;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .complete-emoji {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    animation: wiggle 0.6s ease-in-out 0.3s;
  }

  .complete-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
  }

  .complete-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
  }

  .complete-stat {
    background: var(--green-light);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    text-align: center;
    animation: fadeUp 0.5s ease-out 0.2s both;
  }

  .complete-stat-label {
    font-size: 12px;
    color: var(--green);
    font-weight: 500;
    margin-bottom: 4px;
  }

  .complete-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
    font-variant-numeric: tabular-nums;
  }

  .complete-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeUp 0.5s ease-out 0.3s both;
  }

  /* ============ CONFETTI ============ */
  .confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
  }

  .confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confettiFall 2.5s ease-in forwards;
  }

  /* ============ ANIMATIONS ============ */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
  }

  @keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
  }

  @keyframes confettiFall {
    0% { top: -10%; opacity: 1; }
    100% { top: 110%; opacity: 0; }
  }
