:root {
  color-scheme: dark;
  --bg: #091015;
  --bg-soft: #101920;
  --panel: rgba(20, 28, 34, 0.9);
  --panel-strong: #18222b;
  --line: rgba(162, 180, 191, 0.16);
  --line-strong: rgba(176, 194, 204, 0.34);
  --text: #edf4f7;
  --muted: #8d9daa;
  --sea: #7fd2c7;
  --amber: #d69a69;
  --steel: #7f919f;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(127, 210, 199, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(214, 154, 105, 0.16), transparent 24%),
    linear-gradient(180deg, #070d12, #10171d 46%, #0a1015);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(42px);
  pointer-events: none;
}

.glow-top {
  top: -5rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  background: rgba(127, 210, 199, 0.22);
}

.glow-bottom {
  left: -5rem;
  bottom: -6rem;
  width: 18rem;
  height: 18rem;
  background: rgba(214, 154, 105, 0.18);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 44rem);
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem calc(2rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 1rem;
}

.translator-shell {
  display: grid;
  gap: 1rem;
}

.app-footer {
  padding: 0.25rem 0 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.app-footer a {
  color: #dbe6ec;
  text-decoration: none;
  border-bottom: 1px solid rgba(219, 230, 236, 0.28);
}

.consent-banner {
  position: fixed;
  z-index: 30;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  width: min(100% - 2rem, 44rem);
  margin: 0 auto;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(135deg, rgba(30, 40, 48, 0.96), rgba(14, 20, 25, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}

.consent-banner p {
  color: #dfe8ed;
  line-height: 1.45;
}

.consent-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.consent-actions > * {
  flex: 1 1 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 1.7rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.015) 10%, transparent 24%),
    linear-gradient(135deg, rgba(41, 52, 60, 0.74), rgba(19, 27, 33, 0.92) 52%, rgba(35, 45, 54, 0.76)),
    var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}

.hero-panel {
  padding-top: 1.3rem;
  overflow: hidden;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-logo {
  width: clamp(5rem, 18vw, 7.5rem);
  height: clamp(5rem, 18vw, 7.5rem);
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28));
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, transparent 56%, rgba(127, 145, 159, 0.08));
  pointer-events: none;
}

.eyebrow,
.meta-label,
.card-label,
.strip-label,
.field span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

.hero-title {
  margin-top: 0.15rem;
  font-size: clamp(1.95rem, 7.4vw, 3.9rem);
  line-height: 1;
  letter-spacing: -0.055em;
  white-space: nowrap;
  color: #f3f8fb;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 0 rgba(191, 206, 215, 0.12),
    0 10px 18px rgba(0, 0, 0, 0.34),
    0 18px 36px rgba(0, 0, 0, 0.24);
  transform: perspective(900px) translateZ(0);
}

.hero-title-multiline {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 0.94;
  font-size: clamp(1.75rem, 6.8vw, 3.2rem);
}

.hero-title-manual {
  text-align: center;
}

.hero-title-manual span {
  display: block;
}

.hero-title-manual::after {
  margin-left: auto;
  margin-right: auto;
}

.hero-title::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 18rem;
  height: 0.3rem;
  margin-top: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(127, 210, 199, 0.95), rgba(214, 154, 105, 0.8), rgba(255, 255, 255, 0));
  box-shadow: 0 0 24px rgba(127, 210, 199, 0.18);
}

h2 {
  margin-top: 0.2rem;
  font-size: 1.35rem;
  line-height: 1.05;
}

.lead-copy {
  color: #d8e2e8;
  line-height: 1.5;
  font-size: 1rem;
}

.helper-copy,
.message-box {
  line-height: 1.45;
}

.hero-strip {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.7rem;
  align-items: stretch;
}

.strip-card,
.select-card,
.meta-card,
.transcript-card {
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%),
    rgba(7, 12, 16, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.strip-card,
.select-card {
  padding: 0.95rem 1rem;
}

.strip-card strong,
.select-card select {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.strip-arrow {
  display: grid;
  place-items: center;
  color: var(--amber);
  font-weight: 800;
  font-size: 1.4rem;
}

.swap-button {
  display: grid;
  place-items: center;
  min-width: 3.4rem;
  min-height: 3.4rem;
  align-self: center;
  border-radius: 1.15rem;
  border: 1px solid rgba(109, 200, 188, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(135deg, rgba(127, 210, 199, 0.22), rgba(214, 154, 105, 0.18));
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px rgba(0, 0, 0, 0.24);
}

.select-card select,
.field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  appearance: none;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.timer-chip {
  min-width: 4.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(109, 200, 188, 0.24);
  background: linear-gradient(135deg, rgba(127, 210, 199, 0.14), rgba(127, 145, 159, 0.14));
  text-align: center;
  font-weight: 800;
  color: #dff7f1;
}

.message-box {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(11, 17, 22, 0.72), rgba(8, 12, 16, 0.62));
  border: 1px solid var(--line);
  color: #d6e1e7;
}

.session-inline {
  display: grid;
  gap: 0.6rem;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(109, 200, 188, 0.24);
  background: rgba(109, 200, 188, 0.08);
  color: #e3f7f3;
  font-weight: 800;
}

.session-note {
  color: #d6e1e7;
  line-height: 1.45;
}

.quick-meta,
.cta-stack,
.config-panel,
.transcript-panel {
  display: grid;
  gap: 0.85rem;
}

.quick-meta {
  margin-top: 0.9rem;
}

.meta-card {
  padding: 0.9rem 1rem;
}

.meta-card strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
  line-height: 1.35;
}

.primary-cta,
.secondary-cta,
.ghost-cta {
  min-height: 3.5rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    border-color 120ms ease;
}

.primary-cta {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 22%),
    linear-gradient(135deg, var(--amber), #c67a62);
  font-weight: 800;
  font-size: 1.08rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(214, 154, 105, 0.24);
}

.secondary-surface {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(127, 210, 199, 0.18), rgba(214, 154, 105, 0.22));
  color: var(--text);
  box-shadow: none;
}

.cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.secondary-cta,
.ghost-cta {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
    rgba(255, 255, 255, 0.035);
  font-weight: 700;
}

.mini-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-cta {
  min-height: 2.7rem;
  padding: 0 0.9rem;
}

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

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field input {
  min-height: 3.4rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(6, 10, 13, 0.35);
}

.advanced-panel {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px dashed rgba(152, 176, 188, 0.26);
  background: rgba(8, 12, 15, 0.25);
}

.ghost-inline {
  min-height: 2.8rem;
  border-radius: 0.95rem;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
}

.notice-card {
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    rgba(7, 11, 15, 0.36);
}

.onboarding-panel,
.settings-entry {
  display: grid;
  gap: 0.85rem;
}

.onboarding-actions {
  display: grid;
  gap: 0.7rem;
}

.guide-button {
  min-height: 3rem;
}

.notice-steps {
  border-color: rgba(109, 200, 188, 0.2);
}

.notice-title {
  margin-bottom: 0.4rem;
  font-weight: 800;
  color: var(--text);
}

.steps-list {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  color: #d8e2e8;
  line-height: 1.5;
}

.steps-list li + li {
  margin-top: 0.25rem;
}

.transcript-card {
  padding: 1rem;
}

.transcript-card p {
  margin-top: 0.45rem;
  line-height: 1.45;
  color: #f1f6f8;
}

.source-card {
  border-color: rgba(109, 200, 188, 0.22);
}

.target-card {
  border-color: rgba(213, 143, 94, 0.22);
}

.helper-copy {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 700px) {
  .app-shell {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

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

@media (max-width: 480px) {
  .hero-brand {
    align-items: flex-start;
  }

  .hero-logo {
    width: 4.5rem;
    height: 4.5rem;
  }

  .hero-title {
    font-size: clamp(1.72rem, 9vw, 2.2rem);
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .swap-button {
    width: 100%;
  }

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

  .mini-actions {
    width: 100%;
  }

  .ghost-cta {
    flex: 1 1 0;
  }
}
