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

    :root {
      --bg: #F4F6F3;
      --text: #1D1D1B;
      --text2: rgba(0,0,0,0.42);
      --text3: rgba(0,0,0,0.22);

      /* Tracker / Habits */
      --tr-bg:  #EDF5EC;
      --tr-bg2: #E0EEE0;
      --tr-acc: #4CAF50;
      --tr-acc2:#81C784;

      /* Nutrition */
      --nu-bg:  #FFF9EE;
      --nu-bg2: #FFF3DC;
      --nu-brd: #E8DCC8;
      --nu-acc: #E8913A;
      --nu-lbl: #C47A1A;

      /* Finance */
      --fi-bg:  #EAF2FB;
      --fi-bg2: #DCE9F7;
      --fi-brd: rgba(55,138,221,0.14);
      --fi-acc: #4A90D9;

      --red: #E53935;
    }

    html, body {
      height: 100%;
      overflow: hidden;
      background: var(--bg);
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      color: var(--text);
      display: flex;
      flex-direction: column;
    }

    /* ── STANDALONE HEADER (hidden when in iframe shell) ── */
    .header {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .header-brand { display: flex; align-items: center; gap: 8px; }
    .brand-icon {
      width: 30px; height: 30px;
      background: linear-gradient(135deg, #66BB6A, #A5D6A7);
      border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      font-size: 15px;
    }
    .brand-name { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
    .brand-date { font-size: 11px; color: var(--text2); font-weight: 500; }

    /* ── SCROLL AREA ── */
    .scroll {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 12px 12px 24px;
    }

    /* ── GREETING ── */
    .greeting {
      background: linear-gradient(130deg, #2D7D32, #4CAF50 70%, #66BB6A);
      border-radius: 18px;
      padding: 14px 16px;
      color: white;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
      position: relative;
      overflow: hidden;
    }
    .greeting::after {
      content: '';
      position: absolute;
      right: -20px; top: -20px;
      width: 100px; height: 100px;
      background: rgba(255,255,255,0.07);
      border-radius: 50%;
      pointer-events: none;
    }
    .greeting-text {}
    .greeting-hi {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: -0.4px;
      margin-bottom: 2px;
    }
    .greeting-sub {
      font-size: 12px;
      opacity: 0.72;
      font-weight: 500;
    }
    .greeting-emoji { font-size: 36px; position: relative; z-index: 1; }
    .greeting-avatar {
      width: 54px; height: 54px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid rgba(255,255,255,0.4);
      position: relative; z-index: 1;
      flex-shrink: 0;
    }
    .greeting-avatar-placeholder {
      width: 54px; height: 54px;
      border-radius: 50%;
      background: rgba(255,255,255,0.2);
      border: 2px solid rgba(255,255,255,0.4);
      display: flex; align-items: center; justify-content: center;
      font-size: 22px; font-weight: 700; color: #fff;
      position: relative; z-index: 1;
      flex-shrink: 0;
    }

    /* ── 2-COLUMN GRID ── */
    .grid2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 8px;
    }

    /* ── CARDS ── */
    .card {
      border-radius: 18px;
      overflow: hidden;
      cursor: pointer;
      display: block;
      color: inherit;
      text-decoration: none;
      transition: transform 0.12s;
    }
    .card:active { transform: scale(0.97); }

    .card-full { margin-bottom: 8px; }

    /* Section-specific card styles */
    .card-tracker  { background: var(--tr-bg); }
    .card-nutr     { background: var(--nu-bg); border: 1.5px solid var(--nu-brd); }
    .card-finance  { background: var(--fi-bg); border: 1px solid var(--fi-brd); }

    .card-inner { padding: 12px 14px 14px; }

    .card-label {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    /* Progress bar */
    .pbar {
      height: 5px;
      border-radius: 99px;
      overflow: hidden;
      margin-bottom: 8px;
    }
    .pbar-tracker { background: var(--tr-bg2); }
    .pbar-nutr    { background: var(--nu-bg2); }
    .pbar-fill {
      height: 100%;
      border-radius: 99px;
      transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* Metric */
    .metric-big {
      font-size: 28px;
      font-weight: 800;
      letter-spacing: -1px;
      line-height: 1;
      margin-bottom: 2px;
    }
    .metric-sub {
      font-size: 11px;
      color: var(--text2);
      font-weight: 500;
    }

    /* Finance card inline layout */
    .fin-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .fin-balance {
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -0.8px;
    }
    .fin-rows { display: flex; flex-direction: column; gap: 6px; }
    .fin-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .fin-label {
      font-size: 11px;
      font-weight: 600;
      width: 55px;
      flex-shrink: 0;
    }
    .fin-bar-track {
      flex: 1;
      height: 4px;
      background: var(--fi-bg2);
      border-radius: 99px;
      overflow: hidden;
    }
    .fin-bar {
      height: 100%;
      border-radius: 99px;
      transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .fin-amt {
      font-size: 11px;
      font-weight: 700;
      width: 60px;
      text-align: right;
      white-space: nowrap;
    }

    /* Tasks / Calendar lists */
    .list-card-inner { padding: 12px 14px; }
    .list-item {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 5px 0;
      border-bottom: 1px solid var(--tr-bg2);
      font-size: 12px;
      font-weight: 500;
    }
    .list-item:last-child { border-bottom: none; }
    .list-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .list-time {
      font-size: 10px;
      color: var(--text2);
      font-weight: 600;
      white-space: nowrap;
      margin-left: auto;
    }
    .list-more {
      font-size: 11px;
      color: var(--text2);
      font-weight: 500;
      padding-top: 5px;
    }
    .empty-line {
      font-size: 12px;
      color: var(--text3);
      text-align: center;
      padding: 10px 0;
    }

    /* Skeleton */
    @keyframes shimmer {
      0%   { background-position: -200% 0; }
      100% { background-position:  200% 0; }
    }
    .skel {
      background: linear-gradient(90deg,
        rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.09) 50%, rgba(0,0,0,0.05) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.3s infinite;
      border-radius: 6px;
    }
