@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&display=swap');

:root {
  --bg-0: #050710;
  --bg-1: #0a1022;
  --bg-2: #0d1734;
  --surface: rgba(10, 18, 39, 0.78);
  --surface-strong: rgba(14, 25, 53, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(151, 176, 255, 0.2);
  --line-strong: rgba(190, 207, 255, 0.28);
  --text: #eef4ff;
  --text-muted: #b6c4e5;
  --text-soft: #8e9fc8;
  --accent-a: #59c1ff;
  --accent-b: #9e78ff;
  --accent-c: #2ce5b5;
  --accent-glow: rgba(89, 193, 255, 0.34);
  --success: #2ce5b5;
  --success-glow: rgba(44, 229, 181, 0.18);
  --warn: #f7b046;
  --warn-glow: rgba(247, 176, 70, 0.2);
  --danger: #ff647f;
  --danger-glow: rgba(255, 100, 127, 0.18);
  --shadow-xl: 0 36px 70px rgba(2, 6, 18, 0.62);
  --shadow-lg: 0 22px 44px rgba(4, 8, 18, 0.54);
  --shadow-sm: 0 10px 24px rgba(2, 5, 12, 0.32);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Manrope', 'Zen Kaku Gothic New', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 193, 255, 0.24), transparent 40%),
    radial-gradient(circle at 88% 14%, rgba(158, 120, 255, 0.22), transparent 36%),
    radial-gradient(circle at 44% 100%, rgba(44, 229, 181, 0.15), transparent 40%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 38%, var(--bg-2));
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

/* Light overlay for landing page - fades in/out smoothly */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg, #f0f4fb, #e8edf8 40%, #e2e8f4);
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.theme-light::after {
  opacity: 1;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

:where(button, input, select):focus-visible {
  outline: 2px solid #9ad8ff;
  outline-offset: 2px;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(76px);
  opacity: 0.62;
  animation: orb-float 14s ease-in-out infinite;
}

.orb-a {
  width: 36vw;
  height: 36vw;
  min-width: 240px;
  min-height: 240px;
  top: -8vw;
  left: -6vw;
  background: rgba(89, 193, 255, 0.44);
}

.orb-b {
  width: 32vw;
  height: 32vw;
  min-width: 220px;
  min-height: 220px;
  top: 4vh;
  right: -10vw;
  background: rgba(158, 120, 255, 0.34);
  animation-delay: -4s;
}

.orb-c {
  width: 44vw;
  height: 44vw;
  min-width: 260px;
  min-height: 260px;
  bottom: -24vw;
  left: 34%;
  background: rgba(44, 229, 181, 0.28);
  animation-delay: -8s;
}

#app {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - clamp(18px, 5vw, 56px)));
  margin: 0 auto;
  padding: clamp(14px, 3vw, 30px) 0;
  min-height: 100dvh;
}

.step {
  display: none;
  opacity: 0;
  transform: translateY(18px) scale(0.986);
}

.step.active {
  display: block;
  animation: step-in 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.step-surface {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(152deg, rgba(16, 27, 58, 0.9), rgba(9, 15, 33, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow-xl);
  padding: clamp(22px, 4vw, 38px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.step-surface::before {
  content: '';
  position: absolute;
  inset: -30% auto auto -20%;
  width: 56%;
  height: 56%;
  background: radial-gradient(circle, rgba(89, 193, 255, 0.24), rgba(89, 193, 255, 0));
  pointer-events: none;
}

.step-surface::after {
  content: '';
  position: absolute;
  inset: auto -22% -32% auto;
  width: 52%;
  height: 52%;
  background: radial-gradient(circle, rgba(44, 229, 181, 0.16), rgba(44, 229, 181, 0));
  pointer-events: none;
}

.surface-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 18%, rgba(0, 0, 0, 0.66), transparent 74%);
}

.setup-surface,
.call-surface,
.summary-surface {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.setup-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.language-switcher {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.lang-flag {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lang-flag:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}

.lang-flag.active {
  border-color: var(--accent-a);
  background: rgba(89, 193, 255, 0.15);
  box-shadow: 0 0 8px rgba(89, 193, 255, 0.3);
}

.lang-flag:focus-visible {
  outline: 2px solid var(--accent-a);
  outline-offset: 2px;
}

.logo-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-sm);
}

.hero-kicker {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(0.88rem, 1.8vw, 1rem);
  max-width: 40ch;
}

.hero-title {
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

.gradient-text {
  background: linear-gradient(92deg, #7dd5ff 8%, #9f84ff 45%, #53ffd0 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shimmer-text {
  background-size: 200% auto;
  animation: shimmer 4.6s linear infinite;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.hero-stat {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.hero-stat-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.hero-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.setup-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.setup-form-card,
.setup-visual-card {
  border-radius: calc(var(--radius-md) + 2px);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(14, 24, 51, 0.74), rgba(10, 17, 34, 0.86));
  box-shadow: var(--shadow-lg);
  padding: clamp(16px, 2.6vw, 24px);
}

.setup-visual-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.visual-eyebrow {
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.visual-title {
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.visual-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.visual-list li {
  position: relative;
  padding-left: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.visual-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-c));
  box-shadow: 0 0 0 4px rgba(89, 193, 255, 0.08);
}

.mini-preview {
  margin-top: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
  padding: 14px;
  display: grid;
  gap: 10px;
}

.mini-line {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125, 213, 255, 0.7), rgba(158, 120, 255, 0.45));
  animation: pulse-line 2.3s ease-in-out infinite;
}

.mini-line.short {
  width: 72%;
  animation-delay: -0.8s;
}

.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-chip {
  width: 72px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.label-icon {
  font-size: 0.85rem;
}

.form-group input,
.form-group select,
.help-area input {
  width: 100%;
  min-height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 21, 45, 0.9), rgba(8, 14, 30, 0.92));
  color: var(--text);
  padding: 0 15px;
  font-size: 0.94rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-group input::placeholder,
.help-area input::placeholder {
  color: rgba(190, 206, 245, 0.48);
}

.form-group select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(214, 224, 255, 0.75) 50%),
    linear-gradient(135deg, rgba(214, 224, 255, 0.75) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.form-group input:focus,
.form-group select:focus,
.help-area input:focus {
  outline: none;
  border-color: #8ecbff;
  box-shadow: 0 0 0 3px rgba(89, 193, 255, 0.18), 0 18px 28px rgba(2, 8, 20, 0.48);
}

.form-group input:hover,
.form-group select:hover,
.help-area input:hover {
  border-color: var(--line-strong);
}

.scenario-fields {
  opacity: 1;
}

.scenario-fields.is-fading-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.scenario-fields.is-fading-in {
  animation: fade-in 0.22s ease;
}

.skeleton-group {
  pointer-events: none;
}

.skeleton-line,
.skeleton-input {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border-radius: 10px;
}

.skeleton-line {
  width: 44%;
  height: 10px;
  margin-bottom: 8px;
}

.skeleton-input {
  min-height: 52px;
}

.skeleton-line::after,
.skeleton-input::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  animation: sweep 1.2s linear infinite;
}

button {
  border: none;
  cursor: pointer;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(112deg, #43b6ff 0%, #6f9aff 35%, #59d8d6 100%);
  box-shadow: 0 16px 30px rgba(31, 124, 203, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(32, 132, 213, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}

.btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

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

.glow-btn::after {
  content: '';
  position: absolute;
  inset: -160% auto -160% -34%;
  width: 38%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: rotate(18deg) translateX(0);
  transition: transform 0.68s ease;
  pointer-events: none;
}

.glow-btn:hover::after {
  transform: rotate(18deg) translateX(310%);
}

.btn-secondary {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
}

.btn-secondary:hover {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

#btn-copy-summary.copied {
  border-color: rgba(44, 229, 181, 0.5);
  background: rgba(44, 229, 181, 0.17);
  color: #8dffe3;
}

.btn-danger {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 100, 127, 0.38);
  color: #ff99ae;
  background: linear-gradient(155deg, rgba(255, 100, 127, 0.16), rgba(255, 100, 127, 0.08));
}

.btn-danger:hover {
  box-shadow: 0 12px 24px rgba(97, 22, 38, 0.34);
}

.setup-footer {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.badge-safe {
  color: #7cf6d4;
  background: rgba(44, 229, 181, 0.15);
  border-color: rgba(44, 229, 181, 0.22);
}

.badge-mini {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  font-size: 0.66rem;
  padding: 4px 9px;
}

.badge-accent {
  color: #aee0ff;
  background: rgba(89, 193, 255, 0.14);
  border-color: rgba(89, 193, 255, 0.25);
  font-size: 0.66rem;
  padding: 4px 9px;
}

.call-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(16, 27, 56, 0.76), rgba(10, 17, 35, 0.86));
  box-shadow: var(--shadow-sm);
}

.call-header-left,
.call-header-right {
  display: flex;
  align-items: center;
  gap: 11px;
}

.call-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(89, 193, 255, 0.32), rgba(158, 120, 255, 0.42));
  border: 1px solid rgba(169, 197, 255, 0.32);
  color: #ebf2ff;
}

.status-label,
.call-timer-label {
  color: var(--text-soft);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.call-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 700;
}

.call-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: signal-pulse 1.8s ease-out infinite;
}

.call-status.connecting,
.call-status.ringing {
  color: var(--warn);
}

.call-status.ended {
  color: var(--danger);
}

.call-timer-block {
  text-align: right;
}

.call-timer {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.section-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title-row h3 {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(44, 229, 181, 0.28);
  animation: signal-pulse 1.8s ease-out infinite;
}

.quick-phrases {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}

.phrase-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: var(--text);
  padding: 9px 13px;
  font-size: 0.82rem;
  line-height: 1.35;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.phrase-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: linear-gradient(155deg, rgba(89, 193, 255, 0.19), rgba(255, 255, 255, 0.04));
}

.phrase-btn.copied {
  border-color: rgba(44, 229, 181, 0.52);
  color: #8dffe3;
  background: rgba(44, 229, 181, 0.18);
}

.call-main-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.panel {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(13, 22, 47, 0.72), rgba(9, 15, 31, 0.86));
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.empty-state {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 9px;
}

.empty-state p {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.transcript,
.coaching,
.summary-transcript {
  scrollbar-width: thin;
  scrollbar-color: rgba(151, 176, 255, 0.38) rgba(255, 255, 255, 0.04);
}

.transcript {
  max-height: 330px;
  min-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

.transcript .msg {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  border: 1px solid transparent;
  animation: fade-in 0.2s ease;
}

.transcript .msg.inbound {
  color: rgba(229, 236, 255, 0.84);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.transcript .msg.outbound {
  color: #dff7ff;
  background: rgba(89, 193, 255, 0.13);
  border-color: rgba(89, 193, 255, 0.3);
}

.coaching {
  max-height: 330px;
  min-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(158deg, rgba(89, 193, 255, 0.13), rgba(158, 120, 255, 0.1) 46%, rgba(255, 255, 255, 0.03));
  padding: 14px;
  box-shadow: 0 16px 28px rgba(3, 8, 21, 0.35);
  animation: fade-in 0.23s ease;
}

.coach-card .jp {
  color: #f4f8ff;
  font-size: clamp(1rem, 3vw, 1.3rem);
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.coach-card .romaji {
  color: var(--accent-a);
  font-size: 0.78rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.03em;
  margin-top: 2px;
  opacity: 0.85;
}

.coach-card-footer {
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.coach-card .meaning {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
  flex: 1;
}

.coach-copy-btn {
  appearance: none;
  border-radius: 9px;
  border: 1px solid rgba(151, 176, 255, 0.34);
  background: rgba(8, 14, 30, 0.52);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.coach-copy-btn:hover {
  border-color: #8fd2ff;
  background: rgba(89, 193, 255, 0.14);
}

.coach-copy-btn.copied {
  border-color: rgba(44, 229, 181, 0.46);
  background: rgba(44, 229, 181, 0.16);
  color: #8dffe3;
}

.coach-copy-btn .state-check {
  display: none;
}

.coach-copy-btn.copied .state-copy {
  display: none;
}

.coach-copy-btn.copied .state-check {
  display: inline;
}

.live-summary-area {
  display: flex;
  flex-direction: column;
}

.live-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.summary-item.confirmed {
  border-color: rgba(44, 229, 181, 0.3);
  background: rgba(44, 229, 181, 0.06);
}

.summary-item-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.summary-item-value {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

.summary-item-value.pending {
  color: rgba(255, 180, 80, 0.8);
  font-size: 0.78rem;
}

.summary-item-value.confirmed {
  color: #2ce5b5;
}

.help-area {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0) 0%, rgba(8, 12, 24, 0.92) 40%, rgba(8, 12, 24, 0.98) 100%);
}

.help-area .btn-secondary {
  min-width: 52px;
  min-height: 52px;
  padding: 0;
}

#step-call .step-surface {
  max-height: calc(100dvh - clamp(28px, 6vw, 66px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.summary-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  margin-bottom: 4px;
}

.summary-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(44, 229, 181, 0.34);
  background: linear-gradient(150deg, rgba(44, 229, 181, 0.24), rgba(44, 229, 181, 0.08));
  box-shadow: 0 14px 30px rgba(11, 64, 53, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.summary-subtitle {
  max-width: 44ch;
}

.summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.summary-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(158deg, rgba(14, 25, 52, 0.72), rgba(9, 15, 31, 0.88));
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid rgba(151, 176, 255, 0.15);
  background: linear-gradient(135deg, rgba(89, 193, 255, 0.14), rgba(158, 120, 255, 0.12));
  box-shadow: 0 4px 12px rgba(89, 193, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.summary-label {
  color: var(--text-soft);
  font-size: 0.67rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 7px;
}

.summary-value {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  font-weight: 800;
  color: var(--text);
}

.summary-confirmed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-confirmed-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.summary-confirmed-icon {
  font-size: 1.4rem;
}

.summary-confirmed-label {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-confirmed-value {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.summary-notes-value {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.5;
}

.summary-transcript {
  max-height: 270px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.summary-line {
  display: flex;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  line-height: 1.5;
}

.summary-line.inbound {
  border-left: 2px solid rgba(255, 255, 255, 0.16);
}

.summary-line.outbound {
  border-left: 2px solid rgba(89, 193, 255, 0.44);
}

.summary-line.system {
  color: var(--text-soft);
  font-style: italic;
}

.summary-speaker {
  flex-shrink: 0;
  min-width: 50px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.summary-text {
  color: var(--text);
  word-break: break-word;
}

.summary-buttons {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.summary-buttons .btn-primary,
.summary-buttons .btn-secondary {
  width: 100%;
  margin-top: 0;
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(460px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(10, 18, 38, 0.95), rgba(8, 13, 28, 0.96));
  color: var(--text);
  font-size: 0.83rem;
  padding: 10px 14px;
  box-shadow: 0 14px 28px rgba(2, 6, 17, 0.46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(44, 229, 181, 0.38);
}

.toast.error {
  border-color: rgba(255, 100, 127, 0.42);
}

.transcript::-webkit-scrollbar,
.coaching::-webkit-scrollbar,
.summary-transcript::-webkit-scrollbar,
#step-call .step-surface::-webkit-scrollbar {
  width: 6px;
}

.transcript::-webkit-scrollbar-thumb,
.coaching::-webkit-scrollbar-thumb,
.summary-transcript::-webkit-scrollbar-thumb,
#step-call .step-surface::-webkit-scrollbar-thumb {
  background: rgba(151, 176, 255, 0.34);
  border-radius: 999px;
}

.transcript::-webkit-scrollbar-track,
.coaching::-webkit-scrollbar-track,
.summary-transcript::-webkit-scrollbar-track,
#step-call .step-surface::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.986);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

@keyframes sweep {
  to {
    transform: translateX(100%);
  }
}

@keyframes signal-pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes orb-float {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  50% {
    transform: translateY(-12px) translateX(12px) scale(1.05);
  }
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.72;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.96);
  }
}

@media (min-width: 960px) {
  .setup-shell {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .call-main-grid {
    grid-template-columns: 1.2fr 1.2fr 0.6fr;
  }

  .summary-grid {
    grid-template-columns: 0.82fr 1.18fr;
  }

  .summary-transcript-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  #app {
    width: min(1140px, calc(100% - 18px));
    padding: 10px 0;
  }

  .step-surface {
    border-radius: 20px;
    padding: 18px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .call-header {
    align-items: flex-start;
  }

  .call-header-right {
    flex-direction: column;
    align-items: flex-end;
  }

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

@media (max-width: 460px) {
  .language-switcher {
    justify-content: space-between;
    gap: 8px;
  }

  #language-select {
    width: min(190px, 58vw);
  }

  .hero-title {
    font-size: 1.48rem;
  }

  .form-group label,
  .section-title-row h3,
  .summary-label,
  .status-label,
  .call-timer-label {
    letter-spacing: 0.08em;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger {
    font-size: 0.88rem;
  }
}

/* --- Landing Page --- */
.landing-surface {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: clamp(32px, 6vw, 56px);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 255, 0.88));
  border-color: rgba(180, 196, 232, 0.35);
  color: #1a1e2e;
}

.landing-surface .surface-grid {
  background:
    linear-gradient(rgba(89, 153, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 153, 255, 0.06) 1px, transparent 1px);
}

.landing-surface::before {
  background: radial-gradient(circle, rgba(89, 193, 255, 0.12), rgba(89, 193, 255, 0));
}

.landing-surface::after {
  background: radial-gradient(circle, rgba(44, 229, 181, 0.08), rgba(44, 229, 181, 0));
}

.landing-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.landing-surface .hero-kicker {
  color: #6b7a99;
}

.landing-surface h1,
.landing-surface .hero-title {
  color: #1a1e2e;
}

.landing-surface .hero-title span:not(.gradient-text) {
  color: #1a1e2e;
}

.landing-desc {
  color: #4a5570;
  font-size: clamp(0.92rem, 1.9vw, 1.08rem);
  line-height: 1.7;
  max-width: 52ch;
}

.landing-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6b7a99;
  margin-bottom: 14px;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.landing-step-card {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 196, 232, 0.4);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.7), rgba(244, 248, 255, 0.5));
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(89, 130, 200, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-step-card:hover {
  border-color: rgba(89, 193, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(89, 130, 200, 0.14);
}

.landing-step-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-b);
  opacity: 0.5;
}

.landing-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(89, 193, 255, 0.2), rgba(158, 120, 255, 0.15));
  border: 1px solid rgba(89, 193, 255, 0.2);
  box-shadow: 0 4px 16px rgba(89, 193, 255, 0.12);
}

.landing-step-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a1e2e;
}

.landing-step-desc {
  font-size: 0.8rem;
  color: #5a6580;
  line-height: 1.5;
}

.landing-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.landing-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 196, 232, 0.35);
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-feature:hover {
  border-color: rgba(89, 193, 255, 0.4);
  box-shadow: 0 4px 16px rgba(89, 130, 200, 0.1);
}

.landing-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: linear-gradient(150deg, rgba(44, 229, 181, 0.18), rgba(158, 120, 255, 0.14));
  border: 1px solid rgba(44, 229, 181, 0.2);
  box-shadow: 0 4px 12px rgba(44, 229, 181, 0.1);
}

.landing-feature-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1a1e2e;
  margin-bottom: 4px;
}

.landing-feature-desc {
  font-size: 0.78rem;
  color: #5a6580;
  line-height: 1.5;
}

.landing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-large {
  width: auto;
  min-width: 240px;
  min-height: 56px;
  font-size: 1.05rem;
  padding: 0 32px;
  border-radius: 16px;
}

.landing-cta-sub {
  font-size: 0.78rem;
  color: #6b7a99;
}

/* Landing language switcher light theme */
.landing-surface .lang-flag {
  background: rgba(0, 0, 0, 0.05);
  border-color: transparent;
}

.landing-surface .lang-flag:hover {
  background: rgba(0, 0, 0, 0.1);
}

.landing-surface .lang-flag.active {
  border-color: #5a9eff;
  background: rgba(89, 153, 255, 0.12);
  box-shadow: 0 0 8px rgba(89, 153, 255, 0.2);
}

/* Landing orbs - lighter */
.theme-light .orb-a {
  background: rgba(89, 193, 255, 0.2);
}

.theme-light .orb-b {
  background: rgba(158, 120, 255, 0.15);
}

.theme-light .orb-c {
  background: rgba(44, 229, 181, 0.12);
}

/* --- Setup top bar --- */
.setup-top-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-back:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.language-switcher-inline {
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .landing-steps {
    grid-template-columns: 1fr;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .landing-desc {
    font-size: 0.88rem;
  }

  .btn-large {
    width: 100%;
    min-width: unset;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
