/* TestHub — gemeinsames Stylesheet (aus mock-testhub.html übernommen)
 * HandwerkerHub Design-System: Outfit-Font, Primary #FF8C42, white-dominant
 */

:root {
  --primary: #FF8C42;
  --primary-soft: #FFF4ED;
  --primary-dark: #E5742A;
  --ink: #0F172A;
  --ink-soft: #475569;
  --ink-muted: #94A3B8;
  --success: #10B981;
  --success-soft: #ECFDF5;
  --warning: #F59E0B;
  --warning-soft: #FFFBEB;
  --error: #EF4444;
  --error-soft: #FEF2F2;
  --info: #38BDF8;
  --violet: #8B5CF6;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #F1F5F9;
  --border-strong: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.06), 0 10px 15px -3px rgba(15,23,42,0.05);
  --shadow-lg: 0 20px 40px -8px rgba(15,23,42,0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Container — Mobile-First, max 480px für Phone-Look */
.app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* APP HEADER */
.app-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.brand .dot {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.brand b { color: var(--primary); }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 18px;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--border);
}

.content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.h-block { margin-bottom: 16px; }

.h-block h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* LOGIN-HERO */
.login-hero {
  text-align: center;
  padding: 48px 12px 24px;
}

.login-hero .emoji {
  font-size: 56px;
  margin-bottom: 8px;
  line-height: 1;
}

.login-hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-hero p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 15px;
}

/* INPUTS */
.input-group { margin-top: 24px; }

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  font-size: 16px;
  font-family: inherit;
  background: var(--card);
  transition: border-color .15s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 4px 12px rgba(255, 140, 66, .25);
  transition: transform .12s, box-shadow .12s;
  font-family: inherit;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 140, 66, .35);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
}

.helper {
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  margin-top: 24px;
  padding: 0 16px;
  line-height: 1.6;
}

.helper b { color: var(--ink-soft); }

/* PRODUCT CARDS */
.product-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1.5px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  color: var(--ink);
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.product-icon.hwh-web,
.product-icon.hwh-ios,
.product-icon.hwh-android { background: linear-gradient(135deg, #FF8C42, #E5742A); }

.product-icon.hwb { background: linear-gradient(135deg, #38BDF8, #0EA5E9); }

.product-icon.wr  { background: linear-gradient(135deg, #10B981, #059669); }

.product-icon.kb  { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }

.product-icon.glh { background: linear-gradient(135deg, #F59E0B, #D97706); }

.product-meta {
  flex: 1;
  min-width: 0;
}

.product-meta .name {
  font-weight: 600;
  font-size: 15px;
}

.product-meta .info {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.progress-pill {
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
}

.progress-pill.complete {
  background: var(--success-soft);
  color: var(--success);
}

/* PROGRESS BAR */
.progress-bar-wrap {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.progress-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-bar-meta .label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.progress-bar-meta .count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 4px;
  transition: width .3s;
}

.progress-cheer {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
  margin-top: 8px;
}

/* FILTER CHIPS */
.filter-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background-color .12s, border-color .12s, color .12s;
  min-height: 36px;
}

.chip:hover {
  border-color: var(--ink-soft);
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.chip.danger {
  border-color: #FECACA;
  color: var(--error);
  background: var(--error-soft);
}

.chip.danger.active {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.chip-count {
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.chip.danger .chip-count {
  background: white;
  color: var(--error);
}

.chip.danger.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* USE-CASE CARD */
.uc-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  transition: all .15s;
}

.uc-card:hover {
  border-color: var(--primary);
}

.uc-status {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg);
  border: 1.5px dashed var(--border-strong);
}

.uc-status.done {
  background: var(--success-soft);
  border: none;
  color: var(--success);
}

.uc-status.bug {
  background: var(--error-soft);
  border: none;
}

.uc-status.skip {
  background: var(--warning-soft);
  border: none;
}

.uc-status.meh {
  background: var(--warning-soft);
  border: none;
}

.uc-meta {
  flex: 1;
  min-width: 0;
}

.uc-meta .id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.uc-meta .title {
  font-weight: 600;
  font-size: 14px;
  margin-top: 1px;
}

.uc-meta .role {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.uc-arrow {
  color: var(--ink-muted);
  font-size: 18px;
}

/* USE-CASE DETAIL */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.uc-detail-header {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.uc-detail-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.uc-detail-title {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 8px;
  letter-spacing: -0.02em;
}

.uc-detail-desc {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
}

.step-list {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.step-list h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}

.step:first-of-type { border-top: none; }

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.step-text {
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

/* FEEDBACK BUTTONS (3 Smileys) */
.feedback-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.fb-btn {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 2px solid var(--border-strong);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  padding: 12px 8px;
  font-family: inherit;
}

.fb-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fb-btn .face {
  font-size: 36px;
  margin-bottom: 4px;
}

.fb-btn .lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.fb-btn.good:hover { border-color: var(--success); background: var(--success-soft); }
.fb-btn.meh:hover  { border-color: var(--warning); background: var(--warning-soft); }
.fb-btn.bad:hover  { border-color: var(--error);   background: var(--error-soft); }

/* BUG FORM */
.form-section {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.form-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}

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

.photo-add {
  flex: 1;
  min-width: 120px;
  padding: 24px 8px;
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
}

.photo-add .ic {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.photo-add .lbl {
  font-size: 12px;
  font-weight: 500;
}

.photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.photo-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-strong);
  position: relative;
}

.photo-thumb .remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--error);
  color: white;
  border: 2px solid white;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
}

.ta {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}

.ta:focus {
  outline: none;
  border-color: var(--primary);
}

/* VOICE RECORDING */
.voice-row {
  display: flex;
}

.rec-btn {
  width: 100%;
  min-height: 88px;
  border-radius: 16px;
  border: 2px solid var(--border-strong);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background-color .15s, border-color .15s, transform .1s;
}

.rec-btn:hover:not(:disabled) {
  border-color: var(--primary);
}

.rec-btn:disabled,
.rec-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rec-btn.recording {
  background: var(--error-soft);
  border-color: var(--error);
  animation: rec-pulse 1.2s ease-in-out infinite;
}

.rec-btn.recording .rec-icon {
  color: var(--error);
}

.rec-btn .rec-icon {
  font-size: 28px;
  line-height: 1;
}

.rec-btn .rec-label {
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

.rec-btn .rec-timer {
  font-size: 13px;
  color: var(--error);
  font-weight: 600;
  min-height: 16px;
}

@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.voice-preview {
  margin-top: 12px;
}

.voice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}

.btn-text:hover { color: var(--error); }

.voice-status {
  font-size: 13px;
  color: var(--ink-soft);
}

.voice-status.ok    { color: var(--success); font-weight: 600; }
.voice-status.error { color: var(--error); }
.voice-status.loading::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  margin-left: 6px;
  animation: voice-blink 0.9s ease-in-out infinite;
}

@keyframes voice-blink {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

.transcript-preview {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--success-soft);
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* PRIVACY-NOTE */
.privacy-note {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 12px;
}

.privacy-note strong {
  color: var(--ink);
}

.admin-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--ink);
  color: white;
  border-radius: 14px;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}

.admin-entry:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-entry .ic {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 140, 66, 0.2);
  color: var(--primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-entry .lbl {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-entry .lbl strong {
  font-size: 14px;
  font-weight: 600;
}

.admin-entry .lbl small {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.admin-entry .arr {
  font-size: 22px;
  color: rgba(255,255,255,0.5);
}

/* ADMIN-UI */
.admin-app .admin-pill {
  display: inline-block;
  background: var(--ink);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card-title strong {
  font-size: 15px;
  font-weight: 600;
}

.admin-card-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.5;
  word-break: break-all;
}

.admin-card-meta.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-muted);
}

.admin-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-mini {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  min-height: 36px;
  transition: background-color .12s, border-color .12s;
}

.btn-mini:hover { border-color: var(--ink-soft); }

.btn-mini-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-mini-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-mini-warn { background: var(--warning-soft); color: #92400E; border-color: #FCD34D; }
.btn-mini-warn:hover { background: #FCD34D; }

.btn-mini-danger { background: var(--error-soft); color: #991B1B; border-color: #FECACA; }
.btn-mini-danger:hover { background: #FECACA; }

.role-pill {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.role-pill.role-tester { background: var(--bg);          color: var(--ink-soft);  border: 1px solid var(--border-strong); }
.role-pill.role-staff  { background: #DBEAFE;            color: #1E40AF;          }
.role-pill.role-owner  { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #FED7AA; }

.wl-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.wl-badge.on  { background: var(--success-soft); color: #166534; }
.wl-badge.off { background: var(--error-soft);   color: #991B1B; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 20px;
  left: 12px;
  right: 12px;
  max-width: 456px;
  margin: 0 auto;
  background: var(--ink);
  color: white;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  transform: translateY(10px);
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast .ic { font-size: 20px; }

.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }

/* LOADING / EMPTY STATES */
.loading {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-muted);
  font-size: 14px;
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--ink-soft);
}

.empty .emoji {
  font-size: 48px;
  margin-bottom: 8px;
}

.error-banner {
  background: var(--error-soft);
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

.success-banner {
  background: var(--success-soft);
  border: 1px solid #BBF7D0;
  color: #166534;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

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

.modal {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  transform: translateY(100%);
  transition: transform .25s ease-out;
}

.modal-backdrop.show .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: -8px auto 12px;
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
  }
  .modal {
    border-radius: 24px;
    max-height: 80vh;
  }
}
