/* 字体已改由 index.html 的 <link rel="stylesheet"> + preconnect 加载，避免 @import 的渲染阻塞 */

@layer reset, base, theme, components, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }
  
  button, input, select, textarea {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
  }
}

@layer base {
  :root {
    /* Base HSL values representing the starting/default Focuszen calming color theme (Warm Coral) */
    --theme-h: 16;
    --theme-s: 100%;
    --theme-l: 70%;
    
    /* Primary Accent (Default: Focuszen Warm Coral) */
    --accent: #FF8A65;
    --accent-light: #FFA185;
    --accent-glow: rgba(255, 138, 101, 0.08);
    /* 实心填充专用色（按钮等）：保底鲜艳，浅色主题下也不会变成发白方块 */
    --accent-fill: hsl(16, 100%, 62%);
    --accent-fill-light: hsl(16, 100%, 70%);
    
    /* Typography matching Focuszen branding */
    --font-title: 'Playfair Display', 'Noto Serif SC', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-serif: 'Noto Serif SC', 'Georgia', serif;
    --font-handwritten: 'Ma Shan Zheng', 'Caveat', cursive, sans-serif;
    
    /* UI Sizing & Spacing */
    --max-w-content: 600px;
    --border-radius-card: 16px;
    --border-radius-pill: 50px;
    --transition-easing: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Background and Surfaces (Clean Deep Charcoal palette) */
    --bg-gradient-start: #111418;
    --bg-gradient-end: #0c0e12;
    --surface-glass: #1A1D24;
    --surface-glass-border: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-muted: #8E95A1;
  }

  body {
    font-family: var(--font-body);
    background-color: #0A0B0E;
    background-image: 
      radial-gradient(circle at center, rgba(16, 18, 24, 0.98) 30%, rgba(8, 9, 12, 1) 100%),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
    color: var(--text-primary);
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

}

@layer theme {
  body {
    scrollbar-color: var(--accent) transparent;
    scrollbar-width: thin;
  }

  ::selection {
    background-color: var(--accent-glow);
    color: var(--text-primary);
  }
}

@layer components {
  /* Container for the app viewport to feel like a premium mobile app on desktop, but fill screen on mobile */
  .app-viewport {
    width: 100%;
    max-width: var(--max-w-content);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: transparent;
    backdrop-filter: saturate(140%) blur(4px);
  }

  /* Screens/Views within the SPA */
  .view-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98) translateY(10px);
    transition: opacity 0.5s var(--transition-easing),
                visibility 0.5s var(--transition-easing),
                transform 0.5s var(--transition-easing);
    overflow-y: auto;
  }

  .view-screen.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
  }

  /* 1. NARRATIVE SCREEN (Poetic Paper Feeling) */
  .narrative-paper {
    background-color: #12131a;
    background-image: 
      radial-gradient(circle at center, rgba(28, 30, 43, 0.98), rgba(8, 8, 12, 1)),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.016'/%3E%3C/svg%3E");
    font-family: var(--font-serif);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    z-index: 100;
  }

  .narrative-content {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
  }

  .narrative-line {
    font-size: 1.15rem;
    line-height: 1.8;
    font-weight: 300;
    color: rgba(226, 232, 240, 0.85);
    text-wrap: pretty;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.9s var(--transition-easing);
  }

  .narrative-line.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .typing-cursor::after {
    content: '|';
    animation: blink 1s infinite steps(2, start);
  }

  .skip-narrative-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    z-index: 2;
  }
  
  .skip-narrative-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
  }

  /* 2. GLASS CARDS */
  .glass-card {
    background: rgba(18, 20, 27, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-card);
    padding: 2.2rem 1.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  }


  /* Forms & Inputs */
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .input-label {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
  }

  .text-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s var(--transition-easing);
  }
  
  .text-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px var(--accent-glow);
  }

  select.text-input {
    cursor: pointer;
    background-color: rgb(15, 17, 26);
  }

  /* 3. MBTI QUIZ ELEMENTS */
  .quiz-option-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    margin-bottom: 0.75rem;
    transition: all 0.25s var(--transition-easing);
  }
  
  .quiz-option-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent);
    transform: translateX(4px);
  }
  
  .quiz-option-btn:active {
    transform: translateX(2px);
  }

  .quiz-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
  }

  .quiz-progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.4s var(--transition-easing);
  }

  /* Quiz Visual Selection Cards (A/B) */
  .quiz-visual-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 1rem;
  }

  .quiz-visual-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-easing);
  }

  .quiz-visual-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent);
    transform: translateY(-4px);
  }

  .quiz-visual-card.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
  }

  /* 4. FLOWER LEAF COLOR WREATH (Apple Style Glassmorphism) */
  .wreath-container {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 2rem 0;
  }

  .wreath-svg {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: 320px;
    overflow: visible;
  }

  .leaf-node {
    cursor: pointer;
    transition: transform 0.45s var(--transition-easing), filter 0.45s var(--transition-easing);
  }
  
  .leaf-node .leaf-path-outer {
    fill: var(--leaf-color-border, rgba(255, 192, 192, 0.2));
    transition: fill 0.3s ease;
  }
  
  .leaf-node .leaf-path-inner {
    fill: var(--leaf-color, #ffb3b3);
    transition: fill 0.3s ease;
  }
  
  .leaf-node:hover {
    transform: scale(1.18) translate(var(--hover-dx, 0), var(--hover-dy, 0)) rotate(var(--rotate-deg, 0deg));
    filter: drop-shadow(0 0 14px var(--leaf-glow, rgba(255, 180, 180, 0.6)));
  }
  
  .leaf-node.active {
    transform: scale(1.24) translate(var(--hover-dx, 0), var(--hover-dy, 0)) rotate(var(--rotate-deg, 0deg));
    filter: drop-shadow(0 0 22px var(--leaf-glow, rgba(255, 255, 255, 0.95)));
  }
  
  .leaf-node.active .leaf-path-outer {
    fill: #ffffff;
  }

  /* Leaf veins styles */
  .leaf-vein {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 1.2px;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
  }

  .leaf-node.active .leaf-vein {
    stroke: #ffffff;
    stroke-width: 1.5px;
  }

  .wreath-center-mandala {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  }

  .wreath-center-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: background 0.4s ease, box-shadow 0.4s ease;
  }

  /* Micro HSL Slider center overlay popover */
  .wreath-slider-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    background: rgba(15, 17, 28, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 35px rgba(0,0,0,0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 14px;
    padding: 0.8rem;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 100;
  }

  /* 5. GOAL COACH CARD */
  .goal-popup-card {
    background: rgba(15, 17, 26, 0.8);
    border: 1px solid var(--surface-glass-border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .goal-suggest-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .goal-suggest-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.6rem;
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-wrap: balance;
  }
  
  .goal-suggest-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
  }

  /* App Dock Grid Styling */
  .app-dock-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 18px;
    min-height: 100px;
  }

  .dock-app-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s var(--transition-easing);
  }

  .dock-app-item:hover {
    transform: translateY(-4px);
  }

  .dock-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 0.25s ease;
  }

  .dock-app-item:hover .dock-app-icon {
    border-color: var(--accent);
  }

  /* 品牌 SVG 图标：撑满圆角容器，留一点内边距呼吸感 */
  .dock-app-icon.brand-icon {
    padding: 8px;
  }
  .dock-app-icon.brand-icon svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* 官方图标图片：贴合容器，圆角裁切 */
  .dock-app-icon.brand-icon.has-img {
    padding: 6px;
    overflow: hidden;
  }
  .dock-app-icon.brand-icon.has-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
  }

  .dock-app-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Edit Mode Overlays */
  .dock-app-delete-btn {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
  }

  .dock-app-nav-btns {
    position: absolute;
    bottom: -8px;
    width: 100%;
    display: none;
    justify-content: space-between;
    padding: 0 4px;
    z-index: 10;
  }

  .dock-nav-btn {
    width: 15px;
    height: 15px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--accent);
    font-size: 0.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
  }

  .dock-app-item.edit-mode .dock-app-delete-btn,
  .dock-app-item.edit-mode .dock-app-nav-btns {
    display: flex;
  }

  .floating-desk-pet-container {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 1000;
    animation: float-pet 4.5s ease-in-out infinite;
    transition: filter 0.3s ease;
  }
  
  .floating-desk-pet-container:hover {
    filter: brightness(1.1);
  }

  @keyframes float-pet {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-8px);
    }
  }

  .pet-mini-console {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 17, 26, 0.85);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 50px;
    padding: 0.2rem 0.4rem;
    display: none;
    gap: 0.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 100;
  }
  
  .pet-mini-console button {
    font-size: 0.55rem;
    padding: 0.15rem 0.3rem;
    border-radius: 50px;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
  }
  
  .pet-mini-console button:hover {
    background: rgba(255,255,255,0.08);
  }

  .floating-desk-pet-container:hover .pet-mini-console {
    display: flex;
  }

  /* 6. TOAST INTERACTION ALERTS */
  .alert-blocking-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--transition-easing), visibility 0.5s var(--transition-easing);
  }
  
  .alert-blocking-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .alert-blocking-card {
    background: rgba(20, 22, 33, 0.75);
    border: 1.5px solid rgba(239, 68, 68, 0.25);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.5s var(--transition-easing);
  }

  .alert-blocking-overlay.active .alert-blocking-card {
    transform: scale(1);
  }

  .blocking-warning-title {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 800;
    color: #f87171;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
  }

  .blocking-warning-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
  }
  
  .blocking-warning-body strong {
    color: var(--text-primary);
  }

  /* Buttons */
  .btn-primary {
    background: var(--accent-fill);
    color: #111418;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 2rem;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    box-shadow: none;
    transition: all 0.25s var(--transition-easing);
    text-align: center;
  }
  
  .btn-primary:hover {
    background: var(--accent-fill-light);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .btn-primary:active {
    transform: translateY(1px);
  }

  .btn-sec {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all 0.3s var(--transition-easing);
  }
  
  .btn-sec:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }

  /* Headings & Text */
  .title-lg {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 1.2rem + 3vw, 2.4rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
  }

  .desc-md {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-wrap: pretty;
  }

  /* Search Bar (Chrome-style) */
  .search-wrapper {
    position: relative;
    width: 100%;
    margin-top: 1.5rem;
  }

  .search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-pill);
    padding: 1.1rem 1.5rem 1.1rem 3.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s var(--transition-easing);
  }
  
  .search-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 20px var(--accent-glow);
  }

  .search-icon {
    position: absolute;
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
  }

  .search-wrapper:focus-within .search-icon {
    color: var(--accent);
  }

  /* Canvas Walk Cycles (Visual Avatar) */
  .avatar-canvas-container {
    width: 100%;
    aspect-ratio: 1.7;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .avatar-canvas {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.01);
  }

  .avatar-state-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-family: var(--font-title);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  /* State indicator dot */
  .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
  }

  .state-black .badge-dot { background-color: #ef4444; }
  .state-gray .badge-dot { background-color: var(--accent); }
  .state-white .badge-dot { background-color: #10b981; }

  /* Reborn Warning Banner overlay */
  .reborn-banner {
    position: absolute;
    bottom: 0.5rem;
    left: 5%;
    width: 90%;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--transition-easing);
    pointer-events: none;
  }
  
  .reborn-banner.active {
    opacity: 1;
    transform: translateY(0);
  }

  .reborn-banner-title {
    font-family: var(--font-title);
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
  }

  .reborn-banner-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.1rem;
  }

  /* Bottom Meditation circular trigger */
  .meditation-trigger-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0 0.5rem 0;
  }

  .circle-pulse-trigger {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #1A1D24;
    border: 1.5px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    box-shadow: none;
    transition: all 0.35s var(--transition-easing);
  }
  
  .circle-pulse-trigger::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    opacity: 0.3;
    animation: pulse-ring 2.5s infinite var(--transition-easing);
  }

  .circle-pulse-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.25);
  }
  
  .circle-pulse-trigger:active {
    transform: scale(0.96);
  }

  .meditation-trigger-icon {
    width: 28px;
    height: 28px;
    color: var(--text-primary);
  }

  /* Galaxy Meditation Space Elements */
  .galaxy-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    height: 100%;
  }

  .galaxy-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: var(--border-radius-card);
  }

  .galaxy-ui {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none; /* Make overlay click-through */
  }

  .galaxy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 1.5rem 0 1.5rem;
    pointer-events: auto; /* Re-enable clicks for headers */
  }

  .meditation-timer {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Bubble Prompts container */
  .bubble-prompts-area {
    position: absolute;
    inset: 15% 5% 30% 5%;
    pointer-events: none;
    overflow: hidden;
  }

  .thought-bubble {
    position: absolute;
    left: 50%;
    max-width: 14em;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.95;
    letter-spacing: 0.04em;
    text-align: center;
    color: rgba(246, 248, 252, 0.94);
    /* 仅一层柔和光晕，不再有边框/底色方块 */
    text-shadow:
      0 0 22px var(--bubble-glow, rgba(190, 205, 255, 0.38)),
      0 0 2px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    opacity: 0;
    will-change: opacity, transform, filter;
    /* 从模糊聚焦浮现，停留，再轻轻上飘虚化 */
    animation: thought-surface 12s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  /* Breathing Circle Guidance */
  .breathing-sanctuary {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
  }

  .breath-circle-outer {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .breath-circle-inner {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: none;
    transition: transform 4.0s cubic-bezier(0.4, 0, 0.2, 1);
  }


  .breathing-text {
    margin-top: 1.5rem;
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    text-align: center;
  }

  /* Glass modal dialog styling */
  .dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .dialog-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .dialog-content {
    background: var(--surface-glass);
    border: 1px solid var(--surface-glass-border);
    border-radius: var(--border-radius-card);
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transform: scale(0.92);
    transition: transform 0.35s var(--transition-easing);
  }

  .dialog-overlay.active .dialog-content {
    transform: scale(1);
  }

  .dialog-title {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 600;
  }

  .dialog-body {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
  }
}

@layer utilities {
  /* Animation Keyframes */
  @keyframes pulse-ring {
    0% {
      transform: scale(1);
      opacity: 0.4;
    }
    50% {
      transform: scale(1.15);
      opacity: 0.15;
    }
    100% {
      transform: scale(1);
      opacity: 0.4;
    }
  }

  @keyframes thought-surface {
    0% {
      opacity: 0;
      filter: blur(9px);
      transform: translate(-50%, 30px) scale(0.96);
    }
    16% {
      opacity: 0.95;
      filter: blur(0);
      transform: translate(-50%, 0) scale(1);
    }
    76% {
      opacity: 0.95;
      filter: blur(0);
      transform: translate(-50%, -12px) scale(1);
    }
    100% {
      opacity: 0;
      filter: blur(7px);
      transform: translate(calc(-50% + var(--drift, 0px)), -46px) scale(1.03);
    }
  }

  @keyframes cloud-morph {
    0%, 100% {
      border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
    33% {
      border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
    }
    66% {
      border-radius: 50% 60% 40% 60% / 50% 40% 60% 50%;
    }
  }

  @keyframes blink {
    from, to { color: transparent; }
    50% { color: inherit; }
  }

  @keyframes slide-down-fade {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .circle-pulse-trigger::after {
    animation: none !important;
  }
}

.preset-app-badge {
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s var(--transition-easing);
}

.preset-app-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Sleek premium scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* 无障碍：尊重系统“减少动态效果”偏好。本应用面向焦虑用户，更应避免感官过载 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══ 平台直达选择器（搜索栏内右侧，tryrevive 核心交互） ═══ */
.search-platform-select {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text-muted, rgba(255,255,255,0.55));
  font-size: 0.78rem;
  font-family: inherit;
  padding: 0.42rem 1.7rem 0.42rem 0.9rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  z-index: 2;
}
.search-platform-select:hover,
.search-platform-select:focus {
  color: var(--text-primary, #fff);
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
}
.search-platform-select option {
  background: #14161f;
  color: #eaeaea;
}
/* 给右侧选择器留出空间 */
.search-wrapper .search-input { padding-right: 8.4rem; }
@media (max-width: 520px) {
  .search-platform-select { font-size: 0.7rem; padding: 0.36rem 1.5rem 0.36rem 0.7rem; }
  .search-wrapper .search-input { padding-right: 7.2rem; }
}

/* ═══ AI 心语对话：高透明气泡，催促而不压迫 ═══ */
.ai-chat-toggle {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}
.ai-chat-toggle:hover { transform: scale(1.08); background: rgba(255,255,255,0.1); }
.ai-chat-orb {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent, #8ab4ff) 70%);
  box-shadow: 0 0 14px var(--accent-glow, rgba(138,180,255,0.5));
  animation: chat-orb-breathe 3s ease-in-out infinite;
}
@keyframes chat-orb-breathe {
  0%,100% { transform: scale(1); opacity: .8; }
  50%     { transform: scale(1.15); opacity: 1; }
}

/* ☁️ 云朵心语：定时飘出来的状态问候 */
.cloud-checkin {
  position: fixed;
  right: 90px;
  bottom: 32px;
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px 22px 6px 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.12);
  cursor: pointer;
  z-index: 95;
  opacity: 0;
  transform: translateX(24px) translateY(6px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.6s var(--transition-easing), transform 0.6s var(--transition-easing);
}
.cloud-checkin.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.cloud-checkin:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent, #8ab4ff);
}
.cloud-checkin-emoji {
  font-size: 1.35rem;
  line-height: 1;
  animation: cloud-drift 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.35));
}
@keyframes cloud-drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.cloud-checkin-text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-primary, #eee);
}
.cloud-checkin-close {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(30, 32, 45, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted, #999);
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cloud-checkin-close:hover { color: #fff; }

.ai-chat-panel {
  position: fixed;
  right: 26px;
  bottom: 92px;
  width: min(340px, calc(100vw - 40px));
  max-height: 480px;
  display: none;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 20, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 95;
  overflow: hidden;
  animation: chat-panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-chat-panel.open { display: flex; }
@keyframes chat-panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.1rem 0.6rem;
  font-size: 0.78rem; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
}
.ai-chat-close { color: rgba(255,255,255,0.4); cursor: pointer; font-size: 0.8rem; }
.ai-chat-close:hover { color: #fff; }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 160px;
  max-height: 330px;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  animation: bubble-float-in 0.4s ease;
}
@keyframes bubble-float-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  border-bottom-left-radius: 5px;
}
.chat-user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent, #8ab4ff) 22%, transparent);
  color: rgba(255, 255, 255, 0.92);
  border-bottom-right-radius: 5px;
}

.ai-chat-inputrow {
  display: flex; gap: 0.5rem;
  padding: 0.7rem 0.9rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ai-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary, #fff);
  outline: none;
}
.ai-chat-input:focus { border-color: var(--accent, #8ab4ff); }
.ai-chat-send {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent, #8ab4ff);
  color: #0a0c14; font-size: 1rem; font-weight: 700;
  cursor: pointer; border: none;
  transition: transform 0.2s ease;
}
.ai-chat-send:hover { transform: scale(1.08); }

/* ═══════════════════════════════════════════════════════════════════════════
   TRY REVIVE — stalled-project revival workspace
   ═══════════════════════════════════════════════════════════════════════════ */
body.revive-home-active {
  align-items: stretch;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(255,255,255,0.04), transparent 28%),
    #0a0b0e;
}

body.revive-home-active .app-viewport {
  max-width: 1180px;
  margin: 0 auto;
}

.revive-home-screen {
  padding: 0 1.5rem 2rem;
  gap: 0;
  justify-content: flex-start;
  overflow-y: auto;
}

.revive-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,14,0.86);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.revive-brand-block,
.revive-account-actions,
.revive-tabs,
.revive-section-head,
.revive-action-row,
.revive-action-meta,
.revive-timer-controls,
.revive-data-actions {
  display: flex;
  align-items: center;
}

.revive-brand-block { gap: 0.7rem; }
.revive-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-fill);
  color: #101114;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 22%, transparent);
}
.revive-brand-name { font-weight: 680; letter-spacing: -0.02em; }
.revive-brand-caption { margin-top: 0.1rem; color: var(--text-muted); font-size: 0.68rem; }

.revive-tabs {
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
}
.revive-tab {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.revive-tab:hover { color: var(--text-primary); }
.revive-tab.active {
  color: #101114;
  background: var(--accent-fill-light);
  font-weight: 650;
}

.revive-account-actions { justify-content: flex-end; gap: 0.4rem; }
.revive-icon-btn,
.revive-text-btn {
  padding: 0.48rem 0.7rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
}
.revive-icon-btn:hover,
.revive-text-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

.revive-workspace-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.1rem;
  padding-top: 1.35rem;
}
.revive-main-column { min-width: 0; }
.revive-sidebar { display: flex; flex-direction: column; gap: 0.85rem; }

.revive-hero {
  min-height: 205px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.7rem;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.012)),
    radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%);
  box-shadow: 0 22px 70px rgba(0,0,0,0.22);
}
.revive-hero h1 {
  max-width: 620px;
  margin: 0.55rem 0 0.75rem;
  font-family: var(--font-title);
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 520;
  text-wrap: balance;
}
.revive-hero p { max-width: 590px; color: #a8adb7; font-size: 0.86rem; line-height: 1.7; }
.revive-eyebrow {
  color: var(--accent-light);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.revive-primary-btn,
.revive-secondary-btn,
.revive-quiet-btn {
  border-radius: 11px;
  padding: 0.76rem 1rem;
  font-size: 0.79rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.revive-primary-btn {
  color: #101114;
  background: var(--accent-fill-light);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 15%, transparent);
}
.revive-primary-btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.revive-primary-btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.revive-secondary-btn {
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.045);
}
.revive-secondary-btn:hover { background: rgba(255,255,255,0.075); border-color: rgba(255,255,255,0.18); }
.revive-quiet-btn { color: var(--text-muted); padding-inline: 0.6rem; }
.revive-quiet-btn:hover { color: var(--text-primary); }
.revive-quiet-btn.danger:hover { color: #ff8d8d; }
.revive-new-btn { flex: 0 0 auto; }

.revive-notice {
  display: none;
  margin-top: 0.85rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: #dce0e6;
  font-size: 0.78rem;
  line-height: 1.55;
}
.revive-notice.show { display: block; }
.revive-notice.error { border-color: rgba(255,100,100,0.34); background: rgba(255,80,80,0.07); }

.revive-stage-panel,
.revive-side-card,
.attention-tool-card {
  margin-top: 0.9rem;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 17px;
  background: rgba(255,255,255,0.025);
}
.revive-stage-panel { min-height: 340px; padding: 1.35rem; }
.revive-side-card { margin-top: 0; padding: 1rem; }
.revive-section-head { justify-content: space-between; gap: 0.75rem; }
.revive-section-head h2 { margin-top: 0.22rem; font-size: 0.92rem; font-weight: 620; }
.revive-count-pill,
.revive-status-pill,
.revive-mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: #b7bbc3;
  font-size: 0.66rem;
}
.revive-count-pill { min-width: 26px; height: 26px; }
.revive-status-pill,
.revive-mini-pill { padding: 0.3rem 0.55rem; }
.revive-status-pill.active { color: var(--accent-light); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.revive-status-pill.done { color: #8de2b1; border-color: rgba(85,214,137,0.25); }
.revive-status-pill.due { color: #ffd28d; border-color: rgba(255,185,80,0.3); }

.revive-empty-state {
  min-height: 310px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}
.revive-empty-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  color: var(--accent-light);
  background: rgba(255,255,255,0.03);
  font-size: 1.35rem;
}
.revive-empty-state h2 { margin-bottom: 0.55rem; font-family: var(--font-title); font-size: 1.5rem; font-weight: 520; }
.revive-empty-state p { max-width: 460px; margin: 0 auto 1.2rem; color: var(--text-muted); font-size: 0.82rem; line-height: 1.65; }

.revive-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.revive-form-head h2 { margin-top: 0.35rem; font-family: var(--font-title); font-size: 1.45rem; font-weight: 520; }
.revive-form-progress { color: var(--text-muted); font-size: 0.7rem; }
.revive-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.95rem; }
.revive-field { display: flex; flex-direction: column; gap: 0.42rem; }
.revive-field.full { grid-column: 1 / -1; }
.revive-field label { color: #c9ccd2; font-size: 0.73rem; font-weight: 570; }
.revive-field small { color: #737983; font-size: 0.65rem; line-height: 1.45; }
.revive-input,
.revive-textarea,
.revive-select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  color: var(--text-primary);
  padding: 0.75rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.revive-textarea { min-height: 84px; resize: vertical; }
.revive-input:focus,
.revive-textarea:focus,
.revive-select:focus { border-color: color-mix(in srgb, var(--accent) 68%, white 8%); background: rgba(255,255,255,0.055); }
.revive-select { cursor: pointer; background-color: #15171c; }
.revive-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin-top: 1.15rem; }
.revive-form-actions-right { display: flex; gap: 0.55rem; }

.revive-brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.revive-brief-head h2 { margin: 0.3rem 0 0.45rem; font-family: var(--font-title); font-size: 1.65rem; font-weight: 520; }
.revive-brief-context { color: var(--text-muted); font-size: 0.75rem; line-height: 1.55; }
.revive-action-card {
  margin-top: 1.1rem;
  padding: 1.15rem;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, rgba(255,255,255,0.05));
  border-radius: 15px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), rgba(255,255,255,0.025));
}
.revive-action-card h3 { margin: 0.65rem 0; font-size: 1.28rem; line-height: 1.45; letter-spacing: -0.018em; }
.revive-action-meta { flex-wrap: wrap; gap: 0.45rem; }
.revive-action-rationale,
.revive-done-definition {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  color: #a9aeb7;
  font-size: 0.75rem;
  line-height: 1.6;
}
.revive-done-definition strong,
.revive-action-rationale strong { color: #d9dce1; }
.revive-action-row { justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.revive-action-row > div { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.revive-edit-box { display: none; margin-top: 0.9rem; }
.revive-edit-box.open { display: grid; gap: 0.65rem; }

.revive-timer-stage { text-align: center; padding: 0.5rem; }
.revive-timer-label { color: var(--accent-light); font-size: 0.65rem; letter-spacing: 0.16em; font-weight: 700; }
.revive-timer-action { max-width: 620px; margin: 0.75rem auto 0; font-family: var(--font-title); font-size: clamp(1.45rem, 4vw, 2.35rem); line-height: 1.25; font-weight: 520; }
.revive-timer-clock {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  margin: 1.4rem auto 1.1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, rgba(255,255,255,0.06));
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%);
  box-shadow: inset 0 0 60px rgba(255,255,255,0.018), 0 0 80px color-mix(in srgb, var(--accent) 10%, transparent);
  font-variant-numeric: tabular-nums;
  font-size: 2.25rem;
  letter-spacing: -0.05em;
}
.revive-timer-controls { justify-content: center; flex-wrap: wrap; gap: 0.55rem; }
.revive-tool-link { display: inline-flex; margin: 0.9rem auto 0; color: var(--accent-light); font-size: 0.74rem; cursor: pointer; }

.revive-evidence-intro { margin: 0.5rem 0 1rem; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.revive-file-input { padding: 0.62rem; }
.revive-complete-card { text-align: center; padding: 0.75rem; }
.revive-complete-mark {
  width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 0.9rem;
  border-radius: 50%; background: rgba(70,210,130,0.12); color: #8de2b1; font-size: 1.35rem;
}
.revive-complete-card h2 { font-family: var(--font-title); font-size: 1.75rem; font-weight: 520; }
.revive-complete-card > p { max-width: 540px; margin: 0.55rem auto 1rem; color: var(--text-muted); line-height: 1.6; font-size: 0.79rem; }
.revive-next-card { max-width: 560px; margin: 1rem auto 0; padding: 1rem; border: 1px solid rgba(255,255,255,0.07); border-radius: 13px; text-align: left; }
.revive-next-card h3 { margin-bottom: 0.55rem; font-size: 0.84rem; }

.revive-project-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }
.revive-project-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 0.5rem;
  padding: 0.72rem;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  background: rgba(255,255,255,0.025);
}
.revive-project-item:hover { background: rgba(255,255,255,0.045); }
.revive-project-item.selected { border-color: color-mix(in srgb, var(--accent) 28%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.revive-project-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.76rem; }
.revive-project-item small { display: block; margin-top: 0.22rem; color: var(--text-muted); font-size: 0.63rem; }
.revive-project-empty { padding: 1rem 0.4rem; color: var(--text-muted); text-align: center; font-size: 0.72rem; line-height: 1.55; }
.revive-project-delete { align-self: center; color: #666c75; font-size: 0.7rem; padding: 0.3rem; cursor: pointer; }
.revive-project-delete:hover { color: #ff8d8d; }

.revive-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 0.8rem; }
.revive-metric { padding: 0.72rem; border-radius: 10px; background: rgba(255,255,255,0.025); }
.revive-metric strong { display: block; font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.revive-metric span { display: block; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.61rem; line-height: 1.35; }
.revive-data-card strong { font-size: 0.78rem; }
.revive-data-card p { margin-top: 0.35rem; color: var(--text-muted); font-size: 0.66rem; line-height: 1.55; }
.revive-data-actions { gap: 0.4rem; margin-top: 0.8rem; }
.revive-data-actions button { color: var(--accent-light); font-size: 0.67rem; cursor: pointer; }
.revive-data-actions button.danger { color: #c77d7d; }

.attention-tools-panel { width: min(720px, 100%); margin: 2.5rem auto; padding-bottom: 5rem; }
.attention-tools-intro { margin-bottom: 1.4rem; text-align: center; }
.attention-tools-intro h2 { margin: 0.45rem 0 0.3rem; font-family: var(--font-title); font-size: 2rem; font-weight: 520; }
.attention-tools-intro p { color: var(--accent-light); font-size: 0.8rem; }
.attention-search-box { width: 100%; margin-bottom: 0.9rem; }
.attention-tool-card { padding: 1.1rem; }
.attention-goal-card .text-input { width: 100%; margin-top: 0.9rem; padding: 0.75rem; }
.attention-goal-card .goal-suggest-list { margin-top: 0.65rem; }
.attention-plan-steps { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid rgba(255,255,255,0.07); color: var(--text-muted); font-size: 0.72rem; line-height: 1.65; }
.attention-plan-steps strong { color: var(--accent-light); }
.attention-meditation-btn { display: block; width: 100%; margin-top: 0.9rem; }
.attention-tools-panel .floating-desk-pet-container { position: relative; right: auto; bottom: auto; margin: 1.1rem auto 0; }
.attention-tools-panel .reborn-banner { position: relative; left: auto; bottom: auto; width: 100%; margin-top: 0.8rem; }

body.revive-home-active:not(.revive-focus-tools-active) #cloud-checkin,
body.revive-home-active:not(.revive-focus-tools-active) #ai-chat-toggle,
body.revive-home-active:not(.revive-focus-tools-active) #ai-chat-panel { display: none !important; }
body.revive-focus-tools-active #ai-chat-toggle { display: flex; }

@media (max-width: 900px) {
  body.revive-home-active .app-viewport { max-width: 760px; }
  .revive-workspace-shell { grid-template-columns: 1fr; }
  .revive-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .revive-data-card { grid-column: 1 / -1; }
  .revive-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .revive-home-screen { padding-inline: 0.85rem; }
  .revive-topbar { grid-template-columns: 1fr auto; min-height: 68px; }
  .revive-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .revive-tab { flex: 1; }
  .revive-brand-caption { display: none; }
  .revive-account-actions { grid-column: 2; grid-row: 1; }
  .revive-hero { min-height: auto; padding: 1.2rem; }
  .revive-hero h1 { font-size: 2rem; }
  .revive-new-btn { width: 100%; }
  .revive-stage-panel { padding: 1rem; }
  .revive-form-grid { grid-template-columns: 1fr; }
  .revive-field.full { grid-column: auto; }
  .revive-sidebar { grid-template-columns: 1fr; }
  .revive-data-card { grid-column: auto; }
  .revive-form-actions { align-items: stretch; flex-direction: column-reverse; }
  .revive-form-actions-right { flex-direction: column; }
  .revive-form-actions button { width: 100%; }
  .revive-action-row { align-items: stretch; flex-direction: column; }
  .revive-action-row > div { flex-direction: column; }
  .revive-action-row button { width: 100%; }
  .revive-timer-clock { width: 160px; height: 160px; }
}

/* v2: calm, conversation-first home. Project history and analytics live in a drawer. */
.revive-workspace-shell {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.revive-hero {
  min-height: 0;
  align-items: center;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
}
.revive-hero h1 {
  margin-block: 0.42rem 0.55rem;
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
}
.revive-hero p { max-width: 520px; }
.revive-stage-panel { min-height: 420px; background: rgba(255,255,255,0.018); }

.revive-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  width: min(370px, calc(100vw - 24px));
  height: 100dvh;
  display: flex;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(13,15,19,0.97);
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -28px 0 80px rgba(0,0,0,0.4);
  transform: translateX(105%);
  transition: transform 0.32s var(--transition-easing);
}
body.revive-insights-open .revive-sidebar { transform: translateX(0); }
.revive-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.2rem 0.6rem;
}
.revive-drawer-head strong { display: block; margin-top: 0.25rem; font-size: 1rem; }
.revive-drawer-head button {
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--text-muted); background: rgba(255,255,255,0.045); cursor: pointer;
}
.revive-drawer-head button:hover { color: white; background: rgba(255,255,255,0.08); }
.revive-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: block;
  opacity: 0;
  visibility: hidden;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: default;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
body.revive-insights-open .revive-drawer-backdrop { opacity: 1; visibility: visible; }

.revive-weekly-report { margin-top: 0.8rem; }
.revive-weekly-empty { color: var(--text-muted); font-size: 0.72rem; line-height: 1.6; }
.revive-weekly-statline { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.4rem; }
.revive-weekly-stat {
  padding: 0.65rem 0.4rem;
  border-radius: 9px;
  background: rgba(255,255,255,0.028);
  text-align: center;
}
.revive-weekly-stat strong { display: block; font-size: 1rem; }
.revive-weekly-stat span { display: block; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.57rem; }
.revive-weekly-insight {
  margin-top: 0.65rem;
  padding: 0.72rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: #b9bec6;
  font-size: 0.68rem;
  line-height: 1.55;
}
.revive-weekly-disclaimer { margin-top: 0.55rem; color: #676d76; font-size: 0.58rem; line-height: 1.45; }

.revive-chat {
  max-width: 680px;
  margin: 0 auto;
}
.revive-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.revive-chat-head h2 { margin-top: 0.3rem; font-family: var(--font-title); font-size: 1.3rem; font-weight: 520; }
.revive-chat-progress { color: var(--text-muted); font-size: 0.68rem; white-space: nowrap; }
.revive-chat-messages {
  min-height: 210px;
  max-height: 390px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 0.15rem;
  overflow-y: auto;
}
.revive-chat-bubble {
  max-width: 88%;
  padding: 0.72rem 0.88rem;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}
.revive-chat-bubble.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.055);
  border-bottom-left-radius: 4px;
  color: #d8dbe0;
}
.revive-chat-bubble.user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 19%, rgba(255,255,255,0.02));
  border-bottom-right-radius: 4px;
  color: #f2f3f5;
}
.revive-chat-bubble.ack { color: var(--accent-light); background: transparent; padding-block: 0.1rem; font-size: 0.68rem; }
.revive-chat-options { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 0.8rem; }
.revive-chat-option {
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: #c8ccd2;
  font-size: 0.71rem;
  cursor: pointer;
}
.revive-chat-option:hover { border-color: color-mix(in srgb, var(--accent) 48%, transparent); color: white; }
.revive-chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.revive-chat-composer .revive-input { min-height: 44px; }
.revive-chat-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.revive-chat-summary span {
  max-width: 100%;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.025);
  color: #858b94;
  font-size: 0.61rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.revive-chat-note { margin-top: 0.65rem; color: #666c75; font-size: 0.61rem; line-height: 1.5; }

@media (max-width: 900px) {
  .revive-workspace-shell { grid-template-columns: minmax(0, 760px); }
  .revive-sidebar { display: flex; grid-template-columns: none; }
  .revive-data-card { grid-column: auto; }
}

@media (max-width: 620px) {
  .revive-insights-btn { font-size: 0; width: 34px; height: 34px; padding: 0; }
  .revive-insights-btn::after { content: "复盘"; font-size: 0.62rem; }
  .revive-account-actions { gap: 0.15rem; }
  .revive-account-actions .revive-icon-btn { padding-inline: 0.45rem; }
  .revive-hero { align-items: flex-start; }
  .revive-chat-messages { max-height: 330px; }
  .revive-chat-composer { grid-template-columns: 1fr; }
  .revive-chat-composer button { width: 100%; }
}
