:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef4f0;
  --text: #18212f;
  --muted: #667085;
  --line: #d7dee8;
  --blue: #2764f4;
  --green: #00a982;
  --amber: #f59e0b;
  --red: #ef4444;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --orange: #f97316;
  --brand: #2764f4;
  --accent: #00a982;
  --warm: #f59e0b;
  --shadow: 0 16px 42px rgba(20, 32, 54, 0.12);
  --color-soft-blue: rgba(39, 100, 244, 0.12);
  --color-soft-green: rgba(0, 169, 130, 0.13);
  --color-soft-amber: rgba(245, 158, 11, 0.15);
  --color-soft-pink: rgba(236, 72, 153, 0.12);
  --color-soft-cyan: rgba(6, 182, 212, 0.13);
}

/* 豆包式 AI 会话：保留熟悉的顶部工具栏、消息区和底部输入区。 */
.app-shell.ai-conversation-shell-layout {
  grid-template-rows: 1fr;
}

.app-shell.ai-conversation-shell-layout .app-header,
.app-shell.ai-conversation-shell-layout .tabbar {
  display: none;
}

.app-shell.ai-conversation-shell-layout .view {
  padding: 0;
}

.app-shell.ai-conversation-shell-layout .global-voice-dock,
.app-shell.ai-conversation-shell-layout .global-voice-result {
  display: none !important;
}

.ai-conversation-screen {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  background: #fff;
  color: #101828;
}

.ai-conversation-topbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #edf0f4;
  background: rgba(255, 255, 255, 0.96);
}

.ai-conversation-brand {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.ai-conversation-brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.ai-conversation-brand span {
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.2;
}

.ai-conversation-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.ai-conversation-icon-btn,
.ai-conversation-compose-icon,
.ai-conversation-send {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1d2939;
}

.ai-conversation-icon-btn:hover,
.ai-conversation-icon-btn:focus-visible,
.ai-conversation-compose-icon:hover,
.ai-conversation-compose-icon:focus-within {
  background: #f2f4f7;
}

.ai-conversation-icon-btn.active {
  color: #2764f4;
  background: #eef4ff;
}

.ai-conversation-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 14px max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.ai-conversation-modebar {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  width: min(100%, 340px);
  margin: 10px auto 0;
  padding: 3px;
  border: 1px solid #eaecf0;
  border-radius: 999px;
  background: #f8fafc;
}

.ai-conversation-modebar button {
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  font-size: 13px;
}

.ai-conversation-modebar button.active {
  background: #fff;
  color: #101828;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  font-weight: 700;
}

.ai-conversation-thread {
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  overflow-y: auto;
  padding: 12px 2px 4px;
  scrollbar-width: thin;
}

.ai-conversation-welcome {
  display: grid;
  gap: 6px;
  margin: 12px 0 4px;
  color: #667085;
  text-align: center;
  font-size: 14px;
}

.ai-conversation-welcome strong {
  color: #101828;
  font-size: 20px;
}

.ai-conversation-quick-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.ai-conversation-quick-list button {
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  text-align: left;
  font-size: 14px;
}

.ai-conversation-quick-list button:hover,
.ai-conversation-quick-list button:focus-visible {
  border-color: #98a2b3;
  background: #f9fafb;
}

.ai-conversation-message {
  width: min(88%, 640px);
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: #f2f4f7;
  box-shadow: none;
}

.ai-conversation-message.user {
  border: 0;
  background: #eaf4ff;
}

.ai-conversation-message.assistant {
  border: 0;
  background: #f2f4f7;
}

.ai-conversation-message p {
  white-space: pre-wrap;
  line-height: 1.7;
}

.ai-conversation-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ai-conversation-media img,
.ai-conversation-media video {
  width: min(100%, 220px);
  max-height: 220px;
  border-radius: 8px;
  object-fit: cover;
  background: #111827;
}

.ai-conversation-form {
  display: grid;
  gap: 8px;
  padding: 10px 0 0;
  border-top: 1px solid #eaecf0;
  background: #fff;
}

.ai-conversation-form textarea {
  min-height: 48px;
  max-height: 150px;
  padding: 10px 12px;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  background: #fff;
  resize: vertical;
}

.ai-conversation-compose-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
}

.ai-conversation-compose-icon {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.ai-conversation-compose-icon input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ai-conversation-voice-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 12px;
}

.ai-conversation-send {
  margin-left: auto;
  background: #2764f4;
  color: #fff;
}

.ai-conversation-send:disabled {
  opacity: 0.45;
}

.ai-conversation-privacy {
  color: #98a2b3;
  font-size: 11px;
  text-align: center;
}

.ai-conversation-live-panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #f8fafc;
}

.ai-conversation-live-panel video {
  display: none;
  width: 112px;
  height: 82px;
  border-radius: 8px;
  object-fit: cover;
  background: #101828;
}

.ai-conversation-live-panel.open video {
  display: block;
}

.ai-conversation-live-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ai-conversation-live-copy span,
.ai-conversation-listening span {
  color: #667085;
  font-size: 12px;
}

.ai-conversation-live-actions {
  display: grid;
  gap: 6px;
}

.ai-conversation-listening {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 169, 130, 0.3);
  border-radius: 12px;
  background: rgba(0, 169, 130, 0.08);
}

.ai-conversation-listening .btn {
  margin-left: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.ai-listening-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00a982;
  box-shadow: 0 0 0 5px rgba(0, 169, 130, 0.12);
}

.ai-conversation-image-draft {
  position: relative;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
}

.ai-conversation-image-draft video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101828;
}

.ai-conversation-video-label {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(16, 24, 40, 0.72);
  color: #fff;
  font-size: 10px;
}

.ai-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-block;
}

.ai-icon-back::before { content: "←"; font-size: 25px; line-height: 18px; }
.ai-icon-plus::before { content: "+"; font-size: 28px; line-height: 17px; font-weight: 400; }
.ai-icon-phone::before { content: "☎"; font-size: 21px; line-height: 20px; }
.ai-icon-speaker::before { content: "◖"; font-size: 25px; line-height: 18px; }
.ai-icon-camera::before { content: "▣"; font-size: 23px; line-height: 20px; }
.ai-icon-video::before { content: "▶"; font-size: 18px; line-height: 20px; }
.ai-icon-mic::before { content: "●"; font-size: 15px; line-height: 20px; }
.ai-icon-send::before { content: "↑"; font-size: 23px; line-height: 18px; }

@media (max-width: 560px) {
  .ai-conversation-topbar {
    grid-template-columns: 38px minmax(0, 1fr) 78px;
    padding: 0 10px;
  }

  .ai-conversation-brand strong { font-size: 17px; }
  .ai-conversation-brand span { font-size: 10px; }
  .ai-conversation-body { padding-inline: 10px; }
  .ai-conversation-live-panel { grid-template-columns: 1fr; }
  .ai-conversation-live-panel video { width: 100%; height: min(34vh, 220px); }
  .ai-conversation-live-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-conversation-live-actions .btn { width: 100%; }
  .ai-conversation-listening { align-items: flex-start; flex-wrap: wrap; }
  .ai-conversation-listening span { flex: 1 1 180px; }
  .ai-conversation-listening .btn { margin-left: 0; }
  .ai-conversation-privacy { line-height: 1.4; }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body.dark {
  color-scheme: dark;
  --bg: #101418;
  --surface: #171d24;
  --surface-2: #202a25;
  --text: #edf2f7;
  --muted: #a4adbb;
  --line: #2e3948;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  --color-soft-blue: rgba(80, 130, 255, 0.18);
  --color-soft-green: rgba(28, 193, 144, 0.16);
  --color-soft-amber: rgba(245, 158, 11, 0.18);
  --color-soft-pink: rgba(236, 72, 153, 0.16);
  --color-soft-cyan: rgba(6, 182, 212, 0.16);
}

body.creative-ui {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: rgba(235, 245, 241, 0.88);
  --text: #162033;
  --muted: #617083;
  --line: rgba(46, 67, 96, 0.16);
  --blue: #2f6df6;
  --green: #00a982;
  --amber: #f59e0b;
  --red: #ef4444;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --orange: #f97316;
  --brand: #2f6df6;
  --accent: #00a982;
  --warm: #f59e0b;
}

body.creative-ui.dark {
  --bg: #101722;
  --surface: rgba(23, 31, 43, 0.9);
  --surface-2: rgba(28, 43, 52, 0.88);
  --text: #f4f7fb;
  --muted: #a7b3c3;
  --line: rgba(180, 198, 220, 0.16);
}

body.map-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  touch-action: manipulation;
}

button {
  border: 0;
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fbff 0%, #edf5ef 100%);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: conic-gradient(from 140deg, var(--blue), var(--green), #f59e0b, var(--blue));
  color: white;
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px clamp(18px, 5vw, 72px) 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--brand);
  text-decoration: none;
}

.hero {
  min-height: min(760px, calc(100vh - 65px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(34px, 7vw, 96px) clamp(18px, 5vw, 72px) 42px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
}

.hero p {
  max-width: 640px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-switcher {
  margin: 0 0 10px;
}

.mode-switcher .segmented {
  background: var(--surface);
  border: 1px solid var(--line);
}

.standalone-notice {
  border-color: rgba(15, 143, 114, 0.28);
  background: linear-gradient(180deg, rgba(15, 143, 114, 0.08), var(--surface));
}

.standalone-summary-grid {
  margin-top: 14px;
}

.mode-settings-panel {
  display: grid;
  gap: 12px;
}

.mode-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mode-settings-head h3,
.mode-settings-head p {
  margin: 0;
}

.mode-current-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  font-size: 12px;
  font-weight: 800;
}

.mode-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.mode-card.active {
  border-color: rgba(236, 72, 153, 0.62);
  background:
    linear-gradient(135deg, var(--color-soft-pink), transparent 48%),
    linear-gradient(315deg, var(--color-soft-amber), transparent 64%),
    var(--surface);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.16);
}

.mode-card.active::after {
  content: "当前";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.mode-card:not(.active):hover,
.mode-card:not(.active):focus-visible {
  border-color: rgba(39, 100, 244, 0.42);
}

.file-list-item,
.file-card {
  cursor: pointer;
}

.file-list-item input,
.file-card input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.phone-preview {
  width: min(100%, 390px);
  aspect-ratio: 9 / 18;
  border: 10px solid #111827;
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 auto;
}

.phone-screen {
  height: 100%;
  display: grid;
  grid-template-rows: 56px 1fr 64px;
}

.preview-top {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.preview-map {
  position: relative;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(15, 143, 114, 0.08) 1px, transparent 1px),
    #f8fafc;
  background-size: 36px 36px;
}

.pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.pin.a {
  left: 24%;
  top: 28%;
  background: var(--blue);
}

.pin.b {
  left: 58%;
  top: 54%;
  background: var(--green);
}

.pin.c {
  left: 42%;
  top: 70%;
  background: var(--amber);
}

.preview-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.preview-tabs span {
  display: grid;
  place-items: center;
}

.section {
  padding: 44px clamp(18px, 5vw, 72px);
}

.section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.card,
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
}

.panel:nth-of-type(4n + 1) {
  border-top-color: rgba(39, 100, 244, 0.34);
}

.panel:nth-of-type(4n + 2) {
  border-top-color: rgba(0, 169, 130, 0.34);
}

.panel:nth-of-type(4n + 3) {
  border-top-color: rgba(245, 158, 11, 0.38);
}

.panel:nth-of-type(4n) {
  border-top-color: rgba(236, 72, 153, 0.3);
}

.card h3,
.panel h3 {
  margin: 0 0 8px;
}

.site-qr-card {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.site-qr-card p {
  margin: 0;
}

.site-poster-image {
  width: min(100%, 250px);
  aspect-ratio: 2 / 3;
  object-fit: contain;
  align-self: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: white;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(39, 100, 244, 0.18);
}

.btn.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.green {
  background: linear-gradient(135deg, var(--green), #059669);
  box-shadow: 0 8px 18px rgba(0, 169, 130, 0.18);
}

.btn.warn {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.18);
}

.btn.danger {
  background: linear-gradient(135deg, var(--red), #dc2626);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.18);
}

.app-shell {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 56px 1fr 64px;
  background: var(--bg);
}

.preview-build-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(180, 83, 9, 0.45);
  background: linear-gradient(135deg, #f97316, #c2410c);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(154, 52, 18, 0.2);
}

.preview-build-banner strong {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
}

.preview-build .preview-build-banner {
  display: flex;
}

.preview-build .app-shell,
.preview-build .app-shell.no-top-help {
  grid-template-rows: 36px 56px 1fr 64px;
}

.preview-build.ios-shell .app-shell.no-top-help {
  grid-template-rows: 36px 0 1fr 64px;
}

.creative-world {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(16, 163, 127, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(217, 144, 32, 0.05), transparent 60%);
}

body.creative-ui .app-shell {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04)),
    transparent;
}

body.creative-ui.dark .app-shell {
  background:
    linear-gradient(180deg, rgba(28, 39, 56, 0.72), rgba(16, 23, 34, 0.18)),
    transparent;
}

body.creative-ui .panel,
body.creative-ui .card,
body.creative-ui .list-item {
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(24, 38, 64, 0.12);
}

body.creative-ui .panel {
  transform: translateZ(0);
}

body.creative-ui .panel:hover {
  border-color: rgba(47, 109, 246, 0.28);
}

body.creative-ui .tabbar,
body.creative-ui .app-header,
body.creative-ui .more-menu {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.82);
}

body.creative-ui.dark .tabbar,
body.creative-ui.dark .app-header,
body.creative-ui.dark .more-menu {
  background: rgba(17, 25, 37, 0.82);
}

body.creative-ui .tabbar button.active {
  color: var(--pink);
}

body.creative-ui .tabbar button.active .icon {
  transform: translateY(-2px);
}

body.creative-ui .btn {
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.16);
}

body.creative-ui .btn.green {
  box-shadow: 0 8px 18px rgba(16, 163, 127, 0.16);
}

.creative-hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--color-soft-blue), transparent 42%),
    linear-gradient(315deg, var(--color-soft-pink), transparent 46%),
    linear-gradient(45deg, var(--color-soft-amber), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow);
}

.creative-hero-panel h2,
.creative-hero-panel p {
  margin: 6px 0 0;
}

.creative-hero-panel .btn {
  min-width: 104px;
}

.creative-glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.creative-glance div,
.creative-glance button {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--color-soft-blue), transparent 44%),
    var(--surface);
  color: var(--text);
  text-align: left;
}

.creative-glance > :nth-child(2) {
  background:
    linear-gradient(135deg, var(--color-soft-green), transparent 48%),
    var(--surface);
}

.creative-glance > :nth-child(3) {
  background:
    linear-gradient(135deg, var(--color-soft-amber), transparent 48%),
    var(--surface);
}

.creative-glance > :nth-child(4) {
  background:
    linear-gradient(135deg, var(--color-soft-pink), transparent 48%),
    var(--surface);
}

.creative-glance span,
.creative-glance small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.creative-glance strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-ai-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  border-top: 2px solid var(--color-green);
  background: var(--surface);
}

.creative-ai-entry div,
.ai-conversation-intro div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.creative-ai-entry span,
.ai-conversation-intro p,
.ai-conversation-camera span,
.ai-conversation-privacy {
  color: var(--muted);
  font-size: 13px;
}

.ai-conversation-shell {
  display: grid;
  gap: 12px;
  min-height: min(72vh, 760px);
}

.ai-conversation-intro,
.ai-conversation-notice,
.ai-conversation-camera,
.ai-conversation-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-conversation-intro {
  justify-content: space-between;
}

.ai-conversation-intro h3,
.ai-conversation-intro p,
.ai-conversation-message p,
.ai-conversation-privacy {
  margin: 0;
}

.ai-conversation-modes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-conversation-notice {
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ai-conversation-thread {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 2px 0;
}

.ai-conversation-message {
  width: min(88%, 620px);
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ai-conversation-message.user {
  justify-self: end;
  border-color: rgba(16, 163, 127, 0.32);
  background: var(--color-soft-green);
}

.ai-conversation-message.assistant {
  justify-self: start;
  background: var(--color-soft-blue);
}

.ai-conversation-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-conversation-message small {
  color: var(--muted);
  font-size: 12px;
}

.ai-conversation-replay {
  min-height: 30px;
  padding: 3px 8px;
  font-size: 12px;
}

.ai-conversation-thinking {
  justify-self: start;
  color: var(--muted);
  font-size: 13px;
}

.ai-conversation-camera {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.ai-conversation-camera video {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 34vh;
  min-height: 140px;
  margin-bottom: 8px;
  object-fit: cover;
  background: #111827;
}

.ai-conversation-camera:not(.open) video {
  display: none;
}

.ai-conversation-camera > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ai-conversation-form {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ai-conversation-form textarea {
  min-height: 92px;
  resize: vertical;
}

.ai-conversation-controls {
  justify-content: flex-end;
}

.ai-conversation-upload {
  position: relative;
  overflow: hidden;
}

.ai-conversation-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ai-conversation-image-drafts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-conversation-image-draft {
  position: relative;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ai-conversation-image-draft img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-conversation-image-draft .icon-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  background: var(--surface);
}

@media (max-width: 560px) {
  .creative-ai-entry,
  .ai-conversation-notice,
  .ai-conversation-camera {
    align-items: stretch;
    flex-direction: column;
  }

  .creative-ai-entry .btn,
  .ai-conversation-notice .btn,
  .ai-conversation-camera .btn {
    width: 100%;
  }

  .ai-conversation-camera {
    grid-template-columns: 1fr;
  }

  .ai-conversation-camera .btn {
    grid-column: auto;
  }
}

.creative-capability-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.creative-capability-row button {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(47, 109, 246, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--color-soft-blue), transparent 54%),
    var(--surface);
  color: var(--text);
  text-align: left;
}

.creative-capability-row button:nth-child(2) {
  border-color: rgba(16, 163, 127, 0.2);
  background:
    linear-gradient(135deg, var(--color-soft-green), transparent 56%),
    var(--surface);
}

.creative-capability-row button:nth-child(3) {
  border-color: rgba(245, 158, 11, 0.24);
  background:
    linear-gradient(135deg, var(--color-soft-amber), transparent 56%),
    var(--surface);
}

.creative-capability-row strong,
.creative-capability-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-capability-row span {
  color: var(--muted);
  font-size: 12px;
}

.creative-section {
  margin-top: 10px;
}

.creative-quiet-panel {
  display: grid;
  gap: 10px;
}

.creative-feed,
.creative-tool-grid {
  display: grid;
  gap: 8px;
}

.creative-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.creative-compact-grid .creative-tool {
  min-height: 72px;
}

.creative-feed-item,
.creative-tool {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 45%),
    var(--surface);
  color: var(--text);
  text-align: left;
}

.creative-tool:nth-child(4n + 1),
.creative-feed-item:nth-child(4n + 1) {
  border-color: rgba(39, 100, 244, 0.24);
  background:
    linear-gradient(135deg, var(--color-soft-blue), transparent 52%),
    var(--surface);
}

.creative-tool:nth-child(4n + 2),
.creative-feed-item:nth-child(4n + 2) {
  border-color: rgba(0, 169, 130, 0.24);
  background:
    linear-gradient(135deg, var(--color-soft-green), transparent 52%),
    var(--surface);
}

.creative-tool:nth-child(4n + 3),
.creative-feed-item:nth-child(4n + 3) {
  border-color: rgba(245, 158, 11, 0.26);
  background:
    linear-gradient(135deg, var(--color-soft-amber), transparent 52%),
    var(--surface);
}

.creative-tool:nth-child(4n),
.creative-feed-item:nth-child(4n) {
  border-color: rgba(236, 72, 153, 0.22);
  background:
    linear-gradient(135deg, var(--color-soft-pink), transparent 52%),
    var(--surface);
}

.creative-feed-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.creative-feed-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-feed-item span:not(.creative-dot):not(.badge) {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 13px;
}

.creative-feed-item small {
  grid-column: 2 / 4;
  color: var(--muted);
}

.creative-feed-item > .badge {
  grid-column: 3;
  grid-row: 1;
}

.swipe-list,
.swipe-row {
  min-width: 0;
}

.swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  touch-action: pan-y;
}

.swipe-content {
  position: relative;
  z-index: 2;
  min-width: 0;
  background: var(--surface);
  will-change: transform;
}

.swipe-content > .creative-feed-item,
.swipe-content > .list-item {
  width: 100%;
  margin: 0;
}

.swipe-delete {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  width: 88px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.swipe-delete:active {
  background: #b91c1c;
}

.todo-list-item.overdue,
.creative-feed-item.overdue,
.todo-detail-panel.overdue {
  border-color: rgba(100, 116, 139, 0.38);
  background:
    linear-gradient(135deg, rgba(100, 116, 139, 0.12), transparent 62%),
    var(--surface);
  color: var(--muted);
}

.creative-feed-item.overdue .creative-dot.todo {
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.todo-list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.todo-list-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overdue-time {
  color: var(--muted) !important;
  font-weight: 600;
}

.todo-overdue-callout {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 8px;
  background: rgba(100, 116, 139, 0.1);
  color: var(--muted);
  font-weight: 600;
}

.badge.overdue-muted {
  border: 1px solid rgba(100, 116, 139, 0.3);
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted);
}

@media (max-width: 760px) {
  .swipe-row .inline-list-delete {
    display: none;
  }
}

.creative-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.creative-dot.todo {
  background: var(--amber);
}

.creative-dot.health {
  background: var(--red);
}

.creative-dot.feedback {
  background: var(--blue);
}

.creative-scene {
  display: grid;
  gap: 10px;
}

.creative-scene-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.creative-scene-head h3,
.creative-scene-head p {
  margin: 0;
}

.creative-scene-head p {
  margin-top: 3px;
}

.creative-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.creative-summary-grid div,
.creative-summary-grid button {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--color-soft-cyan), transparent 56%),
    var(--surface-2);
  color: var(--text);
  text-align: left;
}

.creative-summary-grid button {
  width: 100%;
  cursor: pointer;
}

.creative-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.creative-summary-grid strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-records-panel,
.creative-health-history-panel,
.creative-help-panel,
.creative-share-panel {
  display: grid;
  gap: 10px;
}

.primary-page-head {
  display: grid;
  gap: 2px;
}

.primary-page-head small,
.primary-page-head p {
  margin: 0;
  color: var(--muted);
}

.primary-page-head small {
  font-size: 11px;
}

.primary-page-head h3 {
  margin: 0;
}

.creative-records-panel .segmented {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.creative-account-shortcut {
  width: 100%;
}

.creative-record-actions,
.creative-help-actions,
.creative-share-actions {
  margin-top: 0;
}

.share-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.share-qr-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: center;
}

.share-qr-item strong {
  font-size: 14px;
}

.share-poster {
  width: min(100%, 300px);
  aspect-ratio: 2 / 3;
  display: block;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.creative-help-list {
  display: grid;
  gap: 8px;
}

.creative-help-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.creative-help-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.compact-help-list .creative-help-item {
  padding: 10px 12px;
}

.creative-capture-shell {
  display: grid;
  min-height: 100%;
  align-content: center;
  padding: 12px 0;
}

.smart-assistant-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(47, 109, 246, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--color-soft-blue), transparent 46%),
    linear-gradient(315deg, var(--color-soft-green), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow);
}

.smart-assistant-heading,
.smart-assistant-result-head,
.creative-manual-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.smart-assistant-heading h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.smart-local-badge {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.smart-assistant-copy,
.smart-assistant-result p {
  margin: 0;
}

.smart-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
}

.smart-command-field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.6;
}

.smart-mic-button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 112px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}

.smart-mic-button small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.smart-mic-icon {
  position: relative;
  width: 18px;
  height: 28px;
  border: 3px solid currentColor;
  border-radius: 12px;
  margin-bottom: 11px;
}

.smart-mic-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 28px;
  height: 16px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 15px 15px;
  transform: translateX(-50%);
}

.smart-mic-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 3px;
  height: 7px;
  background: currentColor;
  transform: translateX(-50%);
}

.smart-mic-button.recording {
  background: #d64045;
}

[data-voice-hold="true"],
[data-voice-hold="true"] * {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

[data-voice-hold="true"].voice-pressing {
  transform: scale(0.96);
}

.scroll-view.has-global-voice {
  padding-bottom: 28px;
}

.global-voice-dock {
  position: fixed;
  left: 50%;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 16;
  width: 76px;
  height: 76px;
  transform: translateX(-50%);
  pointer-events: none;
}

.global-voice-input,
.global-voice-label,
.global-voice-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.global-voice-button {
  position: relative;
  width: 76px;
  height: 76px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #0f8f72;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 143, 114, 0.34);
  pointer-events: auto;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.global-voice-button .smart-mic-icon {
  margin: 0 0 11px;
}

.global-voice-button.recording {
  background: #e12632;
  box-shadow: 0 10px 30px rgba(225, 38, 50, 0.52), 0 0 0 8px rgba(225, 38, 50, 0.18);
  transform: scale(1.09);
}

.global-voice-button .wake-word-indicator {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f3a712;
  box-shadow: 0 0 0 3px rgba(243, 167, 18, 0.2);
}

.global-voice-button.wake-enabled .wake-word-indicator {
  display: block;
}

.global-voice-button.wake-listening:not(.recording) {
  box-shadow: 0 10px 24px rgba(15, 143, 114, 0.34), 0 0 0 6px rgba(243, 167, 18, 0.16);
}

.global-voice-button.wake-listening:not(.recording) .wake-word-indicator {
  animation: wake-word-listening 1.6s ease-in-out infinite;
}

.global-voice-button.recording .wake-word-indicator {
  display: none;
}

.global-voice-button.recording::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 4px solid rgba(225, 38, 50, 0.58);
  border-radius: 50%;
  animation: voice-recording-pulse 1s ease-out infinite;
}

.global-voice-button.recording .smart-mic-icon {
  width: 25px;
  height: 25px;
  margin: 0;
  border: 0;
  border-radius: 5px;
  background: currentColor;
}

.global-voice-button.recording .smart-mic-icon::before,
.global-voice-button.recording .smart-mic-icon::after,
.global-voice-button.recording-finished .smart-mic-icon::before,
.global-voice-button.recording-finished .smart-mic-icon::after {
  display: none;
}

.global-voice-button.recording-finished {
  background: #16a36f;
  box-shadow: 0 8px 26px rgba(22, 163, 111, 0.48), 0 0 0 7px rgba(22, 163, 111, 0.18);
  animation: voice-recording-finished 750ms ease both;
}

.global-voice-button.recording-finished .smart-mic-icon {
  width: 27px;
  height: 15px;
  margin: -6px 0 0;
  border: 0;
  border-left: 5px solid currentColor;
  border-bottom: 5px solid currentColor;
  border-radius: 2px;
  transform: rotate(-45deg);
}

@keyframes voice-recording-pulse {
  0% { transform: scale(0.88); opacity: 0.95; }
  100% { transform: scale(1.24); opacity: 0; }
}

@keyframes voice-recording-finished {
  0% { transform: scale(0.94); }
  42% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes wake-word-listening {
  0%, 100% { transform: scale(0.88); opacity: 0.72; }
  50% { transform: scale(1.16); opacity: 1; }
}

.global-voice-button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.global-voice-status:empty {
  display: none;
}

.global-voice-result {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  width: min(520px, calc(100vw - 24px));
  max-height: min(42vh, 340px);
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(24, 38, 64, 0.2);
}

.global-voice-result:empty {
  display: none;
}

.global-voice-result .smart-assistant-result {
  margin: 0;
  border: 0;
  box-shadow: none;
}

.creative-capture-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.creative-capture-import > div {
  display: grid;
  gap: 3px;
}

.creative-capture-import span,
.creative-capture-import p {
  color: var(--muted);
  font-size: 12px;
}

.smart-photo-button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(47, 109, 246, 0.35);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.smart-photo-button::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 14px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 7px var(--blue);
}

.smart-photo-button strong {
  margin-right: auto;
}

.smart-photo-button span,
.smart-photo-status {
  color: var(--muted);
  font-size: 12px;
}

.smart-photo-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.smart-photo-status {
  grid-column: 1 / -1;
  margin: -2px 0 0;
}

.smart-example-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.smart-example-row button {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
}

.smart-analyze-button {
  grid-column: 1 / -1;
}

.smart-assistant-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-left: 4px solid var(--green);
  background: var(--surface-2);
}

.smart-assistant-result.needs-input {
  border-left-color: var(--amber);
}

.assistant-qa-answer {
  white-space: pre-line;
  line-height: 1.7;
}

.creative-manual-heading {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.creative-manual-heading strong {
  color: var(--text);
}

.creative-capture-form {
  gap: 10px;
}

.creative-capture-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.creative-first-line input {
  min-height: 52px;
  font-size: 18px;
  font-weight: 800;
}

.creative-capture-card textarea {
  min-height: 132px;
}

.creative-capture-form:not(.has-content) .rich-tools,
.creative-capture-form:not(.has-content) .editor-preview-block,
.creative-capture-form:not(.has-content) .creative-progressive,
.creative-capture-form:not(.has-content) .creative-submit {
  display: none;
}

.creative-progressive {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.creative-kind-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.creative-kind-switch button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.creative-kind-switch button.active {
  border-color: rgba(16, 163, 127, 0.42);
  background: rgba(16, 163, 127, 0.12);
  color: var(--green);
}

.creative-details {
  display: grid;
  gap: 10px;
}

.creative-soft-note {
  margin: 0;
}

.creative-submit {
  width: 100%;
}

.creative-auth-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

body.auth-entry .app-shell.no-top-help {
  /* Header and tabbar are display:none in auth mode, so only the view remains. */
  grid-template-rows: minmax(0, 1fr);
}

body.preview-build.auth-entry .app-shell.no-top-help {
  /* Keep the preview marker, then let the auth view own the remaining height. */
  grid-template-rows: 36px minmax(0, 1fr);
}

body.auth-entry .app-header,
.tabbar[hidden] {
  display: none !important;
}

body.auth-entry .view {
  padding: 14px 16px 20px;
}

body.auth-entry .scroll-view {
  overflow-anchor: none;
}

.auth-mode-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-mode-fallback p {
  margin: 4px 0 0;
  color: var(--muted);
}

.auth-mode-fallback .btn {
  flex: 0 0 auto;
}

.creative-auth-intro {
  display: grid;
  gap: 6px;
  padding: 4px 2px;
}

.creative-auth-intro h2,
.creative-auth-intro p,
.creative-auth-title h3 {
  margin: 0;
}

.creative-auth-intro h2 {
  font-size: 28px;
  line-height: 1.2;
}

.creative-auth-panel {
  display: grid;
  gap: 12px;
}

.creative-auth-form {
  gap: 11px;
}

.creative-auth-title {
  justify-content: flex-start;
}

.creative-auth-actions {
  margin-top: 0;
}

.creative-auth-legal {
  text-align: center;
}

.auth-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auth-feature-strip span {
  display: grid;
  gap: 3px;
  min-height: 70px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(16, 163, 127, 0.14), rgba(37, 99, 235, 0.10));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-feature-strip span:nth-child(2) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(245, 158, 11, 0.12));
}

.auth-feature-strip span:nth-child(3) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(16, 163, 127, 0.10));
}

.auth-feature-strip strong {
  color: var(--text);
}

.legal-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.legal-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.legal-consent a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.startup-privacy-consent {
  margin: 12px 0;
  border-color: rgba(47, 109, 246, 0.28);
  background:
    linear-gradient(135deg, var(--color-soft-blue), transparent 54%),
    var(--surface);
}

.creative-feedback-panel {
  display: grid;
  gap: 10px;
}

.creative-feedback-form textarea {
  min-height: 150px;
}

.creative-feedback-list {
  display: grid;
  gap: 8px;
}

.creative-feedback-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.creative-feedback-item p {
  margin: 0;
  color: var(--muted);
}

.creative-inbox-hero {
  display: grid;
  gap: 12px;
}

.creative-inbox-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.creative-inbox-summary div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.creative-inbox-summary span {
  color: var(--muted);
  font-size: 12px;
}

.creative-inbox-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-inbox-actions {
  margin-top: 0;
}

.creative-inbox-list {
  display: grid;
  gap: 8px;
}

.creative-inbox-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.creative-inbox-item.unread {
  border-color: rgba(47, 109, 246, 0.34);
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.08), transparent 50%),
    var(--surface);
}

.creative-inbox-item-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.creative-inbox-item-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-dot.inbox {
  background: var(--muted);
}

.creative-dot.inbox.unread {
  background: var(--blue);
}

.creative-inbox-item p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.creative-inbox-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.creative-settings-panel {
  display: grid;
  gap: 12px;
}

.creative-settings-panel h3,
.creative-settings-panel p {
  margin: 0;
}

.creative-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.creative-settings-card {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.creative-settings-card span,
.creative-settings-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.creative-settings-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-control-list,
.settings-permission-list,
.settings-choice-group,
.settings-diagnostics {
  display: grid;
  gap: 8px;
}

.settings-toggle-row,
.settings-choice-row,
.settings-permission-state {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.settings-toggle-row input,
.settings-choice-row input,
.settings-permission-state input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.settings-toggle-row > span,
.settings-choice-row > span,
.settings-permission-state > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-toggle-row small,
.settings-choice-row small,
.settings-permission-state small,
.settings-alarm-test span,
.settings-inline-status {
  color: var(--muted);
  line-height: 1.45;
}

.settings-toggle-row.disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.settings-choice-row.selected {
  border-color: rgba(47, 109, 246, 0.55);
  background: var(--color-soft-blue);
}

.settings-permission-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-permission-state {
  flex: 1 1 auto;
  cursor: default;
}

.settings-permission-row .btn,
.settings-permission-row .badge {
  flex: 0 0 auto;
}

.settings-subgroup {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.settings-inline-status {
  margin: 0;
  padding: 0 12px;
  font-size: 13px;
}

.settings-alarm-test {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-diagnostics {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.settings-diagnostic-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.settings-diagnostic-row small {
  flex: 0 0 auto;
  color: var(--muted);
}

.settings-diagnostic-row.warning {
  color: #9a6700;
}

.settings-diagnostic-row.error {
  color: var(--danger);
}

.settings-external-bindings {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.settings-external-bindings-head,
.settings-external-binding-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-external-bindings-head > span,
.settings-external-binding-row > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-external-bindings small {
  color: var(--muted);
  line-height: 1.45;
}

.settings-external-binding-row {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.settings-external-bindings .btn {
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .settings-external-bindings-head,
  .settings-external-binding-row {
    align-items: flex-start;
  }
}

.creative-detail-panel {
  display: grid;
  gap: 12px;
}

.creative-detail-head {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.creative-detail-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.creative-detail-body {
  margin: 0;
  min-height: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.7;
}

.creative-detail-actions {
  margin-top: 0;
}

.creative-health-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.creative-health-metric {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.creative-health-metric span {
  color: var(--muted);
  font-size: 12px;
}

.creative-health-metric strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-account-card {
  display: grid;
  gap: 10px;
}

.creative-profile-panel,
.creative-services-panel {
  display: grid;
  gap: 12px;
}

.creative-profile-form {
  gap: 12px;
}

.creative-avatar-editor {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.creative-profile-entry {
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

.creative-account-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.creative-account-stat {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
}

.creative-account-stat span,
.creative-account-stat small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.creative-account-stat strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-account-actions {
  margin-top: 0;
}

.creative-resource-hub {
  display: grid;
  gap: 12px;
}

.creative-resource-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.creative-resource-head h3,
.creative-resource-head p,
.creative-resource-card h4,
.creative-resource-card p {
  margin: 0;
}

.creative-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.creative-resource-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.creative-resource-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.creative-resource-value {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 2px 0;
}

.creative-resource-value span {
  color: var(--muted);
  font-size: 12px;
}

.creative-resource-value strong,
.creative-service-main strong,
.creative-service-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-resource-actions {
  gap: 8px;
}

.creative-space-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.creative-space-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.creative-service-card {
  grid-column: span 2;
}

.creative-service-shelf {
  display: grid;
  gap: 8px;
}

.creative-service-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.creative-service-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.creative-service-main span {
  color: var(--muted);
  font-size: 12px;
}

.creative-service-main:hover strong,
.creative-service-main:focus-visible strong {
  color: var(--blue);
}

.creative-guard-panel {
  display: grid;
  gap: 10px;
}

.creative-guard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.creative-guard-stats div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.creative-guard-stats span,
.creative-member-item span,
.creative-group-item span {
  color: var(--muted);
  font-size: 12px;
}

.creative-guard-stats strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-guard-map {
  min-height: 230px;
}

.creative-guard-actions {
  margin-top: 0;
}

.creative-guard-detail-panel {
  gap: 12px;
}

.creative-member-list,
.creative-group-list {
  display: grid;
  gap: 8px;
}

.creative-member-item,
.creative-group-item {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.creative-member-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.creative-member-detail-item span:not(.badge) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.creative-member-item div,
.creative-group-item {
  min-width: 0;
}

.creative-member-item strong,
.creative-member-item span,
.creative-group-item strong,
.creative-group-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-group-item {
  text-align: left;
}

.creative-group-item.active {
  border-color: rgba(47, 109, 246, 0.42);
  background: rgba(47, 109, 246, 0.1);
}

.ui-mode-panel .segmented {
  margin-top: 8px;
}

.app-shell.no-top-help {
  grid-template-rows: 56px 1fr 64px;
}

.app-shell.no-top-help .app-header {
  visibility: hidden;
  pointer-events: none;
}

body.ios-shell .app-shell.no-top-help {
  grid-template-rows: 0 1fr 64px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.app-title {
  min-width: 0;
}

.app-title strong,
.app-title span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-title span {
  color: var(--muted);
  font-size: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-weight: 800;
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  flex: 0 0 auto;
}

.icon-account {
  -webkit-mask: url("../icons/nav-account.svg") center / contain no-repeat;
  mask: url("../icons/nav-account.svg") center / contain no-repeat;
}

.icon-location {
  -webkit-mask: url("../icons/nav-location.svg") center / contain no-repeat;
  mask: url("../icons/nav-location.svg") center / contain no-repeat;
}

.icon-memo {
  -webkit-mask: url("../icons/nav-memo.svg") center / contain no-repeat;
  mask: url("../icons/nav-memo.svg") center / contain no-repeat;
}

.icon-health {
  -webkit-mask: url("../icons/nav-health.svg") center / contain no-repeat;
  mask: url("../icons/nav-health.svg") center / contain no-repeat;
}

.icon-more {
  -webkit-mask: url("../icons/nav-more.svg") center / contain no-repeat;
  mask: url("../icons/nav-more.svg") center / contain no-repeat;
}

.icon-plus {
  -webkit-mask: url("../icons/action-plus.svg") center / contain no-repeat;
  mask: url("../icons/action-plus.svg") center / contain no-repeat;
}

.icon-trash {
  -webkit-mask: url("../icons/action-trash.svg") center / contain no-repeat;
  mask: url("../icons/action-trash.svg") center / contain no-repeat;
}

.icon-close {
  -webkit-mask: url("../icons/action-close.svg") center / contain no-repeat;
  mask: url("../icons/action-close.svg") center / contain no-repeat;
}

.icon-help {
  -webkit-mask: url("../icons/action-help.svg") center / contain no-repeat;
  mask: url("../icons/action-help.svg") center / contain no-repeat;
}

.icon-settings {
  -webkit-mask: url("../icons/action-settings.svg") center / contain no-repeat;
  mask: url("../icons/action-settings.svg") center / contain no-repeat;
}

.view {
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.scroll-view {
  height: 100%;
  overflow: auto;
  padding-bottom: 14px;
}

.tabbar {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tabbar button {
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 6px 2px;
  min-width: 0;
  opacity: 1;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.tabbar button.active {
  color: var(--blue);
  font-weight: 800;
}

.tabbar button[disabled] {
  opacity: 1;
  pointer-events: auto;
}

.tabbar button.nav-voice-gap {
  visibility: hidden;
  pointer-events: none;
}

.tabbar i {
  font-style: normal;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 10px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 52%),
    var(--surface);
  border-radius: 8px;
}

.list-item::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.72;
}

.list-item:nth-child(4n + 2)::before {
  background: var(--green);
}

.list-item:nth-child(4n + 3)::before {
  background: var(--amber);
}

.list-item:nth-child(4n)::before {
  background: var(--pink);
}

.list-button {
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.list-button:hover,
.list-button:focus-visible {
  border-color: var(--blue);
}

.service-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.service-main:hover strong,
.service-main:focus-visible strong {
  color: var(--blue);
}

.service-main .item-meta {
  overflow-wrap: anywhere;
}

.list-title-button {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  flex: 1 1 auto;
}

.list-title-button strong,
.list-title-button span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.list-item.highlight {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(15, 143, 114, 0.14);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subpage-head {
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.subpage-head > .btn {
  flex: 0 0 auto;
}

.subpage-title {
  display: grid;
  gap: 2px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.subpage-title small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.subpage-title h3 {
  margin: 0;
  line-height: 1.25;
}

.compact-actions {
  gap: 8px;
  flex-wrap: nowrap;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

.admin-data-tabs {
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
}

.resume-list {
  display: grid;
  gap: 12px;
}

.resume-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.resume-field {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.resume-field.wide {
  grid-column: 1 / -1;
}

.resume-field label {
  color: var(--muted);
  font-size: 12px;
}

.resume-field div {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.service-price-entry {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.service-price-entry:hover {
  border-color: var(--primary);
}

.service-config-card {
  align-content: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.map-board {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(15, 143, 114, 0.08) 1px, transparent 1px),
    #f8fafc;
  background-size: 40px 40px;
}

.full-map-shell {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #dbeafe;
  --map-top-offset: calc(env(safe-area-inset-top, 0px) + 56px);
}

body.ios-shell .full-map-shell {
  --map-top-offset: 12px;
}

.full-map-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.map-back {
  position: absolute;
  left: 12px;
  top: var(--map-top-offset);
  z-index: 3;
  min-height: 38px;
}

.map-title {
  position: absolute;
  left: 92px;
  top: var(--map-top-offset);
  right: 12px;
  z-index: 3;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-title strong,
.map-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-title span {
  color: var(--muted);
  font-size: 12px;
}

.map-status {
  position: absolute;
  left: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 3;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  font-size: 12px;
}

.map-marker {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 116px;
  max-width: 190px;
  padding: 6px 9px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

.map-marker strong,
.map-marker small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-marker small {
  color: var(--muted);
  font-size: 11px;
}

.map-marker-avatar {
  width: 32px;
  height: 32px;
}

.fallback-map-layer {
  position: absolute;
  inset: 0;
  transform-origin: center;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(15, 143, 114, 0.12) 1px, transparent 1px),
    #eff6ff;
  background-size: 46px 46px;
}

.fallback-map-point {
  position: absolute;
  transform: translate(-50%, -100%);
}

.fallback-map-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.captcha-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.captcha-image {
  min-height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.captcha-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.captcha-options {
  display: grid;
  gap: 8px;
}

.captcha-options:has(.captcha-option) {
  grid-template-columns: repeat(3, 1fr);
}

.captcha-slider {
  width: 100%;
  accent-color: var(--blue);
}

.captcha-text-input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 10px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 3px;
}

.captcha-option {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.captcha-option.selected {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

.rich-tools {
  gap: 8px;
}

.editor-preview-block {
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.attachment-summary-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

.attachment-size-summary {
  margin-left: auto;
  white-space: nowrap;
}

.rich-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 96px));
  gap: 8px;
}

.editor-preview:not(:empty) {
  margin-top: 6px;
}

.upload-status {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.upload-status.show {
  display: block;
}

.upload-status.info {
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.upload-status.success {
  border: 1px solid rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.upload-status.error {
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.upload-status.global-voice-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-status.global-voice-status:empty {
  display: none;
}

.attachment-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attachment-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.attachment-preview-button video[controls] {
  pointer-events: none;
}

.attachment-image-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 88px;
}

.ios-media-frame {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.attachment-image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.image-load-failed img {
  display: none;
}

.image-load-failed video {
  display: none;
}

.image-load-failed .attachment-image-fallback {
  display: grid;
}

.video-thumb-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.ios-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-items: center;
  gap: 4px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(15, 118, 110, 0.78));
  color: #fff;
  text-align: center;
}

body.ios-shell .ios-video-placeholder {
  display: grid;
}

body.ios-shell .video-loaded .ios-video-placeholder {
  display: none;
}

.attachment-file {
  display: flex;
  min-width: 140px;
  max-width: 220px;
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
}

.attachment-thumb .icon-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 2;
  width: 30px;
  height: 30px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.attachment-thumb .attachment-preview-button {
  width: 100%;
  height: 100%;
}

.attachment-thumb .attachment-file {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding: 8px;
}

.attachment-download-btn {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 3;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.attachment-download-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.admin-file-thumb {
  position: relative;
  width: 92px;
  height: 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  padding: 0;
}

.admin-file-thumb img,
.admin-file-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-file-thumb.file {
  padding: 8px;
  text-align: center;
  gap: 4px;
}

.admin-file-thumb.file strong {
  font-size: 13px;
  color: #0f766e;
}

.admin-file-thumb.file span,
.admin-file-thumb.empty span {
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.admin-file-thumb.empty {
  cursor: default;
  background: #f1f5f9;
}

.admin-file-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
}

.attachment-preview-button,
.attachment-file {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.attachment-preview-button:focus-visible,
.attachment-file:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pending-upload {
  opacity: 0.82;
}

.upload-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.countdown-line {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-weight: 700;
}

.auto-location-panel .item-meta {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.member-pin {
  position: absolute;
  left: var(--x, 48%);
  top: var(--y, 48%);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 2px solid var(--blue);
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  box-shadow: var(--shadow);
  max-width: 190px;
}

.member-pin.owner {
  border-color: var(--amber);
}

.member-pin.voice-location-focus,
.creative-member-item.voice-location-focus {
  border-color: var(--green);
  outline: 3px solid rgba(15, 143, 114, 0.22);
  box-shadow: 0 0 0 6px rgba(15, 143, 114, 0.1), var(--shadow);
}

.member-pin.voice-location-focus {
  z-index: 3;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--avatar-bg, var(--green));
  color: white;
  font-weight: 800;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-large {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.avatar-editor {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 38px);
  gap: 8px;
}

.avatar-choice {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  cursor: pointer;
}

.avatar-choice.selected {
  border-color: var(--blue);
}

.avatar-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-entry {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.voice-toggle {
  position: relative;
  gap: 8px;
}

.record-dot {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
}

.voice-toggle.recording .record-dot {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.member-pin small,
.item-meta {
  color: var(--muted);
  font-size: 12px;
}

.attachment-preview-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.storage-summary {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.storage-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
  margin: 8px 0;
}

.storage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.compact-list {
  margin-top: 8px;
}

.image-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 18px 18px 96px;
}

.image-preview-close {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  z-index: 62;
  width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  box-shadow: var(--shadow);
}

.image-preview-back {
  display: none;
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  top: max(14px, env(safe-area-inset-top));
  z-index: 62;
  min-width: 76px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  box-shadow: var(--shadow);
}

body.ios-shell .image-preview-back {
  display: inline-flex;
}

.image-preview-content {
  position: relative;
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: calc(100vh - 132px);
}

.image-preview-backdrop img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview-backdrop video {
  max-width: 100%;
  max-height: 100%;
  background: #000;
  border-radius: 8px;
}

.image-preview-fallback {
  display: none;
  max-width: min(92vw, 420px);
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow);
}

.image-preview-fallback span {
  display: block;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.image-preview-content.image-load-failed img {
  display: none;
}

.image-preview-content.image-load-failed .image-preview-fallback {
  display: block;
}

.file-preview-card {
  display: grid;
  gap: 10px;
  width: min(92vw, 420px);
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow);
}

.file-preview-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.android-shell .image-preview-backdrop {
  padding-top: max(64px, env(safe-area-inset-top));
}

.android-shell .image-preview-close {
  top: max(58px, env(safe-area-inset-top));
}

.image-preview-actions {
  position: fixed;
  left: 50%;
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 48px));
  z-index: 61;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: min(92vw, 460px);
  transform: translateX(-50%);
  pointer-events: auto;
}

.image-preview-actions .btn {
  border-color: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.image-preview-hint {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 61;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 30;
  max-width: min(92vw, 420px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 16px;
}

.modal {
  width: min(100%, 560px);
  max-height: 86vh;
  overflow: auto;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 16px;
}

.ad-image {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.more-menu {
  position: fixed;
  right: 12px;
  bottom: 72px;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: max-content;
  min-width: 132px;
  max-width: calc(100vw - 24px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.more-menu .btn {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--bg);
}

.admin-side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px;
}

.admin-side nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-side button {
  text-align: left;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  border-radius: 8px;
}

.admin-side button.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}

.admin-main {
  padding: 18px;
  min-width: 0;
}

.status-grid .metric {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.profit-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 150px;
  padding: 12px 0 4px;
  overflow-x: auto;
}

.profit-bar-wrap {
  min-width: 26px;
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 6px;
}

.profit-bar {
  width: 18px;
  border-radius: 6px 6px 2px 2px;
  background: var(--green);
}

.profit-bar.negative {
  background: var(--red);
}

.profit-bar-wrap span {
  font-size: 11px;
  color: var(--muted);
  writing-mode: vertical-rl;
}

.distribution-list {
  display: grid;
  gap: 8px;
}

.distribution-row {
  display: grid;
  grid-template-columns: minmax(90px, 150px) 1fr auto;
  gap: 8px;
  align-items: center;
}

.distribution-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.distribution-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.badge.danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
}

.badge.green {
  color: #047857;
  background: rgba(0, 169, 130, 0.14);
}

.badge.red {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.settings-tabs button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.settings-tabs button.active {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand);
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.active {
  display: grid;
  gap: 12px;
}

.notice {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.notice.success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}

.notice.danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}

.legal-document {
  line-height: 1.72;
}

body.legal-from-app {
  padding-top: 62px;
}

body.legal-from-app.legal-android-app {
  --legal-android-status-top: 36px;
  padding-top: calc(62px + var(--legal-android-status-top));
}

.legal-return-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: max(10px, env(safe-area-inset-top)) clamp(18px, 5vw, 72px) 10px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

body.legal-android-app .legal-return-bar {
  top: var(--legal-android-status-top);
}

.legal-return-bar .btn {
  min-height: 36px;
  padding-inline: 13px;
}

.legal-document h2,
.legal-document h3 {
  margin-top: 18px;
}

.legal-document p {
  color: var(--text);
  margin: 10px 0;
}

.legal-filing {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: var(--surface-2);
}

.hardware-device-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
}

.hardware-device-head {
  align-items: flex-start;
}

.hardware-device-head > div {
  min-width: 0;
}

.hardware-device-head .item-meta {
  overflow-wrap: anywhere;
}

.hardware-reading {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hardware-event-list {
  max-height: min(60vh, 520px);
  overflow: auto;
}

.hardware-pairing-code {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 18px 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 780px) {
  .smart-assistant-panel {
    padding: 14px;
  }

  .smart-assistant-heading {
    align-items: flex-start;
  }

  .smart-assistant-heading h2 {
    font-size: 21px;
  }

  .smart-assistant-form {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .smart-mic-button {
    min-height: 112px;
    padding: 8px;
  }

  .smart-photo-button {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .smart-photo-button span {
    flex: 1 0 100%;
    padding-left: 30px;
  }

  .creative-hero-panel,
  .creative-tool-grid {
    grid-template-columns: 1fr;
  }

  .creative-tool-grid.creative-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creative-scene-head {
    align-items: stretch;
    flex-direction: column;
  }

  .creative-scene-head .btn {
    width: 100%;
  }

  .creative-resource-head {
    align-items: stretch;
    flex-direction: column;
  }

  .creative-inbox-summary {
    grid-template-columns: 1fr;
  }

  .creative-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-qr-grid {
    grid-template-columns: 1fr;
  }

  .creative-glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-permission-row {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-permission-row .btn {
    width: 100%;
  }

  .auth-feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-feature-strip span {
    min-height: 62px;
    padding: 8px;
    font-size: 11px;
  }

  .auth-mode-fallback {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-mode-fallback .btn {
    width: 100%;
  }

  .creative-capability-row {
    grid-template-columns: 1fr;
  }

  .creative-capture-shell {
    align-content: start;
  }

  .creative-capture-form .split,
  .creative-details .split {
    grid-template-columns: 1fr;
  }

  .creative-details .field,
  .creative-details input,
  .creative-details select,
  .creative-capture-card input,
  .creative-capture-card textarea {
    min-width: 0;
    width: 100%;
  }

  .creative-inbox-actions .btn,
  .creative-inbox-item-foot .btn {
    width: 100%;
  }

  .creative-service-card {
    grid-column: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .nav-links {
    display: none;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-side nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* AI 会话页覆盖旧版设置式会话样式，保证移动端优先布局。 */
.app-shell.ai-conversation-shell-layout {
  grid-template-rows: 1fr !important;
}

body.preview-build .app-shell.ai-conversation-shell-layout {
  grid-template-rows: 36px minmax(0, 1fr) !important;
}

.app-shell.ai-conversation-shell-layout .app-header,
.app-shell.ai-conversation-shell-layout .tabbar {
  display: none !important;
}

.app-shell.ai-conversation-shell-layout .view {
  padding: 0 !important;
}

.ai-conversation-screen {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  background: #fff;
}

/* Android WebView occupies the edge-to-edge window. Keep the AI toolbar's
   controls below the system status icons, matching the existing legal-page
   and media-preview safety boundary. */
body.android-shell .ai-conversation-screen {
  --ai-conversation-android-status-top: max(36px, env(safe-area-inset-top, 0px));
  grid-template-rows: calc(58px + var(--ai-conversation-android-status-top)) minmax(0, 1fr);
}

body.android-shell .ai-conversation-topbar {
  padding-top: var(--ai-conversation-android-status-top);
}

.ai-conversation-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 14px max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.ai-conversation-thread {
  min-height: 0 !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  overflow-y: auto;
  padding: 12px 2px 4px;
}

.ai-conversation-form {
  padding: 10px 0 0 !important;
  border-top: 1px solid #eaecf0 !important;
  background: #fff;
}

.ai-conversation-message {
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

@media (max-width: 560px) {
  .ai-conversation-body { padding-inline: 10px; }
}
