:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #64727f;
  --line: #dce4e8;
  --accent: #42a9df;
  --accent-dark: #008f5a;
  --accent-soft: #dff4ff;
  --accent-text: #ffffff;
  --green: #00a86b;
  --warning: #f2b84b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 20px 20px 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 14px;
  font-size: 17px;
}

p,
span,
li {
  color: var(--muted);
}

.lead {
  margin-bottom: 14px;
  line-height: 1.45;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.summary div,
.panel,
.tariff,
.settings-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary div {
  min-width: 0;
  padding: 14px;
}

.summary span,
.settings-grid span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.summary strong,
.settings-grid strong,
.tariff strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.panel {
  margin-top: 14px;
  padding: 16px;
}

.actions,
.command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.command-list {
  margin-top: 14px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}

[hidden] {
  display: none !important;
}

button:active {
  transform: translateY(1px);
}

button.is-active,
button[data-action="open-bot"],
button[data-action="support"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.form-heading {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.channel-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.empty-state img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 17px;
}

.empty-state p {
  padding-right: 16px;
  line-height: 1.45;
}

.channel-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.channel-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.channel-title {
  color: var(--text);
  font-weight: 800;
}

.channel-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.channel-rights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.badge.is-ok {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge.is-bad {
  background: #fff1f0;
  color: #b42318;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

select,
input[type="number"] {
  padding: 0 12px;
}

input[type="range"] {
  min-height: 28px;
  accent-color: var(--accent);
}

input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--accent);
}

.checkbox-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.font-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.font-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 10px;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.font-swatch.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.color-swatch {
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
  font-size: 13px;
  overflow: hidden;
}

.color-swatch::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 1px solid rgba(23, 33, 43, 0.28);
  border-radius: 50%;
  background: var(--swatch-color, transparent);
}

.color-swatch.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.watermark-tabs,
.preview-ratios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.watermark-tabs button,
.preview-ratios button {
  min-height: 38px;
  padding: 8px 10px;
  border-color: var(--line);
  background: #f7fafb;
  color: var(--text);
  text-align: center;
}

.watermark-tabs button.is-active,
.preview-ratios button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.watermark-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.watermark-preview-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.watermark-preview-toolbar > span {
  color: var(--text);
  font-weight: 800;
}

.preview-ratios {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preview-ratios button {
  min-height: 32px;
  padding: 6px;
  font-size: 12px;
}

.preview-frame {
  position: relative;
  width: min(100%, 360px);
  max-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 43, 0.18);
  border-radius: 8px;
  background: #ccd9df;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.preview-frame.aspect-1-1 {
  aspect-ratio: 1 / 1;
}

.preview-frame.aspect-4-5 {
  aspect-ratio: 4 / 5;
}

.preview-frame.aspect-9-16 {
  aspect-ratio: 9 / 16;
}

.preview-frame.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.preview-scene,
.preview-sky,
.preview-subject,
.preview-hidden-layer,
.preview-motion-path {
  position: absolute;
  inset: 0;
}

.preview-scene {
  overflow: hidden;
  background:
    linear-gradient(170deg, rgba(47, 159, 216, 0.24), rgba(0, 176, 116, 0.10) 40%, rgba(17, 37, 54, 0.10)),
    linear-gradient(0deg, #dfe7eb, #f9fcfd);
}

.preview-sky {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.9) 0 7%, transparent 8%),
    radial-gradient(circle at 42% 15%, rgba(255, 255, 255, 0.65) 0 5%, transparent 6%),
    linear-gradient(180deg, #c9e8f7 0 42%, transparent 43%);
}

.preview-subject {
  inset: auto 8% 7% 8%;
  height: 48%;
  border-radius: 48% 48% 14% 14%;
  background:
    radial-gradient(circle at 34% 38%, #f3c6a6 0 13%, transparent 14%),
    radial-gradient(circle at 66% 38%, #e7b18f 0 13%, transparent 14%),
    linear-gradient(135deg, #24455b 0 35%, #e6533c 36% 64%, #1e7a8f 65%);
  opacity: 0.82;
}

.preview-visible-watermark {
  position: absolute;
  z-index: 3;
  display: flex;
  min-width: 42px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  border: 2px solid currentColor;
  border-radius: 6px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: #ffffff;
  font-size: clamp(12px, 5vw, 26px);
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.preview-visible-watermark:not(.is-text) {
  aspect-ratio: 2.4 / 1;
}

.preview-visible-watermark:not(.is-text):empty {
  border: 0;
}

.preview-visible-watermark.is-text {
  width: auto !important;
  max-width: 82%;
  border-style: dashed;
  background: rgba(17, 33, 43, 0.24);
}

.preview-visible-watermark.pos-top_left {
  top: 7%;
  left: 7%;
}

.preview-visible-watermark.pos-top_right {
  top: 7%;
  right: 7%;
}

.preview-visible-watermark.pos-bottom_left {
  bottom: 7%;
  left: 7%;
}

.preview-visible-watermark.pos-bottom_right {
  right: 7%;
  bottom: 7%;
}

.preview-visible-watermark.pos-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.preview-visible-watermark.motion-horizontal {
  top: 48%;
  left: 7%;
  transform: none;
  animation: preview-horizontal 4s ease-in-out infinite alternate;
}

.preview-visible-watermark.motion-vertical {
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  animation: preview-vertical 4s ease-in-out infinite alternate;
}

.preview-visible-watermark.motion-diagonal,
.preview-visible-watermark.motion-chaotic {
  top: 10%;
  left: 8%;
  transform: none;
  animation: preview-diagonal 4.6s ease-in-out infinite alternate;
}

.preview-motion-path.is-visible {
  z-index: 2;
  border: 2px dashed rgba(23, 33, 43, 0.28);
  border-radius: 14px;
  inset: 9%;
}

.preview-motion-path.motion-horizontal {
  top: 48%;
  bottom: auto;
  height: 0;
}

.preview-motion-path.motion-vertical {
  right: auto;
  left: 50%;
  width: 0;
}

.preview-hidden-mark {
  position: absolute;
  z-index: 2;
  display: grid;
  aspect-ratio: 1 / 1.35;
  place-items: center;
  border: 1px solid rgba(0, 176, 116, 0.65);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.5);
  color: #00a86b;
  font-size: 9px;
  font-weight: 900;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.preview-warning {
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
}

#view-watermark[data-active-watermark-tab="photo"] [data-watermark-scope="video"],
#view-watermark[data-active-watermark-tab="video"] [data-watermark-scope="photo"] {
  display: none;
}

@keyframes preview-horizontal {
  from {
    left: 7%;
  }
  to {
    left: 62%;
  }
}

@keyframes preview-vertical {
  from {
    top: 8%;
  }
  to {
    top: 72%;
  }
}

@keyframes preview-diagonal {
  0% {
    top: 9%;
    left: 7%;
  }
  45% {
    top: 63%;
    left: 60%;
  }
  100% {
    top: 28%;
    left: 23%;
  }
}

.settings-grid div {
  padding: 12px;
}

.tariff-list {
  display: grid;
  gap: 12px;
}

.tariff {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-color: #b7d9ef;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17, 37, 54, 0.08);
}

.tariff.is-featured {
  border-color: #229bdd;
  background: #ffffff;
}

.tariff-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  width: 100%;
  min-height: 0;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: #2f9fd8;
  text-align: left;
}

.tariff-team_start .tariff-summary,
.tariff-team_pro .tariff-summary,
.tariff-team_business .tariff-summary {
  background: #168a65;
}

.tariff-summary:active {
  transform: none;
}

.tariff-code {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: #e8fff5;
  color: #008854;
  font-size: 12px;
  font-weight: 800;
}

.tariff-team_start .tariff-code,
.tariff-team_pro .tariff-code,
.tariff-team_business .tariff-code {
  background: #e8f8ff;
  color: #1b6f9f;
}

.tariff-title {
  color: #ffffff;
  font-size: 18px;
  grid-column: 1;
}

.tariff-price {
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  white-space: nowrap;
}

.tariff-period {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  grid-column: 1;
}

.tariff-hint {
  color: #e8fff5;
  font-size: 13px;
  font-weight: 800;
  grid-column: 1 / -1;
}

.tariff-details {
  display: none;
  padding: 14px;
  background: #ffffff;
}

.tariff.is-expanded .tariff-details {
  display: grid;
  gap: 10px;
}

.tariff-description {
  color: var(--text);
  line-height: 1.42;
}

.tariff-features {
  display: grid;
  gap: 7px;
  margin: 4px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(23, 33, 43, 0.18);
  list-style: none;
}

.tariff-features li {
  color: var(--text);
  font-size: 14px;
}

.tariff-features li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
}

.tariff-details button {
  margin-top: 4px;
  border-color: var(--green);
  background: var(--green);
  color: var(--accent-text);
}

.steps {
  margin: 0;
  padding-left: 20px;
}

.steps li {
  margin: 8px 0;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--text);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 560px) {
  .shell {
    padding: 14px 14px 28px;
  }

  .summary,
  .actions,
  .command-list,
  .settings-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }
}

/* Markora Platform Telegram Mini App redesign 20260721-3 */
:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: rgba(245, 246, 248, 0.96);
  --panel-dark: rgba(17, 20, 27, 0.84);
  --text: #101820;
  --muted: #657080;
  --line: rgba(167, 173, 184, 0.44);
  --accent: #18c77f;
  --accent-dark: #0c9a62;
  --accent-soft: rgba(24, 199, 127, 0.13);
  --accent-text: #ffffff;
  --green: #18c77f;
  --warning: #f2b84b;
  --mono: "DM Mono", "Cascadia Mono", Consolas, monospace;
  --sans: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 16% -12%, rgba(24, 199, 127, 0.28), transparent 28rem),
    radial-gradient(circle at 92% 6%, rgba(47, 159, 216, 0.18), transparent 24rem),
    #0f1115 url("./brand/Markora_Background_Grid_2560x1440.webp") center top / 1440px auto no-repeat;
  color: #f5f6f8;
  font-family: var(--sans);
}

.shell {
  width: min(1120px, 100%);
  padding: 18px 16px 34px;
}

.topbar {
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(245, 246, 248, 0.18);
  border-radius: 20px;
  background: rgba(15, 17, 21, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 145px;
}

.brand-lockup img {
  display: block;
  width: 150px;
  height: auto;
}

.topbar-copy h1 {
  color: #f5f6f8;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.topbar-copy p {
  color: rgba(245, 246, 248, 0.68);
  font-size: 12px;
}

.status {
  border-color: rgba(24, 199, 127, 0.42);
  background: rgba(24, 199, 127, 0.12);
  color: #baffdd;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform-hero {
  margin: 18px 0 14px;
  padding: clamp(24px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(245, 246, 248, 0.16);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(15, 17, 21, 0.94), rgba(15, 17, 21, 0.72) 52%, rgba(15, 17, 21, 0.22)),
    url("./brand/Markora_Hero_Desktop_2880x1440.webp") center / cover no-repeat;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  margin: 0 0 10px;
  color: #18c77f;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.platform-hero h2 {
  max-width: 720px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

.platform-hero p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 16px;
  color: rgba(245, 246, 248, 0.78);
  line-height: 1.58;
}

.summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary div,
.panel,
.tariff,
.settings-grid div {
  border-color: rgba(167, 173, 184, 0.48);
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.12);
}

.summary span,
.settings-grid span {
  color: #6a7584;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.summary strong,
.panel h2,
.panel h3 {
  color: #101820;
}

.navigation-panel {
  position: sticky;
  top: 8px;
  z-index: 8;
  background: rgba(15, 17, 21, 0.86);
  border-color: rgba(245, 246, 248, 0.2);
  backdrop-filter: blur(18px);
}

.navigation-panel h2 {
  color: #f5f6f8;
  font-size: 14px;
}

.primary-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 5px;
  border: 1px solid rgba(245, 246, 248, 0.16);
  border-radius: 14px;
  background: rgba(245, 246, 248, 0.08);
}

.primary-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(245, 246, 248, 0.78);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}

.primary-tabs button.is-active,
.primary-tabs button[aria-selected="true"] {
  background: #f5f6f8;
  color: #0f1115;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.primary-tabs button:nth-child(n+4) {
  min-height: 42px;
}

.auth-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-color: rgba(245, 246, 248, 0.18);
  background: rgba(17, 20, 27, 0.94);
}

.auth-gate img {
  width: 48px;
  height: 48px;
}

.auth-gate h2,
.auth-gate .lead { color: #f5f6f8; }
.auth-gate .lead { margin: 6px 0 0; color: rgba(245, 246, 248, 0.7); }
.auth-gate button { padding-inline: 18px; border-color: #18c77f; background: #18c77f; color: #07110d; }

.is-unauthorized .summary,
.is-unauthorized .navigation-panel,
.is-unauthorized .view { display: none !important; }

.studio-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(340px, 1.14fr);
  align-items: start;
  gap: 18px;
}

.studio-controls {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.studio-workspace .watermark-preview {
  position: sticky;
  top: 154px;
}

.view.is-active {
  animation: markora-panel-in 180ms ease-out;
}

@keyframes markora-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.watermark-preview {
  border-radius: 18px;
  background: #111827;
  border-color: rgba(245, 246, 248, 0.16);
}

.watermark-preview-toolbar > span {
  color: #f5f6f8;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preview-ratios button,
.watermark-tabs button {
  border-color: rgba(167, 173, 184, 0.5);
  background: rgba(245, 246, 248, 0.88);
  color: #101820;
}

.preview-ratios button.is-active,
.watermark-tabs button.is-active {
  background: #18c77f;
  border-color: #18c77f;
  color: #07110d;
}

.preview-frame {
  width: min(100%, 420px);
  border-radius: 18px;
  border-color: rgba(245, 246, 248, 0.2);
  background: #0f1115;
}

.preview-scene {
  background:
    linear-gradient(180deg, rgba(15, 17, 21, 0.1), rgba(15, 17, 21, 0.34)),
    url("./brand/Markora_Hero_Mobile_1440x1920.webp") center / cover no-repeat;
}

.preview-sky,
.preview-subject {
  display: none;
}

.preview-visible-watermark {
  border-color: rgba(245, 246, 248, 0.75);
  border-radius: 0;
  background-color: rgba(15, 17, 21, 0.38);
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.preview-visible-watermark:not(.is-text) {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(245, 246, 248, 0.34);
  background-size: contain;
}

.preview-visible-watermark.is-text {
  border-style: solid;
  background: rgba(15, 17, 21, 0.42);
}

.preview-visible-watermark.motion-orbit {
  top: 42%;
  left: 46%;
  animation: preview-orbit 5.8s linear infinite;
}

.preview-visible-watermark.motion-corners {
  top: 7%;
  left: 7%;
  animation: preview-corners 5.5s steps(1, end) infinite;
}

.preview-visible-watermark.motion-chaotic {
  animation: preview-chaotic 4.8s ease-in-out infinite alternate;
}

.preview-motion-path.is-visible {
  border-color: rgba(24, 199, 127, 0.5);
}

.preview-motion-path.motion-orbit {
  inset: 22%;
  border-radius: 999px;
}

.preview-motion-path.motion-corners,
.preview-motion-path.motion-chaotic {
  inset: 9%;
}

.preview-hidden-mark {
  border-color: rgba(24, 199, 127, 0.68);
  background: rgba(24, 199, 127, 0.12);
  color: #a7ffd0;
}

.form-heading {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(167, 173, 184, 0.26);
}

.field span {
  color: #101820;
}

button:hover:not(:disabled) {
  filter: brightness(1.03);
}

button:disabled,
.tariff-details button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.3);
}

button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

.lead[data-state] {
  position: relative;
  padding-left: 18px;
}

.lead[data-state]::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a7adb8;
}

.lead[data-state="loading"]::before {
  background: #2f9fd8;
  animation: status-pulse 1s ease-in-out infinite alternate;
}

.lead[data-state="success"]::before { background: #18c77f; }
.lead[data-state="error"]::before { background: #d64545; }

@keyframes status-pulse {
  from { opacity: 0.35; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.color-swatch.is-selected,
.font-swatch.is-selected {
  border-color: #18c77f;
  background: rgba(24, 199, 127, 0.14);
  box-shadow: inset 0 0 0 1px #18c77f;
}

.font-swatch {
  min-height: 54px;
  background: #ffffff;
}

.color-swatch {
  background: #ffffff;
}

.tariff {
  border-color: rgba(167, 173, 184, 0.5);
  border-radius: 18px;
}

.tariff-summary {
  background: linear-gradient(135deg, #101820, #263241);
}

.tariff.is-featured .tariff-summary {
  background: linear-gradient(135deg, #0f1115, #0c9a62);
}

.tariff-team_start .tariff-summary,
.tariff-team_pro .tariff-summary,
.tariff-team_business .tariff-summary {
  background: linear-gradient(135deg, #14392b, #168a65);
}

.tariff-details button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #18c77f;
  color: #07110d;
  font-weight: 900;
}

@keyframes preview-orbit {
  from { transform: rotate(0deg) translateX(108px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(108px) rotate(-360deg); }
}

@keyframes preview-corners {
  0%, 24% { top: 7%; left: 7%; }
  25%, 49% { top: 7%; left: 62%; }
  50%, 74% { top: 72%; left: 62%; }
  75%, 100% { top: 72%; left: 7%; }
}

@keyframes preview-chaotic {
  0% { top: 8%; left: 8%; }
  24% { top: 66%; left: 58%; }
  51% { top: 24%; left: 68%; }
  76% { top: 72%; left: 19%; }
  100% { top: 36%; left: 42%; }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .shell {
    width: min(100%, 370px);
    max-width: 370px;
    margin-inline: 0;
    padding: 12px 10px 28px;
    overflow-x: hidden;
  }

  .topbar {
    min-width: 0;
    border-radius: 18px;
  }

  .brand-lockup {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-lockup img {
    width: min(116px, 100%);
  }

  .topbar-copy { display: none; }

  .status {
    display: none;
  }

  .platform-hero {
    max-width: 100%;
    padding: 26px 22px;
    background:
      linear-gradient(180deg, rgba(15, 17, 21, 0.96), rgba(15, 17, 21, 0.78)),
      url("./brand/Markora_Hero_Mobile_1440x1920.webp") center / cover no-repeat;
  }

  .platform-hero h2 {
    max-width: 300px;
    font-size: clamp(24px, 6.8vw, 28px);
    line-height: 1.08;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .platform-hero p:not(.eyebrow) {
    max-width: 100%;
  }

  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary div { padding: 10px 8px; }
  .summary span { font-size: 10px; }
  .summary strong { font-size: 12px; }
  .primary-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .primary-tabs button {
    min-width: 0;
    width: 100%;
    padding-inline: 5px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .primary-tabs button:nth-child(n+4) { font-size: 12px; }
  .studio-workspace { grid-template-columns: 1fr; }
  .studio-workspace .watermark-preview { position: relative; top: auto; }
  .color-palette, .font-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-gate { grid-template-columns: auto minmax(0, 1fr); }
  .auth-gate button { grid-column: 1 / -1; width: 100%; }
  .empty-state { grid-template-columns: 1fr; }
  .empty-state img { height: 130px; }
  .empty-state div { padding: 0 14px 16px; }
  .empty-state p { padding-right: 0; }
}

@media (min-width: 761px) {
  #view-watermark { padding: 22px; }
  #view-watermark > .command-list,
  #view-watermark > .settings-grid { margin-left: calc(43% + 18px); }
}
