:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #16202d;
  --muted: #667385;
  --line: #d7dee8;
  --accent: #1677ff;
  --accent-strong: #075fd4;
  --green: #1f8a58;
  --shadow: 0 14px 34px rgba(22, 32, 45, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.app-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar,
.brand,
.action-row,
.platform-row,
.format-row {
  display: flex;
  align-items: center;
}

.topbar {
  min-height: 66px;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  min-width: 0;
  gap: 10px;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.eyebrow,
h1,
h2,
p {
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  font-size: 28px;
  line-height: 1.08;
}

h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.lang-switch {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.lang-switch button,
.platform-chip,
.primary-action,
.secondary-action {
  min-height: 38px;
  border-radius: 7px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lang-switch button {
  background: transparent;
  color: var(--muted);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.finder-panel,
.info-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.field-label,
.link-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.link-field {
  margin-top: 14px;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.4;
}

textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(22, 119, 255, 0.18);
}

.platform-row,
.format-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.platform-chip {
  padding: 0 12px;
  color: var(--muted);
  background: #f5f7fa;
  border: 1px solid var(--line);
}

.platform-chip[aria-pressed="true"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.format-row label {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f7fa;
  color: var(--ink);
  font-weight: 800;
}

.action-row {
  gap: 8px;
  margin-top: 14px;
}

.primary-action,
.secondary-action {
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-action {
  background: var(--accent);
  color: #fff;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.secondary-action {
  background: #eef2f7;
  color: var(--ink);
}

.status-text {
  min-height: 22px;
  margin-top: 10px;
  color: var(--green);
  font-weight: 800;
}

.info-panel p {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 12px;
  }

  h1 {
    font-size: 24px;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
