@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700;800&display=swap');

:root {
  --pri: #0D9488;
  --pri-dark: #0F766E;
  --pri-light: #14B8A6;
  --sec: #14B8A6;
  --cta: #F97316;
  --cta-hover: #EA580C;
  --bg: #F0FDFA;
  --bg-card: rgba(255,255,255,0.82);
  --bg-card-solid: #ffffff;
  --text: #134E4A;
  --text-muted: #5B8B89;
  --text-light: #94A3B8;
  --border: #CCFBF1;
  --border-input: #E2E8F0;
  --border-focus: var(--pri);
  --shadow: 0 24px 64px rgba(15,23,42,0.08);
  --shadow-btn: 0 18px 40px rgba(5,150,105,0.22);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.04);
  --glass-bg: rgba(255,255,255,0.78);
  --glass-border: rgba(255,255,255,0.5);
  --modal-bg: rgba(255,255,255,0.96);
  --badge-bg: rgba(255,255,255,0.7);
  --badge-text: #059669;
  --field-bg: #F8FAFC;
  --tag-bg: rgba(255,255,255,0.12);
  --tag-border: rgba(255,255,255,0.16);
  --tag-text: rgba(255,255,255,0.84);
  --tag-active-bg: rgba(255,255,255,0.25);
  --tag-active-border: rgba(255,255,255,0.4);
  --footer-bg: #0F172A;
  --footer-text: rgba(255,255,255,0.68);
  --overlay: rgba(15,23,42,0.35);
  --toast-bg: #059669;
  --toast-text: #fff;
  --scrollbar-track: #F1F5F9;
  --scrollbar-thumb: #CBD5E1;
  --info-panel-from: #0D9488;
  --info-panel-to: #0F766E;
  --orb-1: #A7F3D0;
  --orb-2: #DDD6FE;
  --orb-3: #FDE68A;
  --mesh-1: #A7F3D0;
  --mesh-2: #DDD6FE;
  --mesh-3: #FDE68A;
  --mesh-4: #BFDBFE;
  --icon-size: 24px;
}

html.dark {
  --bg: #0F172A;
  --bg-card: rgba(30,41,59,0.85);
  --bg-card-solid: #1E293B;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border: #1E293B;
  --border-input: #334155;
  --border-focus: var(--pri-light);
  --shadow: 0 24px 64px rgba(0,0,0,0.25);
  --shadow-btn: 0 18px 40px rgba(5,150,105,0.15);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.12);
  --glass-bg: rgba(30,41,59,0.78);
  --glass-border: rgba(255,255,255,0.06);
  --modal-bg: rgba(30,41,59,0.96);
  --badge-bg: rgba(13,148,136,0.2);
  --badge-text: #5EEAD4;
  --field-bg: #1E293B;
  --footer-bg: #020617;
  --footer-text: rgba(255,255,255,0.5);
  --overlay: rgba(0,0,0,0.55);
  --toast-bg: #0D9488;
  --toast-text: #fff;
  --scrollbar-track: #1E293B;
  --scrollbar-thumb: #475569;
  --info-panel-from: #0F172A;
  --info-panel-to: #1E293B;
  --orb-1: rgba(167,243,208,0.12);
  --orb-2: rgba(221,214,254,0.10);
  --orb-3: rgba(253,230,138,0.08);
  --mesh-1: rgba(167,243,208,0.04);
  --mesh-2: rgba(221,214,254,0.04);
  --mesh-3: rgba(253,230,138,0.03);
  --mesh-4: rgba(191,219,254,0.03);
}

html { scroll-behavior: smooth; }

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

body {
  font-family: 'Raleway', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

a { text-decoration: none; color: inherit; }

button, input, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.activity-page {
  min-height: 100dvh;
  padding: 112px clamp(18px, 5vw, 72px) 58px;
  position: relative;
  overflow: hidden;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .6;
  background:
    radial-gradient(40% 50% at 15% 25%, var(--mesh-1), transparent 70%),
    radial-gradient(40% 50% at 85% 20%, var(--mesh-2), transparent 70%),
    radial-gradient(40% 50% at 50% 80%, var(--mesh-3), transparent 70%),
    radial-gradient(40% 50% at 80% 60%, var(--mesh-4), transparent 70%);
  animation: meshFlow 20s ease-in-out infinite alternate;
}

@keyframes meshFlow {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%, 80% 60%; background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%; }
  33%  { background-position: 20% 10%, 70% 30%, 40% 70%, 90% 50%; }
  66%  { background-position: 5% 20%, 90% 5%, 60% 80%, 70% 70%; }
  100% { background-position: 0% 0%, 100% 0%, 50% 100%, 80% 60%; }
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 8s ease-in-out infinite;
}

.bg-orb--1 {
  width: 260px; height: 260px;
  background: var(--orb-1);
  right: 5%; top: 12%;
  animation-delay: 0s;
}

.bg-orb--2 {
  width: 200px; height: 200px;
  background: var(--orb-2);
  left: 4%; bottom: 15%;
  animation-delay: -2.8s;
}

.bg-orb--3 {
  width: 160px; height: 160px;
  background: var(--orb-3);
  left: 50%; top: 50%;
  animation-delay: -5.6s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -25px) scale(1.08); }
  50% { transform: translate(-10px, 15px) scale(0.92); }
  75% { transform: translate(15px, 10px) scale(1.04); }
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .25s ease;
  backdrop-filter: blur(12px);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }
.dark .theme-toggle .sun-icon { display: none; }
.dark .theme-toggle .moon-icon { display: block; }

.stagger-children > .stagger-item {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn .5s ease forwards;
}

.stagger-children > .stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > .stagger-item:nth-child(2) { animation-delay: 0.12s; }
.stagger-children > .stagger-item:nth-child(3) { animation-delay: 0.19s; }
.stagger-children > .stagger-item:nth-child(4) { animation-delay: 0.26s; }
.stagger-children > .stagger-item:nth-child(5) { animation-delay: 0.33s; }

@keyframes staggerFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.draft-bar {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  font-size: 13px;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}

.draft-bar.show {
  transform: translateX(-50%) translateY(0);
}

.draft-text { color: var(--text-muted); font-weight: 600; }
.draft-btn {
  padding: 5px 14px;
  border-radius: 8px;
  border: none;
  background: var(--pri);
  color: white;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: .2s;
}

.draft-btn:hover { background: var(--pri-dark); }

.draft-dismiss {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: .2s;
}

.draft-dismiss:hover { color: var(--text); }

.page-head {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px;
}

.badge, .panel-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid rgba(5,150,105,0.15);
  color: var(--badge-text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.page-head h1 {
  font-family: 'Lora', serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 14px;
}

.page-head p {
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.7;
  color: var(--text-muted);
}

.submit-card {
  position: relative;
  z-index: 2;
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  border-radius: 24px;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: background .35s ease, border-color .35s ease;
}

.info-panel {
  background: linear-gradient(135deg, var(--info-panel-from), var(--info-panel-to), #065F46);
  color: white;
  padding: clamp(26px, 4vw, 42px);
  position: relative;
  overflow: hidden;
  transition: background .35s ease;
}

.info-panel::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -80px;
  bottom: -80px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.dark .info-panel::after {
  background: rgba(255,255,255,.03);
}

.info-panel > * { position: relative; z-index: 2; }

.panel-badge {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.18);
}

.info-panel h2 {
  font-family: 'Lora', serif;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  margin-bottom: 12px;
}

.info-panel > p {
  color: rgba(255,255,255,.76);
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: 14px;
}

.info-list { display: grid; gap: 16px; }

.info-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 13px;
  align-items: flex-start;
  color: rgba(255,255,255,.9);
}

.info-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,.13);
  display: grid;
  place-items: center;
}

.info-icon svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255,255,255,.9);
}

.info-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.info-item span {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
  font-family: inherit;
}

.tag-chip:hover {
  background: var(--tag-active-bg);
  border-color: var(--tag-active-border);
  transform: translateY(-1px);
}

.tag-chip.active {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.5);
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
}

.dark .tag-chip.active {
  background: rgba(13,148,136,0.3);
  border-color: var(--pri-light);
  box-shadow: 0 0 0 2px rgba(13,148,136,0.2);
}

.form-panel {
  padding: clamp(26px, 4vw, 42px);
  background: transparent;
}

.activity-form { display: grid; gap: 18px; }

.form-title-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.form-title-row h2 {
  font-family: 'Lora', serif;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 6px;
  transition: color .35s ease;
}

.form-title-row p {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.6;
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--field-bg);
  border: 1px solid var(--border-input);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 900;
  transition: .25s ease;
}

.status-pill.ready {
  background: rgba(5,150,105,0.1);
  color: var(--pri);
  border-color: rgba(5,150,105,.14);
}

.field { display: grid; gap: 8px; }

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  transition: color .35s ease;
}

.label-row small {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
}

.req { color: #EF4444; }

.input-wrap { position: relative; }

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-input);
  border-radius: 16px;
  background: var(--field-bg);
  padding: 15px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: .2s ease, background .35s ease, color .35s ease;
}

.field input { height: 52px; padding-right: 46px; }

.field textarea {
  min-height: 210px;
  resize: none;
  line-height: 1.65;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(13,148,136,.12);
  background: var(--bg-card-solid);
}

.field input.is-valid { border-color: var(--pri-light); }

.field input.is-error,
.field textarea.is-error { border-color: #EF4444; }

.step-section {
  display: grid;
  gap: 20px;
}

.step-section-header h3 {
  font-family: 'Lora', serif;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 4px;
}

.step-section-header p {
  font-size: 13px;
  color: var(--text-light);
}

.steps-connector {
  padding: 4px 0;
}

.steps-list {
  display: grid;
  gap: 0;
}

.step-field {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  transition: opacity .25s;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
  flex-shrink: 0;
  cursor: pointer;
  padding-top: 4px;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--field-bg);
  border: 2px solid var(--border-input);
  color: var(--text-light);
  transition: .25s ease;
  flex-shrink: 0;
}

.step-dot svg {
  width: 14px;
  height: 14px;
}

.step-field.active .step-dot {
  border-color: var(--pri);
  color: var(--pri);
}

.step-dot.done {
  background: var(--pri);
  border-color: var(--pri);
  color: white;
}

.step-line {
  width: 2px;
  flex: 1;
  min-height: 16px;
  background: var(--border-input);
  margin: 3px 0;
  border-radius: 1px;
  transition: background .35s ease;
}

.step-field.complete .step-line {
  background: var(--pri-light);
}

.step-field:last-child .step-line {
  display: none;
}

.step-content {
  flex: 1;
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
}

.step-content label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  transition: color .35s ease;
}

.step-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.step-chars {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--field-bg);
  border: 1px solid var(--border-input);
  transition: .2s ease;
}

.step-chars.ok {
  background: rgba(5,150,105,0.08);
  color: var(--pri);
  border-color: rgba(5,150,105,0.15);
}

.step-content input,
.step-content textarea {
  width: 100%;
  border: 1px solid var(--border-input);
  border-radius: 14px;
  background: var(--field-bg);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: .2s ease, background .35s ease, color .35s ease;
  line-height: 1.6;
}

.step-content input {
  height: 48px;
}

.step-content textarea {
  min-height: 100px;
  resize: none;
}

.step-content input:focus,
.step-content textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(13,148,136,.12);
  background: var(--bg-card-solid);
}

.step-content input.is-valid,
.step-content textarea.is-valid {
  border-color: var(--pri-light);
}

.step-hint {
  font-size: 11px;
  font-weight: 700;
  color: #EF4444;
  margin-top: -2px;
}

.step-field.active .step-content textarea,
.step-field.active .step-content input {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(13,148,136,.06);
}

.step-total {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.valid-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 22px;
  height: 22px;
  display: block;
  color: var(--pri);
  opacity: 0;
  transition: .25s cubic-bezier(.34,1.56,.64,1);
}

.valid-icon.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.field-error {
  display: none;
  color: #EF4444;
  font-size: 12px;
  font-weight: 700;
}

.field-error.show { display: block; }

.counter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.counter-left {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.progress-ring {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
}

.ring-bg { stroke: var(--border-input); }
.ring-fg { stroke: var(--text-light); transition: stroke .25s, stroke-dashoffset .25s ease; }
.ring-fg.low { stroke: #EF4444; }
.ring-fg.ok { stroke: var(--pri); }
.ring-fg.warn { stroke: #D97706; }

.counter-text {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 900;
  color: var(--text-light);
  transition: color .25s;
}

.counter-text.low { color: #EF4444; }
.counter-text.ok { color: var(--pri); }
.counter-text.warn { color: #D97706; }

.counter-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.counter-hint {
  display: none;
  font-size: 12px;
  font-weight: 800;
  color: #EF4444;
}

.counter-hint.show { display: inline; }

.counter-label {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--field-bg);
  border: 1px solid var(--border-input);
  color: var(--text-light);
  font-size: 11px;
  font-weight: 800;
  transition: .2s;
}

.counter-label.ok {
  background: rgba(5,150,105,0.1);
  color: var(--pri);
  border-color: transparent;
}

.counter-label.warn {
  background: rgba(217,119,6,0.1);
  color: #D97706;
  border-color: transparent;
}

.insights-row {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: .3s ease;
}

.insights-row.show {
  opacity: 1;
  max-height: 30px;
}

.insight {
  display: flex;
  align-items: center;
  gap: 5px;
}

.insight-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.insight-value {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}

.insight-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-input);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--border-input);
  overflow: hidden;
  transition: background .35s ease;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--text-light);
  transition: width .25s ease, background-color .25s ease;
}

.progress-bar.low { background: #EF4444; }
.progress-bar.ok { background: linear-gradient(90deg, var(--pri), var(--pri-light)); }
.progress-bar.warn { background: #D97706; }

.send-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.btn-wrap { position: relative; }

.send-btn {
  min-height: 54px;
  min-width: 190px;
  padding: 0 30px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pri), var(--pri-light));
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: .25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(5,150,105,0.3);
}

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

.send-btn:disabled {
  background: var(--border-input);
  color: var(--text-light);
  box-shadow: none;
  cursor: not-allowed;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: var(--shadow-btn); }
  50% { box-shadow: 0 18px 40px rgba(5,150,105,0.35), 0 0 0 6px rgba(13,148,136,0.08); }
}

.send-btn:not(:disabled):not(.loading) {
  animation: btnPulse 2s ease-in-out infinite;
}

.kbd-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-light);
  opacity: 0.6;
}

.kbd-hint kbd {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--field-bg);
  border: 1px solid var(--border-input);
  font-family: inherit;
}

.send-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.hint {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.auto-save-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  transition: .25s;
}

.auto-save-badge.saved { color: var(--pri); }

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: rippleAnim .6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

.send-btn.loading .btn-spinner { display: block; }
.send-btn.loading .btn-label { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  background: var(--footer-bg);
  color: white;
  padding: 50px clamp(18px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 42px;
  transition: background .35s ease;
}

.footer h3 {
  font-family: 'Lora', serif;
  font-size: 28px;
  margin-bottom: 14px;
}

.footer p, .footer a {
  color: var(--footer-text);
  font-size: 14px;
  line-height: 1.8;
}

.footer-links { display: grid; gap: 10px; }

.footer-links a { transition: color .2s; }
.footer-links a:hover { color: white; }

.newsletter-wrap {
  display: flex;
  gap: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}

.newsletter input {
  height: 44px;
  width: 220px;
  border: none;
  background: transparent;
  color: white;
  padding: 0 16px;
  outline: none;
  font-size: 13px;
}

.newsletter input::placeholder { color: rgba(255,255,255,.35); }

.newsletter-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--pri);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .2s;
  flex: 0 0 auto;
}

.newsletter-btn:hover { background: var(--pri-dark); }

.newsletter-btn svg {
  width: 16px;
  height: 16px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(100%, 420px);
  padding: 32px;
  border-radius: 24px;
  background: var(--modal-bg);
  border: 1px solid var(--glass-border);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  transition: background .35s ease;
  transform: scale(0.92) translateY(10px);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s ease, background .35s ease;
  opacity: 0;
}

.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(5,150,105,0.1), rgba(191,219,254,0.2));
  display: grid;
  place-items: center;
  color: var(--pri);
}

.modal-icon svg {
  width: 28px;
  height: 28px;
}

.modal h3 {
  font-family: 'Lora', serif;
  color: var(--text);
  font-size: 24px;
  margin-bottom: 8px;
}

.modal p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 22px;
}

.modal-btn {
  min-height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pri), var(--pri-light));
  color: white;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: .2s;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13,148,136,0.25);
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

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

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

@media (max-width: 1080px) {
  .submit-card { grid-template-columns: 1fr; }
  .info-panel { padding-bottom: 34px; }
  .footer { grid-template-columns: 1fr; }
  .newsletter input { width: 100%; }
}

@media (max-width: 768px) {
  .activity-page { padding-top: 96px; padding-bottom: 44px; }
  .page-head { margin-bottom: 24px; }
  .submit-card { border-radius: 20px; }
  .form-panel, .info-panel { padding: 24px; }
  .form-title-row, .label-row, .counter-row, .send-row, .step-label-row {
    flex-direction: column;
    align-items: stretch;
  }

  .step-field {
    gap: 10px;
  }

  .step-content textarea {
    min-height: 80px;
  }
  .send-btn { width: 100%; }
  .kbd-hint { justify-content: center; }
  .send-info { align-items: flex-start; }
  .hint { text-align: left; }
  .footer { text-align: center; }
  .newsletter-wrap { width: 100%; }
  .newsletter input { flex: 1; }
  .insights-row { flex-wrap: wrap; }
  .counter-meta { flex: 1; }
}
