:root {
  --brand: #00cae1;
  --brand-deep: #008fa0;
  --brand-soft: #e7fbfd;
  --danger: #ff3429;
  --warning: #ff6600;
  --success: #29cc59;
  --text-primary: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.58);
  --text-disabled: rgba(0, 0, 0, 0.3);
  --page: #f4f7f7;
  --surface: #fff;
  --divider: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 36px rgba(16, 58, 64, 0.07);
  --shadow-surface:
    0 0 0 1px oklch(0 0 0 / 0.055),
    0 1px 2px -1px oklch(0 0 0 / 0.06),
    0 10px 36px rgba(16, 58, 64, 0.07);
  --font: "PingFang SC", "苹方", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-modal: 24px;
  --radius-card: 16px;
  --radius-small: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 12% 5%, rgba(0, 202, 225, 0.08), transparent 24rem),
    var(--page);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

.hero p,
.section-heading p,
.settings-drawer__header p,
.settings-group__heading small,
.empty-state p,
.error-state p,
.direct-note,
.security-note p {
  text-wrap: pretty;
}

body.settings-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #003940;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(244, 247, 247, 0.9);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

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

.brand__mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 143, 160, 0.16));
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 22px;
}

.brand small {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.service-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b6bcbc;
}

.service-status.is-online .service-status__dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(41, 204, 89, 0.12);
}

.service-status.is-offline .service-status__dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 52, 41, 0.1);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-button {
  position: relative;
  display: inline-flex;
  min-width: 84px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-weight: 500;
  transition: transform 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}

.settings-button:hover,
.settings-button[aria-expanded="true"] {
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 58, 64, 0.08);
}

.settings-button:active {
  transform: scale(0.96);
}

.settings-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.settings-button__dot {
  position: absolute;
  top: 4px;
  right: 5px;
  display: none;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--warning);
}

.settings-button.is-attention .settings-button__dot {
  display: block;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 28px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 176px;
  margin-bottom: 20px;
  padding: 32px 36px;
  overflow: hidden;
  border-radius: var(--radius-modal);
  background: #dff8fa;
  box-shadow: inset 0 0 0 1px rgba(0, 143, 160, 0.05);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #007e8c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 660px;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--text-secondary);
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-benefits span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #006d79;
  background: rgba(255, 255, 255, 0.66);
  font-size: 10px;
}

.hero-benefits span::before {
  content: "✓";
  font-weight: 700;
}

.hero__art {
  position: relative;
  flex: 0 0 130px;
  height: 110px;
  margin-left: 24px;
}

.hero__disc {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.hero__disc--back {
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(0, 202, 225, 0.18);
}

.hero__disc--front {
  right: 18px;
  bottom: 0;
  width: 80px;
  height: 80px;
  color: #004d56;
  background: var(--brand);
  box-shadow: 0 16px 28px rgba(0, 151, 169, 0.22);
}

.hero__disc svg {
  width: 48px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.credential-card,
.panel {
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-surface);
}

.credential-card {
  margin-bottom: 12px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-heading--compact {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.section-heading p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.step-number,
.heading-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #006d79;
  background: var(--brand-soft);
  font-weight: 700;
}

.step-number--optional {
  font-size: 10px;
}

.heading-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.section-heading .text-button,
.section-heading .icon-button {
  margin-left: auto;
}

.credential-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--divider);
  border-radius: var(--radius-small);
  color: var(--text-primary);
  background: #fbfcfc;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out;
}

.field input {
  min-height: 48px;
  padding: 0 48px 0 14px;
}

.field textarea {
  min-height: 138px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.65;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-disabled);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 202, 225, 0.12);
}

.password-field {
  position: relative;
  display: block;
}

.password-field .icon-button {
  position: absolute;
  top: 5px;
  right: 5px;
}

.field-hint {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.text-button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  color: #007b89;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: transform 150ms ease-out, color 150ms ease-out, background-color 150ms ease-out;
}

.icon-button:active:not(:disabled) {
  transform: scale(0.96);
}

.icon-button:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.045);
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.platform-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 18px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-card);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease-out, border-color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}

.platform-tab:hover {
  transform: translateY(-1px);
  background: #fff;
}

.platform-tab:active:not(:disabled) {
  transform: scale(0.96);
}

.platform-tab.is-active {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 143, 160, 0.09), inset 0 0 0 1px var(--brand);
}

.platform-tab strong,
.platform-tab small {
  display: block;
}

.platform-tab > span:not(.platform-icon) {
  min-width: 0;
}

.platform-tab strong {
  font-size: 15px;
}

.platform-tab small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.platform-icon {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 0 0 1px oklch(0 0 0 / 0.08),
    0 2px 5px rgba(0, 0, 0, 0.08);
}

.platform-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
}

.tab-check {
  display: block;
  width: 22px;
  margin-left: auto;
  fill: none;
  opacity: 0;
  stroke: #007c89;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  filter: blur(4px);
  transform: scale(0.25);
  transition: opacity 300ms cubic-bezier(0.2, 0, 0, 1), filter 300ms cubic-bezier(0.2, 0, 0, 1), transform 300ms cubic-bezier(0.2, 0, 0, 1);
}

.platform-tab.is-active .tab-check {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-modal);
}

.button-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: scale(0.96);
}

.button:disabled {
  color: rgba(255, 255, 255, 0.78);
  background: #d5dcdc;
  cursor: not-allowed;
}

.button--primary {
  color: #003940;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(0, 174, 194, 0.2);
}

.button--primary:hover:not(:disabled) {
  background: #00bfd5;
  box-shadow: 0 10px 24px rgba(0, 174, 194, 0.26);
}

.button--secondary {
  min-width: 104px;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.045);
}

.button--secondary svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button__label svg,
.button--outline > svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button--outline {
  border: 1px solid rgba(0, 143, 160, 0.22);
  color: #006d79;
  background: var(--brand-soft);
  text-decoration: none;
}

.button--outline:hover {
  border-color: rgba(0, 143, 160, 0.4);
  background: #d9f8fb;
}

.button--grow {
  flex: 1;
}

.button--full {
  width: 100%;
}

.button__loading {
  display: none;
  gap: 4px;
  align-items: center;
}

.button__loading i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: dot 1s ease-in-out infinite;
}

.button__loading i:nth-child(2) {
  animation-delay: 0.14s;
}

.button__loading i:nth-child(3) {
  animation-delay: 0.28s;
}

.button.is-loading .button__label {
  display: none;
}

.button.is-loading .button__loading {
  display: inline-flex;
}

.result-area {
  min-height: 260px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.empty-state,
.error-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state__art {
  width: 128px;
  height: 100px;
  margin-bottom: 8px;
}

.empty-state__art svg {
  width: 100%;
}

.empty-bg {
  fill: #edf8f8;
}

.empty-line,
.empty-accent {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.empty-line {
  stroke: #8da4a6;
}

.empty-accent {
  stroke: var(--brand-deep);
}

.empty-state h3,
.error-state h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.empty-state p,
.error-state p {
  max-width: 360px;
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.error-state__icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 24px;
  color: #c42720;
  background: rgba(255, 52, 41, 0.09);
}

.error-state__icon svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.error-state .button {
  min-width: 120px;
  margin-top: 16px;
}

.error-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.error-state__actions .button {
  margin-top: 0;
}

.skeleton {
  display: grid;
  gap: 14px;
  padding: 10px 0;
}

.skeleton__hero,
.skeleton__line,
.skeleton__button {
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.07);
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton__hero {
  height: 92px;
  border-radius: var(--radius-card);
}

.skeleton__line {
  width: 88%;
  height: 14px;
}

.skeleton__line--short {
  width: 58%;
}

.skeleton__button {
  height: 48px;
  margin-top: 8px;
  border-radius: 999px;
}

.result-card {
  animation: fade-in 200ms ease-out both;
}

.result-card__top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.result-card__visual {
  position: relative;
  display: grid;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: var(--radius-card);
  color: #006f7b;
  background: var(--brand-soft);
  overflow: hidden;
}

.result-card__visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
}

.result-card__visual svg {
  width: 40px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.result-card__body {
  min-width: 0;
  flex: 1;
}

.result-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  color: #006c77;
  background: var(--brand-soft);
  font-size: 10px;
  line-height: 14px;
}

.tag--neutral {
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.045);
}

.result-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-card__author-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.author-avatar {
  position: relative;
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  color: #006d79;
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 600;
}

.author-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
}

.author-meta {
  display: block;
  min-width: 0;
}

.author-meta strong,
.author-meta small {
  display: block;
}

.author-meta strong,
.author-meta strong a {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-meta strong a:hover {
  color: var(--brand-deep);
}

.author-meta small {
  margin-top: 1px;
  color: var(--text-secondary);
  font-size: 10px;
}

.copy-card {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-small);
  background: #f7f9f9;
}

.copy-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-card__heading strong {
  font-size: 12px;
}

.copy-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-card__copy,
.copy-card__toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  color: #007b89;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  transition: transform 150ms ease-out, color 150ms ease-out, background-color 150ms ease-out;
}

.copy-card__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.copy-card__copy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.copy-card__copy:hover,
.copy-card__toggle:hover {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
}

.copy-card__copy:active,
.copy-card__toggle:active {
  transform: scale(0.96);
}

.copy-card__toggle {
  min-width: 44px;
}

.copy-card__text {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-card__text.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.hashtag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.hashtag-list span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #006d79;
  background: var(--brand-soft);
  font-size: 10px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.metric {
  padding: 10px 8px;
  border-radius: var(--radius-small);
  background: #f7f9f9;
  text-align: center;
}

.metric strong,
.metric small {
  display: block;
}

.metric strong {
  overflow: hidden;
  font-family: "Alibaba", "DIN", var(--font);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.metric small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.media-section {
  padding-top: 18px;
  border-top: 1px solid var(--divider);
}

.media-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.media-section__heading h4,
.media-section__heading p {
  margin: 0;
}

.media-section__heading h4 {
  font-size: 14px;
  font-weight: 600;
}

.media-section__heading p {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.media-count {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.045);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

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

.media-gallery--video {
  grid-template-columns: 1fr;
}

.media-gallery--empty {
  min-height: 112px;
  grid-template-columns: 1fr;
  place-items: center;
  border-radius: var(--radius-card);
  color: var(--text-secondary);
  background: #f7f9f9;
  font-size: 12px;
  text-align: center;
}

.media-item {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-small);
  color: #fff;
  background: #e9eeee;
  text-decoration: none;
}

.media-item::after {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.52));
  content: "";
  pointer-events: none;
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
  transition: transform 150ms ease-out;
}

.media-item:hover img {
  transform: scale(1.025);
}

.media-item__index,
.media-item__action {
  position: absolute;
  z-index: 1;
  bottom: 8px;
  font-size: 10px;
}

.media-item__index {
  left: 8px;
}

.media-item__action {
  right: 8px;
  font-weight: 600;
}

.media-item__error {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  padding: 16px;
  place-items: center;
  color: var(--text-secondary);
  background: #f0f4f4;
  font-size: 11px;
  text-align: center;
}

.media-item.has-error .media-item__error {
  display: grid;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: #111;
}

.video-shell video {
  display: block;
  width: 100%;
  max-height: 520px;
  background: #111;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
}

.video-shell p {
  display: none;
  min-height: 132px;
  margin: 0;
  padding: 24px;
  place-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  text-align: center;
}

.video-shell.has-error video {
  display: none;
}

.video-shell.has-error p {
  display: grid;
}

.video-shell.is-retrying p {
  position: absolute;
  inset: auto 12px 12px;
  display: grid;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.audio-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  background: #f7f9f9;
  font-size: 11px;
}

.audio-card audio {
  width: 100%;
  height: 36px;
}

.result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.direct-note {
  margin: 10px 4px 0;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.6;
}

.direct-note--mobile {
  margin-right: 0;
  margin-left: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: #506467;
  background: #f3f8f8;
  font-size: 11px;
  transition: color 150ms ease-out, background-color 150ms ease-out;
}

.direct-note--mobile.is-ready {
  color: #17663b;
  background: #edf8f1;
}

.direct-note--mobile.is-warning {
  color: #87550f;
  background: #fff6e8;
}

.result-download--mobile.is-share-ready {
  color: #fff;
  background: #16844b;
  box-shadow: 0 8px 20px rgba(22, 132, 75, 0.2);
}

.settings-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(13, 28, 30, 0.34);
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.settings-backdrop.is-open {
  opacity: 1;
}

.settings-backdrop[hidden],
.settings-drawer[hidden] {
  display: none;
}

.settings-drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(440px, calc(100vw - 24px));
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px 0 0 24px;
  background: var(--page);
  box-shadow: -18px 0 48px rgba(13, 42, 45, 0.16);
  transform: translateX(100%);
  transition: transform 220ms ease-out;
}

.settings-drawer.is-open {
  transform: translateX(0);
}

.settings-drawer__header {
  display: flex;
  min-height: 84px;
  align-items: center;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) 20px 16px;
  border-bottom: 1px solid var(--divider);
  background: rgba(255, 255, 255, 0.92);
}

.settings-drawer__header > div {
  flex: 1;
  min-width: 0;
}

.settings-drawer__header h2,
.settings-drawer__header p {
  margin: 0;
}

.settings-drawer__header h2 {
  font-size: 18px;
  line-height: 24px;
}

.settings-drawer__header p {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
}

.settings-drawer__close svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.settings-drawer__content {
  display: grid;
  gap: 12px;
  padding: 16px 16px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.settings-group {
  padding: 12px;
  border: 0;
  border-radius: var(--radius-modal);
  background: #fff;
  box-shadow:
    0 0 0 1px oklch(0 0 0 / 0.055),
    0 1px 2px -1px oklch(0 0 0 / 0.05),
    0 8px 28px rgba(16, 58, 64, 0.055);
}

.settings-group__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-group__heading > span:last-child {
  min-width: 0;
}

.settings-group__heading strong,
.settings-group__heading small {
  display: block;
}

.settings-group__heading strong {
  font-size: 15px;
}

.settings-group__heading small {
  margin-top: 1px;
  color: var(--text-secondary);
  font-size: 11px;
}

.settings-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-small);
  color: #995000;
  background: rgba(255, 102, 0, 0.08);
}

.settings-status > span {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--warning);
  font-size: 11px;
  font-weight: 700;
}

.settings-status p,
.settings-status strong,
.settings-status small {
  margin: 0;
}

.settings-status strong,
.settings-status small {
  display: block;
}

.settings-status strong {
  font-size: 12px;
}

.settings-status small {
  color: var(--text-secondary);
  font-size: 10px;
}

.settings-status.is-ready {
  color: #116f2d;
  background: rgba(41, 204, 89, 0.08);
}

.settings-status.is-ready > span {
  background: var(--success);
}

.settings-status.is-trial {
  color: #006d79;
  background: var(--brand-soft);
}

.settings-status.is-trial > span {
  color: #003940;
  background: var(--brand);
}

.settings-status.is-required {
  color: #995000;
  background: rgba(255, 102, 0, 0.08);
}

.settings-group--cookie .section-heading {
  margin-bottom: 14px;
}

.settings-group--cookie .section-heading h2 {
  font-size: 15px;
}

.settings-clear {
  margin-top: 2px;
}

.cookie-guidance {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border-radius: var(--radius-small);
  background: #f7f9f9;
  transition: background-color 150ms ease-out, box-shadow 150ms ease-out;
}

.cookie-guidance__icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #168b39;
  background: #fff;
}

.cookie-guidance__icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.cookie-guidance__copy {
  flex: 1;
  min-width: 0;
}

.cookie-guidance strong,
.cookie-guidance small {
  display: block;
}

.cookie-guidance strong {
  font-size: 13px;
}

.cookie-guidance small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.cookie-guidance .text-button {
  flex: 0 0 auto;
}

.cookie-guidance.is-attention {
  background: rgba(255, 102, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 102, 0, 0.22);
}

.cookie-guidance.is-attention .cookie-guidance__icon {
  color: var(--warning);
}

.settings-group--cookie.is-attention {
  box-shadow:
    0 0 0 1px rgba(255, 102, 0, 0.38),
    0 16px 40px rgba(255, 102, 0, 0.09);
}

.cookie-manager-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.cookie-manager-content[hidden] {
  display: none;
}

.cookie-manager-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
}

.cookie-admin-key {
  margin-bottom: 8px;
}

.cookie-manager-toolbar > strong {
  font-size: 12px;
}

.cookie-manager-toolbar .icon-button {
  margin-left: auto;
}

.cookie-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: var(--radius-small);
  background: #f7f9f9;
}

.cookie-status__icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--text-secondary);
  background: #fff;
}

.cookie-status__icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.cookie-status strong,
.cookie-status small {
  display: block;
}

.cookie-status strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cookie-status small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.cookie-status--success {
  background: rgba(41, 204, 89, 0.08);
}

.cookie-status--success .cookie-status__icon {
  color: #168b39;
}

.cookie-status--warning {
  background: rgba(255, 102, 0, 0.08);
}

.cookie-status--warning .cookie-status__icon {
  color: var(--warning);
}

.cookie-input-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: var(--radius-small);
  background: rgba(0, 0, 0, 0.045);
}

.cookie-input-tab {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}

.cookie-input-tab.is-active {
  color: var(--text-primary);
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 58, 64, 0.08);
}

.cookie-json-field {
  gap: 6px;
}

.cookie-json-heading {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-json-heading label {
  font-size: 12px;
  font-weight: 500;
}

.cookie-json-heading .text-button {
  min-height: 32px;
  font-size: 11px;
}

.cookie-json-field textarea {
  min-height: 168px;
  padding: 12px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.65;
  resize: vertical;
}

.cookie-json-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 40px;
  margin: 8px 0 12px;
  padding: 9px 10px;
  border-radius: var(--radius-small);
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.025);
  font-size: 10px;
}

.cookie-json-status > span {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #007b89;
  background: var(--brand-soft);
  font-weight: 700;
}

.cookie-json-status p {
  margin: 2px 0 0;
  line-height: 1.55;
}

.cookie-json-status.is-success {
  color: #116f2b;
  background: rgba(41, 204, 89, 0.08);
}

.cookie-json-status.is-success > span {
  color: #168b39;
  background: #fff;
}

.cookie-json-status.is-error {
  color: #a32620;
  background: rgba(255, 52, 41, 0.08);
}

.cookie-json-status.is-error > span {
  color: #c42720;
  background: #fff;
}

.dropzone {
  display: grid;
  min-height: 178px;
  margin-bottom: 12px;
  padding: 22px 14px;
  place-items: center;
  align-content: center;
  border: 1.5px dashed rgba(0, 143, 160, 0.38);
  border-radius: var(--radius-card);
  background: #f8fdfd;
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease-out, background-color 150ms ease-out, transform 150ms ease-out;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.dropzone__icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 17px;
  color: #007b88;
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 143, 160, 0.09);
}

.dropzone__icon svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dropzone strong,
.dropzone small {
  display: block;
}

.dropzone strong {
  font-size: 13px;
}

.dropzone small {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.file-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  margin-bottom: 12px;
  padding: 8px 4px 8px 10px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-small);
  background: #fff;
}

.file-summary.is-hidden {
  display: none;
}

.file-summary__icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #007884;
  background: var(--brand-soft);
}

.file-summary__icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.file-summary > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

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

.file-summary strong {
  font-size: 12px;
}

.file-summary small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.file-summary.is-error {
  border-color: rgba(255, 52, 41, 0.24);
  background: rgba(255, 52, 41, 0.035);
}

.file-summary.is-error small {
  color: #a32620;
}

.security-note {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-small);
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.025);
  font-size: 11px;
}

.security-note svg {
  flex: 0 0 20px;
  width: 20px;
  color: #168b39;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.security-note p {
  margin: 0;
}

.security-note strong {
  color: var(--text-primary);
  font-size: 12px;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.page-footer p {
  margin: 0;
}

.page-footer a {
  min-height: 44px;
  padding: 12px 4px;
  color: #007b88;
  text-decoration: none;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(312px, calc(100% - 32px));
  min-height: 48px;
  padding: 11px 16px;
  border-radius: 14px;
  color: #fff;
  background: rgba(30, 36, 37, 0.94);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast__icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #182020;
  background: var(--brand);
  font-weight: 700;
}

.toast__icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.toast.is-error .toast__icon {
  color: white;
  background: var(--danger);
}

.toast.is-warning .toast__icon {
  color: white;
  background: var(--warning);
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes dot {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .panel--cookie {
    order: 2;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .topbar__inner,
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar__inner {
    gap: 8px;
    min-height: 60px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 8px;
  }

  .brand > span {
    min-width: 0;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    font-size: 10px;
    letter-spacing: 0.03em;
  }

  .topbar__actions {
    flex: 0 0 auto;
  }

  .service-status {
    width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
  }

  .service-status span:last-child {
    display: none;
  }

  .settings-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .settings-button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .settings-drawer {
    width: 100%;
    border-radius: 0;
  }

  .page-shell {
    padding-top: 16px;
  }

  .hero {
    min-height: 0;
    margin-bottom: 12px;
    padding: 22px 18px;
    border-radius: 20px;
  }

  .hero > div:first-child {
    min-width: 0;
    max-width: 100%;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .hero p {
    margin-top: 8px;
  }

  .hero-benefits {
    gap: 6px;
    margin-top: 14px;
  }

  .hero-benefits span {
    min-height: 26px;
    padding: 3px 8px;
  }

  .hero__art {
    display: none;
  }

  .credential-fields {
    grid-template-columns: 1fr;
  }

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

  .credential-card,
  .panel {
    padding: 18px 16px;
  }

  .platform-tab {
    min-width: 0;
    min-height: 68px;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
  }

  .platform-tab strong {
    font-size: 14px;
  }

  .platform-tab small {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .platform-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .tab-check {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 17px;
    margin: 0;
  }

  .button-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .button-row .button {
    min-width: 0;
    padding-right: 12px;
    padding-left: 12px;
  }

  .result-card__visual {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

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

  .media-gallery--video,
  .media-gallery--empty {
    grid-template-columns: 1fr;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-download--mobile {
    min-height: 52px;
    padding: 12px 16px;
    text-align: center;
  }

  .audio-card {
    grid-template-columns: 1fr;
  }

  .page-footer {
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
}

@media (max-width: 380px) {
  .topbar__inner,
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .brand small,
  .service-status {
    display: none;
  }

  .hero {
    padding: 20px 16px;
  }

  .hero h1 {
    font-size: 21px;
  }

  .platform-tab {
    padding: 9px 8px;
  }

  .platform-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .button-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .button {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
