/* Polices auto-hébergées (SIL Open Font License) : DM Sans et Space Grotesk, sous-ensembles latin et latin-ext. */
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #101610;
  --surface: #1b241c;
  --text: #f3f1e8;
  --muted: #aab6a5;
  --lime: #cef55c;
  --line: #354332;
  font-family: 'DM Sans', system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at 50% -10%, #344e29 0, transparent 38%), var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
button {
  border: 0;
}
#app {
  max-width: 660px;
  margin: auto;
  padding: 0 20px 110px;
}
header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 23px;
}
.brand-icon {
  color: var(--lime);
  font-size: 27px;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--lime);
  font-weight: 700;
}
.ghost,
.icon {
  background: #222e21;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}
.icon {
  min-width: 44px;
  min-height: 44px;
}
.hero {
  padding: 27px 0 18px;
}
.eyebrow {
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.055em;
  margin: 10px 0;
}
.hero p,
.muted {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}
.tabs {
  display: flex;
  gap: 5px;
  background: #1b251a;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px;
  margin: 12px 0;
}
.tabs button {
  flex: 1;
  min-height: 44px;
  background: transparent;
  color: #bbc9b7;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.tabs button.active {
  background: var(--lime);
  color: #18220f;
}
.wheel-wrap {
  position: relative;
  margin: 8px auto 0;
  width: min(100%, 410px);
  aspect-ratio: 1;
}
.wheel-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: pan-y;
}
.wheel-wrap path {
  transition:
    opacity 0.18s,
    filter 0.18s;
}
.wheel-label {
  fill: white;
  font-weight: 700;
  font-size: 11px;
  pointer-events: none;
  text-anchor: middle;
}
.wheel-sub {
  fill: #d5dfd0;
  font-size: 11px;
  text-anchor: middle;
  pointer-events: none;
}
.wheel-button {
  cursor: pointer;
}
.wheel-button:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 4px white);
}
.handle {
  cursor: grab;
  touch-action: none;
}
.hint {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  min-height: 18px;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.card {
  background: linear-gradient(145deg, #202b20, #1a241b);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  margin: 13px 0;
  box-shadow: 0 15px 35px #0002;
}
.card h2,
.card h3 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stack {
  display: grid;
  gap: 10px;
}
.button {
  background: var(--lime);
  color: #17210d;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  min-height: 48px;
}
.button.secondary {
  background: #263425;
  color: var(--text);
  border: 1px solid #3e503a;
}
.button.danger {
  background: #442729;
  color: #ffd4d4;
}
.wide {
  width: 100%;
}
.pill {
  color: #d5e1d1;
  background: #2a3829;
  border: 1px solid #40533c;
  border-radius: 99px;
  padding: 8px 12px;
  font-size: 13px;
  min-height: 40px;
}
.note-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #253125;
  border-radius: 13px;
  padding: 10px 12px;
}
.note .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.note strong {
  flex: 1;
}
.note button {
  background: none;
  color: #e6efe0;
  font-size: 20px;
  min-width: 38px;
  min-height: 38px;
}
.stepper {
  display: flex;
  gap: 12px;
  align-items: center;
}
.stepper button {
  background: #344731;
  color: white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
}
.notes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.input {
  width: 100%;
  background: #131c14;
  border: 1px solid #40523d;
  border-radius: 12px;
  color: #fff;
  padding: 13px;
  margin: 5px 0 13px;
  min-height: 48px;
}
label {
  font-size: 13px;
  color: #cbd7c6;
  font-weight: 600;
}
.subnav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 660px);
  background: #151e16ef;
  border: 1px solid #354333;
  border-bottom: 0;
  display: flex;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
  backdrop-filter: blur(18px);
}
.subnav button {
  flex: 1;
  background: none;
  color: #9eae9a;
  padding: 6px 2px;
  min-height: 46px;
  font-size: 11px;
}
.subnav button.active {
  color: var(--lime);
}
.subnav span {
  display: block;
  font-size: 19px;
}
.small {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
a {
  color: var(--lime);
}
.back {
  background: none;
  color: var(--lime);
  padding: 10px 0;
  min-height: 44px;
}
.terpene {
  width: 100%;
  text-align: left;
  background: #253125;
  color: var(--text);
  border-radius: 15px;
  padding: 16px;
  margin: 5px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.empty {
  padding: 18px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.banner {
  padding: 12px 14px;
  border-radius: 12px;
  background: #453d23;
  color: #f8df9e;
  font-size: 14px;
  line-height: 1.4;
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.banner > span {
  flex: 1 1 200px;
}
.banner-action {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #f8df9e66;
  background: #f8df9e;
  color: #1d1a0d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.splash {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #293c20;
  color: var(--lime);
}
.kicker {
  font-size: 11px;
  color: #a9bd9d;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.progress {
  height: 5px;
  border-radius: 5px;
  background: #354a32;
  margin-top: 7px;
}
.progress i {
  display: block;
  background: var(--lime);
  height: 100%;
  border-radius: 5px;
}
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: #000a;
  z-index: 9;
  display: grid;
  place-items: end center;
}
.dialog {
  width: min(100%, 660px);
  max-height: 90dvh;
  overflow: auto;
  background: #1b261b;
  padding: 24px;
  border-radius: 24px 24px 0 0;
}
.dialog h2 {
  margin-top: 0;
}
@media (min-width: 700px) {
  #app {
    padding-top: 15px;
  }
  .dialog-overlay {
    place-items: center;
  }
  .dialog {
    border-radius: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Presentation aligned with the mobile concept: wheel first, clear controls. */
:root {
  --bg: #111312;
  --surface: #1b1e1c;
  --lime: #c6f34d;
  --line: #343c31;
  --muted: #a5ada1;
}
body {
  background: radial-gradient(ellipse at 50% -16%, #273b20 0, transparent 46%), #111312;
}
#app {
  max-width: 560px;
  padding-inline: 20px;
}
header {
  height: 66px;
  border-color: #ffffff15;
}
.brand {
  font-size: 22px;
}
.hero {
  padding: 21px 0 12px;
}
.hero h1 {
  font-size: clamp(27px, 7vw, 37px);
  max-width: 360px;
}
.hero p {
  margin: 6px 0 8px;
  max-width: 390px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.17em;
}
.tabs {
  border-radius: 14px;
  background: #1b1d1c;
  border-color: #ffffff13;
  margin: 9px 0;
}
.tabs button {
  border-radius: 10px;
}
.wheel-wrap {
  width: min(100%, 390px);
  margin: 7px auto 0;
  filter: drop-shadow(0 12px 24px #0008);
}
.wheel-wrap svg {
  overflow: visible;
}
.wheel-button path:first-child {
  stroke: #151815;
  stroke-width: 1.3;
}
.wheel-button:hover path:first-child {
  filter: brightness(1.15);
}
.wheel-label {
  font-size: 11px;
  fill: #fffef8;
}
.card {
  background: linear-gradient(150deg, #252b26, #1a1e1b);
  border-color: #ffffff17;
  box-shadow: 0 10px 24px #0003;
}
.button {
  box-shadow: inset 0 1px 0 #ffffff50;
}
.subnav {
  background: #161a17f5;
  border-color: #ffffff18;
}
.subnav button.active {
  color: var(--lime);
}
.note {
  background: #ffffff0b;
}
.crumb {
  margin: 3px 0;
}
.hint {
  padding-top: 4px;
}
.pill {
  border-color: #ffffff23;
  background: #242a25;
}
.stepper button {
  background: #303a2d;
}

/* Consistent finishes across touch controls and surfaces. */
.button,
.tabs button.active {
  background: linear-gradient(160deg, #dafa80 0%, #c5ef4a 58%, #9bcf2d 100%);
  color: #17210d;
  box-shadow:
    inset 0 1px 0 #ffffff9c,
    0 5px 16px #86af1b20,
    0 1px 2px #0008;
}
.button.secondary,
.icon,
.ghost {
  background: linear-gradient(155deg, #303a30, #202821);
  border: 1px solid #ffffff20;
  box-shadow:
    inset 0 1px 0 #ffffff15,
    0 4px 10px #0003;
  color: #f0f4ed;
}
.button.danger {
  background: linear-gradient(155deg, #533036, #3b2428);
  border: 1px solid #bc77794a;
  color: #ffd4d4;
}
.button,
.pill,
.tabs button,
.icon,
.stepper button {
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    box-shadow 0.16s ease;
}
.button:active,
.pill:active,
.tabs button:active,
.icon:active,
.stepper button:active {
  transform: scale(0.97);
  filter: brightness(0.94);
}
.pill {
  background: linear-gradient(150deg, #303a30, #222923);
  box-shadow: inset 0 1px 0 #ffffff0d;
}
.card {
  background: linear-gradient(145deg, #282e29 0%, #1a1e1b 75%);
  box-shadow:
    inset 0 1px 0 #ffffff0c,
    0 14px 35px #0004;
}
.stepper button {
  background: linear-gradient(145deg, #40503a, #283429);
  border: 1px solid #ffffff17;
  box-shadow: inset 0 1px 0 #ffffff16;
}
.tabs {
  box-shadow:
    inset 0 1px 3px #0006,
    0 1px 0 #ffffff08;
}
.subnav {
  box-shadow: 0 -10px 35px #0005;
}
@media (prefers-reduced-motion: reduce) {
  .button,
  .pill,
  .tabs button,
  .icon,
  .stepper button {
    transition: none;
  }
}

/* Light follows the rounded surface: layered highlights remain subtle. */
.button,
.tabs button.active {
  position: relative;
  background:
    radial-gradient(ellipse 95% 95% at 50% -38%, #f5ffcfb8 0%, #e3ff9866 36%, transparent 72%),
    linear-gradient(180deg, #cef763, #bce94a 72%, #a9d83a);
  border: 1px solid #eaffb14a;
  box-shadow:
    inset 0 1px 1px #f9ffdcbb,
    inset 0 -2px 3px #719d3526,
    0 4px 12px #93bf2420,
    0 2px 3px #0006;
}
.button.secondary,
.icon,
.ghost {
  background:
    radial-gradient(ellipse 100% 120% at 50% -70%, #ffffff21, transparent 75%),
    linear-gradient(180deg, #303a31, #202721);
  border: 1px solid #ffffff24;
  box-shadow:
    inset 0 1px 1px #ffffff20,
    inset 0 -1px 2px #0005,
    0 3px 9px #0003;
}
.back-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 8px;
  border-radius: 13px;
  background: linear-gradient(180deg, #252d25, #1b211c);
  border: 1px solid #ffffff16;
  color: #e5eee0;
  margin-top: 16px;
  box-shadow:
    inset 0 1px #ffffff0e,
    0 4px 10px #0003;
}
.back-premium span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: #ffffff0a;
  color: var(--lime);
  font-size: 18px;
}
.terp-hero {
  padding-bottom: 14px;
}
.accent-dot {
  color: var(--lime);
}
.terp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 19px;
}
.terp-stats span {
  padding: 8px 11px;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  background: linear-gradient(145deg, #283128, #1c241d);
  font-size: 11px;
  color: #d7e6d0;
  font-weight: 600;
  box-shadow: inset 0 1px #ffffff0a;
}
.terp-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid #c9e99824;
  border-radius: 17px;
  background: radial-gradient(ellipse at 0 0, #a4d34a16, transparent 75%), #20271e;
}
.terp-notice p {
  margin: 0;
  color: #d1ddc8;
  font-size: 12px;
  line-height: 1.55;
}
.notice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid #c6f34d80;
  border-radius: 50%;
  color: #c6f34d;
  font-size: 12px;
  font-weight: 700;
}
.terp-section-title {
  display: flex;
  justify-content: space-between;
  color: #95a88d;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  margin: 28px 2px 11px;
}
.terp-grid {
  display: grid;
  gap: 9px;
}
.terp-card {
  border: 1px solid #ffffff17;
  border-radius: 18px;
  background:
    radial-gradient(
      ellipse 65% 130% at -10% 0%,
      color-mix(in srgb, var(--terp-accent) 17%, transparent),
      transparent 80%
    ),
    linear-gradient(150deg, #252d25, #1a201b);
  box-shadow:
    inset 0 1px #ffffff0e,
    0 6px 20px #0003;
  overflow: hidden;
}
.terp-card summary {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}
.terp-card summary::-webkit-details-marker {
  display: none;
}
.terp-card summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}
.terp-card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 45px;
  height: 45px;
  color: var(--terp-accent);
  font-size: 24px;
  background: color-mix(in srgb, var(--terp-accent) 13%, #1c241d);
  border: 1px solid color-mix(in srgb, var(--terp-accent) 28%, transparent);
  border-radius: 14px;
}
.terp-card-heading {
  display: grid;
  gap: 4px;
  flex: 1;
}
.terp-card-heading strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  letter-spacing: -0.025em;
}
.terp-kicker {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--terp-accent);
  font-weight: 700;
}
.terp-plus {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #ffffff0a;
  border: 1px solid #ffffff10;
  color: #dbe7d6;
  font-size: 21px;
  transition: transform 0.2s;
}
.terp-card[open] .terp-plus {
  transform: rotate(45deg);
}
.terp-card-body {
  border-top: 1px solid #ffffff0d;
  margin: 0 15px;
  padding: 14px 1px 17px;
}
.terp-card-body p,
.research-card p {
  color: #d2dbcf;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 13px;
}
.terp-footnote {
  color: #aab7a6;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.source-link {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid #ffffff1c;
  background: #ffffff09;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #dff8bc;
}
.research-card {
  margin: 20px 0 14px;
  padding: 18px;
  border: 1px solid #ffffff13;
  border-radius: 18px;
  background: linear-gradient(145deg, #293125, #1b211b);
}
.research-card p {
  margin: 9px 0;
}
.research-card a {
  font-size: 13px;
  font-weight: 700;
}
.summary-wheels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.summary-wheel-card {
  display: grid;
  justify-items: center;
  padding: 14px 8px;
  background:
    radial-gradient(ellipse at 50% 5%, #b0d86314, transparent 60%),
    linear-gradient(145deg, #262d27, #191f1a);
  border: 1px solid #ffffff16;
  border-radius: 20px;
  box-shadow:
    inset 0 1px #ffffff0d,
    0 8px 24px #0003;
}
.summary-wheel-card strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
}
.summary-wheel-card span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.mini-wheel {
  width: min(100%, 160px);
  aspect-ratio: 1;
}
.mini-wheel svg {
  width: 100%;
  height: 100%;
}
.summary-caption {
  margin: 10px 4px 18px;
}
.summary-wheels + .summary-caption {
  line-height: 1.5;
}
@keyframes wheelReveal {
  from {
    opacity: 0.55;
    transform: scale(0.955) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
.wheel-enter svg {
  animation: wheelReveal 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.wheel-label {
  font-size: 11px;
}
.dialog {
  box-shadow: 0 -20px 80px #0009;
  border: 1px solid #ffffff18;
}
.dialog h2 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.035em;
}
.dialog-overlay {
  backdrop-filter: blur(5px);
}
@media (prefers-reduced-motion: reduce) {
  .wheel-enter svg {
    animation: none;
  }
}
.restore-draft {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  background: #ffffff08;
  border: 1px solid #ffffff15;
  border-radius: 13px;
  line-height: 1.45;
}
.restore-draft input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #c6f34d;
  flex: none;
}
.tabs button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wheel-note-label {
  font-size: 9.5px;
  paint-order: stroke;
  stroke: #10161077;
  stroke-width: 1.5px;
  stroke-linejoin: round;
}
/* Respect both the system and Telegram content-safe inset when available. */
#app {
  padding-bottom: calc(
    110px + max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px))
  );
}
.subnav {
  padding-bottom: calc(
    8px + max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px))
  );
}
.wheel-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 0 auto 5px;
  color: #c2d1bd;
  font-size: 12px;
}
.wheel-page-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #e5efdf;
  background:
    radial-gradient(ellipse at 50% -60%, #ffffff29, transparent 75%),
    linear-gradient(180deg, #303a31, #1d241e);
  border: 1px solid #ffffff1d;
  box-shadow: inset 0 1px #ffffff18;
}
.wheel-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.share-actions {
  display: grid;
  gap: 9px;
}
.share-actions .button {
  min-height: 48px;
}
/* Compact, readable layout keeps the wheel prominent on narrow screens. */
@media (max-width: 480px) {
  header {
    height: 58px;
  }
  .hero {
    padding: 16px 0 8px;
  }
  .hero h1 {
    font-size: 28px;
    margin: 7px 0;
  }
  .hero p {
    font-size: 13px;
    line-height: 1.4;
  }
  .tabs {
    margin: 8px 0;
  }
  .tabs button {
    min-height: 42px;
  }
  .wheel-wrap {
    width: min(100%, 340px);
  }
  .hint {
    line-height: 1.4;
  }
  .card {
    padding: 16px;
  }
  .crumb {
    gap: 8px;
  }
}
.crumb .back,
.card .back:not(.back-premium) {
  border-radius: 11px;
  padding: 8px 11px;
  background: linear-gradient(180deg, #303a31, #202721);
  border: 1px solid #ffffff1c;
  box-shadow: inset 0 1px #ffffff12;
  min-height: 42px;
  color: #d9edc1;
}
.note button:focus-visible,
.wheel-page-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.pill[aria-pressed='true'] {
  border-color: #c6f34d99;
  background: linear-gradient(145deg, #40542d, #273525);
  color: #edffd4;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #c6f34d2c;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 0, #d5fa6b30, transparent 72%), #202a1d;
  box-shadow: inset 0 1px #ffffff13;
}
.brand-icon svg {
  width: 28px;
  height: 28px;
}
.tg-tag {
  margin-left: 5px;
  padding: 4px 6px;
  border: 1px solid #99c1ad33;
  border-radius: 7px;
  color: #a9bba9;
  font:
    600 9px 'DM Sans',
    system-ui,
    sans-serif;
  letter-spacing: 0.04em;
}
.family-arc {
  fill: none;
  stroke: #d5f78b;
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px #b4eb7470);
}
.wheel-button.is-selected .sector-shape {
  stroke: #e9f6d0;
  stroke-width: 1.8;
  stroke-opacity: 0.9;
}
.wheel-button.is-current .sector-shape {
  stroke: #ddff8e;
  stroke-width: 2.8;
  stroke-opacity: 1;
  filter: drop-shadow(0 0 3px #c6f34d70);
}
.handle-track {
  stroke: #f7ffe3;
  stroke-opacity: 0.75;
  stroke-width: 2;
  stroke-dasharray: 2 2;
  stroke-linecap: round;
}
.handle-halo {
  fill: #cbf75b;
  fill-opacity: 0.24;
  stroke: #edffd3;
  stroke-opacity: 0.45;
  stroke-width: 1;
}
.handle-visible {
  fill: #d2fa73;
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 2px 2px #000a);
}
.handle-core {
  fill: #4f6f25;
  fill-opacity: 0.75;
}
.wheel-add-marker {
  fill: #111b16;
  fill-opacity: 0.58;
  stroke: #f3fae6;
  stroke-opacity: 0.72;
  stroke-width: 1;
}
.wheel-add-symbol {
  fill: #fff;
  stroke: none;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}
.summary-index {
  display: grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: 9px;
  border: 1px solid var(--note-color);
  color: #f7fff1;
  background: #151d16;
  font-size: 11px;
  font-weight: 700;
}
.is-current .handle-halo {
  fill-opacity: 0.4;
  stroke-opacity: 0.85;
}
.is-current .handle-visible {
  fill: #e4ff9a;
}
.family-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  padding: 10px 13px;
  border: 1px solid #c9ef8240;
  border-radius: 14px;
  background: radial-gradient(ellipse at 0 0, #c6f34d16, transparent 70%), #222a21;
  box-shadow: inset 0 1px #ffffff0c;
}
.family-indicator .family-mark {
  width: 9px;
  height: 30px;
  border-radius: 6px;
  background: var(--family-color);
  box-shadow: 0 0 12px var(--family-color);
}
.family-indicator .family-copy {
  display: grid;
  gap: 2px;
}
.family-indicator .family-copy span {
  color: #b1c5a9;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.family-indicator .family-copy strong {
  font-size: 15px;
  color: #f3f7ed;
}
.family-indicator .family-help {
  margin-left: auto;
  color: #b8c7b3;
  font-size: 11px;
  text-align: right;
}

/* Profile navigation and actions */
.profile-hero {
  margin-bottom: 16px;
}
.profile-status {
  color: #b8c9ac;
  font-size: 0.88rem;
}
.profile-status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--lime);
  vertical-align: middle;
  box-shadow: 0 0 10px #c6f34d70;
}
.profile-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}
.profile-actions .button {
  min-width: 0;
  padding: 13px 5px;
  font-size: 0.86rem;
}
.profile-library {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  color: #eef5e9;
  background: linear-gradient(145deg, #263229, #171e19);
  border: 1px solid #ffffff21;
  border-radius: 16px;
  padding: 13px 16px;
  margin-bottom: 22px;
  cursor: pointer;
}
.profile-library strong,
.profile-library small {
  display: block;
}
.profile-library small {
  color: #a8b6a3;
  margin-top: 3px;
}
.profile-library > span:last-child {
  color: var(--lime);
  font-size: 1.35rem;
}
.profile-open {
  margin-top: 16px;
}
.profile-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
@media (max-width: 340px) {
  .profile-actions {
    grid-template-columns: 1fr 1fr;
  }
  .profile-actions .button:first-child {
    grid-column: 1 / -1;
  }
}

/* HTML touch target: the wheel can scroll normally away from a handle. */
.wheel-drag-target {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  touch-action: none;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.wheel-drag-target:active {
  cursor: grabbing;
}

.terp-detail-grid {
  display: grid;
  gap: 13px;
  padding: 14px;
  margin: 14px 0;
  border: 1px solid #ffffff12;
  border-radius: 13px;
  background: #0d151080;
}
.terp-detail-grid strong {
  color: #eef4e9;
  font-size: 13px;
}
.terp-detail-grid p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.terp-detail-label {
  display: block;
  margin-bottom: 5px;
  color: var(--terp-accent);
  font-size: 11px;
  letter-spacing: 0.09em;
  font-weight: 700;
}
.terp-card-body .source-link {
  margin: 0 4px 6px 0;
}

.cloud-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid #ffffff15;
  border-radius: 12px;
  background: #ffffff08;
}
.cloud-row strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cloud-row .button {
  padding: 9px 12px;
  min-height: 44px;
}
.dialog [data-cloud-content] {
  margin-bottom: 18px;
}

.summary-wheel-card {
  width: 100%;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.summary-wheel-card .enlarge-label {
  margin-top: 9px;
  color: #c6f34d;
  font-size: 11px;
  font-weight: 700;
}
.wheel-detail-overlay {
  place-items: center;
  padding: 0;
  z-index: 12;
}
.wheel-detail {
  width: min(100%, 560px);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  overflow: auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px
    calc(22px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(ellipse at 50% 0, #304329 0, transparent 50%), #111713;
}
.wheel-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wheel-detail h2 {
  margin: 16px 0 4px;
  font-size: 30px;
}
.wheel-detail-close {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #edf6e9;
  background: #ffffff12;
  border: 1px solid #ffffff26;
  font-size: 24px;
}
.wheel-detail-visual .mini-wheel {
  width: min(100%, 370px);
  margin: 16px auto;
}
.wheel-detail-notes {
  display: grid;
  gap: 7px;
  margin: 12px 0 20px;
}
.wheel-detail .button {
  margin-top: 8px;
}


.wheel-drag-target.is-active {
  z-index: 3;
}

/* Primary navigation stays above the content, away from the hosting badge. */
.subnav {
  position: sticky;
  top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  bottom: auto;
  left: auto;
  transform: none;
  width: 100%;
  margin: 10px auto 0;
  padding: 4px;
  gap: 4px;
  border: 1px solid #ffffff1b;
  border-radius: 16px;
  background: #171e19f5;
  box-shadow:
    inset 0 1px #ffffff0c,
    0 10px 28px #0008;
  z-index: 5;
  backdrop-filter: blur(20px);
}
.subnav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  border-radius: 12px;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 700;
  transition:
    background 0.18s,
    color 0.18s;
}
.subnav span {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
}
.subnav button.active {
  color: #dbf7a0;
  background: radial-gradient(ellipse at 50% -25%, #d6ff8c2d, transparent 80%), #31402c;
  box-shadow:
    inset 0 1px #ffffff1c,
    0 1px 4px #0007;
}
@media (prefers-reduced-motion: reduce) {
  .subnav button {
    transition: none;
  }
}

/* Named family shortcuts keep their order when the wheel expands. */
.family-switcher {
  margin: 10px 0 5px;
}
.family-switcher-title {
  margin: 0 2px 7px;
  color: #b7c8b2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.family-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.family-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid #ffffff19;
  border-radius: 11px;
  background: linear-gradient(150deg, #293329, #1d251f);
  color: #d6e1d3;
  font-size: 12px;
  font-weight: 700;
}
.family-switch span {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--family-color);
}
.family-switch.is-active {
  border-color: var(--family-color);
  background:
    radial-gradient(
      ellipse at 50% -40%,
      color-mix(in srgb, var(--family-color) 30%, transparent),
      transparent 75%
    ),
    #273027;
  color: #fff;
}
.wheel-family-label {
  font-size: 9px;
  fill: #fafbf3;
  paint-order: stroke;
  stroke: #10161099;
  stroke-width: 1.5px;
  stroke-linejoin: round;
}

.profile-sector-label {
  fill: #fff;
  font-weight: 700;
  paint-order: stroke;
  stroke: #111b15;
  stroke-opacity: 0.9;
  stroke-width: 2.2px;
  stroke-linejoin: round;
  pointer-events: none;
}

/* An in-app image preview gives Telegram WebViews a visible fallback. */
.image-preview-overlay {
  z-index: 20;
  place-items: center;
}
.image-preview {
  width: min(100%, 560px);
  height: 100dvh;
  max-height: 100dvh;
  overflow: auto;
  border-radius: 0;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px
    calc(
      100px + max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px))
    );
  background: #111713;
}
.image-preview h2 {
  margin: 14px 0 8px;
}
.image-preview-art {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid #ffffff20;
  border-radius: 14px;
  -webkit-touch-callout: default;
  user-select: auto;
}
.image-preview .button {
  margin-top: 10px;
}
.image-export-error {
  color: #ffd4a3;
  padding: 10px 0;
}
.wheel-detail {
  padding-bottom: calc(
    105px + max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px))
  );
}

/* Ambiance Projet 420 : fixed artwork keeps the interface readable while scrolling. */
body {
  background: #07130c;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 10, 6, 0.87), rgba(4, 11, 7, 0.92)),
    url('./ambiance-projet-420-fond.jpg') center center / cover no-repeat;
}
#app {
  position: relative;
  z-index: 1;
}

/* Translucent surfaces let the fixed artwork show through without fading text. */
.subnav,
.tabs {
  background: rgba(23, 30, 25, 0.64);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.subnav button.active {
  background:
    radial-gradient(ellipse at 50% -25%, #d6ff8c2d, transparent 80%), rgba(49, 64, 44, 0.78);
}
.card,
.summary-wheel-card,
.profile-library,
.research-card,
.terp-card {
  background: linear-gradient(145deg, rgba(40, 48, 41, 0.65), rgba(25, 31, 26, 0.69));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.terp-card {
  background:
    radial-gradient(
      ellipse 65% 130% at -10% 0%,
      color-mix(in srgb, var(--terp-accent) 17%, transparent),
      transparent 80%
    ),
    linear-gradient(150deg, rgba(37, 45, 37, 0.66), rgba(26, 32, 27, 0.7));
}
.note {
  background: rgba(255, 255, 255, 0.055);
}
.family-indicator,
.terp-notice {
  background: linear-gradient(145deg, rgba(39, 49, 38, 0.66), rgba(28, 37, 29, 0.7));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.button.secondary,
.icon,
.ghost,
.back-premium,
.pill,
.family-switch,
.wheel-page-btn,
.stepper button {
  background:
    radial-gradient(ellipse 100% 120% at 50% -70%, #ffffff21, transparent 75%),
    linear-gradient(180deg, rgba(48, 58, 49, 0.68), rgba(32, 39, 33, 0.72));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.pill[aria-pressed='true'],
.family-switch.is-active {
  background: linear-gradient(145deg, rgba(64, 84, 45, 0.86), rgba(39, 53, 37, 0.88));
}
.button:not(.secondary):not(.danger),
.tabs button.active {
  background:
    radial-gradient(ellipse 95% 95% at 50% -38%, #f5ffcfb8 0%, #e3ff9866 36%, transparent 72%),
    linear-gradient(
      180deg,
      rgba(206, 247, 99, 0.91),
      rgba(188, 233, 74, 0.92) 72%,
      rgba(169, 216, 58, 0.93)
    );
}
.wheel-center-button {
  cursor: pointer;
}
.wheel-center-button:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 4px #fff);
}
.wheel-detail-head {
  position: sticky;
  top: calc(-20px - env(safe-area-inset-top, 0px));
  z-index: 2;
  padding: 10px 0;
  background: linear-gradient(180deg, rgba(17, 23, 19, 0.98), rgba(17, 23, 19, 0.88));
  backdrop-filter: blur(12px);
}

/* Compact wheel workspace with a touch-friendly, horizontally scrollable family list. */
.hero {
  padding: 14px 0 6px;
}
.hero h1 {
  font-size: clamp(25px, 6vw, 33px);
  margin: 6px 0;
}
.hero p {
  font-size: 12px;
  line-height: 1.35;
}
.family-indicator {
  display: inline-flex;
  margin: 4px 0;
  padding: 5px 10px;
  gap: 7px;
}
.family-indicator .family-mark {
  height: 23px;
  width: 6px;
}
.family-indicator .family-copy {
  display: flex;
  align-items: center;
  gap: 7px;
}
.family-indicator .family-copy strong {
  font-size: 13px;
}
.family-switcher {
  margin: 5px 0;
}
.family-switcher-title {
  margin-bottom: 4px;
}
.family-switcher-grid {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
}
.family-switch {
  flex: 0 0 auto;
  padding-inline: 12px;
  min-height: 42px;
}
.wheel-center-feedback {
  display: none;
  pointer-events: none;
}
.wheel-wrap.is-dragging .wheel-center-normal {
  display: none;
}
.wheel-wrap.is-dragging .wheel-center-feedback {
  display: block;
}
.custom-note-action {
  border-style: dashed;
  border-color: #c6f34d99;
  color: #dbf5ad;
}
.profile-dock {
  position: fixed;
  left: 50%;
  bottom: max(
    10px,
    env(safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px)
  );
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 536px);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #ffffff2b;
  border-radius: 16px;
  background: rgba(21, 30, 22, 0.92);
  box-shadow: 0 8px 30px #0009;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.profile-dock span {
  color: #dbe9d4;
  font-size: 12px;
  white-space: nowrap;
}
.profile-dock .button {
  font-size: 12px;
  min-height: 42px;
  padding: 8px 12px;
  white-space: nowrap;
}
body:has(.wheel-wrap.is-dragging) .profile-dock {
  opacity: 0;
  pointer-events: none;
}
.profile-actions {
  grid-template-columns: 1.1fr 1fr 1fr;
}
.profile-actions .button {
  overflow-wrap: anywhere;
}
.summary-caption {
  margin-bottom: 12px;
}
@media (max-width: 360px) {
  .profile-dock span {
    font-size: 12px;
  }
  .profile-dock .button {
    font-size: 11px;
    padding-inline: 8px;
  }
  .profile-actions .button {
    font-size: 0.75rem;
  }
}

/* Terpene cards remain educational: filters refer to descriptions, not product composition. */
.terp-bridge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 10px;
  margin: 1px 0;
  color: #cde4b6;
  font-size: 12px;
  font-weight: 650;
  background: transparent;
  border: 1px solid #c8e7a929;
  border-radius: 12px;
}
.terp-bridge span {
  color: var(--lime);
}
.terp-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding: 5px 1px 7px;
  margin: 17px 0 0;
}
.terp-filter {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 13px;
  color: #d6e5d0;
  border: 1px solid #ffffff26;
  border-radius: 99px;
  background: rgba(40, 52, 42, 0.72);
  font-size: 12px;
  font-weight: 700;
}
.terp-filter[aria-pressed='true'] {
  color: #17210d;
  background: linear-gradient(180deg, #dcf994, #bce94a);
  border-color: #e6ffb0;
  box-shadow: inset 0 1px #fff9;
}
.terp-section-title {
  margin-top: 20px;
}
.terp-chevron {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid #ffffff16;
  border-radius: 11px;
  background: #ffffff0a;
  color: #dfecdc;
}
.terp-chevron svg {
  transition: transform 0.2s ease;
}
.terp-card[open] .terp-chevron svg {
  transform: rotate(180deg);
}
.terp-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin-top: 10px;
  border-top: 1px solid #ffffff12;
  color: #aebdac;
  font-size: 12px;
}
.terp-card-body .terp-sources .source-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 2px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #cee8bc;
}
@media (prefers-reduced-motion: reduce) {
  .terp-chevron svg {
    transition: none;
  }
}

/* The enlarged wheel keeps the same subdued, fixed artwork as the app. */
.wheel-detail {
  position: relative;
  isolation: isolate;
  background: #07130c;
}
.wheel-detail::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 10, 6, 0.87), rgba(4, 11, 7, 0.92)),
    url('./ambiance-projet-420-fond.jpg') center center / cover no-repeat;
}

/* The symbol and wordmark remain readable independently on narrow screens. */
.brand {
  min-width: 0;
  gap: 9px;
}
.brand-icon {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  box-shadow: none;
  flex: none;
}
.brand-icon img {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-name {
  white-space: nowrap;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: #f3f6ee;
}
.brand-name b {
  color: #a5f34c;
  font-weight: 700;
}
.brand .tg-tag {
  flex: none;
}
@media (max-width: 340px) {
  .brand-name {
    font-size: 19px;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
  }
  .brand .tg-tag {
    font-size: 10px;
  }
}

.brand-home {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.brand-home:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.account-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.account-avatar {
  position: relative;
  display: block;
  width: 18px;
  height: 19px;
}
.account-avatar::before,
.account-avatar::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1.5px solid currentColor;
}
.account-avatar::before {
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.account-avatar::after {
  bottom: 0;
  width: 14px;
  height: 6px;
  border-radius: 9px 9px 4px 4px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.current-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.current-profile-bar div {
  min-width: 0;
}
.current-profile-bar strong {
  display: block;
  overflow-wrap: anywhere;
}
.current-profile-bar button {
  flex: none;
}

.profile-library-heading {
  padding-bottom: 12px;
}
.profile-locations,
.cloud-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-locations {
  margin: 5px 0;
}
.profile-location {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #85a37a66;
  color: #d5e6ce;
}
.cloud-row > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cloud-row-actions {
  justify-content: flex-end;
  flex: none;
}
[data-account-notice][hidden] {
  display: none;
}

.account-profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.account-profile-identity p {
  margin: 0;
}
.account-profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #314631;
  color: #ecf5e2;
  font-weight: 700;
}
.account-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Audit 26/11/2026 : sélecteur unique Nez / Bouche, accueil compact. */
.sense-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.sense-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  line-height: 1.15;
}
.sense-tabs button strong {
  font-size: 15px;
}
.sense-tabs button span {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}
.sense-info {
  text-align: center;
  margin: 6px 0 0;
}
.hero-compact {
  padding-top: 4px;
  padding-bottom: 4px;
}
.hero-compact h1 {
  font-size: clamp(24px, 7vw, 30px);
  margin-bottom: 4px;
}
.hero-compact p {
  margin: 0;
}
.wheel-wrap + .hint,
.hint + .wheel-wrap {
  margin-top: 4px;
}

.profile-fields {
  margin: 12px 0;
}
.profile-fields label + label {
  margin-top: 10px;
}

.confirm-message {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.45;
}

/* Suppression du compte : action rare et destructrice, volontairement discrète. */
.account-delete {
  display: block;
  width: 100%;
  margin-top: 14px;
  color: #ff8a80;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Écran 18+ de première ouverture. */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 20%, #1f2d1c, #0b100b 70%);
  overflow: auto;
}
.age-card {
  width: min(100%, 440px);
  text-align: center;
}
.age-card h1 {
  font-size: 28px;
  margin: 8px 0 14px;
}
.age-card p {
  font-size: 16px;
  line-height: 1.5;
}
.age-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  display: block;
}
.age-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.age-privacy,
.legal-notice a {
  color: var(--lime);
}
.age-privacy {
  display: inline-block;
  margin-top: 18px;
  padding: 12px;
  font-size: 14px;
}
.legal-notice {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.8;
}

/* Précision micron : « de » et « à » côte à côte. */
.micron-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 10px;
}

/* Lien vers l'étude : zone tactile d'au moins 44 px. */
.study-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}
