.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--accent);
  color: var(--background);
}

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

.btn-secondary {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size var(--t-med) var(--ease);
}

.text-link:hover {
  background-size: 100% 1px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-bar button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
}

.filter-bar button[aria-pressed="true"],
.filter-bar button.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--background);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.req {
  color: var(--danger);
}

.field,
select.field,
textarea.field {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--background);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

textarea.field {
  min-height: 150px;
  resize: vertical;
}

.field:focus {
  border-color: var(--accent);
}

.form-group.has-error .field {
  border-color: var(--danger);
}

.field-error {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  color: var(--danger);
  font-size: 0.88rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.choice {
  display: flex;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
}

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice input:focus-visible + span {
  box-shadow: var(--focus);
}

.modal-root[hidden] {
  display: none !important;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.modal-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: modalIn var(--t-med) var(--ease-out);
}

.modal-dialog.wide {
  width: min(1040px, 100%);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 140;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 24px));
}

.toast {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: toastIn var(--t-med) var(--ease-out);
}

.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 200;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cursor-ring {
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  opacity: 0.45;
}

.empty-state,
.error-state {
  padding: var(--space-8) var(--space-5);
  text-align: center;
  color: var(--text-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}

html[data-motion="reduced"] .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) .reveal {
    opacity: 1;
    transform: none;
  }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    left: 12px;
    right: 12px;
  }

  .modal-dialog {
    padding: 22px 16px;
    max-height: 92vh;
  }
}
