/* ============================================================
   CommYOUnity v2 — "warm & organic, evolved", simplified
   ------------------------------------------------------------
   The redesign layer. Everything visual below is scoped to
   html[data-design="v2"], which a community opts into (Settings →
   Look & branding). Communities on the classic design never match
   these rules, so they render exactly as before.

   Principles: calm over busy. Flat surfaces with hairline edges and
   one soft shadow; colour reserved for the community accent and for
   what's active; emoji muted until they mean something; nothing shown
   that is empty or repeated elsewhere.

     1. tokens        — palette, radius, spacing, shadow; the community
                        accent arrives as --brand-* from js/branding.js
     2. foundations   — page, type, top bar with the community brand
     3. components    — buttons, chips, cards, sheets, navigation
     4. home          — greeting, prompt, season, progress, sections
   ============================================================ */

/* Only exists for v2: hidden everywhere else. */
.community-brand,
.v2-inline{ display:none; }
html[data-design="v2"] .v2-inline{ display:inline-flex; }
.v2-only{ display:none !important; }
html[data-design="v2"] .v2-only{ display:grid !important; }

/* ---------- 1. tokens ---------- */
html[data-design="v2"]{
  /* Warm and alive, still calm: a sunlit cream page, bright surfaces,
     the community accent washing in from the top, and honey/clay as
     the warm second voice. */
  --bg: var(--brand-bg, #F7F2E7);
  --panel: #FFFDF8;
  --panel-soft: #F1EBDD;
  --ink: #22241D;
  --ink-soft: #626657;
  --ink-faint: #9C9D8C;
  --line: rgba(34,36,29,0.08);
  --clay: #B0744C;
  /* The community's second colour is the warm "honey" voice. */
  --honey: var(--brand-second, #C9963E);
  --honey-pale: var(--brand-second-pale, #F8EBCF);
  --honey-ink: var(--brand-second-ink, #6E5221);
  --blush-pale: #F7E6DD;
  /* Low priority: a calm slate blue, deliberately unlike any accent, so
     it never reads as the Complete button. */
  --prio-low: #5F7FA3;
  /* Priority colours mean something, so they stay fixed whatever a
     community's palette: medium never borrows the second colour. */
  --prio-medium: #C48A2C;
  --blush: #C98B78;
  --notice-pink: #FBEDEA; /* the light pink of the Noticeboard cards on Home */

  /* The community accent stands in for moss everywhere the app uses it. */
  --moss: var(--brand-accent, #57694a);
  --moss-light: var(--brand-accent-soft, #869B72);
  --moss-pale: var(--brand-accent-pale, #E0E4D4);
  --accent-ink: var(--brand-accent-ink, #ffffff);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;
  --space: 20px;
  --shadow: 0 1px 2px rgba(36,38,30,0.05);
  --shadow-lift: 0 6px 20px -8px rgba(36,38,30,0.22);
}
html[data-design="v2"][data-theme="dark"]{
  --bg: var(--brand-bg-dark, #191B13);
  --panel: #212419;
  --panel-soft: #272A1F;
  /* Restated: the light-mode ink above would otherwise win over the dark
     theme (same specificity, later file). */
  --ink: #ECE7D9;
  --ink-soft: #B3AF99;
  --ink-faint: #827F6B;
  --clay: #D49B70;
  --honey: var(--brand-second-dark, #D6B26B);
  --honey-pale: var(--brand-second-dark-pale, #392E1B);
  --honey-ink: var(--brand-second-dark-ink, #EBD7A6);
  --blush-pale: #3C2A24;
  --prio-low: #8EADCF;
  --prio-medium: #D9A54A;
  --blush: #D9A08B;
  --notice-pink: #3A2A27;
  --line: rgba(233,228,214,0.09);
  --moss: var(--brand-accent-dark, #93AF75);
  --moss-light: var(--brand-accent-dark, #ACC591);
  --moss-pale: var(--brand-accent-dark-pale, #343E28);
  --accent-ink: var(--brand-accent-dark-ink, #1B1D14);
  --shadow: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lift: 0 8px 24px -8px rgba(0,0,0,0.6);
}

/* ---------- 2. foundations ---------- */
html[data-design="v2"] body{
  background-image:
    radial-gradient(ellipse 90% 45% at 0% 0%, color-mix(in srgb, var(--moss) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 35% at 100% 0%, color-mix(in srgb, var(--honey) 16%, transparent), transparent 70%);
  background-attachment: fixed;
}
html[data-design="v2"] .view{ padding: 4px var(--space) 28px; }
html[data-design="v2"] .page-head{ margin: 16px 0 18px; }
html[data-design="v2"] .page-head h1{ font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
html[data-design="v2"] .page-head p{ font-size: 13.5px; }

/* Top bar: the community's identity, the platform credit beneath it,
   and only the two buttons that aren't repeated in the navigation. */
/* The top bar stays pinned and slims down once you scroll, so the
   community's name is always in view without taking the screen. */
html[data-design="v2"] .topbar{
  padding: 16px var(--space) 6px; position: sticky; top: 0; z-index: 30;
  transition: padding 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
html[data-design="v2"].is-scrolled .topbar{
  padding-top: 8px; padding-bottom: 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
html[data-design="v2"].is-scrolled .community-brand-logo,
html[data-design="v2"].is-scrolled .community-brand[data-has-logo="false"]::before{ width: 28px; height: 28px; border-radius: 8px; }
html[data-design="v2"].is-scrolled .community-brand-name{ font-size: 15px; }
html[data-design="v2"].is-scrolled .powered-by{ display:none; }
html[data-design="v2"].is-scrolled .profile-icon-btn{ width: 30px; height: 30px; }
html[data-design="v2"] .community-brand-logo,
html[data-design="v2"] .community-brand-name,
html[data-design="v2"] .profile-icon-btn{ transition: width 0.25s ease, height 0.25s ease, font-size 0.25s ease; }
html[data-design="v2"] .topbar .brand .brand-wordmark{ display:none !important; }
html[data-design="v2"] #moreToggle,
html[data-design="v2"] #searchToggle{ display:none; }
html[data-design="v2"] .community-brand{ display:flex; align-items:center; gap:10px; min-width:0; }
html[data-design="v2"] .community-brand-logo{
  width:36px; height:36px; border-radius: 10px; object-fit: contain; flex-shrink:0;
}
html[data-design="v2"] .community-brand[data-has-logo="false"]::before{
  content: ''; width:36px; height:36px; border-radius:10px; flex-shrink:0;
  background: var(--moss-pale);
}
html[data-design="v2"] .community-brand-text{ display:flex; flex-direction:column; min-width:0; }
html[data-design="v2"] .community-brand-name{
  font-family:'Fraunces', serif; font-size:17px; font-weight:600; line-height:1.15;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 60vw;
}
html[data-design="v2"] .powered-by{
  font-size:9.5px; letter-spacing:0.03em; color: var(--ink-faint); margin-top:2px; white-space:nowrap;
}
html[data-design="v2"] .powered-by b{ font-weight:700; color: var(--clay); }
html[data-design="v2"] .icon-btn,
html[data-design="v2"] .profile-icon-btn{ width:36px; height:36px; border:1px solid var(--line); box-shadow:none; background: transparent; }
html[data-design="v2"] .profile-icon-btn{ background: var(--moss-pale); color: var(--moss); border-color: transparent; }
html[data-design="v2"] .search-bar input{ border-radius: var(--r-pill); padding: 11px 16px; }

/* ---------- 3. components ---------- */
/* Solid accent only where you act; selections are a quiet tint. */
html[data-design="v2"] .add-prompt-btn,
html[data-design="v2"] .btn-mini.primary,
html[data-design="v2"] .sheet-submit:not(.danger){
  background: var(--moss); border-color: var(--moss); color: var(--accent-ink);
}
html[data-design="v2"] .chip.active{ background: var(--moss-pale); border-color: transparent; color: var(--moss); }
html[data-design="v2"] .chip{ background: transparent; border-color: var(--line); }
html[data-design="v2"] .add-prompt-btn{ border-radius: var(--r-pill); padding: 8px 16px; }
html[data-design="v2"] .btn-mini{ border-radius: var(--r-sm); }
html[data-design="v2"] .chip{ border-radius: var(--r-pill); padding: 7px 14px; }
html[data-design="v2"] .sheet-submit{ border-radius: var(--r-md); }

/* Cards: one flat surface, a hairline edge, the faintest shadow. */
html[data-design="v2"] .task-card,
html[data-design="v2"] .notice-card,
html[data-design="v2"] .idea-card,
html[data-design="v2"] .hw-card{
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
}
html[data-design="v2"] .task-card,
html[data-design="v2"] .notice-card{ padding: 15px 16px; }
html[data-design="v2"] .hw-card button{ border-radius: var(--r-pill); }

html[data-design="v2"] .section-head{ margin: 34px 0 12px; align-items:center; }
html[data-design="v2"] .section-head h2{ font-size: 16px; font-weight: 600; letter-spacing: 0; }
html[data-design="v2"] .section-head .see-all{ color: var(--moss); padding: 4px 0; }

html[data-design="v2"] .overlay .sheet{ border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--panel); }

/* Choice lists (what to add, the More menu): one tidy column of rows —
   a muted icon, the name, a one-line description, a hairline between —
   instead of a grid of big coloured cards. */
html[data-design="v2"] .type-grid{
  display:flex; flex-direction:column; gap:0; margin-top:14px;
  border:1px solid var(--line); border-radius: var(--r-md); overflow:hidden;
}
html[data-design="v2"] .type-opt{
  display:grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap:12px; row-gap:1px;
  align-items:center; text-align:left; border:none; border-radius:0; background: var(--panel);
  padding: 12px 14px; position:relative;
}
html[data-design="v2"] .type-opt + .type-opt{ border-top:1px solid var(--line); }
/* main.js shows this grid with an inline display:grid and hides it with
   display:none; follow the "shown" state as a column, leave "hidden" alone. */
html[data-design="v2"] #typeGrid[style*="grid"]{ display:flex !important; }
html[data-design="v2"] .type-opt .ic{
  grid-row: 1 / span 2; font-size:16px; text-align:center; filter: grayscale(1); opacity:0.6;
}
html[data-design="v2"] .type-opt .lbl{ font-size:14px; font-weight:600; }
html[data-design="v2"] .type-opt .desc{ font-size:12px; color: var(--ink-faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html[data-design="v2"] .type-opt:active{ background: var(--panel-soft); }
html[data-design="v2"] .type-opt.selected{ background: var(--moss-pale); box-shadow:none; border-color: transparent; }
html[data-design="v2"] .type-opt.suggested:not(.selected){ background: color-mix(in srgb, var(--moss-pale) 55%, var(--panel)); }
html[data-design="v2"] .type-opt.suggested:not(.selected) .lbl{ color: var(--moss); }
html[data-design="v2"] .type-opt.selected .ic{ filter:none; opacity:1; }
html[data-design="v2"] .type-opt.selected .lbl{ color: var(--moss); }
html[data-design="v2"] .type-opt.selected::after{
  content:'✓'; position:absolute; right:14px; top:50%; transform:translateY(-50%);
  width:auto; height:auto; background:none; border:none; color: var(--moss); font-weight:700; font-size:14px;
}

/* Option chips (place, priority, kind of work, roles…): outlined and
   muted until chosen; the chosen one takes a soft accent tint. */
html[data-design="v2"] .select-row{ gap: 6px; }
html[data-design="v2"] .select-opt{
  border:1px solid var(--line); background: transparent; border-radius: var(--r-pill);
  padding: 6px 12px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  filter: grayscale(1); opacity: 0.85;
}
html[data-design="v2"] .select-opt.selected{
  background: var(--moss-pale); border-color: transparent; color: var(--moss); font-weight: 700;
  filter: none; opacity: 1;
}
html[data-design="v2"] .field-label{ letter-spacing: 0.04em; color: var(--ink-faint); }

/* Add-task form: place and priority up front; everything optional
   folds behind "More details" (opened automatically when in use). */
html[data-design="v2"] #detailFields:not(.details-open) #addMoreDetailsBtn ~ *,
html[data-design="v2"] #detailFields:not(.details-open) .ba-section{ display:none !important; }
html[data-design="v2"] .v2-more-details{
  display:flex !important; align-items:baseline; flex-wrap:wrap; gap:6px; width:100%; margin: 14px 0 2px;
  background:none; border:none; border-top: 1px solid var(--line); padding: 12px 0 2px; text-align:left;
  font-size: 13px; font-weight: 700; color: var(--moss);
}
html[data-design="v2"] .v2-more-details .hint-opt{ font-weight: 500; color: var(--ink-faint); font-size: 12px; }
html[data-design="v2"] #detailFields.details-open .v2-more-details .hint-opt{ display:none; }

/* Every other form: optional fields fold behind "More details" (main.js
   tags them .v2-opt and opens the fold when any of them is in use). */
html[data-design="v2"] .sheet:not(.opt-open) .v2-opt{ display:none !important; }

/* Form fields everywhere: one calm style. */
html[data-design="v2"] .sheet input[type=text],
html[data-design="v2"] .sheet input[type=email],
html[data-design="v2"] .sheet input[type=number],
html[data-design="v2"] .sheet input[type=date],
html[data-design="v2"] .sheet input[type=time],
html[data-design="v2"] .sheet select,
html[data-design="v2"] .sheet textarea,
html[data-design="v2"] .sheet .sheet-input,
html[data-design="v2"] .sheet .date-input{
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-soft); color: var(--ink);
  box-shadow: none;
}
html[data-design="v2"] .sheet input:focus,
html[data-design="v2"] .sheet select:focus,
html[data-design="v2"] .sheet textarea:focus{ border-color: color-mix(in srgb, var(--moss) 55%, transparent); background: var(--panel); outline: none; }
html[data-design="v2"] .sheet h3{ font-size: 21px; font-weight: 500; }
html[data-design="v2"] .sheet .hint{ color: var(--ink-faint); }
html[data-design="v2"] .sheet .check-row{ font-size: 13px; color: var(--ink-soft); }

/* The add sheet's other controls, quietened to match. */
html[data-design="v2"] #addOverlay textarea#addTextarea{ border-radius: var(--r-md); border:1px solid var(--line); background: var(--panel-soft); }
html[data-design="v2"] .mic-btn{ background: transparent; border:1px solid var(--line); filter: grayscale(1); opacity:0.7; }
html[data-design="v2"] .mic-btn.listening{ background: var(--red); border-color: var(--red); filter:none; opacity:1; }
html[data-design="v2"] .photo-add-btn{
  background: transparent; border:1px dashed var(--line); color: var(--ink-soft); border-radius: var(--r-md);
}

/* Navigation: icons muted until active; the active tab carries the accent. */
html[data-design="v2"] .bottom-nav{ background: color-mix(in srgb, var(--panel) 94%, transparent); border-top: 1px solid var(--line); }
html[data-design="v2"] .nav-btn{ padding: 6px 4px; min-width: 0; font-size: 10px; color: var(--ink-faint); border-radius: var(--r-sm); gap: 4px; }
html[data-design="v2"] .nav-btn.active{ color: var(--moss); font-weight: 700; }
html[data-design="v2"] .nav-btn.active .ic{ background-color: var(--moss); }
@media (max-width: 899px){
  html[data-design="v2"] .bottom-nav{ justify-content: space-between; padding-left: 10px; padding-right: 10px; }
  html[data-design="v2"] #app{ padding-bottom: 130px; }
  /* The add button sits clear of the bar, in the corner. */
  html[data-design="v2"] .fab{
    left: auto; right: max(18px, calc(50% - 222px)); transform: none;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 52px; height: 52px; border-radius: 18px; font-size: 24px;
  }
}
html[data-design="v2"] .fab{ background: var(--moss); color: var(--accent-ink); box-shadow: var(--shadow-lift); }

/* ---------- 4. home ---------- */
html[data-design="v2"] .greeting{ margin: 20px 0 22px; }
html[data-design="v2"] .greeting h1{ font-size: 28px; font-weight: 500; letter-spacing: -0.015em; }
html[data-design="v2"] .greeting p{ font-size: 14px; }

/* Cover photo: the greeting card itself carries the community's photo
   (--cover-url, set by branding.js), with a soft shade at its foot so the
   white greeting, name and season always read. The card grows to fit
   whatever is on it, so nothing ever spills off the picture. */
html[data-design="v2"][data-has-cover="true"] .greeting{
  background:
    linear-gradient(180deg, rgba(20,22,16,0) 0%, rgba(20,22,16,0.18) 38%, rgba(20,22,16,0.66) 100%),
    var(--cover-url) center / cover no-repeat, var(--panel-soft);
  box-shadow: var(--shadow-lift); padding: 120px 18px 16px; margin-top: 10px; min-height: 230px;
  display:flex; flex-direction:column; justify-content:flex-end;
}
html[data-design="v2"][data-has-cover="true"] .greeting h1,
html[data-design="v2"][data-has-cover="true"] .greeting p{ color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }

/* "What's on your mind?" as one quiet line. */
html[data-design="v2"] .add-prompt{
  border: 1px solid var(--line); border-radius: var(--r-pill); box-shadow: none;
  padding: 6px 6px 6px 16px; margin-bottom: 14px; background: var(--panel);
}
html[data-design="v2"] .add-prompt .leaf{ display:none; }
html[data-design="v2"] .add-prompt span{ text-align: left; font-size: 14px; }

/* The greeting is a card that holds the season line ("Autumn · …").
   Without a cover it's a soft warm card; with one, it sits over the photo. */
html[data-design="v2"] .greeting{
  background: linear-gradient(150deg, var(--panel), var(--honey-pale));
  border-radius: var(--r-lg); padding: 18px 18px 16px; box-shadow: var(--shadow);
}
html[data-design="v2"] .greeting #seasonBannerHolder{ margin-top: 12px; }
html[data-design="v2"] .greeting .season-banner{
  margin: 0; padding: 0; background: none; border-radius: 0;
}
html[data-design="v2"][data-has-cover="true"] .greeting .season-banner .season-label,
html[data-design="v2"][data-has-cover="true"] .greeting .season-banner .season-prompt,
html[data-design="v2"][data-has-cover="true"] .greeting .season-banner .season-go{
  color: #fff !important; text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* Personal greeting: "Good evening, Wren" and a friendly line. */
html[data-design="v2"] #greetingText[data-name]::after{ content: ', ' attr(data-name); }
html[data-design="v2"] .greeting .greeting-sub{ display:none; }
html[data-design="v2"] .greeting .greeting-line{ display:block !important; margin: 4px 0 0; font-size: 14.5px; color: var(--ink-soft); }
html[data-design="v2"][data-has-cover="true"] .greeting .greeting-line{ color: #fff; opacity: 0.92; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }

/* Season: one line of text on a warm honey wash. */
html[data-design="v2"] .season-banner{
  background: var(--honey-pale); border: none; box-shadow: none; border-radius: var(--r-md);
  padding: 10px 14px; margin: 0 0 22px; display:block;
}
html[data-design="v2"] .season-banner .season-go{ color: var(--honey-ink) !important; }
html[data-design="v2"] .season-banner .season-emoji{ display:none; }
html[data-design="v2"] .season-banner .season-label{ display:inline; font-size: 13px; font-weight: 700; color: var(--honey-ink); }
html[data-design="v2"] .season-banner .season-label::after{ content: ' · '; }
html[data-design="v2"] .season-banner .season-prompt{ display:inline; font-size: 13px; color: color-mix(in srgb, var(--honey-ink) 80%, transparent); }
html[data-design="v2"] .season-banner .season-go{ display:inline; margin-left: 6px; font-weight: 600; }

/* Progress: one plain line with small rings. The open/completed counts
   live on the Community board, so Home doesn't repeat them. */
html[data-design="v2"] .milestone-block{
  border: none; box-shadow: none; background: none; padding: 0 2px; margin-bottom: 6px; gap: 12px;
}
html[data-design="v2"] .milestone-block svg{ width: 52px; height: 52px; flex-shrink: 0; }
html[data-design="v2"] .milestone-block svg .v2-arc{ transition: stroke-dashoffset 0.8s cubic-bezier(.2,.7,.2,1); }

/* Noticeboard preview on Home: white cards, a small pin for pinned ones. */
html[data-design="v2"] #noticesPreviewList .notice-preview{
  background: var(--notice-pink); border: 1px solid color-mix(in srgb, var(--blush) 22%, transparent);
  box-shadow: var(--shadow); width: 200px;
}
html[data-design="v2"] #noticesPreviewList .notice-preview .who{
  font-size: 11px; font-weight: 600; color: var(--ink-faint); letter-spacing: 0.02em; filter: grayscale(1);
}
html[data-design="v2"] #noticesPreviewList .notice-preview.pinned{ border-color: color-mix(in srgb, var(--honey) 45%, transparent); }
html[data-design="v2"] #noticesPreviewList .notice-preview.pinned .who{ color: var(--honey-ink); filter: none; }
html[data-design="v2"] #noticesPreviewList .notice-preview .what{ font-size: 13.5px; font-weight: 600; color: var(--ink); }
html[data-design="v2"] .milestone-text .count{ font-size: 14px; font-family: 'Karla', sans-serif; font-weight: 700; }
html[data-design="v2"] .milestone-text .note{ font-size: 12.5px; color: var(--ink-faint); }
html[data-design="v2"] .stat-row{ display:none; }

/* Nothing to show yet: hide the heading rather than leave it bare. */
html[data-design="v2"] .section-head:has(+ #homeCommunityList:empty),
html[data-design="v2"] .section-head:has(+ #homeIdeasList:empty){ display:none; }
html[data-design="v2"] #noticesPreviewSection:has(#noticesPreviewList:empty),
html[data-design="v2"] #helpWantedSection:has(#hwStrip:empty),
html[data-design="v2"] #rostersPreviewSection:has(#rostersPreviewStrip:empty),
html[data-design="v2"] #bookingsPreviewSection:has(#bookingsPreviewList:empty){ display:none; }

/* ---------- 4b. other pages ----------
   Community board, Noticeboard, Calendar, My Space: one filter row up
   front, light card actions, notes and comments as quiet links. */
html[data-design="v2"] .chip-row{ gap: 6px; margin-bottom: 10px; }
html[data-design="v2"] .chip:not(.active){ color: var(--ink-soft); filter: grayscale(1); }
html[data-design="v2"] #view-community:not(.filters-open) #communityPriorityFilters,
html[data-design="v2"] #view-community:not(.filters-open) #communityLocFilters,
html[data-design="v2"] #view-community:not(.filters-open) #communityCategoryFilters{ display:none; }
html[data-design="v2"] .v2-more-filters{
  display:inline-flex !important; align-items:center; gap:6px; margin: 0 0 14px;
  background:none; border:none; padding:2px 0; font-size:12.5px; font-weight:700; color: var(--moss);
}
html[data-design="v2"] .v2-more-filters::after{ content:'▾'; font-size:10px; transition: transform 0.2s ease; }
html[data-design="v2"] #view-community.filters-open .v2-more-filters::after{ transform: rotate(180deg); }
html[data-design="v2"] .view-toggle{ border-radius: var(--r-pill); overflow:hidden; border:1px solid var(--line); background: var(--panel); }
html[data-design="v2"] .vt-btn.active{ background: var(--moss-pale); color: var(--moss); }

/* Page tabs (Noticeboard, My Space, Ideas…): one quiet segmented control. */
html[data-design="v2"] .category-tabs{
  display:flex; gap:2px; padding:3px; margin-bottom:16px; border-radius: var(--r-pill);
  background: var(--panel-soft); border:none; overflow-x:auto;
}
html[data-design="v2"] .category-tab{
  flex:1 1 0; white-space:nowrap; border:none; background: transparent; border-radius: var(--r-pill);
  padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); filter: grayscale(1);
  box-shadow:none;
}
html[data-design="v2"] .category-tab.active{
  background: var(--panel); color: var(--moss); filter:none; box-shadow: 0 1px 3px rgba(34,36,29,0.10);
}

/* Money, Rosters, Bookings, Gratitude, Knowledge: the same flat card
   (hairline edge, faint shadow, rounded) as the board. */
html[data-design="v2"] .expense-card,
html[data-design="v2"] .income-card,
html[data-design="v2"] .sweat-card,
html[data-design="v2"] .roster-card,
html[data-design="v2"] .grat-card,
html[data-design="v2"] .kn-card,
html[data-design="v2"] .booking-card,
html[data-design="v2"] .celebration-card{
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
}

/* In-page "do something" buttons sit back: the + is the main way to add.
   (The one inside "What's on your mind?" and the empty-list button stay solid.) */
html[data-design="v2"] .view .add-prompt-btn:not(.add-prompt .add-prompt-btn):not([data-nav="wellbeing"]){
  background: transparent; color: var(--moss); border: 1px solid color-mix(in srgb, var(--moss) 35%, transparent);
  box-shadow: none;
}
html[data-design="v2"] #addNoticeBtn{
  background: transparent; color: var(--moss); border: 1px solid color-mix(in srgb, var(--moss) 35%, transparent);
}
html[data-design="v2"] #view-myspace > .add-prompt-btn[data-nav="wellbeing"]{
  background: var(--panel) !important; color: var(--ink); border:1px solid var(--line);
  border-radius: var(--r-md); text-align:left; padding: 13px 16px; font-weight:600; filter: grayscale(1);
}

/* Calendar: an open grid — no box per day, the chosen day a solid circle,
   today a ring, the legend as small plain text. */
html[data-design="v2"] .calendar-grid{ gap: 2px; }
html[data-design="v2"] .calendar-day{
  background: transparent; border-radius: 50%; color: var(--ink); font-size: 13px; aspect-ratio: 1;
  max-width: 44px; margin: 0 auto; width: 100%;
}
html[data-design="v2"] .calendar-day:hover{ background: var(--panel-soft); }
html[data-design="v2"] .calendar-day.today{ box-shadow: inset 0 0 0 1.5px var(--moss); color: var(--moss); }
html[data-design="v2"] .calendar-day.selected{ background: var(--moss); color: var(--accent-ink); box-shadow:none; }
html[data-design="v2"] .cal-bar{ width: 5px; height: 5px; border-radius: 50%; }
html[data-design="v2"] .cal-nav-btn{ border:none; background: var(--panel); box-shadow: var(--shadow); }
html[data-design="v2"] .calendar-legend{
  background: none; border: none; padding: 6px 2px 0; margin-top: 8px; filter: grayscale(0.4);
}
html[data-design="v2"] .legend-item{ font-size: 10.5px; color: var(--ink-faint); }
html[data-design="v2"] #addEventBtn{
  background: transparent; color: var(--moss); border: 1px solid color-mix(in srgb, var(--moss) 35%, transparent);
}

/* Task cards: priority as a thin coloured edge (the tag stays for screen
   readers), Edit/Delete folded behind "⋯", so a card reads as: what,
   where, then I'll help / Complete. */
html[data-design="v2"] .task-card{ position:relative; overflow:hidden; }
/* A card with a priority wears it as a soft full border, and floats a
   little off the page; a card without one keeps a quiet hairline. */
html[data-design="v2"] .task-card[data-priority]{
  border: 2.5px solid var(--edge);
  box-shadow: 0 2px 4px rgba(34,36,29,0.04), 0 10px 24px -12px color-mix(in srgb, var(--edge) 45%, rgba(34,36,29,0.25));
  transform: translateY(-1px);
}
html[data-design="v2"] .task-card[data-priority]:hover{
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(34,36,29,0.05), 0 16px 32px -12px color-mix(in srgb, var(--edge) 55%, rgba(34,36,29,0.3));
}
html[data-design="v2"] .task-card{ transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s; }
html[data-design="v2"] .task-card[data-priority="high"]{ --edge: var(--red); }
html[data-design="v2"] .task-card[data-priority="medium"]{ --edge: var(--prio-medium); }
html[data-design="v2"] .task-card[data-priority="low"]{ --edge: var(--prio-low); }
/* The priority is also written in words, so it never relies on colour
   alone (colour-blind readers, greyscale screens): a small tinted pill
   with dark text in the same hue as the border. */
html[data-design="v2"] .task-card .priority-tag{
  background: color-mix(in srgb, var(--edge, var(--ink-faint)) 16%, var(--panel)) !important;
  color: color-mix(in srgb, var(--edge, var(--ink-soft)) 72%, #000) !important;
  border: 1px solid color-mix(in srgb, var(--edge, var(--ink-faint)) 45%, transparent);
  font-size: 10px; letter-spacing: 0.05em; padding: 2px 8px;
}
html[data-design="v2"][data-theme="dark"] .task-card .priority-tag{
  color: color-mix(in srgb, var(--edge, var(--ink-soft)) 70%, #fff) !important;
  background: color-mix(in srgb, var(--edge, var(--ink-faint)) 20%, var(--panel)) !important;
}
html[data-design="v2"] .card-more{
  display:inline-flex !important; order: 10; align-items:center; justify-content:center;
  width:32px; height:32px; border:none; border-radius:50%; background:transparent;
  color: var(--ink-faint); font-size:18px; line-height:1; letter-spacing:1px;
}
html[data-design="v2"] .card-more:hover,
html[data-design="v2"] .task-card.more-open .card-more{ background: var(--panel-soft); color: var(--ink); }
html[data-design="v2"] .task-card:not(.more-open) .task-actions [data-edit],
html[data-design="v2"] .task-card:not(.more-open) .task-actions .btn-icon.danger{ display:none; }
html[data-design="v2"] .task-card.more-open .task-actions [data-edit],
html[data-design="v2"] .task-card.more-open .task-actions .btn-icon.danger{ order: 11; }

/* Card actions: text buttons; only Complete carries the accent. */
html[data-design="v2"] .task-actions{ gap: 4px; margin-top: 10px; align-items:center; }
html[data-design="v2"] .task-actions .btn-mini{
  flex: 0 0 auto; min-width:0; background: transparent; border: none; padding: 7px 10px;
  color: var(--ink-soft); font-weight: 600; border-radius: var(--r-pill);
}
html[data-design="v2"] .task-actions .btn-mini:hover{ background: var(--panel-soft); }
html[data-design="v2"] .task-actions .btn-mini:not(.primary):not(.active){ filter: grayscale(1); }
html[data-design="v2"] .task-actions .btn-mini.active{ background: var(--moss-pale); color: var(--moss); }
html[data-design="v2"] .task-actions .btn-mini.primary{
  margin-left: auto; background: var(--moss); color: var(--accent-ink); padding: 7px 16px;
}
html[data-design="v2"] .btn-icon{ background: transparent; border: none; filter: grayscale(1); opacity: 0.6; }
html[data-design="v2"] .btn-icon:hover{ opacity: 1; }

/* People: a small photo (or soft initials) wherever someone is named. */
html[data-design="v2"] .person-dot{
  align-items:center; justify-content:center; flex-shrink:0; vertical-align:middle;
  width: 22px; height: 22px; border-radius: 50%; margin-right: 7px;
  background: var(--moss-pale) var(--photo, none) center / cover no-repeat;
  color: var(--moss); font-size: 9px; font-weight: 700; letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px var(--panel);
}
html[data-design="v2"] .person-dot[style*="--photo"]{ color: transparent; }
html[data-design="v2"] .added-by,
html[data-design="v2"] .notice-meta{ display:flex; align-items:center; flex-wrap:wrap; column-gap: 4px; }
html[data-design="v2"] .added-by .person-dot,
html[data-design="v2"] .notice-meta .person-dot{ margin-right: 3px; }
/* Helpers' circles show their photos too. */
html[data-design="v2"] .helpers .avatar{
  background: var(--moss-pale) var(--photo, none) center / cover no-repeat; color: var(--moss);
  border: 2px solid var(--panel); width: 26px; height: 26px; font-size: 9.5px;
}
html[data-design="v2"] .helpers .avatar[style*="--photo"]{ color: transparent; }
html[data-design="v2"] .helpers .avatar + .avatar{ margin-left: -8px; }

/* Comments read as a calm conversation: a photo, a soft bubble, your own
   words on the accent tint; a slim reply box underneath. */
html[data-design="v2"] .comments-list{ display:flex; flex-direction:column; gap:8px; }
html[data-design="v2"] .comment-item{
  display:flex; align-items:flex-end; gap:0; padding:0; border:none; background:none;
}
html[data-design="v2"] .comment-item .comment-dot{ width: 26px; height: 26px; margin-right: 8px; }
html[data-design="v2"] .comment-bubble{
  flex:1 1 auto; background: var(--panel-soft); border-radius: 14px 14px 14px 4px;
  padding: 8px 12px; font-size: 13px; line-height: 1.45; color: var(--ink);
}
html[data-design="v2"] .comment-bubble b{ display:block; font-size: 11.5px; color: var(--ink-soft); margin-bottom: 1px; }
html[data-design="v2"] .comment-item.mine{ flex-direction: row-reverse; }
html[data-design="v2"] .comment-item.mine .comment-dot{ margin: 0 0 0 8px; }
html[data-design="v2"] .comment-item.mine .comment-bubble{ background: var(--moss-pale); border-radius: 14px 14px 4px 14px; }
html[data-design="v2"] .comment-item .btn-icon{ align-self:center; }
html[data-design="v2"] .comments-empty{ font-size: 12.5px; color: var(--ink-faint); padding: 2px 0 6px; filter: grayscale(1); }
html[data-design="v2"] .comment-input-row{
  display:flex; align-items:center; gap:6px; margin-top: 10px; padding: 4px 4px 4px 14px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel);
}
html[data-design="v2"] .comment-input{ flex:1; border:none !important; background:transparent !important; padding: 7px 0 !important; font-size: 13px; outline:none; box-shadow:none !important; }
html[data-design="v2"] .comment-post-btn{
  border:none; border-radius: var(--r-pill); padding: 7px 14px; font-size: 12.5px; font-weight: 700;
  background: var(--moss); color: var(--accent-ink);
}
/* Task notes: a soft note card with a small "Notes" heading. */
html[data-design="v2"] .task-desc{
  margin-top: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-soft);
  border-left: 3px solid var(--honey); border-radius: 4px var(--r-sm) var(--r-sm) 4px; background: var(--honey-pale) !important;
}

/* Notes and comments: quiet text links, not boxes. */
html[data-design="v2"] .comment-toggle{
  background: none; border: none; padding: 4px 0; font-size: 12px; font-weight: 600;
  color: var(--ink-faint); filter: grayscale(1);
}
html[data-design="v2"] .comment-toggle.has{ color: var(--moss); filter: none; }
html[data-design="v2"] .task-desc{ border-radius: var(--r-sm); background: var(--panel-soft); border: none; }
html[data-design="v2"] .added-by{ font-size: 12px; color: var(--ink-faint); }
html[data-design="v2"] .priority-tag{ border-radius: var(--r-pill); }
html[data-design="v2"] .location-tag{ border-radius: var(--r-pill); background: var(--panel-soft); border: none; }

/* Empty lists: a soft round illustration, a kind sentence, and (where
   you can add) one tap to put the first thing there. */
html[data-design="v2"] .empty-state{
  display:flex; flex-direction:column; align-items:center; gap:10px; padding: 36px 20px;
  color: var(--ink-soft);
}
html[data-design="v2"] .empty-state .em{
  width: 72px; height: 72px; border-radius: 50%; margin: 0 0 4px;
  display:flex; align-items:center; justify-content:center; font-size: 30px;
  background: radial-gradient(circle at 35% 30%, var(--panel), var(--honey-pale));
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--honey-pale) 45%, transparent);
}
html[data-design="v2"] .empty-state p{ font-size: 14px; line-height: 1.5; max-width: 30ch; margin: 0; }
html[data-design="v2"] .empty-add{
  margin-top: 6px; background: var(--moss); color: var(--accent-ink); border: none;
  border-radius: var(--r-pill); padding: 9px 18px; font-size: 13px; font-weight: 700;
}

/* ---------- 4c. gentle motion ----------
   Small, soft, quick: pages ease in, sheets rise, the + and buttons
   respond to a press, finished tasks fade back. All of it is switched
   off for anyone who asks their device for less motion (see below). */
html[data-design="v2"] .view.active{ animation: v2-rise 0.32s cubic-bezier(.2,.7,.2,1); }
@keyframes v2-rise{ from{ opacity:0; transform: translateY(8px); } to{ opacity:1; transform:none; } }
html[data-design="v2"] .overlay.open .sheet{ animation: v2-sheet 0.34s cubic-bezier(.2,.8,.2,1); }
@keyframes v2-sheet{ from{ transform: translateY(28px); opacity: 0.6; } to{ transform:none; opacity:1; } }
html[data-design="v2"] .task-card,
html[data-design="v2"] .notice-card{ animation: v2-rise 0.36s cubic-bezier(.2,.7,.2,1) both; }
html[data-design="v2"] .task-card:nth-child(2), html[data-design="v2"] .notice-card:nth-child(2){ animation-delay: 0.04s; }
html[data-design="v2"] .task-card:nth-child(3), html[data-design="v2"] .notice-card:nth-child(3){ animation-delay: 0.08s; }
html[data-design="v2"] .task-card:nth-child(n+4), html[data-design="v2"] .notice-card:nth-child(n+4){ animation-delay: 0.12s; }
html[data-design="v2"] .task-card.completed{ transition: opacity 0.4s ease, filter 0.4s ease; filter: saturate(0.6); }
html[data-design="v2"] button{ transition: transform 0.12s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
html[data-design="v2"] button:active{ transform: scale(0.97); }
html[data-design="v2"] .fab:active{ transform: scale(0.92); }
html[data-design="v2"] .nav-btn .ic{ transition: background-color 0.25s ease, transform 0.25s ease; }
html[data-design="v2"] .nav-btn.active .ic{ transform: translateY(-1px); }

/* ---------- 5. icons ----------
   One set of simple line icons (24px grid, 1.8 stroke, round ends),
   drawn as CSS masks so they take the current text colour. They replace
   the emoji in the navigation, the More menu and the "what to add"
   choices — v2 only; classic keeps its emoji. */
html[data-design="v2"] .nav-btn .ic,
html[data-design="v2"] .type-opt[data-nav] .ic,
html[data-design="v2"] .type-opt[data-type] .ic,
html[data-design="v2"] #moreSearchBtn .ic{
  font-size: 0; width: 22px; height: 22px; display:block; justify-self:center;
  background-color: currentColor; filter: none; opacity: 1;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
html[data-design="v2"] .type-opt[data-nav] .ic,
html[data-design="v2"] .type-opt[data-type] .ic,
html[data-design="v2"] #moreSearchBtn .ic{ width: 20px; height: 20px; background-color: var(--ink-soft); }
html[data-design="v2"] .type-opt.selected .ic{ background-color: var(--moss); }

html[data-design="v2"] [data-nav="home"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 10.5 12 4l8.5 6.5V19a1.5 1.5 0 0 1-1.5 1.5h-4.5v-6h-5v6H5A1.5 1.5 0 0 1 3.5 19z'/></svg>"); }
html[data-design="v2"] [data-nav="community"] .ic,
html[data-design="v2"] [data-type="community"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='8.5'/><path d='m8.3 12.4 2.5 2.5 5-5.3'/></svg>"); }
html[data-design="v2"] [data-nav="myspace"] .ic,
html[data-design="v2"] [data-type="mine"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8.5' r='3.8'/><path d='M4.5 20.5c0-4 3.4-6.5 7.5-6.5s7.5 2.5 7.5 6.5'/></svg>"); }
html[data-design="v2"] [data-nav="knowledge"] .ic,
html[data-design="v2"] [data-type="knowledge"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 6.5C10 5 7 4.5 4 5v13c3-.5 6 0 8 1.5 2-1.5 5-2 8-1.5V5c-3-.5-6 0-8 1.5z'/><path d='M12 6.5v13'/></svg>"); }
html[data-design="v2"] [data-nav="notices"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9 3.5h6l-1 5.5 3 3V14H7v-2l3-3z'/><path d='M12 14v6.5'/></svg>"); }
html[data-design="v2"] [data-type="notice"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 10v4h3.5l7 4.5v-13L7.5 10z'/><path d='M17.5 9a4 4 0 0 1 0 6'/></svg>"); }
html[data-design="v2"] [data-nav="bookings"] .ic,
html[data-design="v2"] [data-type="booking"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 6.5v13M3.5 15.5h17v4M20.5 15.5V13a3 3 0 0 0-3-3H11v5.5'/><circle cx='7.3' cy='12.3' r='1.8'/></svg>"); }
html[data-design="v2"] [data-nav="calendar"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3.5' y='5' width='17' height='15.5' rx='2.5'/><path d='M3.5 10h17M8 3v4M16 3v4'/></svg>"); }
html[data-design="v2"] [data-nav="rosters"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='4.5' width='14' height='16' rx='2'/><path d='M9.5 3.5h5v2h-5zM9 10.5h6M9 14h6M9 17.5h3.5'/></svg>"); }
html[data-design="v2"] [data-nav="wellbeing"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M19.5 14.5A8 8 0 1 1 9.5 4.5a6.3 6.3 0 0 0 10 10z'/></svg>"); }
html[data-design="v2"] [data-nav="ideas"] .ic,
html[data-design="v2"] [data-type="idea"] .ic,
html[data-design="v2"] [data-type="suggest"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9.5 17.5h5M10.5 20.5h3'/><path d='M12 3.5a5.8 5.8 0 0 0-3.4 10.5c.6.5.9 1.1.9 1.9v.1h5V16c0-.8.3-1.4.9-1.9A5.8 5.8 0 0 0 12 3.5z'/></svg>"); }
html[data-design="v2"] [data-nav="money"] .ic,
html[data-design="v2"] [data-type="money"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='6' width='18' height='13' rx='2.5'/><path d='M3 10h18M15.5 15h2.5'/></svg>"); }
html[data-design="v2"] [data-nav="gratitude"] .ic,
html[data-design="v2"] [data-type="gratitude"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19.5s-7-4.3-7-9.6A3.9 3.9 0 0 1 12 7.6a3.9 3.9 0 0 1 7 2.3c0 5.3-7 9.6-7 9.6z'/></svg>"); }
html[data-design="v2"] [data-type="celebration"] .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3.5v3.5M12 17v3.5M3.5 12H7M17 12h3.5M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6'/></svg>"); }
html[data-design="v2"] #moreNavBtn .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><circle cx='5.5' cy='12' r='1.7'/><circle cx='12' cy='12' r='1.7'/><circle cx='18.5' cy='12' r='1.7'/></svg>"); }
html[data-design="v2"] #governanceMoreLink .ic{
  font-size: 0; width: 20px; height: 20px; display:block; justify-self:center; filter:none; opacity:1;
  background-color: var(--ink-soft);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4.5 13.5h15v6h-15z'/><path d='M8 13.5V4.5h8v9'/><path d='m10 9 1.6 1.6L14.5 7.5'/></svg>");
}
html[data-design="v2"] #governanceMoreLink{ text-decoration:none; color: inherit; }
html[data-design="v2"] #moreSearchBtn .ic{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='6.5'/><path d='m20 20-4.2-4.2'/></svg>"); }

/* Visible keyboard focus everywhere in v2. */
html[data-design="v2"] :focus-visible{ outline: 2px solid var(--moss); outline-offset: 2px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce){
  html[data-design="v2"] *{ transition: none !important; animation: none !important; }
}

/* ---------- wide screens (laptop / desktop) ---------- */
@media (min-width: 900px){
  /* The community's own brand leads the top bar, as on a phone; the
     sidebar no longer repeats the CommYOUnity wordmark (the platform
     credit sits under the community name). */
  html[data-design="v2"] .topbar{ justify-content: space-between; padding: 22px 0 10px; }
  html[data-design="v2"] .topbar .brand{ display:flex; }
  html[data-design="v2"].is-scrolled .topbar{ padding: 10px 0; }
  html[data-design="v2"] .sidebar-brand{ display:none; }
  html[data-design="v2"] .community-brand-name{ max-width: none; font-size: 19px; }
  html[data-design="v2"] .community-brand-logo,
  html[data-design="v2"] .community-brand[data-has-logo="false"]::before{ width: 40px; height: 40px; }

  /* Sidebar: a quiet column of the same line icons, active as a soft pill. */
  html[data-design="v2"] .bottom-nav{
    background: var(--panel); border-right: 1px solid var(--line); padding: 28px 14px; gap: 2px;
    box-shadow: none; border-radius: 0; width: 220px; bottom: auto; right: auto;
  }
  html[data-design="v2"] .nav-btn{ font-size: 13.5px; padding: 10px 14px; gap: 12px; color: var(--ink-soft); }
  html[data-design="v2"] .nav-btn .ic{ width: 20px; height: 20px; }
  html[data-design="v2"] .nav-btn:hover{ background: var(--panel-soft); }
  html[data-design="v2"] .nav-btn.active{ background: var(--moss-pale); color: var(--moss); }
  html[data-design="v2"] .nav-btn.active .ic{ transform: none; }

  /* Room to breathe: a wider cover, a roomier greeting card. */
  html[data-design="v2"] .greeting h1{ font-size: 34px; }
  html[data-design="v2"] .greeting{ padding: 22px 24px 20px; }
  html[data-design="v2"][data-has-cover="true"] .greeting{ padding: 170px 26px 22px; min-height: 290px; }

  /* Sheets open as centred cards: round every corner. */
  html[data-design="v2"] .overlay .sheet{ border-radius: var(--r-lg); }
  html[data-design="v2"] .fab{ border-radius: 20px; }
}

/* ---------- Account & settings ---------- */
/* Light / Dark: a slim two-way switch instead of two big tiles. */
html[data-design="v2"] .theme-toggle-row{
  gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--panel-soft); max-width: 260px;
}
html[data-design="v2"] .theme-opt{
  display:flex; align-items:center; justify-content:center; gap:6px; padding: 8px 10px;
  border:none; border-radius: var(--r-pill); background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
html[data-design="v2"] .theme-opt .te{ display:inline; font-size: 14px; margin:0; filter: grayscale(1); }
html[data-design="v2"] .theme-opt.selected{ background: var(--panel); color: var(--moss); box-shadow: 0 1px 3px rgba(34,36,29,0.10); }

/* Settings rows: flat, hairline-edged, no heavy boxes. */
html[data-design="v2"] .account-row-toggle{
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: none; padding: 13px 14px;
}
html[data-design="v2"] .account-row-toggle .lbl{ font-size: 14px; }
html[data-design="v2"] .account-row-toggle .sub{ color: var(--ink-faint); }
html[data-design="v2"] .account-name-input{ border-radius: var(--r-md); background: var(--panel); }

/* Admin sections: a tidy list of rows, each opening in place. */
html[data-design="v2"] .section-head.accordion-head{
  margin: 8px 0 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
html[data-design="v2"] .section-head.accordion-head h2{ font-size: 15px; font-weight: 600; font-family: 'Karla', sans-serif; }
html[data-design="v2"] .section-head.accordion-head.open{ border-radius: var(--r-md) var(--r-md) 0 0; }
html[data-design="v2"] .accordion-body{
  margin: 0 0 8px; padding: 14px 16px 6px; background: var(--panel); border: 1px solid var(--line);
  border-top: none; border-radius: 0 0 var(--r-md) var(--r-md);
}
/* Empty notes inside settings stay small: no illustration, no button. */
html[data-design="v2"] .accordion-body .empty-state{ padding: 6px 0 10px; align-items:flex-start; text-align:left; }
html[data-design="v2"] .accordion-body .empty-state .em{ display:none; }
html[data-design="v2"] .accordion-body .empty-state p{ font-size: 12.5px; max-width:none; color: var(--ink-faint); }

/* ---------- Feeds: Activity & Updates ----------
   A calm timeline: one thin line down the left, each event a small
   round marker on it, the words first, the time quiet underneath. */
html[data-design="v2"] #activityFeedList,
html[data-design="v2"] #appUpdatesList{ position: relative; padding-left: 4px; }
html[data-design="v2"] #activityFeedList::before,
html[data-design="v2"] #appUpdatesList::before{
  content:''; position:absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--moss-pale), var(--line));
}
html[data-design="v2"] .activity-row{ border-bottom: none; padding: 9px 0; gap: 14px; position: relative; }
html[data-design="v2"] .activity-icon{
  width: 28px; height: 28px; font-size: 13px; background: var(--panel); position: relative; z-index: 1;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line); filter: grayscale(0.6);
}
html[data-design="v2"] .activity-row:first-child .activity-icon{ filter: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--moss); }
html[data-design="v2"] .activity-content{
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 13px;
}
html[data-design="v2"] .activity-msg{ font-size: 13.5px; color: var(--ink); }
html[data-design="v2"] .activity-time{ font-size: 11px; }
html[data-design="v2"] .update-desc{ font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 3px; }

/* ---------- Governance: the Decisions card ----------
   What needs deciding, at a glance: a vote waiting for you is a
   highlighted action with its countdown as a pill and a clear "Vote"
   button; open polls stay quiet; outcomes carry a "Decided" marker. */
html[data-design="v2"] #decisionsCard{
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 16px 16px 8px; margin-bottom: 18px;
}
html[data-design="v2"] .decisions-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 6px; }
html[data-design="v2"] .decisions-head h2{ font-size: 18px; font-weight: 600; margin: 0; }
html[data-design="v2"] .decisions-gov-link{
  font-size: 12px; padding: 5px 11px; border-radius: var(--r-pill); background: var(--moss-pale); color: var(--moss);
}
html[data-design="v2"] .decisions-subhead{
  font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-faint); margin: 14px 0 6px; font-weight: 700;
}
html[data-design="v2"] .decision-row{ border-bottom: 1px solid var(--line); padding: 10px 2px; }
html[data-design="v2"] .decision-title{ font-size: 14px; }
html[data-design="v2"] .decision-closes{
  display:inline-block; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--panel-soft); color: var(--ink-soft); font-weight: 600;
}
html[data-design="v2"] .decision-closes.urgent{ background: color-mix(in srgb, var(--red) 14%, var(--panel)); color: var(--red); }

/* The vote waiting for you. */
html[data-design="v2"] #decisionsPending .decisions-subhead{ color: var(--prio-medium); }
html[data-design="v2"] #decisionsPending .decision-row{
  border: 1.5px solid color-mix(in srgb, var(--prio-medium) 55%, transparent); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--prio-medium) 8%, var(--panel)); padding: 12px 14px; margin-bottom: 8px;
}
html[data-design="v2"] #decisionsPending .decision-closes{ background: color-mix(in srgb, var(--prio-medium) 18%, var(--panel)); color: color-mix(in srgb, var(--prio-medium) 70%, #000); }
html[data-design="v2"][data-theme="dark"] #decisionsPending .decision-closes{ color: color-mix(in srgb, var(--prio-medium) 70%, #fff); }
html[data-design="v2"] #decisionsPending .decision-vote-link{
  display:inline-flex; align-items:center; gap:4px; margin-top: 4px; padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--moss); color: var(--accent-ink);
}
html[data-design="v2"] .decision-question{ font-size: 13px; }

/* Outcomes: a quiet "Decided" marker before each. */
html[data-design="v2"] #decisionsOutcomes .decision-row .decision-title::before{
  content: '✓ Decided'; display:inline-block; margin-right: 8px; padding: 1px 8px; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; vertical-align: 1px;
  background: var(--moss-pale); color: var(--moss);
}
html[data-design="v2"] .decision-outcome-text{ font-size: 12.5px; color: var(--ink-soft); }
html[data-design="v2"] .decision-review-badge{ border-radius: var(--r-pill); }

/* ---------- Ideas & Knowledge ----------
   Ideas read like seeds on a pinboard: the words first, in the serif,
   with a soft wash of the community's second colour; reactions as small
   counts, tools tucked quiet. Knowledge reads like a library: clean
   cards, a clear title, an easy-reading snippet. */
html[data-design="v2"] .idea-card{
  background: linear-gradient(160deg, var(--panel), var(--honey-pale));
  border: 1px solid color-mix(in srgb, var(--honey) 28%, transparent); padding: 18px 18px 14px;
}
html[data-design="v2"] .idea-card .idea-text{ font-size: 16.5px; color: var(--ink); line-height: 1.45; }
html[data-design="v2"] .idea-card .idea-meta{ color: var(--ink-faint); font-size: 12px; }
html[data-design="v2"] .idea-card .card-tools .btn-icon{ background: transparent; border: none; }
html[data-design="v2"] .reaction-row{ gap: 4px; margin-top: 10px; }
html[data-design="v2"] .reaction{
  border: none; background: transparent; opacity: 1; padding: 5px 9px; border-radius: var(--r-pill);
  color: var(--ink-soft); font-weight: 600; filter: grayscale(1);
}
html[data-design="v2"] .reaction:hover{ background: color-mix(in srgb, var(--honey-pale) 70%, transparent); }
html[data-design="v2"] .reaction.active{ background: var(--honey-pale); color: var(--honey-ink); filter: none; }
html[data-design="v2"] .idea-status-btn{
  background: transparent; border: none; padding: 6px 2px; color: var(--moss); font-weight: 700; filter: grayscale(0.4);
}

html[data-design="v2"] .kn-card{ padding: 16px 18px; border: 1px solid var(--line); }
html[data-design="v2"] .kn-card .kn-title{ font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; line-height: 1.3; }
html[data-design="v2"] .kn-card .kn-snippet{ font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
html[data-design="v2"] .kn-card .kn-byline,
html[data-design="v2"] .kn-card .kn-counts{ font-size: 11.5px; color: var(--ink-faint); }
html[data-design="v2"] .kn-kind,
html[data-design="v2"] .kn-status{ border-radius: var(--r-pill); }
html[data-design="v2"] .kn-cover{ border-radius: var(--r-sm); }
html[data-design="v2"] .kn-body{ font-size: 15px; line-height: 1.7; max-width: 65ch; }
html[data-design="v2"] .kn-write-btn{
  background: transparent !important; color: var(--moss) !important;
  border: 1px solid color-mix(in srgb, var(--moss) 35%, transparent) !important;
}

/* ---------- Gratitude & Wellbeing ----------
   Each keeps the shared calm structure, with a gentle colour of its own:
   warm blush for GratitYOUde, soft lavender (the app's wellbeing colour)
   for Wellbeing. */
html[data-design="v2"] #view-gratitude .category-tab.active{ color: var(--blush); }
html[data-design="v2"] #view-gratitude .grat-card{
  background: linear-gradient(160deg, var(--notice-pink), var(--panel));
  border: 1px solid color-mix(in srgb, var(--blush) 25%, transparent); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 16px 18px;
}
html[data-design="v2"] #view-gratitude .grat-message{ font-size: 15px; }
html[data-design="v2"] #view-gratitude .grat-meta{ color: var(--blush); }
html[data-design="v2"] .grat-empty{
  display:flex; flex-direction:column; align-items:center; gap:10px; padding: 36px 20px;
  color: var(--ink-soft); font-size: 14px; line-height: 1.5;
}
html[data-design="v2"] .grat-empty .em{
  width: 72px; height: 72px; border-radius: 50%; margin: 0 0 4px;
  display:flex; align-items:center; justify-content:center; font-size: 28px; color: var(--blush);
  background: radial-gradient(circle at 35% 30%, var(--panel), var(--notice-pink));
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--notice-pink) 55%, transparent);
}

html[data-design="v2"] #view-wellbeing .category-tab.active{ color: var(--wellbeing); }
html[data-design="v2"] #view-wellbeing .empty-state .em{
  background: radial-gradient(circle at 35% 30%, var(--panel), var(--wellbeing-pale));
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--wellbeing-pale) 55%, transparent);
}
html[data-design="v2"] #view-wellbeing .cycle-insight-card,
html[data-design="v2"] #view-wellbeing .wb-row,
html[data-design="v2"] #view-wellbeing .wb-log-row{
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
}
html[data-design="v2"] #view-wellbeing .cycle-insight-card{
  background: linear-gradient(160deg, var(--panel), var(--wellbeing-pale));
  border-color: color-mix(in srgb, var(--wellbeing) 25%, transparent);
}

/* ---------- first-run tour ----------
   The community's own colours, one floating card, a soft round
   illustration, and progress dots in the accent. */
html[data-design="v2"] .overlay.onboarding-overlay{
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, color-mix(in srgb, var(--moss) 18%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 45% at 95% 10%, color-mix(in srgb, var(--honey) 20%, transparent), transparent 70%),
    var(--bg);
}
html[data-design="v2"] .onboarding-card{
  max-width: 380px; margin: 0 16px; padding: 30px 26px 22px; border-radius: 26px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(34,36,29,0.05), 0 24px 60px -24px rgba(34,36,29,0.28);
  border: 1px solid var(--line);
}
html[data-design="v2"] .onboarding-emoji{
  width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; font-size: 44px;
  background: radial-gradient(circle at 35% 30%, var(--panel), var(--moss-pale));
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--moss-pale) 45%, transparent);
}
html[data-design="v2"] .onboarding-card h2{ font-size: 24px; letter-spacing: -0.01em; }
html[data-design="v2"] .onboarding-card .sheet-submit{ border-radius: var(--r-pill); }
html[data-design="v2"] .onboarding-skip{ color: var(--ink-faint); }
html[data-design="v2"] .onboarding-dot.active{ background: var(--moss); }

/* ---------- sign-in & welcome screens ----------
   Platform screens (sign in, welcome, "where to today?", name), shown
   before any community is open, so they always wear CommYOUnity's own
   colours — never one community's — with the new warm look: a sunlit
   cream page with soft moss and honey light, and one floating card. */
html[data-design="v2"] .overlay.login-overlay{
  --moss: #57694a; --moss-pale: #e0e4d4; --moss-light: #869b72; --accent-ink: #ffffff;
  --honey: #c9963e; --honey-pale: #f8ebcf; --honey-ink: #6e5221;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(87,105,74,0.16), transparent 70%),
    radial-gradient(ellipse 70% 45% at 95% 10%, rgba(201,150,62,0.18), transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(186,136,115,0.12), transparent 70%),
    #f8f3e8;
}
html[data-design="v2"][data-theme="dark"] .overlay.login-overlay{
  --moss: #93af75; --moss-pale: #343e28; --accent-ink: #1b1d14;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(147,175,117,0.14), transparent 70%),
    radial-gradient(ellipse 70% 45% at 95% 10%, rgba(214,178,107,0.12), transparent 70%),
    #191b13;
}
html[data-design="v2"] .login-card{
  max-width: 380px; padding: 34px 28px 26px; margin: 0 16px; border-radius: 26px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(34,36,29,0.05), 0 24px 60px -24px rgba(34,36,29,0.28);
  border: 1px solid var(--line);
}
html[data-design="v2"] .login-card h1,
html[data-design="v2"] .login-card h2{ font-weight: 500; letter-spacing: -0.01em; }
html[data-design="v2"] .login-card input{
  border-radius: var(--r-pill); padding: 13px 18px; background: var(--panel-soft); border: 1px solid var(--line);
}
html[data-design="v2"] .login-card input:focus{ border-color: color-mix(in srgb, var(--moss) 55%, transparent); background: var(--panel); }
html[data-design="v2"] .login-card .sheet-submit{ border-radius: var(--r-pill); }
html[data-design="v2"] .login-card .invite-card,
html[data-design="v2"] .login-card .community-pick{
  border-radius: var(--r-md); box-shadow: var(--shadow); border-color: var(--line);
}

/* ---------- community picker ----------
   Platform-level (it shows before any community's design applies), so
   these rules are not v2-scoped — but they only touch communities that
   have set a logo or accent; an unbranded row is unchanged. */
.community-pick-logo{
  width:40px; height:40px; border-radius:11px; object-fit:contain; flex-shrink:0;
  background: var(--panel); box-shadow: 0 1px 3px rgba(34,36,29,0.12);
}
.community-pick:has(.community-pick-logo) .community-pick-name{ flex:1 1 auto; }
.community-pick.has-accent{
  border-left: 5px solid var(--pick-accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--pick-accent) 9%, var(--panel)), var(--panel) 60%);
}

/* ---------- admin: Look & branding ---------- */
.brand-logo-row{ display:flex; align-items:center; gap:14px; }
.brand-logo-preview{
  width:84px; height:84px; border-radius:18px; background: var(--panel-soft); border:1px dashed var(--line);
  display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0;
  font-size:11px; color: var(--ink-faint); text-align:center; padding:6px;
}
.brand-logo-preview img{ max-width:100%; max-height:100%; object-fit:contain; }
.brand-cover-preview{
  height:110px; border-radius:16px; background: var(--panel-soft); border:1px dashed var(--line);
  display:flex; align-items:center; justify-content:center; overflow:hidden; font-size:11px; color: var(--ink-faint);
}
.brand-cover-preview img{ width:100%; height:100%; object-fit:cover; }
.brand-accent-row{ display:flex; align-items:center; gap:10px; }
.brand-accent-row input[type=color]{ width:48px; height:42px; border:none; border-radius:12px; padding:0; background:none; cursor:pointer; }
.brand-accent-row .cfg-input{ flex:1; margin:0; }
.brand-accent-row .btn-mini{ flex:0 0 auto; padding-left:14px; padding-right:14px; }
.brand-warning{ font-size:12px; color: var(--orange); margin:8px 0 0; line-height:1.45; }
.brand-accent-sample{ display:flex; align-items:center; gap:10px; margin-top:12px; padding:12px; border-radius:14px; background: var(--bg); }
.brand-accent-sample .sample-btn{ padding:7px 14px; border-radius:999px; font-size:12px; font-weight:700; }
.brand-accent-sample .sample-chip{ padding:6px 12px; border-radius:999px; font-size:12px; font-weight:600; }
.brand-accent-sample .sample-link{ font-size:13px; font-weight:700; }
.brand-accent-sample .sample-second{ padding:6px 12px; border-radius:10px; font-size:12px; font-weight:600; }
.brand-accent-sample{ flex-wrap: wrap; }

/* "Previewing — not saved yet": a calm honey strip with Discard. */
.brand-preview-note{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px;
  padding:10px 12px; border-radius:14px; background: var(--honey-pale); color: var(--honey-ink); font-size:12.5px; line-height:1.4;
}
.brand-preview-note[hidden]{ display:none; }
.brand-preview-note .btn-mini{ flex:0 0 auto; padding-left:14px; padding-right:14px; }
/* While previewing, Save carries a soft pulse so it's clear what's waiting. */
html.brand-previewing #brandSaveBtn{ box-shadow: 0 0 0 4px color-mix(in srgb, var(--moss) 22%, transparent); }

/* Palette choices: two swatches and a name; the chosen one is outlined. */
.brand-palette-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; }
.brand-palette{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px 4px 7px;
  border:1px solid var(--line); border-radius:12px; background: var(--panel); cursor:pointer;
}
.brand-palette .swatches{ display:flex; }
.brand-palette .swatches span{ width:22px; height:22px; border-radius:50%; box-shadow: 0 0 0 2px var(--panel); }
.brand-palette .swatches span + span{ margin-left:-6px; }
.brand-palette .pname{ font-size:10.5px; font-weight:600; color: var(--ink-soft); text-align:center; line-height:1.2; }
.brand-palette.selected{ border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.brand-palette.selected .pname{ color: var(--moss); }
