:root {
  --bg: #f8f8f3;
  --surface: #fff;
  --ink: #233e36;
  --muted: #737b70;
  --green: #204f40;
  --green-light: #edf3e9;
  --line: #e6e9df;
  --yellow: #f1cd72;
  --orange: #bf7747;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 20px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c38d40;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--surface);
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -1.2px;
  line-height: 1.18;
}
h3 {
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.35px;
}
h1 {
  font-size: 46px;
}
h2 {
  font-size: 32px;
}
h3 {
  font-size: 20px;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 11px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.svg-defs {
  display: none;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  font-family: "Manrope", var(--sans);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 36px;
  height: 39px;
  border-radius: 12px;
  background: var(--green);
  color: #fff1d6;
  font-family: var(--serif);
  font-weight: 400;
  display: inline-grid;
  place-items: center;
  font-size: 37px;
  margin-right: 9px;
  padding-bottom: 4px;
}
.brand-dot {
  color: var(--orange);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 19px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.2s;
}
.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: #153f32;
}
.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
.secondary:hover {
  background: var(--green-light);
}
.ghost {
  background: transparent;
  color: var(--ink);
  padding-left: 0;
  padding-right: 0;
}
.danger {
  background: #fff3ef;
  color: #9c3f35;
  border: 1px solid #e9c4ba;
}
.small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}
.full {
  width: 100%;
}
.text-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  border: 0;
  background: none;
  padding: 0;
}
.label-note {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
input,
textarea,
select {
  border: 1px solid #dfe4db;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 13px;
  width: 100%;
}
input:hover,
textarea:hover,
select:hover {
  border-color: #a9b9a8;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
form > label,
form > div > label {
  margin-top: 17px;
}
small {
  font-size: 11px;
  color: var(--muted);
}
.form-error {
  font-size: 12px;
  color: #a33f36;
  margin: 10px 0;
  min-height: 18px;
}
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
}
.auth-story {
  position: relative;
  overflow: hidden;
  background: #e9eedf;
  padding: 40px 9% 34px;
}
.auth-story-content {
  max-width: 470px;
  margin: 76px auto 0;
}
.auth-story h1 {
  font-size: 49px;
  margin: 22px 0;
}
.auth-story em {
  color: #6c8460;
  font-weight: 400;
}
.auth-story p {
  max-width: 330px;
  color: #63735f;
  font-size: 15px;
}
.auth-art {
  height: 240px;
  position: relative;
  margin-top: 15px;
}
.art-card {
  position: absolute;
  left: 100px;
  top: 40px;
  width: 180px;
  height: 188px;
  padding: 24px;
  background: #fff9e9;
  transform: rotate(-9deg);
  border-radius: 7px;
  box-shadow: 0 12px 30px #46613b12;
}
.art-card span {
  font-size: 9px;
  letter-spacing: 1.4px;
}
.art-card strong {
  display: block;
  font: 28px/1.2 var(--serif);
  margin-top: 19px;
}
.art-card i {
  position: absolute;
  bottom: 13px;
  right: 17px;
  font-size: 34px;
  font-style: normal;
  color: #d3aa50;
}
.art-orbit {
  position: absolute;
  width: 250px;
  height: 170px;
  border: 1px solid #c5cfb6;
  border-radius: 50%;
  left: 50px;
  top: 50px;
  transform: rotate(-25deg);
}
.art-coin {
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: absolute;
  background: #edc56b;
  border: 6px solid #f4d58b;
  color: #a47b32;
  font-size: 38px;
  width: 72px;
  height: 72px;
}
.coin-one {
  left: 29px;
  top: 146px;
  transform: rotate(-15deg);
}
.coin-two {
  left: 284px;
  top: 35px;
  width: 55px;
  height: 55px;
  font-size: 28px;
}
.art-leaf {
  position: absolute;
  width: 52px;
  height: 100px;
  border-radius: 0 100% 0 100%;
  background: #7b9467;
  left: 305px;
  top: 145px;
  transform: rotate(15deg);
}
.story-foot {
  display: flex;
  gap: 22px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 35px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  background: var(--surface);
}
.auth-box {
  max-width: 370px;
  width: 100%;
}
.auth-box h2 {
  font-size: 35px;
  margin: 17px 0;
}
.auth-box > .muted {
  font-size: 13px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 27px 0 15px;
}
.auth-tabs button {
  width: 50%;
  border: 0;
  background: transparent;
  padding: 12px 4px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.auth-tabs .selected {
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.auth-note {
  margin: 21px 0 16px;
  color: var(--muted);
  font-size: 11px;
}
.auth-box #otp {
  max-width: 220px;
}
.app-screen {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 232px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 37px 22px 0;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.sidebar .brand {
  margin-left: 12px;
}
.sidebar-tagline {
  font-size: 11px;
  color: #929887;
  margin: 15px 0 35px 13px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #727b6f;
}
.nav-link:hover {
  background: #f4f5ed;
  text-decoration: none;
}
.nav-link.active {
  background: #eaf0e4;
  color: var(--green);
  font-weight: 650;
}
.nav-separator {
  height: 1px;
  background: var(--line);
  margin: 15px 13px;
}
.sidebar-note {
  margin: 35px 7px 26px;
  padding: 20px 15px 17px;
  background: #f5f4e9;
  border-radius: 12px;
  position: relative;
}
.sidebar-note > span {
  font-size: 30px;
  color: #a2ab77;
  display: block;
  line-height: 1;
  margin-bottom: 12px;
}
.sidebar-note strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
}
.sidebar-note p {
  font-size: 11px;
  color: #8a907e;
  margin-top: 6px;
}
.account-button {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  text-align: left;
}
.account-button strong {
  font-size: 12px;
  display: block;
  max-width: 115px;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account-button small {
  display: block;
  font-size: 10px;
}
.account-button > span:last-child {
  margin-left: auto;
}
.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  background: #eadfc6;
  border-radius: 50%;
  color: #82704a;
  font-size: 13px;
  font-weight: 600;
}
.app-body {
  margin-left: 232px;
  width: calc(100% - 232px);
}
.topbar {
  height: 89px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fffefa99;
}
.topbar > div:first-child {
  display: flex;
  gap: 17px;
  align-items: center;
}
.breadcrumb {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #9ba28f;
}
.breadcrumb:after {
  content: "/";
  margin-left: 17px;
  color: #c7caba;
}
#page-label {
  font-size: 12px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.topbar select {
  font-size: 12px;
  max-width: 180px;
  background: transparent;
  padding: 8px 30px 8px 10px;
  min-height: 36px;
}
.parent-badge {
  font-size: 10px;
  border: 1px solid #dfe5d5;
  border-radius: 20px;
  padding: 5px 11px;
  color: #7a896b;
}
main {
  padding: 35px 44px 30px;
  max-width: 1430px;
  margin: auto;
  min-height: calc(100vh - 145px);
}
.page-intro {
  margin-bottom: 28px;
}
.page-intro .eyebrow {
  color: #86947b;
  margin-bottom: 10px;
}
.page-intro h1 {
  font-size: 37px;
}
.page-intro p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  max-width: 650px;
}
.page-intro.flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.welcome-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.welcome-top h1 {
  font-size: 36px;
}
.welcome-top p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.date-note {
  font-size: 11px;
  color: #929987;
}
.hero {
  background: #eaf0e2;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 31px 35px;
  min-height: 242px;
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 450px;
}
.hero .eyebrow {
  color: #648156;
  font-size: 9px;
}
.hero h2 {
  font-size: 35px;
  margin: 14px 0 12px;
  max-width: 390px;
  letter-spacing: -1px;
}
.hero p {
  font-size: 12px;
  color: #74816b;
  max-width: 335px;
  margin-bottom: 22px;
}
.hero .button {
  font-size: 11px;
  min-height: 39px;
}
.hero-art {
  position: absolute;
  right: 10px;
  top: 0;
  width: 270px;
  height: 100%;
  pointer-events: none;
  opacity: 0.95;
}
.hero-art .art-card {
  left: 45px;
  top: 38px;
  width: 146px;
  height: 161px;
  padding: 23px;
  transform: rotate(10deg);
}
.hero-art .art-card strong {
  font-size: 25px;
  margin-top: 17px;
}
.hero-art .art-card span {
  font-size: 8px;
}
.hero-art .coin-one {
  width: 58px;
  height: 58px;
  left: 16px;
  top: 163px;
  font-size: 27px;
}
.hero-art .coin-two {
  left: 207px;
  top: 51px;
  width: 45px;
  height: 45px;
  font-size: 23px;
}
.hero-art .art-leaf {
  left: 209px;
  top: 140px;
  width: 40px;
  height: 72px;
}
.hero-art .art-orbit {
  left: 0;
  top: 40px;
  width: 247px;
  height: 160px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.35px;
}
.section-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.home-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 25px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.activity-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px #24403007;
}
.activity-art {
  height: 95px;
  position: relative;
  background: #f4efe0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.activity-art.sage {
  background: #edf2e7;
}
.activity-art.rose {
  background: #f7eae2;
}
.activity-art.blue {
  background: #e8eff0;
}
.activity-art .art-symbol {
  font-family: var(--serif);
  font-size: 55px;
  color: #b39a57;
  position: relative;
  z-index: 1;
  line-height: 1;
  transform: rotate(-8deg);
}
.activity-art.sage .art-symbol {
  color: #859a69;
}
.activity-art.rose .art-symbol {
  color: #c69072;
}
.activity-art.blue .art-symbol {
  color: #7d9b9b;
}
.activity-art:before,
.activity-art:after {
  content: "";
  position: absolute;
  border: 1px solid currentColor;
  opacity: 0.12;
  border-radius: 50%;
  width: 105px;
  height: 105px;
  left: calc(50% - 76px);
  top: 5px;
}
.activity-art:after {
  left: calc(50% - 26px);
  top: -15px;
}
.activity-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #8c947f;
  gap: 8px;
}
.activity-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  margin: 10px 0 8px;
}
.activity-body p {
  font-size: 11px;
  color: #838b7c;
  line-height: 1.6;
  flex: 1;
}
.activity-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 10px;
  color: #7b8a70;
}
.card-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--green);
  font-size: 15px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.panel h3 {
  font-size: 17px;
}
.panel p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.empty-state {
  border: 1px dashed #cdd7c4;
  background: #fbfcf7;
  border-radius: 14px;
  text-align: center;
  padding: 29px 18px;
}
.empty-state .empty-symbol {
  font-family: var(--serif);
  font-size: 34px;
  color: #a9b494;
  display: block;
  margin-bottom: 8px;
}
.empty-state h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  max-width: 380px;
  margin: 10px auto 18px;
}
.journey-panel {
  background: #fcfaf2;
  border-color: #e8e6d6;
  padding: 23px;
}
.journey-panel .eyebrow {
  font-size: 9px;
  color: #9a987f;
}
.journey-panel h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin-top: 13px;
}
.journey-panel p {
  font-size: 11px;
  line-height: 1.8;
}
.journey-list {
  margin: 20px 0;
}
.journey-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 15px;
}
.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #edf0e0;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #70835b;
  flex-shrink: 0;
}
.journey-item strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.journey-item small {
  font-size: 10px;
  color: #9a9e8d;
}
.note-strip {
  margin-top: 24px;
  padding: 17px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f4f5ec;
}
.note-strip > span {
  color: #98a477;
  font-size: 26px;
}
.note-strip p {
  font-size: 11px;
  color: #7a846f;
}
.note-strip strong {
  color: #637553;
  font-weight: 500;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  padding: 17px;
}
.stat strong {
  font-family: var(--serif);
  font-size: 30px;
  display: block;
  font-weight: 400;
}
.stat span {
  font-size: 10px;
  color: var(--muted);
}
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 44px;
  color: #9a9f92;
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.filter-bar select {
  width: auto;
  max-width: 250px;
  font-size: 12px;
}
.filter-bar input {
  width: 230px;
  font-size: 12px;
}
.filter-count {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 19px;
}
.activity-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.draft-note {
  font-size: 11px;
  color: #8b805d;
  border: 1px solid #e8e0c9;
  background: #fcf9ef;
  border-radius: 9px;
  padding: 10px 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.badge {
  display: inline-flex;
  font-size: 10px;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 20px;
  background: var(--green-light);
  color: #6d8260;
  vertical-align: middle;
}
.badge.warm {
  background: #fbefdc;
  color: #947038;
}
.badge.gray {
  background: #f0f1ec;
  color: #808779;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
}
.profile-header .avatar {
  height: 48px;
  width: 48px;
  background: #edf0e0;
  font-size: 20px;
}
.profile-header p {
  margin-top: 2px;
}
.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}
.profile-card .goal-text {
  font-family: var(--serif);
  font-size: 21px;
  color: #657855;
}
.memory-card .memory-content {
  font-size: 15px;
  color: var(--ink);
  white-space: pre-wrap;
  margin: 15px 0;
}
.memory-meta {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.source-card {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.source-card:first-child {
  padding-top: 0;
}
.source-card h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  margin: 12px 0 8px;
}
.source-card .source-byline {
  font-size: 11px;
  color: var(--muted);
}
.source-card p {
  font-size: 13px;
  margin-top: 10px;
  max-width: 850px;
}
.source-card .limitation {
  font-size: 11px;
  color: #8b846b;
  background: #f8f6ee;
  padding: 11px 14px;
  border-radius: 8px;
  margin: 12px 0;
}
.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 225px;
  gap: 24px;
}
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 540px;
}
.chat-top {
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 11px;
}
.coach-avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: #f5e8c6;
  font-family: var(--serif);
  font-size: 27px;
}
.chat-top strong {
  font-size: 13px;
}
.chat-top small {
  display: block;
  font-size: 10px;
}
.chat-messages {
  padding: 25px;
  flex: 1;
  max-height: 580px;
  overflow: auto;
}
.chat-welcome {
  text-align: center;
  padding: 45px 5px 30px;
}
.chat-welcome > span {
  font-size: 36px;
  color: #9eb189;
}
.chat-welcome h2 {
  font-size: 29px;
  margin: 17px 0 12px;
}
.chat-welcome p {
  font-size: 12px;
  color: var(--muted);
  max-width: 340px;
  margin: auto;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 25px;
}
.suggestions button {
  background: #f8faf4;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 11px;
  color: #697e5c;
}
.message {
  max-width: 94%;
  margin: 0 0 22px;
}
.message.user {
  margin-left: auto;
  max-width: 82%;
  text-align: right;
}
.message-label {
  font-size: 9px;
  color: #96a08b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.message-body {
  border: 1px solid var(--line);
  border-radius: 3px 14px 14px;
  padding: 16px 18px;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fbfcf8;
}
.message.user .message-body {
  background: #edf3e6;
  border: 0;
  border-radius: 14px 3px 14px 14px;
  text-align: left;
}
.message-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.message-sources a {
  font-size: 10px;
  color: #6b805a;
  text-decoration: underline;
}
.message-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 9px;
}
.chat-compose {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
}
.chat-compose textarea {
  min-height: 72px;
  border: 0;
  background: #f7f8f3;
  font-size: 13px;
}
.chat-compose-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 11px;
  gap: 10px;
}
.chat-compose-bottom p {
  font-size: 10px;
  color: #919984;
}
.chat-side h3 {
  font-size: 13px;
  margin-bottom: 13px;
}
.conversation-link {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  font-size: 11px;
  color: #758469;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mode-note {
  font-size: 11px;
  background: #f5f3e7;
  border-radius: 10px;
  padding: 13px;
  color: #867d60;
  margin-top: 18px;
}
.chat-side .button {
  margin-bottom: 22px;
}
.loader {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.loader:before {
  content: "";
  display: block;
  width: 25px;
  height: 25px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.result-box {
  margin-top: 17px;
  padding: 18px;
  background: #f3f6ec;
  border-radius: 12px;
  font-size: 13px;
}
.result-box pre,
.code-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  max-height: 330px;
  overflow: auto;
}
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.list-row strong {
  font-size: 13px;
}
.list-row small {
  display: block;
}
.list-row:last-child {
  border-bottom: 0;
}
.settings-section {
  margin-bottom: 22px;
}
.settings-section .button {
  margin-top: 17px;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 13px;
}
.status-card span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.status-card strong {
  font-size: 20px;
  font-weight: 500;
}
.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0;
  max-width: 660px;
  width: calc(100% - 30px);
  color: var(--ink);
  max-height: 90vh;
  box-shadow: 0 25px 90px #1a332922;
}
dialog::backdrop {
  background: #1b30264d;
  backdrop-filter: blur(3px);
}
.dialog-header {
  padding: 25px 30px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dialog-header h2 {
  font-size: 29px;
  margin-top: 8px;
}
.dialog-close {
  border: 0;
  background: #f2f4ed;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 21px;
  color: #87927b;
  flex-shrink: 0;
}
.dialog-body {
  padding: 24px 30px 30px;
}
.dialog-body h3 {
  font-size: 14px;
  margin: 22px 0 9px;
}
.dialog-body p,
.dialog-body li {
  font-size: 13px;
}
.dialog-body ol {
  padding-left: 22px;
}
.dialog-body li {
  padding: 5px 0 5px 5px;
}
.quote {
  font-family: var(--serif);
  font-size: 21px !important;
  background: #edf2e5;
  padding: 21px;
  border-radius: 12px;
  color: #536e43;
  margin: 16px 0;
}
.dialog-body .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 19px;
  font-size: 12px;
}
.checkbox-row input {
  width: 17px;
  min-width: 17px;
  margin-top: 4px;
}
.checkbox-row label {
  font-size: 11px;
  font-weight: 400;
}
.disclosure {
  background: #f6f7f0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 12px;
  margin: 18px 0;
}
.disclosure summary {
  cursor: pointer;
  font-weight: 500;
}
.disclosure p {
  margin-top: 10px;
}
.form-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.topic-pill {
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 30px;
  display: inline-block;
}
.notice {
  background: #fcf4df;
  color: #89723f;
  padding: 13px 17px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 20px;
}
#notifications {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 100;
  display: grid;
  gap: 10px;
  max-width: 380px;
}
.toast {
  background: #254e3f;
  color: white;
  border-radius: 11px;
  padding: 14px 20px;
  box-shadow: 0 5px 30px #19362b20;
  font-size: 13px;
}
.toast.error {
  background: #914e3e;
}
.section-gap {
  margin-top: 30px;
}
.inline-error {
  padding: 25px;
  background: #fff3ef;
  border: 1px solid #ead8cd;
  border-radius: 14px;
}
.inline-error p {
  font-size: 13px;
  margin-bottom: 15px;
}
.enrollment-key {
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
  padding: 12px;
  background: #f4f4ea;
  border-radius: 8px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.report-table th,
.report-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
}
.report-table th {
  font-size: 10px;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .hero-art {
    right: 65px;
  }
  .hero h2 {
    font-size: 39px;
  }
  .hero {
    min-height: 260px;
  }
  .activity-art {
    height: 115px;
  }
  .sidebar {
    width: 250px;
  }
  .app-body {
    margin-left: 250px;
    width: calc(100% - 250px);
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 205px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .app-body {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  main {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .journey-panel {
    display: none;
  }
  .hero-content {
    max-width: 60%;
  }
  .hero-art {
    right: -20px;
  }
  .hero h2 {
    font-size: 32px;
  }
  .chat-layout {
    grid-template-columns: minmax(0, 1fr) 185px;
  }
  .auth-story h1 {
    font-size: 41px;
  }
  .auth-story {
    padding-left: 8%;
    padding-right: 6%;
  }
  .auth-art {
    transform: scale(0.85);
    transform-origin: left center;
  }
  .story-foot {
    gap: 14px;
    letter-spacing: 0.7px;
  }
  .activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 78px;
    padding: 26px 9px 0;
    align-items: center;
  }
  .sidebar .brand {
    font-size: 0;
    margin: 0;
  }
  .sidebar .brand-mark {
    font-size: 34px;
    margin: 0;
  }
  .brand-dot,
  .sidebar-tagline,
  .sidebar-note,
  .nav-text,
  .account-button > span:not(.avatar) {
    display: none;
  }
  .sidebar nav {
    width: 100%;
    margin-top: 30px;
  }
  .nav-link {
    padding: 14px 18px;
  }
  .nav-separator {
    margin: 10px;
  }
  .account-button {
    justify-content: center;
    padding: 20px 0;
  }
  .app-body {
    margin-left: 78px;
    width: calc(100% - 78px);
  }
  .auth-story {
    padding: 30px;
  }
  .auth-story h1 {
    font-size: 35px;
  }
  .auth-panel {
    padding: 30px;
  }
  .auth-story-content {
    margin-top: 55px;
  }
  .story-foot {
    flex-wrap: wrap;
    gap: 8px 17px;
  }
  .auth-art {
    margin-left: -25px;
    transform: scale(0.75);
    height: 205px;
  }
  .auth-box h2 {
    font-size: 29px;
  }
  .parent-badge {
    display: none;
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-side {
    display: none;
  }
  .two-columns {
    grid-template-columns: 1fr;
  }
  .page-intro.flex {
    align-items: flex-start;
  }
  .date-note {
    display: none;
  }
  .cards-grid {
    gap: 11px;
  }
  .activity-body {
    padding: 13px;
  }
  .activity-body h3 {
    font-size: 18px;
  }
  .activity-art {
    height: 80px;
  }
  .hero {
    padding: 27px;
    min-height: 230px;
  }
  .hero-content {
    max-width: 67%;
  }
  .hero-art {
    right: -55px;
    transform: scale(0.8);
    transform-origin: right center;
  }
  .hero h2 {
    font-size: 30px;
  }
  .hero p {
    font-size: 11px;
  }
  .app-footer {
    padding: 20px 28px;
  }
  .topbar {
    height: 75px;
  }
}
@media (max-width: 580px) {
  .auth-screen {
    display: block;
  }
  .auth-story {
    padding: 25px 27px 30px;
  }
  .auth-story-content {
    margin-top: 26px;
  }
  .auth-story h1 {
    font-size: 33px;
    margin: 13px 0;
  }
  .auth-story p {
    font-size: 12px;
    max-width: 280px;
  }
  .auth-art,
  .story-foot {
    display: none;
  }
  .auth-story-content > .eyebrow {
    font-size: 8px;
  }
  .auth-panel {
    padding: 30px 27px;
  }
  .auth-box {
    max-width: none;
  }
  .auth-box h2 {
    font-size: 29px;
  }
  .auth-box > .eyebrow {
    display: none;
  }
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background: var(--surface);
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 0 6px;
    z-index: 20;
    display: block;
  }
  .sidebar > .brand,
  .account-button {
    display: none;
  }
  .sidebar nav {
    margin: 0;
    display: flex;
    justify-content: space-around;
    gap: 0;
    overflow: auto;
    height: 100%;
  }
  .nav-link {
    padding: 12px 9px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    border-radius: 0;
    min-width: 54px;
  }
  .nav-text {
    display: block;
    font-size: 8px;
  }
  .nav-link .icon {
    width: 19px;
    height: 19px;
  }
  .nav-separator {
    display: none;
  }
  .app-body {
    margin-left: 0;
    width: 100%;
    padding-bottom: 70px;
  }
  .topbar {
    height: 66px;
    padding: 0 20px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar select {
    max-width: 155px;
    font-size: 11px;
  }
  .topbar > div:first-child:before {
    content: "tiléo.";
    font:
      800 26px "Manrope",
      var(--sans);
    letter-spacing: -1.8px;
  }
  #page-label {
    display: none;
  }
  main {
    padding: 23px 19px;
  }
  .welcome-top {
    margin-bottom: 21px;
  }
  .welcome-top h1 {
    font-size: 30px;
  }
  .welcome-top p {
    font-size: 11px;
  }
  .hero {
    padding: 24px 22px;
    min-height: 250px;
    border-radius: 16px;
    margin-bottom: 26px;
  }
  .hero h2 {
    font-size: 30px;
    max-width: 260px;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero p {
    max-width: 225px;
  }
  .hero-art {
    opacity: 0.32;
    right: -94px;
    top: 40px;
  }
  .hero-content .eyebrow {
    font-size: 8px;
  }
  .hero .button {
    position: relative;
    z-index: 2;
  }
  .section-heading h2 {
    font-size: 16px;
  }
  .section-heading .text-link {
    font-size: 10px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .activity-card {
    display: grid;
    grid-template-columns: 88px 1fr;
  }
  .activity-art {
    height: 100%;
    min-height: 151px;
  }
  .activity-art .art-symbol {
    font-size: 43px;
  }
  .activity-body {
    padding: 14px 17px;
  }
  .activity-body h3 {
    font-size: 21px;
    margin: 8px 0 5px;
  }
  .activity-body p {
    font-size: 11px;
  }
  .activity-bottom {
    margin-top: 10px;
  }
  .card-meta {
    font-size: 9px;
  }
  .activity-list {
    grid-template-columns: 1fr;
  }
  .activity-list .activity-card {
    grid-template-columns: 88px 1fr;
  }
  .note-strip {
    padding: 15px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 12px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat span {
    font-size: 9px;
  }
  .page-intro h1 {
    font-size: 33px;
  }
  .page-intro.flex {
    display: block;
  }
  .page-intro.flex > .button {
    margin-top: 16px;
  }
  .filter-bar {
    gap: 8px;
  }
  .filter-bar select,
  .filter-bar input {
    max-width: none;
    flex: 1;
    min-width: 130px;
  }
  .app-footer {
    padding: 20px;
    display: block;
    font-size: 9px;
  }
  .app-footer a {
    display: block;
    margin-top: 4px;
  }
  .panel {
    padding: 20px;
  }
  .chat-panel {
    min-height: 520px;
  }
  .chat-messages {
    padding: 18px 15px;
    max-height: 60vh;
  }
  .chat-compose {
    padding: 14px;
  }
  .chat-compose-bottom p {
    font-size: 9px;
    max-width: 155px;
  }
  .chat-welcome {
    padding: 20px 0;
  }
  .chat-welcome h2 {
    font-size: 27px;
  }
  .chat-welcome p {
    font-size: 11px;
  }
  .message {
    max-width: 100%;
  }
  .message-body {
    font-size: 12px;
    padding: 14px;
  }
  .chat-layout {
    gap: 0;
  }
  .dialog-header {
    padding: 22px;
  }
  .dialog-body {
    padding: 20px 22px 26px;
  }
  .dialog-body .field-row {
    grid-template-columns: 1fr;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .status-card:last-child {
    grid-column: 1/-1;
  }
  #notifications {
    bottom: 87px;
    right: 15px;
    left: 15px;
    max-width: none;
  }
  .form-buttons {
    flex-wrap: wrap;
  }
  .quote {
    font-size: 19px !important;
  }
  .source-card h3 {
    font-size: 21px;
  }
  .report-table {
    font-size: 10px;
  }
  .report-table th,
  .report-table td {
    padding: 8px 5px;
  }
  .page-intro p {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.welcome-star {
  font-size: 0.65em;
  color: #b49e5f;
}
.source-note {
  margin: 0 0 25px;
}
.tool-title {
  margin-top: 14px;
}
.tool-open {
  margin-top: 20px;
}

.top-account {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f1f3e9;
  color: var(--green);
  font-size: 17px;
}

.memory-privacy-note {
  border: 1px solid var(--line);
  background: #f2f5ec;
  border-radius: 12px;
  padding: 15px 19px;
  margin-bottom: 22px;
  font-size: 12px;
}
.memory-privacy-note strong {
  font-weight: 500;
}
.memory-privacy-note p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.memory-change-warning {
  background: #fcf4df;
  border-radius: 9px;
  padding: 12px 14px;
  color: #7a673c;
  font-size: 11px !important;
  margin-top: 14px;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.chat-header-actions .text-link {
  font-size: 10px;
}
.conversation-row {
  display: flex;
  align-items: stretch;
  gap: 5px;
  margin-bottom: 8px;
  min-width: 0;
}
.conversation-row .conversation-link {
  margin-bottom: 0;
  min-width: 0;
  flex: 1;
}
.conversation-delete {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #89947d;
  border-radius: 8px;
  font-size: 17px;
  padding: 0 9px;
  min-width: 30px;
}
.conversation-delete:hover {
  background: #fff0e8;
  color: #9c4f3c;
}
.history-list {
  margin-top: 20px;
}
.history-list .conversation-link {
  font-size: 12px;
}
.history-list .conversation-delete {
  min-width: 40px;
}
@media (max-width: 580px) {
  .chat-top {
    padding: 15px;
  }
  .chat-header-actions {
    gap: 9px;
  }
  .chat-header-actions .text-link {
    font-size: 9px;
  }
  .chat-top small {
    font-size: 9px;
    max-width: 155px;
  }
  .chat-header-actions button[data-action="delete-chat"] {
    display: none;
  }
  .memory-privacy-note {
    padding: 13px 15px;
  }
  .conversation-delete {
    min-width: 40px;
    min-height: 40px;
  }
}

.model-health-note {
  background: #f7f7ed;
  border: 1px solid var(--line);
  padding: 15px 17px;
  border-radius: 11px;
  margin-top: 18px;
}
.model-health-note p {
  font-size: 11px;
  margin-top: 9px;
}
.chat-header-actions .text-link {
  min-height: 28px;
}
.conversation-delete {
  min-width: 36px;
}
@media (max-width: 580px) {
  .chat-header-actions .text-link {
    min-height: 36px;
    min-width: 30px;
  }
  .conversation-delete {
    min-width: 44px;
    min-height: 44px;
  }
  .dialog-close {
    min-width: 36px;
    min-height: 36px;
  }
}

/* Rich activity experience: restrained movement, four clear destinations. */
:root {
  --button-text: #fff;
  --soft-surface: #edf3e9;
  --danger: #9c3f35;
}
.button.primary {
  color: var(--button-text);
}
.button,
.dialog-close,
.top-account,
.conversation-delete,
.chat-header-actions .text-link,
.text-link,
summary {
  min-height: 44px;
}
.dialog-close,
.top-account,
.conversation-delete {
  min-width: 44px;
}
.text-link {
  display: inline-flex;
  align-items: center;
}
summary {
  cursor: pointer;
  display: list-item;
  padding-block: 10px;
}
summary:focus-visible,
meter:focus-visible {
  outline: 3px solid #c38d40;
  outline-offset: 4px;
}
.topbar {
  background: var(--surface);
}
.sidebar,
.panel,
dialog,
.activity-card,
input,
select,
textarea {
  color: var(--ink);
}
.nav-link {
  color: var(--muted);
}
.nav-link:hover,
.nav-link.active {
  background: var(--green-light);
  color: var(--green);
}
.sidebar-tagline,
.sidebar-note p,
.breadcrumb,
.card-meta,
.activity-body > p,
.activity-bottom,
.page-intro p,
.welcome-top p,
.hero-content p,
.date-note {
  color: var(--muted);
}
.rich-hero {
  min-height: 310px;
  gap: 30px;
  background: var(--soft-surface);
}
.rich-hero .hero-content {
  flex: 1;
}
.guide-portrait {
  margin: 0;
  width: 240px;
  align-self: center;
  text-align: center;
  flex-shrink: 0;
}
.guide-portrait img {
  width: 200px;
  height: 200px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 7px solid var(--surface);
}
.guide-portrait figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}
.rich-hero .hero-content p {
  max-width: 37em;
}
.age-chooser {
  margin: 26px 0 0;
  border: 1px solid var(--line);
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--surface);
}
.age-chooser legend {
  padding: 0 7px;
  font-weight: 600;
}
.age-choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.age-chooser p,
.context-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}
.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}
.space-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.space-link {
  display: grid;
  align-content: start;
  gap: 9px;
  position: relative;
  padding: 23px;
}
.space-link > span:first-child {
  color: var(--green);
  font-size: 26px;
}
.space-link strong {
  font-size: 17px;
}
.space-link p {
  font-size: 13px;
  color: var(--muted);
}
.space-link:hover {
  text-decoration: none;
  border-color: var(--green);
}
.space-arrow {
  position: absolute;
  right: 20px;
  top: 20px;
}
.space-return {
  margin-bottom: 20px;
}
.rich-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}
.rich-card:hover {
  transform: translateY(-3px);
}
.rich-card .activity-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}
.rich-card h3 {
  margin: 8px 0 10px;
}
.rich-card .activity-body > p {
  font-size: 14px;
  line-height: 1.6;
}
.rich-card .activity-bottom {
  margin-top: auto;
  padding-top: 18px;
  gap: 8px;
}
.activity-cover-link {
  display: block;
}
.activity-art {
  position: relative;
  overflow: hidden;
}
.activity-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.duration-pill {
  position: absolute;
  z-index: 2;
  left: 15px;
  bottom: 13px;
  font-size: 12px;
  font-weight: 600;
  color: #233e36;
  background: #fffef8;
  padding: 5px 10px;
  border-radius: 99px;
}
.editorial-status {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 12px;
}
.filter-bar {
  flex-wrap: wrap;
  align-items: end;
}
.filter-bar > label:not(.sr-only) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 135px;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
.filter-bar > input {
  flex: 1;
  min-width: 150px;
}
.filter-bar label > select {
  width: 100%;
}
.activity-summary {
  margin-bottom: 16px;
}
.activity-step-nav {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 20px 0;
  background: var(--bg);
}
.activity-step-nav .selected {
  background: var(--green-light);
  color: var(--green);
}
.activity-step-nav .button {
  flex: 1 1 auto;
  padding-inline: 12px;
}
.activity-detail [data-activity-step] {
  animation: reveal-soft 180ms ease-out;
}
.activity-detail .next-step {
  margin: 22px 0;
}
.activity-detail .quote {
  font-size: 17px;
  line-height: 1.6;
}
.activity-detail ul {
  padding-left: 23px;
}
.activity-steps {
  padding-left: 24px;
}
.activity-steps .disclosure {
  margin-top: 0;
}
.activity-steps .disclosure p {
  padding: 8px 0 12px;
}
.media-disclosure audio,
.media-disclosure video {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 14px 0;
  border-radius: 12px;
}
.media-disclosure video {
  background: #173e35;
  max-height: 420px;
}
.media-disclosure audio {
  min-height: 54px;
}
.rehearsal {
  margin-block: 24px;
  padding: 22px;
  background: var(--soft-surface);
  border-radius: 16px;
}
.rehearsal h3 {
  margin-top: 10px;
}
.rehearsal-options {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.rehearsal-choice {
  min-height: 44px;
  text-align: left;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
}
.rehearsal-choice[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: inset 3px 0 var(--green);
}
.rehearsal-explanation {
  animation: reveal-soft 180ms ease-out;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.rehearsal-explanation h4 {
  margin-top: 15px;
}
.saved-moment,
.memory-preview {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--soft-surface);
  margin-top: 20px;
}
.saved-moment {
  animation: reveal-soft 200ms ease-out;
}
.saved-moment > span {
  font-size: 28px;
}
.saved-moment .button {
  margin: 10px 8px 0 0;
}
.memory-preview .quote {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.memory-preview h3 {
  margin-top: 12px;
}
.saved-leaf {
  font-size: 30px;
  display: block;
  width: fit-content;
  margin-left: auto;
  animation: leaf-confirm 220ms ease-out;
}
.journal-timeline {
  list-style: none;
  padding: 0 0 0 26px;
  margin: 15px 0;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 20px;
}
.journal-entry {
  position: relative;
  padding: 24px;
}
.journal-entry::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 30px;
  width: 13px;
  height: 13px;
  background: var(--green);
  border: 3px solid var(--bg);
  border-radius: 50%;
}
.journal-entry h3 {
  margin: 15px 0 12px;
}
.journal-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.journal-meta time {
  margin-left: auto;
}
.journal-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.jars-invitation {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.jars-invitation h3 {
  margin-block: 10px;
}
.jars-invitation p {
  color: var(--muted);
}
.jar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 25px 0;
}
.jar-item label {
  font-size: 13px;
  text-align: center;
  margin: 13px 0;
  min-height: 42px;
}
.jar-vessel {
  height: 170px;
  border: 3px solid #809889;
  border-top-width: 7px;
  border-radius: 12px 12px 26px 26px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap-reverse;
  align-content: flex-start;
  justify-content: center;
  gap: 4px;
  background: var(--soft-surface);
}
.jar-1 {
  border-color: #b69855;
}
.jar-2 {
  border-color: #ab867b;
}
.jar-token {
  height: 25px;
  width: 25px;
  display: inline-block;
  border-radius: 50%;
  background: #f1cd72;
  border: 2px solid #c1a057;
  animation: reveal-soft 180ms ease-out;
}
.jar-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 4px;
}
.jar-controls .button {
  width: 44px;
  padding: 0;
}
.jar-controls input {
  min-width: 0;
  text-align: center;
  padding-inline: 4px;
  font-size: 16px;
}
#jars-status {
  min-height: 52px;
  font-size: 14px;
  color: var(--muted);
}
.scenario-chart {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.scenario-chart figcaption {
  font-weight: 600;
  margin-bottom: 16px;
}
.scenario-chart p {
  font-size: 13px;
  line-height: 1.6;
}
.scenario-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin-block: 15px;
}
.scenario-row meter {
  width: 100%;
  height: 20px;
  accent-color: var(--green);
}
.scenario-row strong {
  text-align: right;
  font-size: 13px;
}
.loss-scenario {
  border-color: var(--danger);
}
#tool-rate-slider {
  width: 100%;
  min-height: 44px;
  accent-color: var(--green);
  padding: 0;
}
.content-review-list {
  margin-top: 0;
  margin-bottom: 32px;
}
.content-review-list .panel {
  padding: 22px;
}
.content-review-list .panel h3 {
  margin-block: 12px;
}
.content-review-list .button {
  margin-top: 16px;
}
.content-review-list .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.content-diff {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 12px 0;
}
.content-diff > div {
  background: var(--bg);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.content-diff pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.7 var(--sans);
}
.content-hash {
  display: inline;
  overflow-wrap: anywhere;
  font-size: 11px;
}
#content-candidate-form textarea {
  min-height: 100px;
}
@keyframes reveal-soft {
  from {
    opacity: 0.35;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes leaf-confirm {
  from {
    opacity: 0.1;
    transform: translateY(8px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 800px) {
  .space-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-portrait {
    width: 155px;
  }
  .guide-portrait img {
    width: 150px;
    height: 150px;
  }
  .guide-portrait figcaption {
    font-size: 11px;
  }
  .rich-hero {
    gap: 18px;
  }
}
@media (max-width: 580px) {
  .sidebar {
    height: auto;
    min-height: 72px;
    padding-bottom: max(
      env(safe-area-inset-bottom, 0px),
      var(--telegram-safe-bottom, 0px)
    );
    background: var(--surface);
  }
  .sidebar nav {
    min-height: 72px;
    overflow: visible;
    align-items: stretch;
  }
  .nav-link {
    flex: 1;
    min-width: 0;
    padding: 10px 4px;
    min-height: 68px;
    justify-content: center;
    border-radius: 8px;
  }
  .nav-text {
    font-size: 11px;
    white-space: nowrap;
  }
  .nav-link .icon {
    width: 22px;
    height: 22px;
  }
  .app-body {
    font-size: 15px;
    padding-bottom: calc(
      82px +
        max(env(safe-area-inset-bottom, 0px), var(--telegram-safe-bottom, 0px))
    );
  }
  .app-body p,
  .activity-body p,
  .dialog-body p,
  .dialog-body li {
    font-size: 14px;
  }
  .app-body .form-note,
  .app-body .tiny,
  .dialog-body .form-note,
  .dialog-body .tiny,
  .app-body .editorial-status {
    font-size: 12px;
  }
  .topbar {
    padding: 12px 16px;
    gap: 8px;
  }
  .topbar-actions {
    gap: 7px;
  }
  .topbar select {
    max-width: 155px;
    font-size: 13px;
    min-height: 44px;
  }
  .parent-badge {
    display: none;
  }
  .breadcrumb {
    font-size: 10px;
  }
  #page-label {
    font-size: 12px;
  }
  .rich-hero {
    min-height: 0;
    padding: 25px 22px;
    display: flex;
    align-items: start;
  }
  .rich-hero h2 {
    font-size: 30px;
  }
  .rich-hero .hero-content > p {
    font-size: 14px;
  }
  .guide-portrait {
    width: 72px;
    position: absolute;
    top: 22px;
    right: 18px;
  }
  .guide-portrait img {
    width: 66px;
    height: 66px;
    border-width: 3px;
  }
  .guide-portrait figcaption {
    display: none;
  }
  .rich-hero .eyebrow {
    padding-right: 70px;
    font-size: 9px;
    min-height: 32px;
  }
  .rich-hero .hero-content {
    padding: 0;
    max-width: 100%;
  }
  .age-chooser {
    padding: 15px;
  }
  .age-chooser legend {
    font-size: 13px;
  }
  .age-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .age-chooser p,
  .context-note {
    font-size: 12px;
  }
  .home-shortcuts,
  .space-links {
    gap: 12px;
  }
  .space-link {
    padding: 17px;
  }
  .space-link strong {
    font-size: 15px;
    padding-right: 8px;
  }
  .space-link p {
    font-size: 12px;
  }
  .space-arrow {
    right: 12px;
    top: 16px;
  }
  .section-heading {
    align-items: start;
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  .section-heading > .text-link {
    font-size: 12px;
    flex-shrink: 0;
  }
  .rich-card .activity-body {
    padding: 17px;
  }
  .rich-card h3 {
    font-size: 19px;
  }
  .rich-card .activity-art {
    height: 165px;
    width: 100%;
  }
  .rich-card .card-meta {
    font-size: 12px;
  }
  .rich-card .activity-bottom {
    font-size: 12px;
  }
  .rich-card .activity-body > p {
    font-size: 14px;
  }
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .filter-bar label,
  .filter-bar input,
  .filter-bar select {
    min-width: 0 !important;
    max-width: 100%;
  }
  .filter-bar input {
    width: 100%;
    font-size: 16px;
  }
  .filter-bar label select {
    font-size: 14px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-header {
    padding: 20px;
  }
  .dialog-header h2 {
    font-size: 25px;
  }
  .dialog-header .eyebrow {
    font-size: 9px;
    line-height: 1.7;
  }
  dialog {
    max-height: calc(100dvh - 24px - var(--telegram-safe-top, 0px));
    width: calc(100% - 18px);
  }
  .dialog-body input,
  .dialog-body textarea,
  .dialog-body select {
    font-size: 16px;
  }
  .activity-step-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .activity-step-nav .button {
    font-size: 12px;
  }
  .rehearsal {
    padding: 17px;
  }
  .rehearsal-choice {
    font-size: 14px;
  }
  .journal-timeline {
    padding-left: 17px;
  }
  .journal-entry {
    padding: 18px;
  }
  .journal-entry::before {
    left: -25px;
  }
  .journal-meta {
    gap: 8px;
    font-size: 12px;
  }
  .journal-meta time {
    margin-left: 0;
  }
  .journal-entry .card-actions {
    flex-wrap: wrap;
  }
  .jars-invitation {
    display: block;
  }
  .jars-invitation > button {
    margin-top: 18px;
  }
  .jar-grid {
    gap: 8px;
  }
  .jar-vessel {
    height: 135px;
    padding: 8px 4px;
    gap: 3px;
    border-width: 2px;
    border-top-width: 6px;
  }
  .jar-token {
    width: 19px;
    height: 19px;
  }
  .jar-item label {
    font-size: 12px;
    min-height: 48px;
  }
  .jar-controls {
    grid-template-columns: 1fr 1fr;
  }
  .jar-controls input {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }
  .jar-controls .button {
    width: 100%;
    min-width: 44px;
  }
  .scenario-row {
    grid-template-columns: 1fr 80px;
    gap: 5px 8px;
  }
  .scenario-row meter {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .scenario-chart figcaption {
    font-size: 14px;
  }
  .content-diff {
    grid-template-columns: 1fr;
  }
  .chat-header-actions .text-link {
    font-size: 12px;
  }
}
html[data-telegram-scheme="dark"] {
  --line: #45554d;
  --green-light: #293f35;
  --soft-surface: #243a30;
  --danger: #ef9c8b;
}
html[data-telegram-scheme="dark"] .hero,
html[data-telegram-scheme="dark"] .sidebar-note,
html[data-telegram-scheme="dark"] .memory-privacy-note,
html[data-telegram-scheme="dark"] .model-health-note,
html[data-telegram-scheme="dark"] .message.assistant,
html[data-telegram-scheme="dark"] .chat-welcome,
html[data-telegram-scheme="dark"] .suggestions button,
html[data-telegram-scheme="dark"] .disclosure,
html[data-telegram-scheme="dark"] .quote,
html[data-telegram-scheme="dark"] .badge,
html[data-telegram-scheme="dark"] .result-box,
html[data-telegram-scheme="dark"] .note-strip,
html[data-telegram-scheme="dark"] .draft-note,
html[data-telegram-scheme="dark"] .limitation,
html[data-telegram-scheme="dark"] .memory-change-warning,
html[data-telegram-scheme="dark"] .form-note,
html[data-telegram-scheme="dark"] .top-account,
html[data-telegram-scheme="dark"] .dialog-close,
html[data-telegram-scheme="dark"] .code-output,
html[data-telegram-scheme="dark"] .empty-state {
  background: var(--soft-surface);
  color: var(--ink);
  border-color: var(--line);
}
html[data-telegram-scheme="dark"] .form-error,
html[data-telegram-scheme="dark"] .button.danger {
  color: var(--danger);
}
html[data-telegram-scheme="dark"] .button.danger {
  background: #402b29;
}
html[data-telegram-scheme="dark"] .chat-top small,
html[data-telegram-scheme="dark"] .message-label,
html[data-telegram-scheme="dark"] .source-byline,
html[data-telegram-scheme="dark"] .list-row small,
html[data-telegram-scheme="dark"] .app-footer {
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .rich-card:hover {
    transform: none;
  }
}
#notifications {
  pointer-events: none;
}
@media (max-width: 580px) {
  #notifications {
    bottom: calc(84px + var(--telegram-safe-bottom, 0px));
    max-width: calc(100vw - 32px);
    right: 16px;
  }
}
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}
.hero .button {
  min-height: 44px;
}
.button.primary:hover {
  background: var(--green);
  filter: brightness(0.94);
}
.message-sources a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.jar-controls button:disabled {
  cursor: not-allowed;
}
