:root {
  color-scheme: light;
  --bg: #f2f3f5;
  --surface: #ffffff;
  --ink: #17171b;
  --muted: #92939a;
  --line: #e9e9ed;
  --blue: #1677ff;
  --violet: #5b43f5;
  --hero: #5360f6;
  --safe-top: max(env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px));
  --tg-content-top: 0px;
  --shadow: 0 5px 18px rgba(27, 31, 38, 0.055);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, textarea, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.app-shell.browser-auth-mode { padding-bottom: 0; }

.app-shell {
  position: relative;
  width: min(100%, 590px);
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: calc(104px + var(--safe-bottom));
  background: var(--bg);
  overflow: hidden;
}

.context-nav {
  position: absolute;
  z-index: 12;
  top: calc(var(--safe-top) + 17px);
  left: 22px;
  height: 40px;
  padding: 0 14px 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 22px;
  color: #666870;
  background: rgba(223, 224, 230, .92);
  box-shadow: 0 5px 18px rgba(29, 30, 45, .08);
  backdrop-filter: blur(18px);
  cursor: pointer;
}
.context-nav span { width: 18px; font-size: 25px; font-weight: 300; line-height: 1; text-align: center; }
.context-nav strong { font-size: 14px; font-weight: 700; }
.context-nav[data-mode="back"] span { font-size: 30px; transform: translateY(-1px); }
.telegram-host .context-nav { display: none !important; }

.hero {
  position: relative;
  height: 376px;
  padding: calc(var(--safe-top) + 13px) 22px 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 30%, rgba(117, 208, 255, .22), transparent 32%),
    radial-gradient(circle at 86% 46%, rgba(176, 148, 255, .18), transparent 34%),
    linear-gradient(180deg, #eef2ff 0%, #f5f6fb 78%, var(--bg) 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(242,243,245,0), var(--bg) 92%);
  pointer-events: none;
}
.hero-orb { position: absolute; border-radius: 999px; filter: blur(1px); opacity: .5; }
.hero-orb-one { width: 190px; height: 190px; left: -120px; top: 95px; background: rgba(43, 208, 255, .12); }
.hero-orb-two { width: 180px; height: 180px; right: -110px; top: 130px; background: rgba(213, 143, 255, .12); }

.browser-chrome {
  position: relative;
  z-index: 4;
  height: 48px;
  display: grid;
  grid-template-columns: 105px 1fr auto;
  align-items: center;
  gap: 9px;
  font-size: 16px;
}
.browser-actions { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.browser-chrome { color: #777982; }
.telegram-host .browser-chrome { visibility: hidden; }

.mascot {
  position: absolute;
  z-index: 2;
  width: 132px;
  height: 142px;
  top: calc(var(--safe-top) + 53px);
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(73, 78, 112, .16));
  animation: float 5s ease-in-out infinite;
}
.hero h1 {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 205px);
  left: 22px;
  right: 22px;
  margin: 0;
  text-align: center;
  font-size: clamp(30px, 8.2vw, 40px);
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.ask-button {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: 24px;
  min-height: 60px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  box-shadow: 0 7px 22px rgba(38, 42, 56, .1);
  backdrop-filter: blur(22px);
  text-align: left;
  cursor: pointer;
}
.ask-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #5b43f5;
  background: transparent;
  font-size: 27px;
}
.ask-button strong, .ask-button small { display: block; }
.ask-button strong { font-size: 16px; letter-spacing: -.018em; }
.ask-button small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.chevron { color: #a1a2a8; font-size: 25px; font-weight: 300; line-height: 1; }

.content { position: relative; z-index: 2; margin-top: 0; padding: 0 18px; }
.discovery-section { margin: 0 0 28px; }
.discovery-section h2, .profile-content > h2 {
  margin: 0 0 14px;
  padding-left: 4px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.section-title-row { display: flex; align-items: center; justify-content: space-between; }
.section-title-row button { margin: 0 18px 12px 0; border: 0; color: var(--blue); background: none; font-weight: 600; cursor: pointer; }
.projects-section { margin-bottom: 30px; }
.project-tabs {
  margin: 0 -22px;
  padding: 1px 22px 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.project-tabs::-webkit-scrollbar { display: none; }
.project-tab {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  scroll-snap-align: start;
  border: 1px solid #e5e5ea;
  border-radius: 16px;
  color: #616168;
  background: rgba(255,255,255,.72);
  box-shadow: 0 6px 18px rgba(27,27,45,.045);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
}
.project-tab span { font-size: 17px; }
.project-tab em { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; color: #92939a; background: #eeeef1; font-size: 9px; font-style: normal; }
.project-tab.active { color: #fff; border-color: transparent; background: linear-gradient(135deg,#5262f5,#7450e9); box-shadow: 0 9px 22px rgba(83,82,235,.2); }
.project-tab.active em { color: #5751d8; background: rgba(255,255,255,.88); }
.project-context {
  min-height: 70px;
  margin-top: 4px;
  padding: 11px 12px 11px 15px;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 38px;
  gap: 11px;
  align-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg,#eeedff,#f4efff);
  box-shadow: inset 0 0 0 1px rgba(102,84,232,.08);
}
.project-context-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: #fff; box-shadow: 0 5px 13px rgba(49,43,95,.08); font-size: 21px; }
.project-context strong, .project-context small { display: block; }
.project-context strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.project-context small { margin-top: 3px; color: #7d7893; font-size: 11px; }
.project-context button { width: 38px; height: 38px; border: 0; border-radius: 13px; color: #77728f; background: rgba(255,255,255,.7); font-weight: 800; letter-spacing: 1px; cursor: pointer; }
.group-card {
  overflow: hidden;
  border: 1px solid rgba(24, 28, 37, .055);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.action-row, .agent-row, .recent-item, .settings-row {
  position: relative;
  width: 100%;
  min-height: 66px;
  padding: 7px 14px 7px 18px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.action-row::after, .agent-row::after, .recent-item::after, .settings-row::after {
  content: "";
  position: absolute;
  left: 67px;
  right: 17px;
  bottom: 0;
  height: 1px;
  background: var(--line);
}
.action-row:last-child::after, .agent-row:last-child::after, .recent-item:last-child::after, .settings-row:last-child::after { display: none; }
.action-row:active, .agent-row:active, .recent-item:active, .settings-row:active { background: #f6f6f8; }
.row-emoji, .agent-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent !important;
  font-size: 24px;
}
.row-copy { min-width: 0; }
.row-copy strong, .row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.row-copy strong { margin-bottom: 2px; font-size: 16px; letter-spacing: -.023em; white-space: nowrap; }
.row-copy small { color: var(--muted); font-size: 13px; line-height: 1.24; }

.agent-row { min-height: 64px; }
.agent-row.selected { background: #f7f5ff; }
.agent-row.selected .chevron { color: var(--violet); }
.agent-row .row-copy strong { font-size: 16px; }
.agent-row .row-copy small { font-size: 13px; }

.task-card {
  margin: -8px 0 32px;
  padding: 17px;
  border: 1px solid rgba(24, 28, 37, .06);
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}
.task-card-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.task-agent-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #8b8c93; background: #f2f3f5; }
.task-card-head small { color: #98999f; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.task-card-head h3 { margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.task-state { padding: 6px 9px; border-radius: 999px; color: #24845d; background: #e9f7ef; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.assistant-answer { max-height: 320px; margin-top: 16px; padding: 14px; overflow-y: auto; border: 1px solid #ececf0; border-radius: 17px; color: #303138; background: #f7f7f9; white-space: pre-wrap; font-size: 13px; line-height: 1.52; }
.progress-track { height: 4px; margin: 18px 0; overflow: hidden; border-radius: 99px; background: #ececf0; }
.progress-track span { display: block; width: 8%; height: 100%; border-radius: inherit; background: #8f9097; transition: width .35s; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.step { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: center; color: #a0a1a7; font-size: 12px; }
.step::before { content: ""; width: 15px; height: 15px; border: 1px solid #d9dade; border-radius: 50%; }
.step.done { text-decoration: line-through; }
.step.done::before { content: "✓"; display: grid; place-items: center; color: #fff; border-color: #8f9097; background: #8f9097; font-size: 9px; text-decoration: none; }
.step.running { color: #33343a; font-weight: 700; }
.step.running::before { border-color: #8f9097; background: #8f9097; box-shadow: inset 0 0 0 4px #fff; }
.task-actions { margin-top: 18px; display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; }
.primary-button, .secondary-button { min-height: 48px; border: 0; border-radius: 16px; font-weight: 750; cursor: pointer; }
.primary-button { color: #fff; background: linear-gradient(135deg, #4e5ff5, #774fe9); box-shadow: 0 10px 22px rgba(88,79,238,.28); }
.secondary-button { color: #606168; background: #f0f1f3; }
.primary-button:disabled { opacity: .55; }

.recent-section { padding-bottom: 8px; }
.recent-list:empty { display: none; }
.recent-empty { padding: 24px; color: var(--muted); font-size: 14px; line-height: 1.4; text-align: center; }
.recent-item { min-height: 64px; }
.recent-item-icon { width: 36px; height: 36px; display: grid; place-items: center; background: transparent; font-size: 22px; }
.recent-item h4 { margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.recent-item p { margin: 0; color: var(--muted); font-size: 12px; }

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  width: 206px;
  height: 60px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 34px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 13px 38px rgba(26, 27, 40, .19);
  backdrop-filter: blur(24px) saturate(1.2);
}
.bottom-nav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 28px;
  color: #25252a;
  background: transparent;
  cursor: pointer;
}
.bottom-nav button.active { color: var(--blue); background: rgba(234,235,239,.72); }
.bottom-nav strong { margin-top: 2px; font-size: 10px; line-height: 1; }
.bottom-nav em { position: absolute; top: 5px; right: 27px; min-width: 16px; height: 16px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #7357ef; font-size: 9px; font-style: normal; font-weight: 800; }
.nav-icon { position: relative; width: 27px; height: 27px; display: block; }
.search-icon::before { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border: 4px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 12px; height: 4px; right: 0; bottom: 3px; border-radius: 4px; background: currentColor; transform: rotate(45deg); }
.profile-icon { border: 3px solid currentColor; border-radius: 50%; }
.profile-icon::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 3px; height: 9px; border-radius: 10px 10px 7px 7px; background: currentColor; opacity: .18; }
.profile-icon i { position: absolute; inset: 2px; display: grid; place-items: center; font-size: 11px; font-style: normal; font-weight: 800; }

.profile-view { min-height: 100svh; background: var(--bg); }
.profile-safe-top { height: calc(var(--safe-top) + 78px); }
.profile-content { padding: 0 22px 28px; }
.profile-content > h1 { margin: 0 0 18px; padding-left: 22px; font-size: 31px; letter-spacing: -.04em; }
.profile-content > h2 { margin-top: 42px; }
.settings-row { min-height: 64px; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 11px; }
.settings-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; letter-spacing: -.02em; }
.settings-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #5d5f69; background: transparent !important; font-size: 21px; }
.settings-icon.purple { color: #7b4de8; }
.settings-icon.indigo { color: #4f5fe9; }
.settings-icon.red { color: #ec4052; }
.settings-icon.blue { color: #1684e8; }
.settings-icon.cyan { color: #1aa3cc; }
.settings-icon.orange { color: #f18b17; }
.settings-icon.green { color: #20af64; }
.settings-value { color: var(--muted); font-size: 14px; }
.badge { padding: 5px 8px; border-radius: 8px; color: #784bd9; background: #efe3ff; font-size: 10px; font-weight: 700; }
.referral-banner { position: relative; min-height: 158px; margin-top: 28px; padding: 23px; overflow: hidden; border-radius: 29px; color: #fff; background: radial-gradient(circle at 90% 10%, #29b9ff, transparent 46%), linear-gradient(135deg,#5253ff,#5337ec); box-shadow: 0 14px 28px rgba(74,70,232,.2); }
.referral-banner div { position: relative; z-index: 2; max-width: 68%; display: flex; flex-direction: column; align-items: flex-start; }
.referral-banner strong { font-size: 21px; line-height: 1.15; }
.referral-banner span { margin-top: 5px; color: rgba(255,255,255,.82); font-size: 13px; }
.referral-banner button { margin-top: 14px; padding: 9px 17px; border: 0; border-radius: 999px; color: #4d4bea; background: #fff; font-weight: 750; cursor: pointer; }
.referral-banner img { position: absolute; right: -11px; bottom: -17px; width: 150px; height: 154px; object-fit: contain; transform: rotate(-8deg); }

.browser-auth-view {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--safe-top) + 8px) 0 calc(22px + var(--safe-bottom));
  background: #f2f3f5;
}
.browser-auth-header {
  min-height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.browser-auth-title { min-width: 0; display: flex; align-items: center; gap: 11px; }
.secure-lock {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  color: #777980;
  background: #e6e7ea;
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
}
.browser-auth-title small, .browser-auth-title strong { display: block; }
.browser-auth-title small { margin-bottom: 2px; color: #9a9ba1; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.browser-auth-title strong { max-width: 270px; overflow: hidden; color: #505158; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.browser-auth-header > button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #777881;
  background: #e4e5e8;
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
}
.telegram-host .browser-auth-view {
  padding-top: max(calc(var(--tg-content-top) + 8px), 76px);
}
.telegram-host .browser-auth-header {
  min-height: 36px;
  padding: 0 54px 10px;
  justify-content: center;
  text-align: center;
}
.telegram-host .browser-auth-title { justify-content: center; }
.telegram-host .secure-lock,
.telegram-host .browser-auth-header > button { display: none; }
.telegram-host .browser-auth-title strong { max-width: min(310px, 78vw); }
.browser-auth-body { padding: 8px 16px 0; }
.browser-preview-shell {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #dedfe3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(34,35,54,.055);
}
.browser-preview-bar { height: 34px; padding: 0 13px; display: flex; align-items: center; color: #8d8f96; background: #f7f7f8; font-size: 10px; font-weight: 650; }
.browser-preview-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-preview-shell img { width: 100%; max-height: 260px; display: block; object-fit: cover; object-position: top; background: #ececf0; }
.browser-preview-shell.captcha-active {
  border-color: rgba(104, 86, 229, .32);
  box-shadow: 0 16px 38px rgba(67, 56, 157, .16);
}
.browser-preview-shell.captcha-active .browser-preview-bar {
  color: #6759d8;
  background: #f0edff;
  font-weight: 750;
}
.browser-preview-shell.captcha-active img {
  max-height: none;
  height: auto;
  object-fit: contain;
  cursor: crosshair;
  touch-action: manipulation;
}
.browser-preview-shell.captcha-active img:active { opacity: .82; }
.browser-auth-card {
  padding: 21px 18px 18px;
  border: 1px solid rgba(24,28,37,.055);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(30,31,51,.055);
}
.browser-auth-symbol {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #85868d;
  background: #f0f1f3;
  box-shadow: none;
  font-size: 18px;
}
.browser-auth-symbol.success { color: #14824f; background: #e2f8ed; box-shadow: none; }
.browser-auth-symbol.error { color: #bf3547; background: #fde8eb; box-shadow: none; }
.browser-auth-eyebrow { display: block; margin-bottom: 5px; color: #8e9097; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.browser-auth-card h1 { margin: 0; font-size: clamp(23px,6.4vw,30px); line-height: 1.08; letter-spacing: -.035em; }
.browser-auth-card > p { margin: 9px 0 0; color: #7d7e85; font-size: 14px; line-height: 1.44; }
.browser-auth-form { margin-top: 20px; }
.browser-auth-options { margin: 0 0 14px; padding: 0; display: grid; gap: 8px; border: 0; }
.browser-auth-option { min-height: 48px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #e6e6ec; border-radius: 15px; background: #f8f8fa; font-size: 13px; font-weight: 700; cursor: pointer; }
.browser-auth-option:has(input:checked) { border-color: #aeb0b7; background: #f1f2f4; }
.browser-auth-option input { width: 17px; height: 17px; accent-color: #62646b; }
.browser-auth-fields { display: grid; gap: 12px; }
.browser-auth-field { display: grid; gap: 7px; }
.browser-auth-field > span { color: #65666e; font-size: 12px; font-weight: 750; }
.browser-auth-field input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid #e1e1e7;
  border-radius: 14px;
  outline: 0;
  background: #f6f6f8;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.browser-auth-field input:focus { border-color: #8f9198; background: #fff; box-shadow: 0 0 0 3px rgba(74,76,84,.08); }
.browser-auth-submit, .browser-auth-done {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #2481cc;
  box-shadow: none;
  font-weight: 780;
  cursor: pointer;
}
.browser-auth-submit { display: flex; align-items: center; justify-content: center; gap: 9px; }
.browser-auth-submit span { font-size: 20px; font-weight: 400; }
.browser-auth-submit:disabled { opacity: .58; }
.browser-auth-working { margin-top: 18px; padding: 13px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; border-radius: 15px; color: #5f6068; background: #f2f3f5; }
.browser-auth-working strong, .browser-auth-working small { display: block; }
.browser-auth-working strong { font-size: 13px; }
.browser-auth-working small { margin-top: 3px; color: #92939c; font-size: 11px; line-height: 1.35; }
.browser-auth-spinner { width: 32px; height: 32px; display: grid; place-items: center; color: #8a8c92; font-size: 18px; animation: browserSpark 1.6s ease-in-out infinite; }
.browser-auth-privacy { margin: 14px 4px 0; display: grid; grid-template-columns: 28px 1fr; gap: 9px; color: #83848c; }
.browser-auth-privacy > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #5d8a73; background: #e7f3ed; font-weight: 800; }
.browser-auth-privacy p { margin: 0; font-size: 10px; line-height: 1.45; }
.browser-auth-privacy strong { display: block; margin-bottom: 2px; color: #666770; font-size: 11px; }
.browser-auth-cancel { width: 100%; margin-top: 14px; padding: 9px; border: 0; color: #9a9ba2; background: transparent; font-size: 12px; cursor: pointer; }

@keyframes browserSpark {
  0%,100% { opacity: .32; transform: scale(.82) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.08) rotate(8deg); }
}

.sheet-backdrop { position: fixed; z-index: 29; inset: 0; background: rgba(15,16,28,.33); backdrop-filter: blur(3px); }
.composer-sheet {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  width: min(100%, 590px);
  padding: 8px 18px calc(18px + var(--safe-bottom));
  transform: translateX(-50%);
  border-radius: 32px 32px 0 0;
  background: #f5f5f7;
  box-shadow: 0 -20px 60px rgba(25,26,43,.2);
}
.sheet-handle { width: 38px; height: 5px; margin: 0 auto 14px; border-radius: 99px; background: #d5d5da; }
.composer-title { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.composer-title small, .composer-title strong { display: block; }
.composer-title small { margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.composer-title strong { font-size: 18px; }
.composer-title > button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #73737a; background: #e6e6e9; font-size: 26px; cursor: pointer; }
.composer-project { min-height: 52px; margin-bottom: 10px; padding: 8px 14px; display: grid; grid-template-columns: 29px 1fr; gap: 10px; align-items: center; border-radius: 17px; background: linear-gradient(135deg,#eeedff,#f4efff); }
.composer-project > span { font-size: 20px; text-align: center; }
.composer-project small, .composer-project strong { display: block; }
.composer-project small { margin-bottom: 2px; color: #858098; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.composer-project strong { font-size: 13px; }
.composer-model { width: 100%; min-height: 52px; margin-bottom: 10px; padding: 8px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; border: 0; border-radius: 17px; color: #626269; background: #e9e9ee; text-align: left; cursor: pointer; }
.composer-model > span { font-size: 12px; font-weight: 700; }
.composer-model > strong { color: var(--ink); font-size: 13px; text-align: right; }
.composer-model > b { color: #9898a0; font-size: 22px; font-weight: 400; }
.composer { padding: 14px; border-radius: 23px; background: #fff; box-shadow: 0 8px 28px rgba(34,34,49,.08); }
.composer textarea { width: 100%; min-height: 112px; padding: 4px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; line-height: 1.45; }
.composer textarea::placeholder { color: #a0a0a7; }
.composer-footer { display: flex; align-items: center; gap: 9px; }
.composer-footer > span { flex: 1; color: var(--muted); font-size: 11px; }
.attach-button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: #67676e; background: #f0f0f3; font-size: 22px; cursor: pointer; }
.send-button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 14px; color: #fff; background: var(--blue); font-size: 13px; font-weight: 750; cursor: pointer; }
.send-button b { margin-left: 5px; font-size: 16px; }

.model-sheet {
  position: fixed;
  z-index: 32;
  left: 50%;
  bottom: 0;
  width: min(100%, 590px);
  padding: 8px 18px calc(21px + var(--safe-bottom));
  transform: translateX(-50%);
  border-radius: 32px 32px 0 0;
  background: #f5f5f7;
  box-shadow: 0 -20px 60px rgba(25,26,43,.22);
}
.model-sheet-head { margin: 0 2px 16px; display: flex; align-items: center; justify-content: space-between; }
.model-sheet-head small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.model-sheet-head h2 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.035em; }
.model-sheet-head > button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #73737a; background: #e4e4e8; font-size: 26px; cursor: pointer; }
.model-list { overflow: hidden; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.model-option { position: relative; width: 100%; min-height: 76px; padding: 10px 15px; display: grid; grid-template-columns: 36px 1fr 24px; gap: 11px; align-items: center; border: 0; background: transparent; text-align: left; cursor: pointer; }
.model-option::after { content: ""; position: absolute; left: 62px; right: 16px; bottom: 0; height: 1px; background: var(--line); }
.model-option:last-child::after { display: none; }
.model-option:active { background: #f6f6f9; }
.model-symbol { width: 36px; height: 36px; display: grid; place-items: center; color: #5b43f5; background: transparent; font-size: 24px; }
.model-option:nth-child(2) .model-symbol { color: #7c45ea; }
.model-option:nth-child(3) .model-symbol { color: #248fcf; }
.model-copy { min-width: 0; }
.model-title { display: flex; align-items: center; gap: 7px; }
.model-title strong { font-size: 16px; }
.model-title em { padding: 4px 7px; border-radius: 999px; color: #6750d9; background: #eee8ff; font-size: 9px; font-style: normal; font-weight: 800; }
.model-copy small { margin-top: 4px; display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.model-check { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #d4d4da; border-radius: 50%; color: transparent; font-size: 12px; font-weight: 900; }
.model-option.selected .model-check { color: #fff; border-color: var(--blue); background: var(--blue); }
.model-note { margin: 14px 12px 0; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: center; }

.project-sheet {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  width: min(100%, 590px);
  padding: 8px 18px calc(20px + var(--safe-bottom));
  transform: translateX(-50%);
  border-radius: 32px 32px 0 0;
  background: #f5f5f7;
  box-shadow: 0 -20px 60px rgba(25,26,43,.2);
}
.project-sheet-head { margin-bottom: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-sheet-head small { color: #6f56e8; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-sheet-head h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.04em; }
.project-sheet-head > button { width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 50%; color: #73737a; background: #e6e6e9; font-size: 26px; cursor: pointer; }
.project-name-field { display: grid; gap: 8px; color: #626269; font-size: 11px; font-weight: 750; }
.project-name-field input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid transparent; border-radius: 17px; outline: 0; background: #fff; box-shadow: var(--shadow); font-size: 15px; }
.project-name-field input:focus { border-color: #7161ed; box-shadow: 0 0 0 3px rgba(113,97,237,.12); }
.project-emoji-field { margin: 17px 0 0; padding: 0; border: 0; }
.project-emoji-field legend { margin-bottom: 8px; color: #626269; font-size: 11px; font-weight: 750; }
.project-emoji-field div { display: grid; grid-template-columns: repeat(8,1fr); gap: 6px; }
.project-emoji-field button { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid #e5e4eb; border-radius: 13px; background: #fff; font-size: 20px; cursor: pointer; }
.project-emoji-field button.selected { border-color: #6657ea; background: #eeebff; box-shadow: 0 0 0 2px rgba(102,87,234,.12); }
.project-sheet-note { margin: 15px 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.project-sheet-actions { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px; }
.project-sheet-actions .primary-button { min-height: 50px; }
.delete-project { min-height: 50px; padding: 0 17px; border: 0; border-radius: 16px; color: #ca4053; background: #f5e6e9; font-size: 12px; font-weight: 750; cursor: pointer; }
.project-sheet-actions .delete-project.hidden + .primary-button { grid-column: 1 / -1; }

.studio { min-height: 100svh; padding: calc(var(--safe-top) + 13px) 20px calc(34px + var(--safe-bottom)); background: var(--bg); }
.studio-top { height: 46px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; }
.studio-top strong { font-size: 15px; letter-spacing: -.02em; }
.library-heading { margin: 27px 2px 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.library-heading small, .editor-heading small { display: block; margin-bottom: 5px; color: #6f56e8; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.library-heading h1, .editor-heading h1 { margin: 0; font-size: 32px; line-height: 1; letter-spacing: -.05em; }
.compact-create { padding: 7px 2px; display: inline-flex; align-items: center; gap: 3px; border: 0; color: #5d4be4; background: transparent; font-size: 13px; font-weight: 750; cursor: pointer; }
.compact-create span { font-size: 19px; font-weight: 400; line-height: 1; }
.style-showcase { position: relative; min-height: 204px; padding: 22px; overflow: hidden; border-radius: 28px; background: radial-gradient(circle at 85% 22%, rgba(255,255,255,.95), transparent 25%), linear-gradient(135deg,#d9f6eb,#eaf7d9); box-shadow: 0 15px 36px rgba(55,94,70,.1); }
.style-showcase::after { content: ""; position: absolute; inset: auto -50px -72px auto; width: 230px; height: 230px; border-radius: 50%; background: rgba(255,255,255,.52); }
.style-showcase-copy { position: relative; z-index: 2; width: 50%; display: flex; flex-direction: column; align-items: flex-start; }
.style-showcase-copy > span { margin-bottom: 9px; padding: 5px 8px; border-radius: 9px; color: #388364; background: rgba(255,255,255,.7); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.style-showcase-copy strong { font-size: 24px; line-height: 1.03; letter-spacing: -.04em; }
.style-showcase-copy small { margin-top: 11px; color: #668074; font-size: 11px; line-height: 1.4; }
.style-showcase > img { position: absolute; z-index: 1; width: 61%; height: 100%; right: -10px; bottom: -3px; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 8px 11px rgba(61,58,45,.1)); }
.library-subtitle { margin: 30px 2px 13px; display: flex; align-items: baseline; justify-content: space-between; }
.library-subtitle h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.library-subtitle span { color: var(--muted); font-size: 12px; }
.sticker-pack-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pack-card { min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 23px; background: #fff; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.pack-cover { position: relative; height: 142px; display: block; overflow: hidden; background: linear-gradient(145deg,#dff6ea,#edf7de); }
.pack-cover::before, .pack-cover::after { position: absolute; z-index: 1; display: grid; place-items: center; width: 39px; height: 39px; border: 3px solid #fff; border-radius: 50%; background: #ffd966; box-shadow: 0 5px 12px rgba(38,44,53,.14); font-size: 19px; }
.pack-cover::before { content: "♡"; top: 17px; right: 14px; transform: rotate(9deg); }
.pack-cover::after { content: "!"; right: 25px; bottom: 16px; color: #fff; background: #704ff0; transform: rotate(-8deg); font-weight: 900; }
.pack-source { position: absolute; z-index: 2; width: 104px; height: 104px; left: 12px; bottom: -8px; border: 5px solid #fff; border-radius: 46% 46% 38% 38%; object-fit: cover; box-shadow: 0 8px 18px rgba(38,44,53,.16); transform: rotate(-3deg); }
.pack-placeholder { position: absolute; z-index: 2; width: 104px; height: 104px; left: 12px; bottom: -8px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 46% 46% 38% 38%; color: #6652e6; background: #e8e2ff; font-size: 42px; box-shadow: 0 8px 18px rgba(38,44,53,.16); transform: rotate(-3deg); }
.pack-info { padding: 13px 14px 14px; display: block; }
.pack-info strong, .pack-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-info strong { font-size: 14px; letter-spacing: -.02em; }
.pack-info small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.pack-progress { height: 4px; margin-top: 9px; display: block; overflow: hidden; border-radius: 99px; background: #ecebf2; }
.pack-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5362f7,#8b51ed); transition: width .35s ease; }
.pack-source.generated { width: 128px; height: 128px; left: 5px; bottom: -8px; border: 0; border-radius: 0; object-fit: contain; box-shadow: none; filter: drop-shadow(0 8px 12px rgba(38,44,53,.14)); }
.library-empty { padding: 28px 24px; border: 1px dashed #d4d0e7; border-radius: 25px; background: rgba(255,255,255,.45); text-align: center; }
.library-empty > span { color: #7257ee; font-size: 25px; }
.library-empty > strong { margin-top: 8px; display: block; font-size: 16px; }
.library-empty p { max-width: 310px; margin: 7px auto 16px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.library-empty .primary-button { min-height: 42px; padding: 0 17px; border-radius: 14px; font-size: 12px; }
.editor-heading { padding: 27px 5px 5px; text-align: center; }
.editor-heading h1 { font-size: 35px; line-height: 1.02; }
.editor-heading p { max-width: 370px; margin: 13px auto 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dropzone { position: relative; min-height: 166px; padding: 22px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #b9adE8; border-radius: 25px; background: #fff; text-align: center; cursor: pointer; }
.dropzone input { display: none; }
.dropzone strong { position: relative; z-index: 2; font-size: 15px; }
.dropzone > span:not(.photo-add-icon) { position: relative; z-index: 2; margin-top: 5px; color: var(--muted); font-size: 11px; }
.photo-add-icon { position: relative; z-index: 2; margin-bottom: 8px; color: #6b55e8; background: transparent; font-size: 28px; font-weight: 300; line-height: 1; }
.preview-strip { position: absolute; z-index: 1; inset: 0; margin: 0; }
.preview-strip img { width: 100%; height: 100%; object-fit: cover; }
.sticker-photo.has-photo::after { content: "Изменить фото"; position: absolute; z-index: 3; right: 10px; bottom: 10px; padding: 6px 9px; border-radius: 10px; color: #fff; background: rgba(22,22,27,.62); backdrop-filter: blur(10px); font-size: 10px; font-weight: 700; }
.sticker-photo.has-photo .photo-add-icon, .sticker-photo.has-photo > strong, .sticker-photo.has-photo > span:not(.photo-add-icon) { opacity: 0; }
.field-label { margin-top: 18px; display: grid; gap: 8px; color: #626269; font-size: 11px; font-weight: 750; }
.field-label textarea, .field-label input { width: 100%; padding: 14px 15px; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: var(--shadow); outline: 0; font-size: 14px; line-height: 1.5; }
.field-label textarea { resize: vertical; }
.field-help { margin: -1px 4px 0; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.4; }
.compact-field { margin-top: 22px; }
.style-note { margin-top: 18px; padding: 11px; display: grid; grid-template-columns: 66px 1fr; gap: 12px; align-items: center; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.style-note img { width: 66px; height: 66px; border-radius: 15px; background: linear-gradient(135deg,#dff6ea,#eef7df); object-fit: contain; }
.style-note strong, .style-note span { display: block; }
.style-note strong { font-size: 13px; }
.style-note span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.sticker-generation { margin-top: 18px; padding: 17px; border-radius: 22px; color: #fff; background: #22232d; box-shadow: 0 14px 32px rgba(28,29,46,.18); }
.sticker-generation.failed { background: #342529; }
.sticker-generation.ready { color: var(--ink); background: #fff; }
.generation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.generation-head small, .generation-head strong { display: block; }
.generation-head small { margin-bottom: 5px; color: #aaa4ff; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.generation-head strong { font-size: 14px; line-height: 1.3; }
.generation-head b { color: #c8c4ff; font-size: 22px; letter-spacing: -.04em; }
.sticker-generation.ready .generation-head small, .sticker-generation.ready .generation-head b { color: #26a56b; }
.sticker-generation.failed .generation-head small, .sticker-generation.failed .generation-head b { color: #ff9ca8; }
.generation-track { height: 7px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.11); }
.generation-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#6672ff,#b06eff); transition: width .45s ease; }
.sticker-generation.ready .generation-track { background: #edf0ed; }
.sticker-generation.ready .generation-track span { background: linear-gradient(90deg,#28b776,#74d7a7); }
.sticker-generation > p { margin: 10px 0 0; color: rgba(255,255,255,.58); font-size: 10px; line-height: 1.45; }
.sticker-generation.ready > p { color: var(--muted); }
.generated-stickers { margin-top: 14px; display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.generated-stickers:empty { display: none; }
.generated-stickers figure { min-width: 0; margin: 0; padding: 5px; border-radius: 13px; background: rgba(255,255,255,.08); text-align: center; }
.sticker-generation.ready .generated-stickers figure { background: #f2f5f1; }
.generated-stickers img { width: 100%; aspect-ratio: 1; display: block; object-fit: contain; }
.generated-stickers figcaption { margin-top: 3px; overflow: hidden; color: rgba(255,255,255,.55); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.sticker-generation.ready .generated-stickers figcaption { color: #81838a; }
.draft-sticker-pick { position: relative; width: 100%; padding: 0; display: block; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.draft-sticker-pick:active { transform: scale(.96); }
.draft-sticker-pick:disabled { cursor: default; }
.draft-sticker-pick.selected { border-color: #5d58ee; background: #e8e7ff; }
.draft-sticker-check { position: absolute; z-index: 2; top: 4px; right: 4px; width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid rgba(38,38,47,.2); border-radius: 999px; color: transparent; background: rgba(255,255,255,.88); box-shadow: 0 2px 7px rgba(38,38,47,.12); font-size: 10px; font-weight: 900; }
.draft-sticker-pick.selected .draft-sticker-check { border-color: #5d58ee; color: #fff; background: #5d58ee; }
.regenerate-controls { margin-top: 13px; padding: 11px; display: grid; gap: 10px; border-radius: 14px; background: #f2f1ff; }
.regenerate-controls span { color: #69648f; font-size: 9px; line-height: 1.35; }
.regenerate-controls button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(135deg,#5865f2,#7952e9); font-size: 10px; font-weight: 800; cursor: pointer; }
.regenerate-controls button:disabled { color: #9a97ae; background: #e4e2ee; cursor: default; }
.regeneration-instruction { display: grid; gap: 6px; }
.regeneration-instruction > span { color: #45405f; font-size: 10px; font-weight: 800; }
.regeneration-instruction textarea { width: 100%; min-height: 76px; resize: vertical; padding: 10px 11px; border: 1px solid #d8d4f5; border-radius: 12px; outline: 0; color: var(--ink); background: #fff; font: inherit; font-size: 11px; line-height: 1.4; }
.regeneration-instruction textarea:focus { border-color: #6b61ed; box-shadow: 0 0 0 3px rgba(107,97,237,.12); }
.regeneration-actions { display: grid; gap: 9px; }
.draft-selection-buttons { display: grid; grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); gap: 8px; }
.regenerate-controls .delete-draft-stickers { color: #c24151; background: #fff; box-shadow: inset 0 0 0 1px #e4bdc4; }
.regenerate-controls .delete-draft-stickers:disabled { color: #aaa4ad; background: #ebe8ee; box-shadow: none; }
.sticker-publish { margin-top: 14px; padding: 13px; display: grid; gap: 11px; border-radius: 17px; background: #f2f5f1; }
.sticker-publish strong, .sticker-publish span { display: block; }
.sticker-publish strong { color: var(--ink); font-size: 13px; }
.sticker-publish span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.sticker-publish button { min-height: 44px; border: 0; border-radius: 14px; color: #fff; background: #229ed9; font-size: 12px; font-weight: 800; cursor: pointer; }
.sticker-publish button:disabled { opacity: .55; cursor: default; }
.sticker-publish.published { background: #edf8f2; }
.sticker-publish.failed { background: #fff0f1; }
.quantity { margin: 18px 0; display: flex; align-items: center; justify-content: space-between; color: #626269; font-size: 12px; font-weight: 750; }
.quantity-options { padding: 3px; display: flex; align-items: center; gap: 2px; border-radius: 13px; background: #e8e8ed; }
.quantity button { min-width: 43px; padding: 7px 11px; border: 0; border-radius: 10px; background: transparent; font-size: 12px; cursor: pointer; }
.quantity button.active { color: #fff; background: #24242b; }
.quantity-custom { height: 31px; margin-left: 2px; padding: 0 8px 0 3px; display: flex; align-items: center; gap: 3px; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(34,34,43,.08); }
.quantity-custom input { width: 36px; padding: 0; border: 0; outline: 0; color: #24242b; background: transparent; font: inherit; font-weight: 800; text-align: center; appearance: textfield; }
.quantity-custom input::-webkit-inner-spin-button, .quantity-custom input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.quantity-custom small { color: #97979f; font-size: 9px; font-weight: 700; }
.editor-actions { display: grid; grid-template-columns: .72fr 1.28fr; gap: 9px; }
.editor-actions .primary-button, .save-pack-button { min-height: 48px; border: 0; border-radius: 15px; font-size: 12px; font-weight: 750; cursor: pointer; }
.save-pack-button { color: #5e55a2; background: #e8e5f6; }
.editor-actions button:disabled { opacity: .55; }
.saved-sticker-library { margin-top: 18px; padding: 17px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.saved-sticker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.saved-sticker-head small, .saved-sticker-head strong { display: block; }
.saved-sticker-head small { margin-bottom: 5px; color: #26a56b; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.saved-sticker-head strong { font-size: 16px; }
.saved-sticker-head b { min-width: 34px; height: 34px; padding: 0 9px; display: grid; place-items: center; border-radius: 12px; color: #21865b; background: #eaf8f1; font-size: 14px; }
.saved-sticker-library > p { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.saved-stickers { grid-template-columns: repeat(3,1fr); }
.saved-stickers figure { background: #f2f5f1; }
.saved-stickers figcaption { color: #81838a; }
.wide { width: 100%; min-height: 50px; }

.access-gate { position: fixed; z-index: 100; inset: 0; padding: 28px; display: grid; place-items: center; background: var(--bg); }
.access-gate > div { width: min(100%, 390px); padding: 34px 28px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.access-gate > div > span { color: var(--violet); font-size: 36px; }
.access-gate h1 { margin: 12px 0 8px; font-size: 28px; letter-spacing: -.04em; }
.access-gate p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.access-gate strong { color: var(--ink); }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(102px + var(--safe-bottom)); max-width: min(380px, calc(100% - 40px)); padding: 12px 16px; border-radius: 16px; color: #fff; background: rgba(25,25,31,.94); box-shadow: 0 15px 40px rgba(0,0,0,.2); transform: translate(-50%, 14px); opacity: 0; pointer-events: none; transition: .24s; font-size: 13px; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes float { 0%,100% { transform: translateX(-50%) translateY(0) rotate(-2deg); } 50% { transform: translateX(-50%) translateY(-7px) rotate(1deg); } }

@media (min-width: 620px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100svh - 44px); border-radius: 42px; box-shadow: 0 24px 80px rgba(22,22,37,.16); }
  .bottom-nav { bottom: 32px; }
  .composer-sheet { bottom: 22px; border-radius: 32px; }
  .model-sheet { bottom: 22px; border-radius: 32px; }
  .project-sheet { bottom: 22px; border-radius: 32px; }
}

@media (max-width: 390px) {
  .hero { height: 364px; padding-left: 16px; padding-right: 16px; }
  .content, .profile-content, .studio { padding-left: 16px; padding-right: 16px; }
  .project-tabs { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .ask-button { left: 16px; right: 16px; }
  .context-nav { left: 16px; }
  .action-row, .agent-row, .recent-item { padding-left: 15px; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; }
  .action-row::after, .agent-row::after, .recent-item::after { left: 61px; }
  .regeneration-actions { grid-template-columns: 1fr; }
  .regeneration-actions button { width: 100%; }
}

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