.wc-view {
  --wc-ink: var(--text, #e8edf0);
  --wc-muted: var(--muted, #a5b2ba);
  --wc-panel: var(--panel, #152127);
  --wc-field: var(--field, #101a20);
  --wc-border: var(--border, #2b3b43);
  --wc-accent: var(--accent, #7cdbbd);
  --wc-coral: #f0a17e;
  --wc-lilac: #c6a9e8;
  --wc-yellow: #e8ca7c;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  color: var(--wc-ink);
  display: grid;
  gap: 16px;
}

.wc-view *,
.wc-view *::before,
.wc-view *::after { box-sizing: border-box; }

.wc-heading,
.wc-submit,
.wc-confirmation,
.wc-cloud-section {
  min-width: 0;
  border: 1px solid var(--wc-border);
  border-radius: 16px;
  background: var(--wc-panel);
}

.wc-heading {
  position: relative;
  overflow: hidden;
  padding: clamp(19px, 4vw, 28px);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--wc-accent) 10%, var(--wc-panel)), var(--wc-panel) 62%);
}

.wc-heading::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -86px;
  top: -108px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--wc-accent) 28%, transparent);
  box-shadow: 0 0 0 17px color-mix(in srgb, var(--wc-accent) 4%, transparent), 0 0 0 35px color-mix(in srgb, var(--wc-accent) 3%, transparent);
  pointer-events: none;
}

.wc-kicker,
.wc-section-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--wc-accent);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.wc-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wc-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wc-accent) 14%, transparent);
}

.wc-prompt {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  max-width: 680px;
  font: 700 clamp(21px, 4vw, 30px)/1.2 'Exo 2', sans-serif;
  overflow-wrap: anywhere;
}

.wc-instructions {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--wc-muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wc-summary {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 17px;
  color: var(--wc-muted);
  font-size: 13px;
}

.wc-summary-number {
  color: var(--wc-ink);
  font: 700 18px/1 'Exo 2', sans-serif;
  font-variant-numeric: tabular-nums;
}

.wc-submit { padding: 18px; }
.wc-submit label { display: block; margin-bottom: 3px; font-weight: 700; }
.wc-form-hint { margin: 0 0 12px; color: var(--wc-muted); font-size: 13px; line-height: 1.45; }
.wc-voice-note { margin: 0 0 9px; color: var(--wc-muted); font-size: 12px; line-height: 1.45; }
.wc-consent-label { display: flex !important; align-items: flex-start; gap: 9px; margin: 0 0 12px; color: var(--wc-muted); font-size: 12px; line-height: 1.4; font-weight: 500 !important; cursor: pointer; }
.wc-consent-label input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--wc-accent); }
.wc-mic-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; min-height: 46px; }
.wc-mic-button svg { width: 19px; height: 19px; }
.wc-mic-button[aria-pressed="true"] { border-color: #e58e7e; color: #e58e7e; }
.wc-mic-button:disabled { cursor: not-allowed; opacity: .55; }
.wc-voice-status { min-height: 18px; margin: 8px 0 0; color: var(--wc-muted); font-size: 12px; line-height: 1.45; }
.wc-form-row { display: flex; gap: 9px; }
.wc-form-row input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--wc-border);
  border-radius: 10px;
  background: var(--wc-field);
  color: var(--wc-ink);
  font: inherit;
}
.wc-form-row input::placeholder { color: var(--wc-muted); opacity: .8; }
.wc-form-row input:focus-visible { outline: 3px solid color-mix(in srgb, var(--wc-accent) 44%, transparent); outline-offset: 1px; border-color: var(--wc-accent); }
.wc-form-row input[aria-invalid="true"] { border-color: #e58e7e; }
.wc-submit-button { flex: 0 0 auto; min-height: 46px; }
.wc-error { margin: 8px 0 0; color: #f0a99a; font-size: 13px; }

.wc-confirmation {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 12px;
  padding: 15px 18px;
  border-color: color-mix(in srgb, var(--wc-accent) 38%, var(--wc-border));
  background: color-mix(in srgb, var(--wc-accent) 7%, var(--wc-panel));
}
.wc-confirmation-label { grid-row: span 2; color: var(--wc-muted); font-size: 12px; }
.wc-confirmation strong { overflow-wrap: anywhere; color: var(--wc-accent); font: 700 19px/1.2 'Exo 2', sans-serif; }
.wc-confirmation-note { color: var(--wc-muted); font-size: 12px; line-height: 1.4; }

.wc-cloud-section { padding: 18px; }
.wc-cloud-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wc-cloud-head h3 { margin: 3px 0 0; font: 700 19px/1.2 'Exo 2', sans-serif; }
.wc-word-total { flex: 0 0 auto; padding: 5px 9px; border-radius: 99px; background: var(--wc-field); color: var(--wc-muted); font-size: 12px; }

.wc-cloud {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 154px;
  margin: 0;
  padding: 14px 4px;
  list-style: none;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 46%, color-mix(in srgb, var(--wc-accent) 5%, transparent), transparent 66%),
    var(--wc-field);
}

.wc-word {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  padding: 7px 10px 7px 12px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, currentColor 8%, var(--wc-panel));
  color: var(--wc-accent);
  font-size: var(--wc-size, 1rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  animation: wc-arrive .28s ease-out both;
}
.wc-tone-1 { color: var(--wc-coral); }
.wc-tone-2 { color: var(--wc-lilac); }
.wc-tone-3 { color: var(--wc-yellow); }
.wc-tone-4 { color: #8ec1dd; }
.wc-word-label { min-width: 0; overflow-wrap: anywhere; }
.wc-count {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 3px 5px;
  border-radius: 7px;
  background: color-mix(in srgb, currentColor 14%, var(--wc-field));
  color: var(--wc-ink);
  font: 700 11px/1.2 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.wc-empty {
  display: flex;
  min-height: 154px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 20px;
  border-radius: 12px;
  background: var(--wc-field);
  color: var(--wc-muted);
  text-align: center;
}
.wc-empty b { color: var(--wc-ink); font-size: 14px; }
.wc-empty > span:last-child { max-width: 260px; font-size: 13px; line-height: 1.45; }
.wc-empty-mark { position: relative; width: 42px; height: 25px; margin-bottom: 6px; }
.wc-empty-mark::before { content: ""; position: absolute; left: 7px; top: 8px; width: 28px; height: 15px; border-radius: 12px; background: color-mix(in srgb, var(--wc-accent) 22%, var(--wc-field)); }
.wc-empty-mark i { position: absolute; z-index: 1; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--wc-accent); }
.wc-empty-mark i:nth-child(1) { left: 8px; }
.wc-empty-mark i:nth-child(2) { left: 17px; top: 1px; }
.wc-empty-mark i:nth-child(3) { left: 25px; }

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

:root[data-theme="light"] .wc-view {
  --wc-ink: var(--text, #24333a);
  --wc-muted: var(--muted, #687980);
  --wc-panel: var(--panel, #fff);
  --wc-field: var(--field, #f1f5f3);
  --wc-border: var(--border, #d8e1de);
}

@media (max-width: 600px) {
  .wc-view { gap: 11px; }
  .wc-heading, .wc-cloud-section { border-radius: 13px; }
  .wc-submit { padding: 15px; }
  .wc-form-row { flex-direction: column; }
  .wc-submit-button, .wc-mic-button { width: 100%; }
  .wc-cloud-section { padding: 15px; }
  .wc-cloud { gap: 8px; padding: 12px 8px; }
  .wc-word { gap: 5px; padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .wc-word { animation: none; }
}
