:root {
  color-scheme: light;
  --ink: #25201d;
  --muted: #766d67;
  --paper: #f8f5ef;
  --card: rgba(255, 255, 255, 0.92);
  --line: #e6ddd3;
  --accent: #9d6754;
  --accent-dark: #754738;
  --accent-soft: #f1dfd5;
  --sage: #dce6dc;
  --shadow: 0 18px 50px rgba(69, 52, 43, 0.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(241, 223, 213, 0.8), transparent 26rem),
    radial-gradient(circle at 92% 28%, rgba(220, 230, 220, 0.75), transparent 28rem),
    var(--paper);
  transition: color .25s ease, background-color .25s ease;
}

body.safe-mode-active {
  --muted: #68677c;
  --paper: #f1f1f8;
  --line: #d8d6e8;
  --accent: #69639d;
  --accent-dark: #46416f;
  --accent-soft: #e5e3f3;
  --sage: #dfe6ef;
  background:
    radial-gradient(circle at 12% 5%, rgba(220, 217, 239, .9), transparent 28rem),
    radial-gradient(circle at 92% 28%, rgba(215, 229, 237, .85), transparent 30rem),
    var(--paper);
}

body.safe-mode-active .app-header {
  border-bottom-color: rgba(195, 191, 220, .9);
  background: rgba(241, 241, 248, .9);
}

body.safe-mode-active .quick-checkin {
  border-color: rgba(105, 99, 157, .32);
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(225,222,242,.82));
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 78px;
  padding: 12px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(230, 221, 211, 0.9);
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--ink);
  font: 700 14px/1 Georgia, serif;
  letter-spacing: .08em;
}

.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font: 600 16px/1.1 Georgia, serif; }
.brand small { color: var(--muted); font-size: 11px; }

.view-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
}

.view-tab, .auth-button, .write-button, .filter-chip, .secondary-button, .primary-link, .card-button {
  border: 0;
  cursor: pointer;
}

.view-tab {
  padding: 9px 14px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}
.view-tab.is-active { color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(69, 52, 43, .08); }

.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

.search-control {
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(240px, 22vw);
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .75);
}
.search-control span { color: var(--muted); font-size: 20px; line-height: 1; }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(157, 103, 84, .12); }

.auth-button {
  max-width: 190px;
  overflow: hidden;
  padding: 10px 14px;
  border-radius: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: white;
  background: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.write-button {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
}

.app-shell { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 158px); margin: 0 auto; padding: 48px 0 72px; }
.content-view[hidden] { display: none; }

.quick-checkin {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr);
  gap: 24px 36px;
  margin-bottom: 42px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(157, 103, 84, .2);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(241,223,213,.72));
  box-shadow: var(--shadow);
}
.quick-checkin-copy h1 { margin: 8px 0 10px; font: 600 clamp(28px, 4vw, 43px)/1.08 Georgia, serif; letter-spacing: -.025em; }
.quick-checkin-copy p { margin: 0; color: var(--muted); line-height: 1.55; }
.quick-checkin-actions { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.quick-moods { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(58px, 1fr)); gap: 7px; }
.quick-moods button { display: grid; min-height: 66px; place-items: center; gap: 2px; padding: 7px 3px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: rgba(255,255,255,.78); font-size: 23px; }
.quick-moods small { color: var(--muted); font-size: 9px; font-weight: 750; }
.quick-moods button.is-selected { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px rgba(157,103,84,.13); }
.quick-save { min-height: 48px; }
.quick-safe-mode { display: grid; gap: 2px; padding: 9px 13px; text-align: left; }
.quick-safe-mode strong { font-size: 12px; }
.quick-safe-mode span { font-size: 10px; font-weight: 600; opacity: .82; }
.quick-checkin-status { grid-column: 1 / -1; margin: -11px 0 0; color: var(--muted); font-size: 11px; }

.reader-intro {
  display: grid;
  grid-template-columns: minmax(0, 760px) auto;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 38px;
}
.reader-intro.compact { margin-bottom: 30px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reader-intro h1 { max-width: 740px; margin: 12px 0 14px; font: 500 clamp(34px, 5vw, 61px)/1.03 Georgia, serif; letter-spacing: -.035em; }
.reader-intro.compact h1 { font-size: clamp(34px, 4vw, 52px); }
.reader-intro p { max-width: 670px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.reading-hub { margin: -8px 0 24px; padding: 19px; border: 1px solid #dfd5cb; border-radius: 20px; background: linear-gradient(135deg, #fff 0%, #faf5ef 58%, #f0e8f4 100%); box-shadow: 0 12px 32px rgba(60,43,35,.07); }
.reading-hub-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.reading-hub-heading h2 { margin: 4px 0 0; font: 600 23px/1.15 Georgia, serif; }
.reading-mode-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.reading-mode { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; text-align: left; color: var(--ink); background: rgba(255,255,255,.88); }
.reading-mode > span { grid-row: 1 / 3; align-self: center; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--accent-dark); background: var(--accent-soft); font-size: 14px; }
.reading-mode strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.reading-mode small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.reading-mode:hover, .reading-mode.is-active { border-color: var(--accent); background: white; box-shadow: 0 5px 16px rgba(80,56,46,.09); }
.reading-mode.is-active > span { color: white; background: var(--accent); }
.random-post-button { display: grid; grid-template-columns: auto 1fr; gap: 1px 9px; min-width: 208px; padding: 11px 14px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; color: white; background: linear-gradient(120deg, #9d6754, #7a4f8f); box-shadow: 0 9px 20px rgba(122,79,143,.2); }
.random-post-button > span { grid-row: 1 / 3; align-self: center; font-size: 19px; }
.random-post-button strong { font-size: 12px; }
.random-post-button small { color: rgba(255,255,255,.8); font-size: 9px; }
.random-post-button:disabled { cursor: wait; opacity: .65; }
.following-directory-button { margin: 12px 2px 0 auto; }

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 13px 17px;
  border-radius: 13px;
  color: white;
  background: var(--accent);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(117, 71, 56, .18);
}

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.mood-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  font-size: 13px;
}
.filter-chip.is-active { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); font-weight: 700; }
.result-count { flex: 0 0 auto; color: var(--muted); font-size: 13px; }

.status-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 150px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.45);
}
.status-panel[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card, .circle-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(69, 52, 43, .055);
}
.post-card { display: flex; flex-direction: column; min-height: 280px; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card.has-image .card-body { min-height: 230px; }
.card-image-wrap { display: grid; grid-template-columns: 1fr; height: 210px; overflow: hidden; background: #eee8e1; }
.card-image-wrap.multi { grid-template-columns: 2fr 1fr; gap: 2px; }
.card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-image-wrap .image-stack { display: grid; gap: 2px; grid-template-rows: repeat(2, 1fr); min-height: 0; }
.card-image-wrap .more-images { position: relative; }
.card-image-wrap .more-images::after { content: attr(data-more); position: absolute; inset: 0; display: grid; place-items: center; color: white; background: rgba(37,32,29,.56); font-weight: 800; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 19px; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; color: var(--muted); font-size: 12px; }
.mood-pill, .shared-pill, .sensitive-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 750; }
.shared-pill { background: var(--sage); color: #405443; }
.sensitive-pill { background: #f3e5bd; color: #6c5520; }
.meta-separator { opacity: .45; }
.card-title { margin: 0 0 10px; font: 600 23px/1.17 Georgia, serif; }
.card-excerpt { display: -webkit-box; overflow: hidden; margin: 0; color: #5f5752; font-size: 15px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.post-card.is-sensitive .card-excerpt { filter: blur(6px); user-select: none; }
.sensitive-reveal { margin-top: 12px; padding: 8px 10px; border: 1px solid #e4d3a5; border-radius: 10px; background: #fff9e9; cursor: pointer; font-size: 12px; font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.card-tag { color: var(--muted); font-size: 12px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.support-count { color: var(--muted); font-size: 12px; }
.card-button { padding: 8px 11px; border-radius: 10px; color: var(--accent-dark); background: var(--accent-soft); font-weight: 750; }
.card-button { text-decoration: none; }

.load-more-wrap { display: flex; justify-content: center; padding-top: 30px; }
.secondary-button { padding: 12px 18px; border: 1px solid var(--line); border-radius: 13px; background: white; font-weight: 750; }
.secondary-button:disabled { cursor: wait; opacity: .6; }

.circle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.circle-card { padding: 22px; }
.my-circle-grid { margin-bottom: 42px; }
.circle-discovery-heading { margin-top: 12px; }
.circle-card.is-disabled { opacity: .72; }
.circle-icon { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: 20px; border-radius: 15px; background: var(--sage); font-size: 22px; }
.circle-card h2 { margin: 0 0 9px; font: 600 23px/1.2 Georgia, serif; }
.circle-card p { min-height: 70px; margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.circle-stats { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.circle-category { display: inline-block; margin-bottom: 11px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.circle-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.membership-label { color: #405443; font-size: 12px; font-weight: 750; }
.circle-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.circle-action-buttons .secondary-button { padding: 8px 11px; font-size: 12px; }
.circle-checkbox { display: flex; align-items: flex-start; gap: 11px; margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: #fbfaf8; }
.circle-checkbox input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--accent); }
.circle-checkbox span { display: grid; gap: 4px; }
.circle-checkbox strong { font-size: 13px; }
.circle-checkbox small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.circle-form-actions { align-items: center; }
.form-action-spacer { flex: 1; }

.profile-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.creator-stats { margin: -12px 0 42px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.creator-stats .section-heading { margin-bottom: 16px; }
.creator-stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.creator-stat-card { display: grid; gap: 5px; min-width: 0; padding: 13px 10px; border-radius: 13px; background: #f7f3ee; }
.creator-stat-card strong { color: var(--accent-dark); font: 700 24px/1 Georgia, serif; }
.creator-stat-card span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.creator-stats-detail { margin-top: 14px; }

.circle-open-button { padding: 9px 13px; border: 0; border-radius: 10px; color: white; background: var(--ink); cursor: pointer; font-weight: 700; }
.circle-universe-view { width: min(1080px, 100%); margin: 0 auto; }
.circle-universe-header { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin: 22px 0 38px; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(135deg, var(--card), var(--sage)); box-shadow: var(--shadow); }
.circle-universe-copy h1 { margin: 8px 0 13px; font: 600 clamp(34px, 6vw, 58px)/1.02 Georgia, serif; }
.circle-universe-copy > p { max-width: 720px; color: var(--muted); line-height: 1.7; }
.circle-universe-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.circle-universe-facts span { padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.72); font-size: 12px; font-weight: 700; }
.circle-universe-posts-heading { margin-top: 32px; }

.stats-range-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 24px; }
.stats-range-tabs button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 700; }
.stats-range-tabs button.is-active { color: white; border-color: var(--accent-dark); background: var(--accent-dark); }
.advanced-stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.advanced-stat-card { min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: var(--shadow); }
.advanced-stat-card strong { display: block; color: var(--accent-dark); font: 700 27px/1 Georgia, serif; }
.advanced-stat-card span { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.stats-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.stats-panel { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.stats-panel h2 { margin: 5px 0 16px; font: 600 25px/1.2 Georgia, serif; }
.stats-metric-row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.stats-metric-row:last-child { border-bottom: 0; }
.stats-metric-row strong { color: var(--ink); }
.stats-bar-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 32px; gap: 12px; align-items: center; margin: 10px 0; font-size: 13px; }
.stats-bar-track { height: 12px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.stats-bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }
.stats-post-list { display: grid; gap: 8px; }
.stats-post-row { display: grid; gap: 5px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); text-align: left; cursor: pointer; font-weight: 700; }
.stats-post-row small { color: var(--muted); font-weight: 500; }
.stats-gate { display: grid; gap: 10px; padding: 24px; border: 1px solid var(--accent); border-radius: 20px; background: var(--card); }
.stats-gate p { margin: 0; color: var(--muted); line-height: 1.6; }

.guided-suggestion { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 34px; padding: clamp(22px, 5vw, 38px); border-radius: 24px; color: white; background: linear-gradient(135deg, #6c5ce7, #8f73ec); box-shadow: var(--shadow); }
.guided-suggestion .eyebrow, .guided-suggestion p { color: rgba(255,255,255,.84); }
.guided-suggestion h2 { margin: 7px 0; font: 600 clamp(27px, 5vw, 42px)/1.05 Georgia, serif; }
.guided-suggestion .primary-link { color: var(--ink); background: white; }
.guided-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guided-template-card { display: flex; min-height: 230px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.guided-template-card.is-paid { border-color: rgba(108,92,231,.5); }
.guided-template-card h3 { margin: 15px 0 8px; font: 600 22px/1.2 Georgia, serif; }
.guided-template-card p { flex: 1; color: var(--muted); line-height: 1.55; }
.guided-template-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.guided-entry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 38px; }
.guided-entry-row { display: grid; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: left; cursor: pointer; }
.guided-entry-row span { color: var(--muted); font-size: 12px; }
.guided-editor, .guided-entry-detail { width: min(820px, 100%); margin: 0 auto; }
.guided-editor-heading { margin: 26px 0 12px; }
.guided-editor-heading h2, .guided-entry-sheet > h2 { margin: 7px 0 10px; font: 600 clamp(32px, 6vw, 50px)/1.06 Georgia, serif; }
.guided-editor-heading p, .guided-draft-status { color: var(--muted); }
.guided-question { margin: 14px 0; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.guided-question legend { padding: 0 7px; font-weight: 750; }
.guided-question-help { color: var(--muted); font-size: 12px; }
.guided-input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--soft); resize: vertical; }
.guided-choice-row, .guided-choice-list { display: flex; flex-wrap: wrap; gap: 9px; }
.guided-choice { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); cursor: pointer; }
.guided-form-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.guided-entry-sheet { margin-top: 22px; padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.guided-entry-date { color: var(--muted); }
.guided-answer { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.guided-answer h3 { color: var(--muted); font-size: 14px; }
.guided-answer p { white-space: pre-wrap; line-height: 1.7; }
.guided-reflection { margin-top: 28px; padding: 18px; border-radius: 15px; background: var(--sage); }
.guided-reflection p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.stats-upgrade-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 16px; padding: 15px; border: 1px dashed var(--line); border-radius: 14px; background: #fbfaf8; }
.stats-upgrade-card p { grid-column: 1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.stats-upgrade-card button { grid-column: 2; grid-row: 1 / 3; }
.profile-avatar { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 20px; color: white; font-size: 27px; }
.profile-copy { display: grid; gap: 5px; min-width: 0; }
.profile-copy strong { font: 600 24px/1.15 Georgia, serif; }
.profile-copy span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; }
.plan-pill { padding: 7px 10px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 12px; font-weight: 800; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2 { margin: 7px 0 0; font: 600 31px/1.15 Georgia, serif; }
.own-post-grid .post-card { min-height: 245px; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #4f4844; background: #eee9e3; font-size: 11px; font-weight: 800; }
.status-pill.public { color: #405443; background: var(--sage); }
.status-pill.private { color: #594a71; background: #e8e0f1; }
.own-card-actions { display: flex; gap: 7px; }
.danger-button { padding: 8px 11px; border: 0; border-radius: 10px; cursor: pointer; color: #8a342f; background: #f8e1de; font-weight: 750; }

.post-dialog { width: min(760px, calc(100% - 28px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: white; box-shadow: 0 30px 90px rgba(37, 32, 29, .25); }
.post-dialog::backdrop { background: rgba(37, 32, 29, .55); backdrop-filter: blur(4px); }
#compose-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; background: #f7f3ed; box-shadow: none; }
#compose-dialog::backdrop { background: #f7f3ed; backdrop-filter: none; }
#compose-dialog .dialog-frame { width: min(980px, 100%); max-height: none; min-height: 100dvh; margin: 0 auto; padding: clamp(24px, 5vw, 58px) clamp(18px, 6vw, 72px) 80px; overflow: visible; background: white; box-shadow: 0 0 80px rgba(55,42,35,.08); }
#compose-dialog .dialog-close { position: fixed; top: 18px; right: 22px; }
.dialog-frame { position: relative; overflow-y: auto; max-height: 88vh; padding: clamp(25px, 5vw, 48px); }
.dialog-close { position: sticky; z-index: 2; top: 0; float: right; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: #f3efeb; font-size: 25px; line-height: 1; }
.dialog-title { margin: 16px 45px 12px 0; font: 600 clamp(29px, 5vw, 43px)/1.08 Georgia, serif; }
.dialog-text { clear: both; margin: 25px 0; color: #4f4844; white-space: pre-wrap; font-size: 17px; line-height: 1.75; }
.dialog-gallery { display: grid; gap: 10px; margin: 25px 0; }
.dialog-gallery img { width: 100%; max-height: 580px; border-radius: 16px; object-fit: cover; }
.reaction-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.reaction { padding: 7px 10px; border-radius: 999px; color: var(--muted); background: #f6f2ed; font-size: 12px; }
.reaction-picker { margin-top: 6px; padding: 20px 0; border-top: 1px solid var(--line); }
.reaction-picker h3 { margin: 0 0 5px; font: 600 19px/1.2 Georgia, serif; }
.reaction-picker p { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.reaction-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.reaction-button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: white; font-size: 12px; }
.reaction-button.is-selected { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); font-weight: 800; }
.reaction-button:disabled { cursor: wait; opacity: .55; }
.dialog-actions { display: flex; gap: 8px; margin-top: 12px; }

.form-field { display: grid; gap: 8px; margin: 19px 0; color: var(--ink); font-size: 13px; font-weight: 750; }
.form-field > span { display: flex; justify-content: space-between; }
.form-field small { color: var(--muted); font-weight: 500; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: #fbfaf8;
  font: 400 15px/1.5 Inter, ui-sans-serif, sans-serif;
}
.form-field textarea { resize: vertical; min-height: 190px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(157, 103, 84, .12); }
.form-field > small { justify-self: end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compose-destination-card { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--accent-soft) 45%, white); }
.compose-destination-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.compose-destination-heading > div { display: grid; gap: 3px; }
.compose-destination-heading strong { font-size: 15px; }
.compose-destination-card .form-field { margin: 0; }
.compose-share-public { margin-bottom: 0; background: white; }
.compose-destination-card.is-group-selected { border-color: var(--accent); box-shadow: 0 8px 24px rgba(122,81,67,.08); }
.compose-destination-card.is-locked { opacity: .76; }
html[data-theme="dark"] .compose-destination-card { background: #302b28; }
html[data-theme="dark"] .compose-share-public { background: #352f2b; }
.privacy-reminder { padding: 12px 14px; border-radius: 12px; color: var(--muted); background: #f5f1ec; font-size: 12px; line-height: 1.55; }
.form-error { padding: 11px 13px; border-radius: 11px; color: #873c37; background: #f9e6e3; font-size: 13px; }
.form-actions { justify-content: flex-end; margin-top: 22px; }
.compose-safety-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 11px 13px; border: 1px solid #cfe0d3; border-radius: 13px; color: #405f49; background: #edf6ef; }
.compose-safety-bar > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: #568366; }
.compose-safety-bar div { display: grid; gap: 2px; }
.compose-safety-bar strong { font-size: 12px; }
.compose-safety-bar small { color: #5d7664; font-size: 9px; }
.compose-safety-bar.is-saving > span { animation: pulse 1s infinite alternate; }
.compose-safety-bar.has-error { border-color: #e4b6ae; color: #813f38; background: #fff0ed; }
.compose-modes { margin: 22px 0 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.compose-modes[hidden] { display: none; }
.compose-modes h3 { margin: 6px 0 13px; font: 600 21px/1.2 Georgia, serif; }
.writing-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.writing-mode { display: grid; gap: 3px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; background: #fbfaf8; }
.writing-mode strong { font-size: 12px; }
.writing-mode small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.writing-mode.is-selected { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(157,103,84,.1); }
.writing-mode-hint { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: #f5f1ec; }
.compose-quill-editor { min-height: 260px; border-radius: 0 0 12px 12px; background: #fbfaf8; font: 400 16px/1.65 Inter, ui-sans-serif, sans-serif; }
.compose-quill-editor .ql-editor { min-height: 260px; font: inherit; }
.compose-quill-editor .ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.rich-editor-toolbar.ql-toolbar.ql-snow { border-color: var(--line); border-radius: 12px 12px 0 0; font-family: inherit; }
.compose-quill-editor.ql-container.ql-snow { border-color: var(--line); }
.rich-editor-label { margin: 0 5px 0 2px; color: var(--accent-dark); font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.rich-editor-toolbar button { min-width: 34px; min-height: 32px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink); background: white; font-size: 12px; }
.rich-editor-toolbar button:hover { border-color: var(--accent); background: var(--accent-soft); }
.rich-editor-toolbar .spellcheck-toggle { width: auto; min-width: 112px; margin-left: auto; color: #68427d; font-weight: 800; }
.rich-editor-toolbar .spellcheck-toggle.is-active { border-color: #8a5d9e; color: white; background: #7a4f8f; box-shadow: 0 0 0 2px rgba(122,79,143,.14); }
.spellcheck-status { display: block; margin: 7px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.spellcheck-status.is-active { color: #68427d; font-weight: 700; }
.spellcheck-panel { margin-top: 10px; padding: 14px; border: 1px solid #d8c5e1; border-radius: 14px; background: #fbf7fd; }
.spellcheck-panel[hidden] { display: none; }
.spellcheck-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.spellcheck-panel-head strong { font-size: 13px; }
.spellcheck-panel-head span { color: #68427d; font-size: 11px; font-weight: 800; }
.spellcheck-results { display: grid; gap: 8px; max-height: 330px; overflow-y: auto; }
.spellcheck-issue { display: grid; gap: 8px; padding: 10px 11px; border: 1px solid #e3d9e8; border-radius: 11px; background: white; }
.spellcheck-issue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.spellcheck-issue-head strong { color: #8b3f45; font-size: 14px; }
.spellcheck-issue-head small { color: var(--muted); font-size: 9px; }
.spellcheck-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.spellcheck-suggestions button { padding: 6px 9px; border: 1px solid #cdb7d8; border-radius: 999px; cursor: pointer; color: #68427d; background: #faf5fc; font-size: 11px; font-weight: 750; }
.spellcheck-suggestions .spellcheck-ignore { color: var(--muted); border-color: var(--line); background: white; }
.spellcheck-empty { margin: 0; padding: 12px; border-radius: 10px; color: #405f49; background: #edf6ef; font-size: 12px; }
.rich-editor-toolbar .rich-preview-toggle { margin-left: auto; min-width: 70px; }
.compose-rich-preview { margin: -10px 0 20px; padding: 18px; border: 1px dashed var(--accent); border-radius: 13px; background: var(--accent-soft); }
.compose-paid-options { margin: 10px 0 18px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf8; }
.compose-paid-options .form-field { margin-bottom: 0; }
.tier-badge { display: inline-flex; width: fit-content; align-items: center; padding: 4px 8px; border-radius: 999px; color: #5d554f; background: #ece7e1; font-size: 10px; font-weight: 850; letter-spacing: .02em; white-space: nowrap; }
.tier-accompagnement { color: #48644d; background: #e3efe5; }
.tier-premium { color: #68427d; background: #eee3f5; }
.feature-option { position: relative; }
.feature-option.is-locked { cursor: pointer; border-style: dashed; opacity: .72; }
.feature-option.is-locked::after { content: "🔒 Cliquer pour découvrir l’accès"; position: absolute; z-index: 2; right: 9px; bottom: 8px; padding: 5px 8px; border-radius: 999px; color: #4f4641; background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(40,30,25,.12); font-size: 9px; font-weight: 850; pointer-events: none; }
.feature-option.is-unavailable::after { content: "Disponible pour une publication publique"; }
.feature-dialog, .report-dialog { width: min(610px, calc(100% - 28px)); }
.report-button { margin-top: 0; color: #8a4a45; }
.featured-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #68427d; background: #eee3f5; font-size: 11px; font-weight: 850; }
.ephemeral-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #76552a; background: #f8ebcf; font-size: 11px; font-weight: 800; }
.read-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #46624f; background: #e3efe6; font-size: 11px; font-weight: 800; }
.featured-duration-field { margin: -4px 0 18px 42px; padding: 13px; border: 1px solid #d8c5e1; border-radius: 13px; background: #faf5fc; }
.featured-duration-field[hidden] { display: none; }
.followed-origin-pill { display: inline-flex; width: fit-content; margin-top: 13px; padding: 6px 9px; border-radius: 999px; color: #3e6251; background: #e4f0e8; font-size: 10px; font-weight: 800; }
.clear-follow-filter { margin-left: 8px; padding: 4px 7px; border: 0; border-radius: 999px; cursor: pointer; color: var(--accent-dark); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.rich-content { color: var(--ink); line-height: 1.72; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 18px 0 8px; font-family: Georgia, serif; line-height: 1.2; }
.rich-content p { margin: 9px 0; white-space: pre-wrap; }
.rich-content ul { margin: 9px 0; padding-left: 23px; }
.rich-content blockquote { margin: 12px 0; padding: 9px 14px; border-left: 3px solid var(--accent); color: var(--muted); background: var(--accent-soft); }
.rich-content a { color: var(--accent-dark); text-decoration: underline; }
.post-responses { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-responses-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.post-responses-title { margin: 0; font: 600 clamp(22px, 3vw, 29px)/1.15 Georgia, serif; }
.post-responses-list { display: grid; gap: 12px; }
.post-response-card, .post-response-upgrade, .post-response-form { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--card) 88%, var(--accent-soft)); }
.post-response-content { margin: 9px 0; white-space: pre-wrap; line-height: 1.65; }
.post-response-card small { color: var(--muted); }
.post-response-form { display: grid; gap: 13px; margin-top: 16px; }
.post-response-form textarea { min-height: 120px; resize: vertical; }
.post-response-upgrade { margin-top: 16px; }
.post-response-upgrade p { margin: 7px 0 16px; color: var(--muted); }
.compose-media-field input[type="file"] { padding: 9px; cursor: pointer; }
.compose-media-field input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; color: var(--ink); background: white; font-weight: 750; }
.compose-image-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: -5px 0 19px; }
.compose-image-item { position: relative; overflow: hidden; min-height: 105px; border: 1px solid var(--line); border-radius: 13px; background: #f3efeb; }
.compose-image-item img { display: block; width: 100%; height: 120px; object-fit: cover; }
.compose-image-item button { position: absolute; top: 7px; right: 7px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: white; background: rgba(30, 25, 23, .78); font-size: 18px; }
.compose-image-item small { position: absolute; right: 0; bottom: 0; left: 0; padding: 6px 8px; color: white; background: linear-gradient(transparent, rgba(25, 21, 19, .82)); font-size: 10px; }
.compose-upload-progress { margin: 9px 0; color: var(--muted); font-size: 12px; }
.account-profile { display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: center; margin: 22px 0; padding: 18px; border-radius: 17px; background: #f7f3ee; }
.account-profile strong, .account-profile span { display: block; }
.account-profile span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.verified-label { display: block; margin-top: 5px; color: #55725b; font-size: 11px; font-weight: 750; }
.account-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-dialog { width: min(880px, calc(100% - 28px)); }
.account-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 150px; color: var(--muted); }
.account-error { display: grid; justify-items: start; gap: 12px; padding: 20px; border-radius: 15px; color: #873c37; background: #f9e6e3; }
.account-error p { margin: 0; }
.account-section { margin: 26px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.account-section-heading { margin-bottom: 15px; }
.account-section-heading h3 { margin: 0 0 5px; font: 600 24px/1.2 Georgia, serif; }
.account-section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.subscription-card { padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: #fbfaf8; }
.subscription-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.subscription-head h4 { margin: 6px 0; font: 600 25px/1.2 Georgia, serif; }
.subscription-head p { max-width: 540px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.subscription-metadata { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.account-meta { display: grid; gap: 4px; padding: 10px 12px; border-radius: 11px; background: white; }
.account-meta span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.account-meta strong { font-size: 13px; }
.account-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.account-link { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; font-size: 13px; }
.subscription-offers { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.subscription-offer { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.subscription-offer strong { font-size: 13px; }
.subscription-offer small { color: var(--muted); font-size: 11px; }
.subscription-offer button { grid-column: 2; grid-row: 1 / 3; white-space: nowrap; }
.subscription-unavailable { display: grid; gap: 4px; width: 100%; padding: 13px; border: 1px dashed var(--line); border-radius: 13px; background: var(--surface-soft, #f7f5f2); }
.subscription-unavailable small { color: var(--muted); line-height: 1.45; }
.subscription-access-wrapper { display: grid; gap: 13px; margin-top: 15px; }
.subscription-access-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.subscription-access-title strong { font: 600 18px/1.2 Georgia, serif; }
.subscription-access-title .secondary-button { padding: 8px 11px; font-size: 11px; text-decoration: none; }
.subscription-access-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.subscription-access-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); }
.subscription-access-card.is-current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.subscription-access-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.subscription-access-heading h4 { margin: 0; font: 600 17px/1.2 Georgia, serif; }
.access-state { padding: 4px 6px; border-radius: 999px; color: var(--accent-dark); background: white; font-size: 9px; font-weight: 800; }
.subscription-feature-list { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.35; }

/* Page publique des abonnements */
.pricing-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 62px 0 76px; }
.pricing-hero { max-width: 780px; margin: 0 auto 42px; text-align: center; }
.pricing-hero h1 { margin: 12px 0 15px; font: 600 clamp(38px, 6vw, 64px)/1.02 Georgia, serif; letter-spacing: -.035em; }
.pricing-hero p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pricing-card { position: relative; display: flex; flex-direction: column; padding: 27px; border: 1px solid var(--line); border-radius: 23px; background: var(--card); box-shadow: var(--shadow); }
.pricing-card.is-highlighted { border-color: var(--accent); box-shadow: 0 20px 55px rgba(105, 99, 157, .16); }
.pricing-card .plan-pill { align-self: flex-start; }
.pricing-card h2 { margin: 18px 0 8px; font: 600 30px/1.1 Georgia, serif; }
.pricing-card > p { min-height: 46px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.pricing-price { display: grid; gap: 4px; margin: 21px 0; }
.pricing-price strong { font: 700 30px/1 Georgia, serif; }
.pricing-price small { color: var(--muted); font-size: 11px; }
.pricing-features { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; color: var(--muted); font-size: 13px; line-height: 1.4; }
.pricing-card .primary-link, .pricing-card .secondary-button { margin-top: auto; text-decoration: none; }
.pricing-note { max-width: 820px; margin: 30px auto 0; padding: 17px 20px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.62); font-size: 12px; line-height: 1.55; text-align: center; }
.mobile-access { margin-top: 54px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 25px; background: var(--card); box-shadow: var(--shadow); }
.mobile-access .section-heading { margin-bottom: 8px; }
.mobile-access-intro { max-width: 780px; margin: 0 0 24px; color: var(--muted); line-height: 1.65; }
.mobile-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.mobile-store-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: #fbfaf8; }
.mobile-store-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: white; background: var(--ink); font-size: 24px; }
.mobile-store-card h3 { margin: 2px 0 6px; font: 600 22px/1.2 Georgia, serif; }
.mobile-store-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.mobile-store-card > .primary-link { grid-column: 1 / -1; justify-self: start; text-decoration: none; }
.android-tester-form { display: grid; grid-column: 1 / -1; gap: 9px; padding-top: 8px; }
.android-tester-form > label:first-child { color: var(--ink); font-size: 12px; font-weight: 800; }
.android-tester-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.android-tester-fields input { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: white; font: inherit; }
.android-tester-fields input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(157,103,84,.12); }
.android-consent { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 11px; line-height: 1.45; }
.android-consent input { margin-top: 2px; }
.android-tester-status { min-height: 20px; color: var(--accent-dark); font-size: 12px; font-weight: 750; }
.android-tester-status.is-error { color: #873c37; }
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.payment-dialog { width: min(620px, calc(100% - 28px)); }
.payment-summary { margin: 0 0 14px; color: var(--ink); font-size: 16px; font-weight: 750; }
.payment-notice { margin-bottom: 14px; padding: 13px 14px; border-radius: 12px; color: #554942; background: var(--accent-soft); font-size: 12px; line-height: 1.55; }
.paypal-buttons-host { min-height: 46px; margin: 16px 0; }
.sumup-card-host { min-height: 180px; margin: 14px 0; }
.payment-separator { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.payment-separator::before, .payment-separator::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.paypal-card-form { display: grid; gap: 12px; }
.paypal-card-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.paypal-card-field { min-height: 46px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.paypal-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paypal-card-form .primary-link { width: 100%; justify-content: center; }
.subscription-offer-actions { display: grid; gap: 8px; margin-top: 10px; }
.subscription-offer-actions button { width: 100%; justify-content: center; }
html[data-theme="dark"] .paypal-card-field { background: #fff; }
.payment-legal { color: var(--muted); font-size: 11px; line-height: 1.55; }
.account-settings-form { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fbfaf8; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-copy { display: grid; gap: 4px; }
.setting-copy strong { font-size: 14px; }
.setting-copy small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.setting-toggle { width: 21px; height: 21px; flex: 0 0 auto; accent-color: var(--accent); }
.account-select { min-width: 140px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.account-save-button { justify-self: end; margin: 14px 16px; }
.data-action-list { display: grid; gap: 10px; }
.data-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fbfaf8; }
.data-action strong { font-size: 14px; }
.data-action p { max-width: 560px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.data-action button { flex: 0 0 auto; }
.export-ready { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 14px; color: #405443; background: var(--sage); font-size: 13px; font-weight: 700; }

/* Espace bien-être privé */
.safe-mode-button { align-self: center; padding: 14px 19px; border: 1px solid #d99a91; border-radius: 14px; color: #7b302d; background: #f9e5e2; cursor: pointer; font-weight: 800; }
.safe-mode-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 22px; padding: 18px 20px; border: 1px solid #d99a91; border-radius: 17px; background: #f9e5e2; }
.safe-mode-panel strong { font: 600 21px/1.2 Georgia, serif; }
.safe-mode-panel p { margin: 5px 0 0; color: #704c49; font-size: 13px; line-height: 1.5; }
body.safe-mode-active .safe-mode-button { border-color: #69639d; color: white; background: #69639d; }
body.safe-mode-active .safe-mode-panel { border-color: #8d87b9; color: #3e3965; background: #e5e3f3; }
body.safe-mode-active .safe-mode-panel p { color: #5b5779; }
body.safe-mode-active { --paper: #eeeffb; --card: rgba(250,250,255,.96); --line: #cbc9e4; --accent: #6963a7; --accent-dark: #48417e; --accent-soft: #e4e3f4; background: radial-gradient(circle at 12% 5%, #dddaf4, transparent 28rem), radial-gradient(circle at 90% 25%, #d8e8ed, transparent 30rem), var(--paper); }
body.safe-mode-active .app-header { border-bottom-color: #aba6d2; background: rgba(239,240,251,.96); box-shadow: 0 8px 30px rgba(72,65,126,.1); }
.safe-mode-indicator { position: fixed; z-index: 30; right: 18px; bottom: 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; max-width: min(430px, calc(100% - 28px)); padding: 10px 11px; border: 1px solid #8f89bd; border-radius: 16px; color: #3f3966; background: rgba(245,244,255,.97); box-shadow: 0 12px 36px rgba(72,65,126,.24); backdrop-filter: blur(12px); }
.safe-mode-indicator[hidden] { display: none; }
.safe-mode-indicator > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: white; background: #6963a7; font-size: 18px; }
.safe-mode-indicator div { display: grid; gap: 2px; }
.safe-mode-indicator strong { font-size: 12px; }
.safe-mode-indicator small { color: #656080; font-size: 9px; }
.safe-mode-indicator button { padding: 8px 10px; border: 0; border-radius: 10px; cursor: pointer; color: white; background: #6963a7; font-size: 10px; font-weight: 800; }
body.safe-mode-active .quick-checkin { border-color: #aaa5d0; background: linear-gradient(135deg, #e6e4f6, #edf4f7); }
.protected-tools { margin: 0 0 22px; padding: clamp(20px, 4vw, 28px); border: 1px solid #aaa5d0; border-radius: 22px; background: linear-gradient(135deg, #f0effb, #edf6f7); box-shadow: 0 15px 40px rgba(72,65,126,.1); }
.protected-tools-heading h2 { margin: 8px 0 18px; font: 600 clamp(24px, 4vw, 34px)/1.12 Georgia, serif; }
.protected-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.protected-tool-grid button { display: grid; gap: 7px; min-height: 110px; padding: 16px; border: 1px solid #c3c0df; border-radius: 16px; cursor: pointer; text-align: left; color: #3f3966; background: rgba(255,255,255,.78); transition: transform .18s ease, box-shadow .18s ease; }
.protected-tool-grid button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(72,65,126,.12); }
.protected-tool-grid strong { font-size: 14px; }
.protected-tool-grid span { color: #666180; font-size: 11px; line-height: 1.45; }
.wellbeing-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 18px; }
.wellbeing-card, .calm-card, .crisis-card { padding: clamp(20px, 4vw, 30px); border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 12px 34px rgba(69, 52, 43, .055); }
.wellbeing-card h2, .calm-card h2, .crisis-card h2 { margin: 8px 0 10px; font: 600 28px/1.15 Georgia, serif; }
.checkin-moods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 20px 0; }
.checkin-moods button { display: grid; min-height: 74px; place-items: center; gap: 3px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: #fbfaf8; font-size: 25px; }
.checkin-moods button small { color: var(--muted); font-size: 10px; font-weight: 700; }
.checkin-moods button.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(157,103,84,.12); }
.wellbeing-range { display: grid; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.wellbeing-range span { display: flex; justify-content: space-between; }
.wellbeing-range input { width: 100%; accent-color: var(--accent); }
.compact-field textarea { min-height: 84px; }
.non-clinical-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.emotion-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.emotion-stat { padding: 13px; border-radius: 13px; background: #f7f3ee; }
.emotion-stat strong, .emotion-stat span { display: block; }
.emotion-stat strong { color: var(--accent-dark); font: 700 25px/1 Georgia, serif; }
.emotion-stat span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.emotion-distribution { display: grid; gap: 9px; margin-top: 18px; }
.distribution-row { display: grid; grid-template-columns: 105px 1fr 25px; align-items: center; gap: 8px; font-size: 12px; }
.distribution-track { height: 9px; overflow: hidden; border-radius: 999px; background: #eee8e1; }
.distribution-fill { height: 100%; border-radius: inherit; background: var(--accent); }
.calm-card { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 28px; margin-top: 18px; background: linear-gradient(135deg, var(--card), var(--sage)); }
.calm-card p, .crisis-card p { color: var(--muted); line-height: 1.65; }
.calm-actions, .crisis-actions, .auth-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.relaxation-player { display: grid; gap: 8px; margin-top: 20px; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 15px; background: rgba(255,255,255,.62); }
.relaxation-player label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.relaxation-player label small, .relaxation-player > small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.relaxation-player select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); font: inherit; }
.relaxation-player audio { width: 100%; height: 38px; }
.breathing-stage { display: grid; min-height: 230px; place-items: center; }
.breathing-circle { display: grid; width: 175px; height: 175px; place-items: center; align-content: center; gap: 8px; border: 3px solid var(--accent); border-radius: 50%; background: rgba(255,255,255,.68); transition: transform 1s ease; }
.breathing-circle strong { max-width: 135px; text-align: center; }
.breathing-circle span { color: var(--accent-dark); font-size: 24px; font-weight: 800; }
.crisis-card { margin-top: 18px; border-color: #d99a91; background: #fff8f6; }
.crisis-actions a { text-decoration: none; }
.wellbeing-section, .profiles-manager { margin-top: 42px; }
.profiles-hint { max-width: 720px; margin: -8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.profile-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.following-intro { margin-bottom: 22px; }
.following-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 34px; }
.following-rules > div { display: grid; gap: 5px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--card) 88%, var(--accent-soft)); }
.following-rules strong { font-size: 13px; }
.following-rules span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.following-directory { margin-top: 10px; }
.following-count { padding: 7px 11px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.following-empty { display: grid; grid-column: 1 / -1; justify-items: start; gap: 8px; padding: 26px; border: 1px dashed var(--line); border-radius: 18px; background: var(--card); }
.following-empty p { max-width: 600px; margin: 0 0 8px; color: var(--muted); line-height: 1.55; }
.followed-profile-card { position: relative; overflow: hidden; }
.followed-profile-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; content: ""; background: linear-gradient(90deg, var(--accent), var(--sage)); }
.followed-since { display: block; margin-top: 12px; color: var(--muted); font-size: 10px; }
.alias-type-badge { display: inline-flex; width: fit-content; margin-top: 8px; padding: 5px 8px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.alias-type-badge.compact { margin-top: 5px; padding: 3px 7px; font-size: 9px; }
.profile-universe { animation: universe-enter .22s ease-out; }
.profile-universe-back { margin-bottom: 18px; }
.profile-universe-header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--accent-soft) 60%, var(--card))); box-shadow: var(--shadow); }
.profile-universe-avatar { display: grid; width: 96px; height: 96px; place-items: center; border-radius: 30px; color: white; font-size: 42px; box-shadow: 0 14px 28px rgba(40,30,25,.14); }
.profile-universe-copy { min-width: 0; }
.profile-universe-identity h1 { margin: 6px 0 0; font: 600 clamp(30px, 5vw, 52px)/1.04 Georgia, serif; letter-spacing: -.025em; }
.profile-universe-identity p { max-width: 720px; margin: 13px 0 0; color: var(--muted); line-height: 1.6; }
.profile-universe-stats { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.profile-universe-stat { display: grid; min-width: 105px; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.profile-universe-stat strong { font: 700 20px/1 Georgia, serif; }
.profile-universe-stat span { color: var(--muted); font-size: 10px; }
.profile-universe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 20px; }
.universe-section { margin-top: 38px; }
.alias-public-notice { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); }
.alias-public-notice.is-one-time { border-color: #8f78c8; background: linear-gradient(135deg, #f2edff, #f8f5ff); }
.alias-public-notice.is-one-time strong { color: #5c4594; }
.one-time-alias-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #5c4594; background: #eee8ff; font-size: 10px; font-weight: 800; }
@keyframes universe-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.anonymous-profile-card { padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.anonymous-profile-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; }
.anonymous-profile-avatar { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 15px; color: white; font-size: 22px; }
.anonymous-profile-card h3 { margin: 0; font: 600 18px/1.2 Georgia, serif; }
.anonymous-profile-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.anonymous-profile-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.anonymous-profile-actions button { padding: 8px 10px; font-size: 11px; }
.profile-name-input { width: 100%; margin-top: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfaf8; }
.anonymous-profile-editor { display: grid; gap: 8px; margin-top: 12px; }
.anonymous-profile-editor[hidden] { display: none; }
.anonymous-profile-editor .profile-name-input { margin-top: 0; }
.profile-bio-input, .profile-style-select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: #fbfaf8; font: inherit; }
.profile-bio-input { min-height: 76px; resize: vertical; line-height: 1.45; }
.profile-style-choices { display: grid; grid-template-columns: minmax(130px, .6fr) 1.4fr; gap: 12px; align-items: end; }
.profile-setting-field { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.profile-color-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.profile-color-field legend { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.profile-color-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-color-name { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.profile-color-swatch { position: relative; width: 31px; height: 31px; padding: 0; border: 2px solid transparent; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(40,30,25,.12); transition: transform .15s ease, box-shadow .15s ease; }
.profile-color-swatch:hover { transform: translateY(-2px); }
.profile-color-swatch.is-selected { border-color: white; box-shadow: 0 0 0 3px var(--accent), inset 0 0 0 1px rgba(40,30,25,.15); }
.profile-save-button { justify-self: end; }
.profile-editor-toggle[aria-expanded="true"] { color: var(--accent-dark); background: var(--accent-soft); }
.anonymous-profile-card.is-editing-profile { grid-column: span 2; border-color: var(--accent); box-shadow: 0 10px 28px rgba(69,52,43,.08); }
.profile-active-label { padding: 8px 10px; border: 0; border-radius: 999px; color: #55725b; background: #eaf3eb; font-size: 11px; font-weight: 800; }
.emotion-history { display: grid; gap: 10px; }
.history-day { display: grid; grid-template-columns: minmax(150px, .5fr) 1.5fr; gap: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.history-day time { font-weight: 750; }
.history-entries { display: flex; flex-wrap: wrap; gap: 7px; }
.history-entry { padding: 7px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; }
.history-note { grid-column: 2; margin: 0; color: var(--muted); font-size: 12px; }

/* Authentification email ou Google */
.auth-dialog { width: min(560px, calc(100% - 28px)); }
.auth-intro { color: var(--muted); font-size: 14px; line-height: 1.6; }
.google-auth-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: white; font-weight: 750; }
.google-auth-button span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #4285f4; background: #f4f7ff; font-weight: 900; }
.auth-separator { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: var(--muted); font-size: 11px; }
.auth-separator::before, .auth-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.text-button { margin-top: 16px; padding: 0; border: 0; color: var(--accent-dark); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1ebe5;
  --muted: #b9aea6;
  --paper: #1d1a18;
  --card: rgba(43, 38, 35, .94);
  --line: #493f39;
  --accent: #d49a83;
  --accent-dark: #f0c0ad;
  --accent-soft: #4b332a;
  --sage: #334438;
}
html[data-theme="dark"] body { background: radial-gradient(circle at 12% 5%, rgba(75,51,42,.7), transparent 26rem), radial-gradient(circle at 92% 28%, rgba(51,68,56,.62), transparent 28rem), var(--paper); }
html[data-theme="dark"] .app-header { background: rgba(29,26,24,.9); }
html[data-theme="dark"] .view-tabs,
html[data-theme="dark"] .search-control,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .account-meta,
html[data-theme="dark"] .account-select { background: #2b2623; }
html[data-theme="dark"] .view-tab.is-active,
html[data-theme="dark"] .post-dialog,
html[data-theme="dark"] .subscription-card,
html[data-theme="dark"] .account-settings-form,
html[data-theme="dark"] .data-action { background: #2b2623; }
html[data-theme="dark"] .account-profile,
html[data-theme="dark"] .dialog-close,
html[data-theme="dark"] .privacy-reminder,
html[data-theme="dark"] .circle-checkbox { background: #352f2b; }
html[data-theme="dark"] .wellbeing-card,
html[data-theme="dark"] .anonymous-profile-card,
html[data-theme="dark"] .history-day,
html[data-theme="dark"] .checkin-moods button,
html[data-theme="dark"] .profile-name-input,
html[data-theme="dark"] .google-auth-button { background: #2b2623; }
html[data-theme="dark"] .quick-checkin { background: linear-gradient(135deg, #2b2623, #4b332a); }
html[data-theme="dark"] .quick-moods button,
html[data-theme="dark"] .writing-mode,
html[data-theme="dark"] .article-detail { background: #2b2623; }
html[data-theme="dark"] .emotion-stat { background: #352f2b; }
html[data-theme="dark"] .crisis-card { background: #3a2927; }
html[data-theme="dark"] .card-excerpt,
html[data-theme="dark"] .dialog-text,
html[data-theme="dark"] .article-body { color: #d0c6bf; }

.toast { position: fixed; z-index: 50; right: 20px; bottom: 20px; max-width: 340px; padding: 12px 15px; border-radius: 12px; color: white; background: var(--ink); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* Lecture d'une publication dans une page dédiée */
.post-page-header { display: flex; justify-content: space-between; }
.post-back-link { text-decoration: none; }
.article-shell { width: min(820px, calc(100% - 32px)); min-height: calc(100vh - 160px); margin: 0 auto; padding: clamp(38px, 7vw, 82px) 0; }
.inline-article-view { width: min(820px, 100%); margin: 0 auto; }
.inline-article-back { margin-bottom: 18px; }
.article-detail { padding: clamp(25px, 6vw, 58px); border: 1px solid var(--line); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.article-detail[hidden] { display: none; }
.article-detail h1 { max-width: 17ch; margin: 15px 0 28px; font: 600 clamp(38px, 7vw, 66px)/1.02 Georgia, serif; letter-spacing: -.035em; }
.article-body { color: #4f4844; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 18px/1.85 Georgia, serif; }
.article-gallery { display: grid; gap: 14px; margin: 30px 0; }
.article-gallery img { width: 100%; max-height: 680px; border-radius: 18px; object-fit: cover; }
.article-sensitive { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; margin: 0 0 22px; padding: 16px; border: 1px solid #e4d3a5; border-radius: 14px; background: #fff9e9; }
.article-sensitive span { flex: 1; color: #6c5520; font-size: 12px; }
.is-hidden-sensitive { filter: blur(8px); pointer-events: none; user-select: none; }
.article-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-kindness { margin-top: 34px; padding: 19px; border-radius: 16px; background: var(--sage); }
.article-kindness strong { font: 600 19px/1.2 Georgia, serif; }
.article-kindness p { margin: 7px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.article-kindness a { text-decoration: none; }

.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.app-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.app-footer a:hover { color: var(--accent-dark); }

@media (max-width: 980px) {
  .app-header { grid-template-columns: 1fr auto; gap: 12px; }
  .view-tabs { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .post-grid, .circle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-intro { grid-template-columns: 1fr; align-items: start; }
  .reading-mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-checkin { grid-template-columns: 1fr; }
  .creator-stats-grid, .protected-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .advanced-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guided-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .app-header { gap: 8px; padding: 10px 12px; }
  .view-tabs { width: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .view-tabs::-webkit-scrollbar { display: none; }
  .view-tab { flex: 0 0 auto; padding: 8px 11px; font-size: 11px; }
  .brand small { display: none; }
  .brand { gap: 8px; min-width: 0; }
  .brand strong { display: block; overflow: hidden; max-width: 110px; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
  .brand-mark { width: 37px; height: 37px; border-radius: 12px; }
  .header-actions { gap: 6px; min-width: 0; }
  .search-control { width: 44px; padding: 9px 11px; }
  .search-control:focus-within { position: absolute; z-index: 3; right: 14px; width: calc(100% - 28px); background: white; }
  .search-control input { width: 0; }
  .search-control:focus-within input { width: 100%; }
  .write-button { display: none; }
  .auth-button { max-width: 88px; padding: 10px 8px; font-size: 11px; }
  .app-shell { width: min(100% - 28px, 580px); padding-top: 34px; }
  .reader-intro { gap: 24px; margin-bottom: 28px; }
  .reader-intro h1 { font-size: 38px; }
  .reader-intro p { font-size: 15px; }
  .reading-hub { margin-top: 0; padding: 14px; }
  .reading-hub-heading { align-items: stretch; flex-direction: column; }
  .random-post-button { width: 100%; min-width: 0; }
  .reading-mode-grid { grid-template-columns: 1fr 1fr; }
  .reading-mode:last-child { grid-column: 1 / -1; }
  .following-directory-button { width: 100%; margin-top: 10px; }
  .featured-duration-field { margin-left: 0; }
  #compose-dialog .dialog-frame { padding: 22px 14px 70px; }
  #compose-dialog .dialog-close { top: 10px; right: 10px; }
  #compose-dialog .dialog-title { margin-right: 44px; }
  .spellcheck-results { max-height: 260px; }
  .toolbar { display: block; }
  .mood-filters { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .mood-filters::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; }
  .result-count { display: block; margin-top: 7px; text-align: right; }
  .post-grid, .circle-grid { grid-template-columns: 1fr; }
  .quick-checkin { gap: 18px; margin-bottom: 30px; padding: 20px; }
  .quick-checkin-actions { grid-template-columns: 1fr; }
  .quick-moods { grid-template-columns: repeat(3, 1fr); }
  .quick-save, .quick-safe-mode { width: 100%; }
  .writing-mode-grid { grid-template-columns: repeat(2, 1fr); }
  .post-page-header { align-items: center; }
  .post-back-link { padding: 9px 11px; font-size: 11px; }
  .article-detail { border-radius: 21px; }
  .article-footer { align-items: stretch; flex-direction: column; }
  .wellbeing-grid, .calm-card, .profile-card-grid, .following-rules { grid-template-columns: 1fr; }
  .profile-universe-header { grid-template-columns: 1fr; gap: 17px; padding: 20px; }
  .profile-universe-avatar { width: 78px; height: 78px; border-radius: 24px; font-size: 34px; }
  .profile-universe-stat { flex: 1 1 42%; min-width: 0; }
  .profile-universe-actions > button { width: 100%; }
  .anonymous-profile-card.is-editing-profile { grid-column: auto; }
  .profile-style-choices { grid-template-columns: 1fr; }
  .safe-mode-indicator { right: 14px; bottom: 14px; left: 14px; grid-template-columns: auto 1fr; }
  .safe-mode-indicator button { grid-column: 1 / -1; width: 100%; }
  .protected-tool-grid { grid-template-columns: 1fr 1fr; }
  .creator-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-stats-grid, .stats-columns, .guided-template-grid, .guided-entry-list { grid-template-columns: 1fr; }
  .circle-universe-header, .guided-suggestion { grid-template-columns: 1fr; }
  .stats-bar-row { grid-template-columns: 110px 1fr 28px; gap: 8px; }
  .stats-upgrade-card { grid-template-columns: 1fr; }
  .stats-upgrade-card p, .stats-upgrade-card button { grid-column: 1; grid-row: auto; }
  .compose-quill-editor, .compose-quill-editor .ql-editor { min-height: 220px; }
  .checkin-moods { grid-template-columns: repeat(4, minmax(62px, 1fr)); overflow-x: auto; }
  .safe-mode-panel, .history-day { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .history-note { grid-column: 1; }
  .profile-summary { grid-template-columns: auto 1fr; padding: 18px; }
  .plan-pill { grid-column: 1 / -1; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .subscription-head, .data-action, .export-ready { align-items: stretch; flex-direction: column; }
  .subscription-metadata { grid-template-columns: 1fr; }
  .subscription-offers { grid-template-columns: 1fr; }
  .subscription-access-grid, .pricing-grid, .mobile-access-grid { grid-template-columns: 1fr; }
  .android-tester-fields { grid-template-columns: 1fr; }
  .subscription-access-title { align-items: flex-start; flex-direction: column; }
  .data-action button, .export-ready .primary-link { width: 100%; }
  .setting-row { align-items: flex-start; }
  .circle-actions { align-items: flex-start; flex-direction: column; }
  .circle-action-buttons { width: 100%; justify-content: flex-start; }
  .circle-action-buttons button { flex: 1; }
  .circle-form-actions { align-items: stretch; flex-direction: column; }
  .form-action-spacer { display: none; }
  .card-image-wrap { height: 230px; }
  .app-footer { align-items: flex-start; flex-direction: column; }
  .app-footer p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
