:root {
  --bg0: #0f1c18;
  --bg1: #173028;
  --ink: #e8f2ec;
  --muted: #9bb5a8;
  --line: rgba(232, 242, 236, 0.28);
  --line-strong: rgba(198, 242, 109, 0.55);
  --accent: #c6f26d;
  --accent-ink: #132019;
  --card: rgba(255, 255, 255, 0.04);
  --radius: 18px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "PT Serif", Georgia, serif;
  --drawer-w: min(86vw, 320px);
}

* { box-sizing: border-box; }
button, a, [role="button"], label, input, textarea, select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(198, 242, 109, 0.16), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(240, 194, 122, 0.12), transparent 55%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 45%, #12241f);
  overflow: hidden;
}

.app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
}
.brand-mark {
  width: 48px; height: 48px; border-radius: 14px;
  object-fit: cover; flex-shrink: 0;
  border: 1.5px solid rgba(198, 242, 109, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.gear {
  appearance: none;
  border: 1.5px solid rgba(232, 242, 236, 0.32);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  width: 47px; height: 47px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) {
  .gear:hover {
    background: rgba(198,242,109,0.18);
    border-color: rgba(198, 242, 109, 0.55);
  }
}
.gear:active { transform: scale(0.94); }
.gear svg { transition: transform 0.25s ease; }
.gear:active svg { transform: rotate(45deg); }

.stage {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view { display: none; }
.view.active {
  display: block;
  overflow: auto;
  height: 100%;
  padding: 1.15rem 1.15rem 1.5rem;
}
#view-chat.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0;
  overflow: hidden;
}

.chat-log {
  flex: 1; min-height: 0; overflow: auto;
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1rem 1rem 0.4rem;
  background: transparent; border: none;
}
.bubble {
  max-width: min(92%, 640px);
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  line-height: 1.45;
  white-space: normal;
  border: 1.5px solid rgba(232, 242, 236, 0.2);
  word-break: break-word;
}
.bubble.user {
  align-self: flex-end;
  background: rgba(198, 242, 109, 0.18);
  white-space: pre-wrap;
  border-color: rgba(198, 242, 109, 0.28);
}
.bubble .bubble-img {
  display: block;
  max-width: min(72vw, 280px);
  max-height: 220px;
  border-radius: 12px;
  margin-bottom: 0.45rem;
  object-fit: cover;
}
.bubble.assistant {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(232, 242, 236, 0.12);
}
.bubble.nudge {
  align-self: flex-start;
  max-width: min(92%, 640px);
  background: rgba(198, 242, 109, 0.08);
  border-color: rgba(198, 242, 109, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.bubble.nudge .nudge-text {
  margin: 0;
  color: rgba(232, 242, 236, 0.88);
  font-size: 0.95rem;
  line-height: 1.45;
}
.bubble.nudge .nudge-btn {
  align-self: flex-start;
  border: 1px solid rgba(198, 242, 109, 0.45);
  background: rgba(198, 242, 109, 0.16);
  color: #f2f7ef;
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
@media (hover: hover) {
  .bubble.nudge .nudge-btn:hover {
  background: rgba(198, 242, 109, 0.28);
}
}
.bubble.assistant strong { font-weight: 700; color: #f2f7ef; }
.bubble.assistant em {
  font-style: italic;
  color: rgba(232, 240, 230, 0.78);
}
.bubble.assistant code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
}
.bubble.assistant a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bubble.assistant a.link-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  margin: 0.55rem 0 0.25rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  text-decoration: none;
  color: #eef5ea;
  background: linear-gradient(135deg, rgba(198, 242, 109, 0.14), rgba(255, 255, 255, 0.04));
  border: 1.5px solid rgba(198, 242, 109, 0.58);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}
@media (hover: hover) {
  .bubble.assistant a.link-card:hover {
  border-color: rgba(198, 242, 109, 0.88);
  background: linear-gradient(135deg, rgba(198, 242, 109, 0.22), rgba(255, 255, 255, 0.07));
}
}
.bubble.assistant .link-card-mark {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #121e1a;
  background: rgba(198, 242, 109, 0.92);
  border: 1px solid rgba(18, 30, 26, 0.4);
}
.bubble.assistant .link-card-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.bubble.assistant .link-card-label {
  font-weight: 650;
  color: #f4fae8;
  line-height: 1.25;
}
.bubble.assistant .link-card-url {
  font-size: 0.75rem;
  opacity: 0.8;
  word-break: break-all;
}
.bubble.assistant .link-card-go {
  flex: 0 0 auto;
  opacity: 0.55;
  font-size: 1.05rem;
  color: #c6f26d;
}
.bubble.streaming .stream-caret {
  display: inline-block;
  width: 0.45rem;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: rgba(198, 242, 109, 0.9);
  border-radius: 1px;
  animation: caret-blink 0.9s step-end infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}
.bubble.is-status {
  min-width: 11rem;
}
.bubble .stream-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  opacity: 0.88;
  font-size: 0.95rem;
  color: #d7e6d2;
}
.bubble .stream-status-text {
  animation: status-fade 1.6s ease-in-out infinite;
}
@keyframes status-fade {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}
.bubble.assistant .md-li {
  display: block;
  padding-left: 0.85rem;
  position: relative;
  margin: 0.15rem 0;
}
.bubble.assistant .md-li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.bubble.typing {
  padding: 0.95rem 1.15rem;
  min-width: 4.2rem;
}
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1rem;
}
.typing-dots i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(232, 240, 230, 0.88);
  display: block;
  animation: typing-blink 1.25s ease-in-out infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.18s; }
.typing-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-blink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0) scale(0.85); }
  40% { opacity: 1; transform: translateY(-2px) scale(1); }
}

.composer button[disabled],
.composer input:disabled,
.composer textarea:disabled {
  opacity: 0.55;
  cursor: wait;
}

.composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: end;
  padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(232, 242, 236, 0.14);
  background: linear-gradient(180deg, rgba(8, 16, 14, 0.15), rgba(0, 0, 0, 0.28));
}
.composer-attach-wrap {
  display: grid;
  place-items: center;
  padding-bottom: 2px;
}
.composer-attach {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(232, 242, 236, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 242, 236, 0.88);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.composer-attach.is-active {
  border-color: rgba(198, 242, 109, 0.5);
  background: rgba(198, 242, 109, 0.14);
  color: #f2f7ef;
}
@media (hover: hover) {
  .composer-attach:hover {
    border-color: rgba(198, 242, 109, 0.5);
    background: rgba(198, 242, 109, 0.14);
    color: #f2f7ef;
  }
}
.composer-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.composer-preview {
  position: relative;
  align-self: flex-start;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(232, 242, 236, 0.2);
  background: rgba(0, 0, 0, 0.25);
}
.composer-preview[hidden] { display: none !important; }
.composer-preview img {
  display: block;
  max-height: 88px;
  max-width: min(48vw, 180px);
  object-fit: cover;
}
.composer-preview-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
#chat-form.composer textarea#chat-input {
  min-height: 48px;
  max-height: min(40vh, 220px);
  height: 48px;
  border-radius: 22px;
  border: 1px solid rgba(232, 242, 236, 0.18);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.7rem 1.1rem;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  field-sizing: content;
  width: 100%;
  box-sizing: border-box;
}
#chat-form.composer textarea#chat-input:focus {
  border-color: rgba(198, 242, 109, 0.45);
  box-shadow: 0 0 0 3px rgba(198, 242, 109, 0.12);
}
#chat-form.composer button[type="submit"] {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}
#chat-form.composer button[type="submit"] svg {
  display: block;
  margin-left: 2px;
}

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 40;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--drawer-w);
  background: linear-gradient(180deg, #1a322a, #10231d);
  border-left: 1px solid var(--line);
  z-index: 50;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: max(1rem, env(safe-area-inset-top, 1rem)) 0.85rem 1.2rem;
  box-shadow: -16px 0 40px rgba(0,0,0,0.35);
}
.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.35rem 0.35rem 1rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.drawer-title {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
}
.drawer-sub { color: var(--muted); font-size: 0.88rem; margin-top: 0.25rem; }
.drawer-close {
  appearance: none; border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 0 0.35rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.drawer-nav button {
  appearance: none; border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0.95rem 0.95rem;
  border-radius: 14px;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
}
.drawer-nav button.active {
  background: rgba(198, 242, 109, 0.16);
}
@media (hover: hover) {
  .drawer-nav button:hover {
    background: rgba(198, 242, 109, 0.16);
  }
}

.panel-head h2 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
  margin: 0 0 0.35rem; font-size: 1.7rem;
}
.muted { color: var(--muted); line-height: 1.5; margin: 0; }
.panel-head { margin-bottom: 1rem; }

.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.form {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  width: 100%;
}
.form.row { grid-template-columns: 1fr; }
label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  width: 100%;
}
input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid rgba(232, 242, 236, 0.32);
  background: rgba(0,0,0,0.28);
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239bb5a8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(198, 242, 109, 0.7);
  box-shadow: 0 0 0 2px rgba(198, 242, 109, 0.22);
}
.form > button[type="submit"] {
  width: 100%;
  min-height: 48px;
  margin-top: 0.15rem;
}
button[type="submit"], .btn {
  border: 0; border-radius: 12px; padding: 0.75rem 1rem;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 700; cursor: pointer;
}
.btn.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  font-weight: 600;
}
.check { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.check input { width: auto; }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 0.85rem; }

.list { display: grid; gap: 0.55rem; }
.item {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.item strong { display: block; }
.item span { color: var(--muted); font-size: 0.82rem; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.plan {
  border-radius: var(--radius); border: 1px solid var(--line);
  padding: 1.1rem; background: var(--card); display: grid; gap: 0.5rem;
}
.plan.active { border-color: rgba(198,242,109,0.55); }
.plan .price { font-family: var(--display); font-size: 1.6rem; }
.plan .ai { color: var(--accent); font-weight: 600; }
.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.plan h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}
.plan-ico {
  font-size: 1.15em;
  line-height: 1;
  flex-shrink: 0;
}
.plan-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.25);
}
.plan-dot.on {
  background: #7dff8a;
  box-shadow: 0 0 0 2px rgba(125,255,138,0.25), 0 0 8px rgba(125,255,138,0.45);
}
.plan-dot.off {
  background: #ff5c5c;
  box-shadow: 0 0 0 2px rgba(255,92,92,0.2);
}
.plan-feats {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
  display: grid;
  gap: 0.2rem;
}
.plan-feats li {
  padding-left: 0.95rem;
  position: relative;
}
.plan-feats li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.plan .btn[disabled] { opacity: 0.7; cursor: default; }
a.btn.plan-max {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-top: 0.25rem;
}
a.btn.plan-max img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
}

.support-card {
  display: grid;
  gap: 0.9rem;
}
.max-launch {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.85rem 0.5rem 0.35rem;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.max-launch:focus-visible {
  border-color: rgba(198,242,109,0.4);
  background: rgba(255,255,255,0.04);
  outline: none;
}
@media (hover: hover) {
  .max-launch:hover {
    border-color: rgba(198,242,109,0.4);
    background: rgba(255,255,255,0.04);
  }
}
.max-ico {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.max-launch-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.max-launch-sub {
  color: var(--muted);
  font-size: 0.85rem;
}
.support-link-label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.support-card > .btn {
  width: 100%;
  min-height: 48px;
}

.drawer-nav .nav-ico-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.drawer-nav .nav-ico-img img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
}

@media (max-width: 560px) {
  .brand-name { font-size: 1.1rem; }
  .form.row { grid-template-columns: 1fr; }
}

body.menu-open { overflow: hidden; }

/* —— calendar —— */
.cal {
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.9rem 0.85rem 1rem;
  margin-bottom: 0.85rem;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cal-title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: capitalize;
}
.cal-nav {
  display: flex; gap: 0.35rem;
}
.cal-nav button {
  appearance: none; border: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--ink); font: inherit; font-size: 1.1rem;
  cursor: pointer;
}
@media (hover: hover) {
  .cal-nav button:hover { background: rgba(198,242,109,0.18); }
}
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}
.cal-week span {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
}
.cal-cell {
  appearance: none; border: 0;
  aspect-ratio: 1;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
@media (hover: hover) {
  .cal-cell:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
}
.cal-cell:disabled { opacity: 0.25; cursor: default; }
.cal-cell.other { color: rgba(232,242,236,0.28); }
.cal-cell.today {
  box-shadow: inset 0 0 0 1.5px rgba(198,242,109,0.55);
}
.cal-cell.selected {
  background: var(--accent);
  color: var(--accent-ink);
}
.cal-cell.has-shot::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-cell.selected.has-shot::after { background: var(--accent-ink); }
.cal-cell.done-shot::after { background: #7ec8ff; }
.cal-day {
  margin-bottom: 0.9rem;
  min-height: 2.5rem;
}
.cal-day .day-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  background: rgba(255,255,255,0.03);
}
.cal-day .day-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}
.cal-day .day-card ul {
  margin: 0; padding-left: 1.1rem;
  color: var(--muted);
}

.chart {
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem 0.55rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.chart-head strong { color: var(--ink); font-size: 0.95rem; }
.chart-head strong.down { color: var(--accent); }
.chart-head strong.up { color: #f0c27a; }
.chart-head strong.flat { color: var(--muted); }
.chart svg { display: block; }

input[type="date"]:invalid,
input[type="date"][value=""] {
  color: var(--muted);
}
input::placeholder { color: var(--muted); opacity: 1; }
textarea::placeholder {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.drawer-nav button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.drawer-nav .nav-ico {
  width: 1.6rem;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

#profile-age {
  opacity: 0.85;
  cursor: default;
}

.max-card {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(108, 92, 231, 0.18), transparent 60%),
    var(--card);
}
.max-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.max-card-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.max-card-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.max-card-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.max-card-head .plan-dot { margin-left: auto; }
.max-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: grid;
  gap: 0.35rem;
}
.max-steps a { color: var(--accent); }
.max-link-form,
.max-linked-box,
.max-restore {
  display: grid;
  gap: 0.65rem;
}
.max-linked-id {
  margin: 0;
  font-size: 0.95rem;
}
.max-linked-id code {
  color: var(--accent);
  font-size: 1.05rem;
}
.max-restore {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}
.max-restore summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.max-restore .hint { margin: 0 0 0.35rem; }

.linkish{background:none;border:none;padding:0;color:var(--accent,#7dd87d);text-decoration:underline;cursor:pointer;font:inherit}

#view-offer.view {
  align-items: stretch;
}
.offer-head {
  text-align: center;
  margin-bottom: 1.15rem;
}
.offer-head h2 {
  margin-bottom: 0.4rem;
}
.offer-body {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  text-align: left;
  box-sizing: border-box;
}
.offer-card {
  width: 100%;
  box-sizing: border-box;
  padding: 1.15rem 1.2rem;
}
.offer-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
  text-align: left;
}
.offer-card > p {
  margin: 0 0 0.75rem;
  line-height: 1.45;
  text-align: left;
}
.offer-card > p:last-child {
  margin-bottom: 0;
}
.offer-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  text-align: left;
}
.offer-meta div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem;
  align-items: start;
  line-height: 1.4;
}
.offer-meta .k {
  color: var(--muted);
  font-size: 0.88rem;
}
.offer-meta .v {
  color: var(--ink);
  word-break: break-word;
}
.offer-plan {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(232, 242, 236, 0.12);
  text-align: left;
}
.offer-plan:first-of-type {
  margin-top: 0.35rem;
}
.offer-plan h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}
.offer-plan ul,
.offer-card ul,
.offer-steps {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.15rem;
  text-align: left;
}
.offer-plan li,
.offer-card li {
  margin: 0.28rem 0;
  line-height: 1.4;
}


/* --- multi-chat --- */
.chat-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(232, 242, 236, 0.12);
  background: transparent;
}
.chat-toolbar-mid {
  min-width: 0;
  text-align: center;
}
.chat-toolbar-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: rgba(232, 242, 236, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.chat-ico {
  appearance: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(232, 242, 236, 0.78);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
@media (hover: hover) {
  .chat-ico:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f4fae8;
}
}
.chat-ico-new {
  color: var(--accent);
}
@media (hover: hover) {
  .chat-ico-new:hover {
  background: rgba(198, 242, 109, 0.12);
  color: #d8f58a;
}
}
.chat-ico:active { transform: scale(0.96); }

.chats-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 60;
}
.chats-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.chats-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(88vw, 340px);
  background: linear-gradient(165deg, #152922 0%, #0d1a16 100%);
  border-right: 1px solid rgba(232, 242, 236, 0.12);
  z-index: 70;
  transform: translateX(-105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: max(1.15rem, env(safe-area-inset-top, 1.15rem)) 0.85rem 1.25rem;
  box-shadow: 18px 0 48px rgba(0,0,0,0.4);
}
.chats-panel.open { transform: translateX(0); }
.chats-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0 0.15rem;
}
.chats-panel-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.chats-panel-sub { display: none; }
.chats-new-full {
  appearance: none;
  width: 100%;
  margin-bottom: 0.85rem;
  border: 0;
  background: rgba(198, 242, 109, 0.14);
  color: #eef8dc;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.chats-new-plus {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
}
@media (hover: hover) {
  .chats-new-full:hover {
  background: rgba(198, 242, 109, 0.2);
}
}
.chats-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.1rem;
}
.chat-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.7rem 0.8rem 0.9rem;
  border-radius: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background 0.15s ease;
}
@media (hover: hover) {
  .chat-item:hover {
  background: rgba(255,255,255,0.05);
}
}
.chat-item.active {
  background: rgba(198, 242, 109, 0.12);
}
.chat-item-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.chat-item-title {
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f0f6ee;
  min-width: 0;
  flex: 1;
}
.chat-item-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.chat-topic-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(198, 242, 109, 0.16);
  color: var(--accent);
  border: 1px solid rgba(198, 242, 109, 0.35);
  line-height: 1.2;
}
.chat-item.is-special .chat-item-title {
  max-width: calc(100% - 4.5rem);
}
.chat-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
}
.chat-item-del {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: rgba(155, 181, 168, 0.55);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
@media (hover: hover) {
  .chat-item-del:hover {
  background: rgba(255, 120, 120, 0.12);
  color: #ffb4b4;
}
}
.chats-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.4rem 0.5rem;
  line-height: 1.45;
  text-align: center;
}

.about-head {
  text-align: center;
}
.about-head h2 {
  margin-bottom: 0.4rem;
}
.about-card {
  display: grid;
  gap: 1.15rem;
  text-align: center;
  padding: 1.35rem 1.2rem 1.4rem;
}
.about-hero {
  font-size: 1.65rem;
  letter-spacing: 0.35rem;
  line-height: 1;
}
.about-lead {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #eef5ea;
}
.about-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  text-align: left;
}
.about-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: rgba(198, 242, 109, 0.09);
  line-height: 1.35;
}
.about-emoji {
  flex: 0 0 auto;
  width: 1.6rem;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1;
}
.about-note {
  margin: 0 auto;
  max-width: 26rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* —— confirm modal —— */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 10, 0.72);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.confirm-backdrop.open { opacity: 1; }
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: grid;
  place-items: center;
  padding: 1.1rem;
  pointer-events: none;
}
.confirm-modal:not([hidden]) { pointer-events: auto; }
.confirm-card {
  width: min(100%, 24rem);
  background: linear-gradient(165deg, #1a2a22 0%, #121c17 100%);
  border: 1px solid rgba(198, 242, 109, 0.22);
  border-radius: 1.25rem;
  padding: 1.55rem 1.3rem 1.2rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: scale(0.94) translateY(0.5rem);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.confirm-modal.open .confirm-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.confirm-ico {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.28);
}
.confirm-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #f2f7ef;
}
.confirm-card p {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.confirm-actions { display: flex; gap: 0.6rem; }
.confirm-actions .btn { flex: 1; min-height: 46px; margin: 0; }
.btn.danger {
  background: #e04848;
  border-color: #e04848;
  color: #fff;
}
@media (hover: hover) {
  .btn.danger:hover {
  background: #c83c3c;
  border-color: #c83c3c;
}
}

/* —— pay modal —— */
.pay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 10, 0.72);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.pay-backdrop.open { opacity: 1; }
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  place-items: end center;
  padding: 1rem;
  pointer-events: none;
}
.pay-modal:not([hidden]) { pointer-events: auto; }
.pay-modal-card {
  width: min(100%, 26rem);
  background: linear-gradient(165deg, #1a2a22 0%, #121c17 100%);
  border: 1px solid rgba(198, 242, 109, 0.22);
  border-radius: 1.25rem;
  padding: 1.35rem 1.25rem 1.2rem;
  position: relative;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(1.2rem);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.pay-modal.open .pay-modal-card {
  transform: translateY(0);
  opacity: 1;
}
.pay-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  color: #a8bfa8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.pay-ico { font-size: 1.8rem; margin-bottom: 0.35rem; }
.pay-modal-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  color: #f2f7ef;
}
.pay-lead { margin: 0 0 0.75rem; color: #c9dbc8; font-size: 0.98rem; }
.pay-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent, #c6f26d);
  margin: 0 0 0.65rem;
}
.pay-note { margin: 0 0 1rem; font-size: 0.88rem; }
.pay-modal-card .pay-go,
.pay-modal-card .btn.ghost {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin: 0;
  min-height: 48px;
  line-height: 1.2;
}
.pay-modal-card .pay-go {
  margin-bottom: 0.55rem;
}
.pay-modal-card .btn.ghost {
  width: 100%;
}

/* —— share result —— */
.share-card { display: grid; gap: 0.85rem; }
.share-steps { margin: 0; padding-left: 1.2rem; line-height: 1.45; }
.share-upload {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; cursor: pointer; text-align: center;
}
.share-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(232, 242, 236, 0.16);
  background: #0a1210;
  min-height: 180px;
}
.share-stage img {
  display: block; width: 100%; max-height: 420px; object-fit: contain;
  background: #0a1210;
  transition: filter 0.25s ease, transform 0.25s ease;
}
.share-stage.is-magic img {
  filter: blur(10px) brightness(0.55) saturate(1.15);
  transform: scale(1.04);
}
.share-magic {
  position: absolute; inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background:
    radial-gradient(420px 220px at 50% 40%, rgba(198, 242, 109, 0.18), transparent 65%),
    rgba(6, 14, 12, 0.35);
  backdrop-filter: blur(2px);
  z-index: 2;
}
.share-magic[hidden] { display: none !important; }
.share-spinner {
  width: 56px; height: 56px;
  position: relative;
}
.share-spinner span {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--accent);
  animation: share-spin 0.9s linear infinite;
}
.share-spinner span:nth-child(2) {
  inset: 7px;
  border-top-color: #f0c27a;
  animation-duration: 1.15s;
  animation-direction: reverse;
}
.share-spinner span:nth-child(3) {
  inset: 14px;
  border-top-color: #9ad4ff;
  animation-duration: 0.75s;
}
@keyframes share-spin {
  to { transform: rotate(360deg); }
}
.share-magic-text {
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  animation: share-magic-pulse 1.4s ease-in-out infinite;
}
@keyframes share-magic-pulse {
  0%, 100% { opacity: 0.78; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}
.share-animals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.share-animal {
  appearance: none; border: 1px solid rgba(232,242,236,0.18);
  background: rgba(255,255,255,0.04); border-radius: 14px;
  min-height: 52px; font-size: 1.45rem; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.share-animal.active {
  background: rgba(198,242,109,0.14);
  border-color: rgba(198,242,109,0.45);
}
@media (hover: hover) {
  .share-animal:hover {
    background: rgba(198,242,109,0.14);
    border-color: rgba(198,242,109,0.45);
  }
}
.share-animal:active { transform: scale(0.96); }
.share-animal:disabled { opacity: 0.45; cursor: wait; }
.share-actions { display: grid; gap: 0.5rem; }
.share-actions .btn, .share-actions a.btn {
  text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center; min-height: 48px;
}
.share-status { min-height: 1.2em; margin: 0; }

/* —— BMI calculator —— */
.bmi-shell {
  display: grid;
  gap: 1.05rem;
  padding: 0 0.85rem 1.4rem;
  max-width: 520px;
}
.bmi-field {
  display: grid;
  gap: 0.45rem;
}
.bmi-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.bmi-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.bmi-readout {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bmi-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.28rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(232, 242, 236, 0.12);
}
.bmi-seg-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  color: rgba(232, 242, 236, 0.72);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.bmi-seg-btn[aria-pressed="true"] {
  background: rgba(198, 242, 109, 0.2);
  color: #f2f7ef;
  box-shadow: inset 0 0 0 1px rgba(198, 242, 109, 0.35);
}
.bmi-shell input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(198,242,109,0.15), rgba(198,242,109,0.45));
  outline: none;
  margin: 0.35rem 0 0;
}
.bmi-shell input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  cursor: pointer;
}
.bmi-shell input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  cursor: pointer;
}
.bmi-range-ends {
  display: flex;
  justify-content: space-between;
  color: rgba(155, 181, 168, 0.75);
  font-size: 0.75rem;
}
.bmi-age-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
}
.bmi-age-row input {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(232, 242, 236, 0.18);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 1.05rem;
}
.bmi-age-unit { color: var(--muted); font-size: 0.9rem; }
.bmi-result {
  margin-top: 0.25rem;
  padding: 1.1rem 1.05rem 1rem;
  border-radius: 22px;
  background:
    radial-gradient(420px 180px at 10% 0%, rgba(198,242,109,0.14), transparent 60%),
    rgba(0,0,0,0.28);
  border: 1px solid rgba(232, 242, 236, 0.14);
  display: grid;
  gap: 0.85rem;
}
.bmi-result[data-tone="low"] { border-color: rgba(120, 180, 255, 0.35); }
.bmi-result[data-tone="ok"] { border-color: rgba(198, 242, 109, 0.45); }
.bmi-result[data-tone="warn"] { border-color: rgba(240, 194, 122, 0.45); }
.bmi-result[data-tone="high"] { border-color: rgba(255, 140, 120, 0.4); }
.bmi-result-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.bmi-value {
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}
.bmi-result[data-tone="low"] .bmi-value { color: #9ec8ff; }
.bmi-result[data-tone="warn"] .bmi-value { color: #f0c27a; }
.bmi-result[data-tone="high"] .bmi-value { color: #ff9b86; }
.bmi-cat {
  font-weight: 700;
  font-size: 1.05rem;
  color: rgba(232, 242, 236, 0.92);
  text-align: right;
  max-width: 12rem;
}
.bmi-scale {
  position: relative;
  padding: 0.35rem 0 0.55rem;
}
.bmi-scale-track {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1.6fr 1.2fr 1.4fr;
  gap: 3px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}
.bmi-scale-seg.s1 { background: #6aa8ff; }
.bmi-scale-seg.s2 { background: #7fd0ff; }
.bmi-scale-seg.s3 { background: #c6f26d; }
.bmi-scale-seg.s4 { background: #f0c27a; }
.bmi-scale-seg.s5 { background: #ff8c78; }
.bmi-scale-needle {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: left 0.22s ease;
  pointer-events: none;
}
.bmi-meta {
  display: grid;
  gap: 0.35rem;
  color: rgba(232, 242, 236, 0.82);
  font-size: 0.92rem;
  line-height: 1.4;
}
.bmi-meta strong { color: var(--ink); font-weight: 700; }
.bmi-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.file-hidden {
  position: absolute !important;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  border: 0;
  padding: 0;
  margin: 0;
}
.composer-attach, .share-upload { position: relative; }
.composer-attach svg { position: relative; z-index: 1; pointer-events: none; }

.composer-hint {
  margin: 0.35rem 0.9rem 0.6rem;
  font-size: 12px;
  color: var(--muted);
}
.composer-preview.is-raw img { display: none; }
.composer-preview.is-raw::before {
  content: "📷 HEIC";
  display: grid;
  place-items: center;
  min-width: 72px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px dashed rgba(198, 242, 109, 0.45);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.composer-preview.is-loading { opacity: 0.75; }

/* Android APK WebView: drop expensive compositing/paint effects */
.is-webview body {
  background: #0f1c18 !important;
}
.is-webview * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: none !important;
  transition: none !important;
}
.is-webview .card,
.is-webview .drawer,
.is-webview .chats-panel,
.is-webview .topbar {
  box-shadow: none !important;
}

/* WebView: use system fonts, skip downloading webfonts */
.is-webview {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  --display: Georgia, "Times New Roman", serif !important;
}
