
:root {
  color-scheme: light;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --orange-800: #9a3412;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-600: #16a34a;
  --green-700: #15803d;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --purple-50: #faf5ff;
  --purple-400: #c084fc;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --yellow-50: #fefce8;
  --yellow-100: #fef9c3;
  --yellow-200: #fef08a;
  --yellow-400: #facc15;
  --yellow-600: #ca8a04;
  --yellow-700: #a16207;
  --radius: .65rem;
  --radius-sm: .45rem;
  --radius-lg: .9rem;
  --radius-xl: 1.15rem;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --tap-size: 2.75rem;
  --nav-height: 4.35rem;
  --mini-player-height: 5.25rem;
  --content-width: 64rem;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow-md: 0 8px 24px rgb(15 23 42 / .10);
  --shadow-lg: 0 18px 45px rgb(15 23 42 / .16);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--gray-50); overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--gray-50); color: var(--gray-900); font-size: 16px; line-height: 1.5; }
body.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body.player-open { overflow: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
button { border: 0; background: transparent; cursor: pointer; }
button:disabled { cursor: default; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
input, select, textarea { border: 1px solid var(--gray-300); border-radius: .55rem; background: white; }
input:focus, select:focus, textarea:focus { border-color: var(--orange-500); outline: 2px solid rgb(249 115 22 / .2); outline-offset: 1px; }
summary { cursor: pointer; }
main { overscroll-behavior: auto; -webkit-overflow-scrolling: touch; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes fpSlideUp { from { transform: translateY(2rem); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fpSlideDown { from { transform: translateY(0); opacity: 1; } to { transform: translateY(2rem); opacity: 0; } }
@keyframes page-fade-out { to { opacity: 0; transform: translateY(-2px); } }
@keyframes page-fade-in { from { opacity: 0; transform: translateY(3px); } }

#page-content { view-transition-name: page-content; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(page-content) { animation: page-fade-out 80ms ease-in both; mix-blend-mode: normal; }
::view-transition-new(page-content) { animation: page-fade-in 130ms ease-out both; mix-blend-mode: normal; }
::view-transition-group(podcast-artwork) { overflow: hidden; border-radius: var(--radius-lg); animation-duration: 240ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(podcast-artwork), ::view-transition-new(podcast-artwork) { height: 100%; mix-blend-mode: normal; object-fit: cover; }

/* App shell */
.safe-top { padding-top: env(safe-area-inset-top, 0); }
.tab-bar { padding-bottom: env(safe-area-inset-bottom, 0); }
.scrollbar-hide { scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.line-clamp-2, .line-clamp-3, .line-clamp-6 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }
.line-clamp-6 { -webkit-line-clamp: 6; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose { color: var(--gray-700); line-height: 1.75; }
.prose p { margin: 0 0 1rem; }
.prose a { color: var(--orange-700); text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose-sm { font-size: .875rem; }

/* Hopper design system: layout, type, controls, navigation, and media */
.app-shell { min-height: 100vh; background: var(--gray-50); color: var(--gray-900); -webkit-font-smoothing: antialiased; }
.app-main { width: min(100%, var(--content-width)); margin-inline: auto; padding: max(1rem, env(safe-area-inset-top, 0)) 1rem calc(var(--nav-height) + var(--mini-player-height) + env(safe-area-inset-bottom, 0) + 2rem); }
.app-main[aria-busy="true"]::before { content: ""; position: fixed; z-index: 80; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--orange-500), transparent); background-size: 45% 100%; animation: nav-loading .8s linear infinite; }
@keyframes nav-loading { from { background-position: -80% 0; } to { background-position: 180% 0; } }
.app-history { display: flex; align-items: center; gap: .25rem; margin: -.25rem 0 .5rem; }
.app-history__button, .icon-button { display: inline-flex; width: var(--tap-size); height: var(--tap-size); align-items: center; justify-content: center; border-radius: 999px; color: var(--gray-500); }
.app-history__button:disabled { color: var(--gray-300); opacity: .35; }
.app-history__button:not(:disabled):hover, .icon-button:hover { background: var(--gray-100); }
.app-logout { display: inline-flex; min-height: var(--tap-size); align-items: center; margin-left: auto; padding-inline: .75rem; color: var(--gray-500); font-size: .875rem; }
.app-logout:hover { color: var(--gray-800); }
.page-heading { margin: 0 0 .75rem; font-size: 1.35rem; line-height: 1.25; font-weight: 750; letter-spacing: -.015em; }
.page-heading__count { color: var(--gray-400); font-size: 1rem; font-weight: 400; }

.chip-row { display: flex; gap: .5rem; margin-inline: -1rem; padding: 0 1rem .5rem; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; flex: 0 0 auto; min-height: 2.5rem; align-items: center; justify-content: center; padding: .5rem 1rem; border-radius: 999px; background: var(--gray-100); color: var(--gray-600); font-size: .9rem; font-weight: 600; transition: background-color 140ms ease, color 140ms ease, transform 140ms ease; }
.chip:hover { background: var(--gray-200); }
.chip:active { transform: scale(.97); }
.chip--active { background: var(--orange-600); color: white; }
.chip--active:hover { background: var(--orange-700); }

.podcast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .75rem; }
.podcast-card { overflow: hidden; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-sm); transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.podcast-card:hover { border-color: #fed7aa; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.podcast-card--muted { opacity: .75; }
.podcast-card__art { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; contain: paint; background: var(--gray-200); }
.podcast-card__placeholder { display: flex; align-items: center; justify-content: center; background: var(--gray-300); color: white; font-size: 1.25rem; font-weight: 700; }
.podcast-card__body { padding: .8rem; }
.podcast-card__title { display: -webkit-box; overflow: hidden; color: var(--gray-900); font-size: 1rem; font-weight: 650; line-height: 1.35; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.podcast-card__meta { margin-top: .3rem; color: var(--gray-500); font-size: .875rem; }

.button { display: inline-flex; min-height: var(--tap-size); align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1rem; border-radius: var(--radius); font-size: .9375rem; font-weight: 650; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease; }
.button:active { transform: scale(.98); }
.button--primary { background: var(--orange-600); color: white; }
.button--primary:hover { background: var(--orange-700); }
.button--secondary { border: 1px solid var(--gray-200); background: white; color: var(--gray-700); }
.button--secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }
.button--quiet { color: var(--orange-700); }
.button--quiet:hover { background: var(--orange-50); }
.button--danger { color: var(--red-600); }
.button--danger:hover { background: var(--red-50); }
.empty-state { padding: 3rem 1rem; color: var(--gray-500); text-align: center; }
.empty-state__title { margin: 0 0 .5rem; color: var(--gray-700); font-size: 1.1rem; font-weight: 650; }
.empty-state__copy { margin: 0; font-size: .9375rem; }

.login-shell { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 1rem; background: var(--gray-50); }
.login-card { width: min(100%, 24rem); padding: 2rem; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-sm); }
.login-brand { margin: 0 0 1.5rem; color: var(--orange-600); font-size: 1.35rem; font-weight: 750; text-align: center; }
.form-stack { display: grid; gap: 1rem; }
.field-label { display: block; margin-bottom: .3rem; color: var(--gray-700); font-size: .9rem; font-weight: 600; }
.text-field { width: 100%; min-height: 3rem; padding: .7rem .8rem; background: white; font-size: 1rem; }
.form-note { display: block; margin: 0; color: var(--gray-500); font-size: .8rem; line-height: 1.35; text-align: center; }
.login-divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--gray-400); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: var(--gray-200); }

.mini-player { position: fixed; z-index: 40; right: 0; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0)); left: 0; border-top: 1px solid var(--gray-200); background: rgb(255 255 255 / .98); box-shadow: 0 -8px 28px rgb(15 23 42 / .08); backdrop-filter: blur(14px); }
.mini-player__inner { display: flex; width: min(100%, var(--content-width)); min-height: calc(var(--mini-player-height) - .8rem); margin-inline: auto; align-items: center; gap: .35rem; padding: .4rem .75rem .3rem; }
.mini-player__episode { display: flex; min-width: 0; flex: 1; align-items: center; gap: .75rem; border-radius: var(--radius); text-align: left; }
.mini-player__episode:focus-visible { outline: 2px solid var(--orange-500); outline-offset: 2px; }
.mini-player__art { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; overflow: hidden; border-radius: var(--radius-sm); background: var(--gray-200); }
.mini-player__art img { width: 100%; height: 100%; object-fit: cover; }
.mini-player__copy { min-width: 0; flex: 1; }
.mini-player__title, .mini-player__show { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-player__title { font-size: .9375rem; font-weight: 650; }
.mini-player__show { color: var(--gray-500); font-size: .8rem; }
.transport { display: flex; min-width: 0; flex: 0 0 auto; align-items: center; justify-content: flex-end; }
.transport__button { display: inline-flex; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 999px; color: var(--gray-600); touch-action: manipulation; }
.transport__button:hover { background: var(--gray-100); }
.transport__button:active, .full-player__skip:active, .full-player__play:active { transform: scale(.94); }
.transport__button--play { width: 3.2rem; height: 3.2rem; background: var(--orange-600); color: white; box-shadow: var(--shadow-sm); }
.transport__button--play:hover { background: var(--orange-700); }
.transport__speed { background: var(--gray-100); font-size: .8rem; font-weight: 750; }
.skip-icon { display: block; width: 2rem; height: 2rem; }
.full-player__skip .skip-icon { width: 2.7rem; height: 2.7rem; }
.share-player__skip { display: inline-flex; width: var(--tap-size); height: var(--tap-size); align-items: center; justify-content: center; touch-action: manipulation; }
.share-player__skip .skip-icon { width: 1.85rem; height: 1.85rem; }
.mini-player[aria-busy="true"] .transport__button--play { position: relative; }
.mini-player[aria-busy="true"] .transport__button--play svg { opacity: 0; }
.mini-player[aria-busy="true"] .transport__button--play::after { content: ""; position: absolute; width: 1.25rem; height: 1.25rem; border: 2px solid rgb(255 255 255 / .45); border-top-color: white; border-radius: 999px; animation: spin .7s linear infinite; }
.scrubber { position: relative; height: .8rem; cursor: pointer; }
.scrubber__track { position: absolute; right: 0; bottom: .15rem; left: 0; height: .22rem; border-radius: 999px; background: var(--gray-200); transition: height 140ms ease; }
.scrubber:hover .scrubber__track { height: .375rem; }
.scrubber__progress { height: 100%; border-radius: inherit; background: var(--orange-600); }
.scrubber__handle { position: absolute; bottom: -.05rem; width: .75rem; height: .75rem; border-radius: 999px; background: var(--orange-600); box-shadow: var(--shadow-sm); opacity: 0; transform: translateX(-50%); transition: opacity 140ms ease; }
.scrubber:hover .scrubber__handle { opacity: 1; }

.full-player { position: fixed; z-index: 50; inset: 0; flex-direction: column; overflow: hidden; padding-top: env(safe-area-inset-top, 0); padding-bottom: env(safe-area-inset-bottom, 0); background: radial-gradient(circle at 50% -10%, var(--orange-100), transparent 48%), linear-gradient(180deg, #fffaf5 0%, white 58%); }
.full-player__header { display: grid; grid-template-columns: 3rem 1fr auto; align-items: center; padding: .75rem 1rem; cursor: grab; touch-action: none; user-select: none; }
.full-player__header:active { cursor: grabbing; }
.full-player__eyebrow { color: var(--orange-700); font-size: .75rem; font-weight: 750; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.full-player__header-actions { display: flex; align-items: center; gap: .15rem; }
.full-player__stage { display: flex; width: min(100%, 30rem); min-height: 0; margin-inline: auto; padding: .5rem 1.5rem 1.5rem; flex: 1; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 1rem; overflow-y: auto; }
.full-player__art { width: min(16rem, 68vw); aspect-ratio: 1; flex: 0 0 auto; overflow: hidden; border-radius: var(--radius-xl); background: var(--gray-200); box-shadow: var(--shadow-lg); }
.full-player__art img { width: 100%; height: 100%; object-fit: cover; }
.full-player__metadata { width: 100%; min-width: 0; text-align: center; }
.full-player__title { font-size: 1.35rem; font-weight: 750; line-height: 1.3; text-wrap: balance; }
.full-player__show { margin-top: .3rem; color: var(--gray-500); font-size: .95rem; }
.full-player__timeline { width: 100%; }
.full-player__scrubber { position: relative; height: 2.5rem; cursor: pointer; }
.full-player__scrubber-track { position: absolute; top: .9375rem; right: 0; left: 0; height: .5rem; border-radius: 999px; background: var(--gray-200); }
.full-player__handle { position: absolute; top: .625rem; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: var(--orange-600); box-shadow: var(--shadow-md); transform: translateX(-50%); }
.full-player__times { display: flex; justify-content: space-between; margin-top: -.25rem; color: var(--gray-400); font-size: .8rem; font-variant-numeric: tabular-nums; }
.full-player__controls { display: flex; width: 100%; align-items: center; justify-content: space-evenly; gap: .75rem; }
.full-player__skip { display: inline-flex; width: 4.5rem; height: 4.5rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 999px; color: var(--gray-700); touch-action: manipulation; }
.full-player__skip:hover { background: var(--gray-100); }
.full-player__play { display: inline-flex; width: 5.5rem; height: 5.5rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 999px; background: var(--orange-600); color: white; box-shadow: var(--shadow-lg); touch-action: manipulation; }
.full-player__play:hover { background: var(--orange-700); }

.share-chooser { position: fixed; z-index: 4; inset: 0; display: grid; align-items: end; }
.share-chooser__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; background: rgb(15 23 42 / .36); backdrop-filter: blur(3px); }
.share-sheet { position: relative; width: min(100%, 32rem); margin-inline: auto; padding: .5rem 1rem max(1rem, env(safe-area-inset-bottom, 0)); border-radius: 1.4rem 1.4rem 0 0; background: white; box-shadow: var(--shadow-lg); animation: fpSlideUp .18s ease-out; }
.share-sheet__handle { width: 2.5rem; height: .28rem; margin: 0 auto .35rem; border-radius: 999px; background: var(--gray-300); }
.share-sheet__header { display: flex; align-items: center; justify-content: space-between; padding: .25rem .25rem .75rem .4rem; }
.share-sheet__title { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.share-sheet__subtitle { margin: .1rem 0 0; color: var(--gray-500); font-size: .85rem; }
.share-sheet__options { display: grid; gap: .5rem; }
.share-choice { display: grid; min-height: 4.4rem; grid-template-columns: 3rem 1fr auto; align-items: center; gap: .75rem; padding: .55rem .75rem; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: white; text-align: left; touch-action: manipulation; }
.share-choice:hover { border-color: var(--orange-200); background: var(--orange-50); }
.share-choice:active { transform: scale(.985); }
.share-choice:focus-visible { border-color: var(--orange-500); outline: 2px solid rgb(249 115 22 / .2); outline-offset: 1px; }
.share-choice__icon { display: inline-flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; border-radius: 999px; background: var(--orange-50); color: var(--orange-700); }
.share-choice__copy { display: flex; min-width: 0; flex-direction: column; }
.share-choice__copy strong { font-size: .98rem; }
.share-choice__copy span { overflow: hidden; color: var(--gray-500); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.share-choice__chevron { color: var(--gray-400); font-size: 1.75rem; line-height: 1; }
.share-feedback { position: fixed; z-index: 5; bottom: max(1.25rem, env(safe-area-inset-bottom, 0)); left: 50%; padding: .65rem 1rem; border-radius: 999px; background: var(--gray-900); color: white; font-size: .875rem; font-weight: 650; box-shadow: var(--shadow-lg); transform: translateX(-50%); }

@media (min-width: 640px) {
  .share-sheet { margin-bottom: 1rem; border-radius: 1.4rem; }
}

.bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: flex; min-height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0)); justify-content: space-around; padding: .35rem 1rem max(.35rem, env(safe-area-inset-bottom, 0)); border-top: 1px solid var(--gray-200); background: rgb(255 255 255 / .98); backdrop-filter: blur(14px); }
.bottom-nav__link { display: flex; min-width: 3.5rem; min-height: 3.5rem; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: var(--gray-400); font-size: .8rem; }
.bottom-nav__link:hover { color: var(--gray-600); }
.bottom-nav__link--active { color: var(--orange-600); }

.queue-page { width: 100%; }
.episode-card { width: 100%; min-width: 0; max-width: 100%; padding: .875rem; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-sm); }
.episode-card__row { display: flex; min-width: 0; align-items: center; gap: .875rem; }
.episode-card__art { width: 3.5rem; height: 3.5rem; flex: 0 0 auto; border-radius: var(--radius); background: var(--gray-200); object-fit: cover; }
.episode-card__body { min-width: 0; flex: 1; }
.episode-card__title, .episode-card__show { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-card__title { font-size: 1rem; font-weight: 650; }
.episode-card__title:hover { color: var(--orange-600); }
.episode-card__show { color: var(--gray-500); font-size: .875rem; }
.episode-card__actions { display: flex; flex: 0 0 auto; align-items: center; gap: .25rem; }
.episode-stack { display: grid; min-width: 0; gap: .75rem; margin-bottom: 1.5rem; }
.episode-play-button.is-playing { background: var(--orange-600); color: white; }
.episode-row-progress { height: .25rem; margin-top: .45rem; overflow: hidden; border-radius: 999px; background: var(--gray-100); }
.episode-row-progress__fill { height: 100%; border-radius: inherit; background: var(--orange-500); }

@media (min-width: 640px) {
  :root { --mini-player-height: 4.75rem; }
  .app-main { padding-bottom: calc(var(--nav-height) + var(--mini-player-height) + 2rem); }
  .podcast-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .full-player__art { width: 18rem; }
  .mini-player__inner { min-height: calc(var(--mini-player-height) - .8rem); gap: .75rem; padding: .4rem 1rem .3rem; }
  .transport { justify-content: flex-end; }
  .transport__button { width: var(--tap-size); height: var(--tap-size); }
  .transport__button--play { width: 3.25rem; height: 3.25rem; }
}
@media (max-width: 639px) {
  #mp-speed { display: none; }
  .mini-player__episode { gap: .55rem; }
  .mini-player__title { font-size: .875rem; }
  .mini-player__show { font-size: .75rem; }
}
@media (max-height: 700px) {
  .full-player__stage { justify-content: flex-start; }
  .full-player__art { width: min(11rem, 42vh); }
  .full-player__title { font-size: 1.15rem; }
}
@media (min-width: 768px) { .podcast-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .podcast-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Layout */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.self-center { align-self: center; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.gap-0\.5 { gap: .125rem; } .gap-1 { gap: .25rem; } .gap-1\.5 { gap: .375rem; }
.gap-2 { gap: .5rem; } .gap-2\.5 { gap: .625rem; } .gap-3 { gap: .75rem; }
.gap-3\.5 { gap: .875rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.gap-y-1 { row-gap: .25rem; }
.space-y-0\.5 > * + * { margin-top: .125rem; }
.space-y-1 > * + * { margin-top: .25rem; }
.space-y-1\.5 > * + * { margin-top: .375rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Positioning */
.relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; } .sticky { position: sticky; }
.inset-0 { inset: 0; } .top-0 { top: 0; } .top-2\.5 { top: .625rem; } .top-4 { top: 1rem; }
.right-0 { right: 0; } .bottom-0 { bottom: 0; } .bottom-1 { bottom: .25rem; } .bottom-14 { bottom: 3.5rem; }
.left-0 { left: 0; }
.z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-40 { z-index: 40; } .z-50 { z-index: 50; }
.pointer-events-none { pointer-events: none; }

/* Sizing */
.w-3 { width: .75rem; } .w-3\.5 { width: .875rem; } .w-4 { width: 1rem; } .w-5 { width: 1.25rem; }
.w-8 { width: 2rem; } .w-10 { width: 2.5rem; } .w-11 { width: 2.75rem; } .w-12 { width: 3rem; }
.w-14 { width: 3.5rem; } .w-16 { width: 4rem; } .w-20 { width: 5rem; } .w-24 { width: 6rem; }
.w-48 { width: 12rem; } .w-64 { width: 16rem; } .w-full { width: 100%; }
.h-1 { height: .25rem; } .h-1\.5 { height: .375rem; } .h-2 { height: .5rem; } .h-2\.5 { height: .625rem; }
.h-3 { height: .75rem; } .h-3\.5 { height: .875rem; } .h-4 { height: 1rem; } .h-5 { height: 1.25rem; }
.h-8 { height: 2rem; } .h-10 { height: 2.5rem; } .h-11 { height: 2.75rem; } .h-12 { height: 3rem; }
.h-14 { height: 3.5rem; } .h-16 { height: 4rem; } .h-20 { height: 5rem; } .h-24 { height: 6rem; }
.h-48 { height: 12rem; } .h-64 { height: 16rem; } .h-full { height: 100%; }
.min-h-11 { min-height: 2.75rem; } .min-h-14 { min-height: 3.5rem; } .min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; } .min-w-\[3\.5rem\] { min-width: 3.5rem; }
.max-w-\[120px\] { max-width: 120px; } .max-w-none { max-width: none; }
.max-w-sm { max-width: 24rem; } .max-w-md { max-width: 28rem; } .max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; } .max-w-screen-md { max-width: 768px; } .max-w-screen-lg { max-width: 1024px; }
.max-h-40 { max-height: 10rem; } .max-h-48 { max-height: 12rem; }
.max-h-\[30vh\] { max-height: 30vh; } .max-h-\[40vh\] { max-height: 40vh; } .max-h-\[70vh\] { max-height: 70vh; }
.aspect-square { aspect-ratio: 1; }

/* Spacing */
.m-0 { margin: 0; } .mx-auto { margin-left: auto; margin-right: auto; } .ml-auto { margin-left: auto; }
.-mx-1 { margin-left: -.25rem; margin-right: -.25rem; } .-mx-2 { margin-left: -.5rem; margin-right: -.5rem; }
.-mx-4 { margin-left: -1rem; margin-right: -1rem; } .-ml-2 { margin-left: -.5rem; } .-mt-1 { margin-top: -.25rem; }
.mt-0\.5 { margin-top: .125rem; } .mt-1 { margin-top: .25rem; } .mt-1\.5 { margin-top: .375rem; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-0\.5 { margin-bottom: .125rem; } .mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.25rem; } .mb-6 { margin-bottom: 1.5rem; }
.ml-1 { margin-left: .25rem; } .ml-1\.5 { margin-left: .375rem; } .ml-2 { margin-left: .5rem; }
.ml-3 { margin-left: .75rem; } .ml-4 { margin-left: 1rem; } .ml-8 { margin-left: 2rem; }
.ml-\[4\.5rem\] { margin-left: 4.5rem; }
.p-0\.5 { padding: .125rem; } .p-2 { padding: .5rem; } .p-3 { padding: .75rem; } .p-3\.5 { padding: .875rem; }
.p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
.px-0\.5 { padding-left: .125rem; padding-right: .125rem; } .px-1 { padding-left: .25rem; padding-right: .25rem; }
.px-1\.5 { padding-left: .375rem; padding-right: .375rem; } .px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; } .px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; } .px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; } .py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; } .py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; } .py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-3\.5 { padding-top: .875rem; padding-bottom: .875rem; } .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; } .py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-1 { padding-top: .25rem; } .pt-6 { padding-top: 1.5rem; } .pt-12 { padding-top: 3rem; }
.pb-1 { padding-bottom: .25rem; } .pb-2 { padding-bottom: .5rem; } .pb-3 { padding-bottom: .75rem; }
.pb-16 { padding-bottom: 4rem; } .pb-36 { padding-bottom: 9rem; }
.pl-2 { padding-left: .5rem; } .pl-3 { padding-left: .75rem; } .pl-4 { padding-left: 1rem; }

/* Typography */
.text-\[10px\] { font-size: 10px; } .text-\[11px\] { font-size: 11px; } .text-\[13px\] { font-size: 13px; }
.text-\[15px\] { font-size: 15px; } .text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; } .text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; } .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; } .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.font-normal { font-weight: 400; } .font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; } .leading-snug { line-height: 1.375; } .leading-relaxed { line-height: 1.625; }
.tracking-wide { letter-spacing: .025em; } .tracking-wider { letter-spacing: .05em; } .tracking-\[0\.5em\] { letter-spacing: .5em; }
.uppercase { text-transform: uppercase; } .whitespace-nowrap { white-space: nowrap; } .tabular-nums { font-variant-numeric: tabular-nums; }
.align-middle { vertical-align: middle; }
.text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; }

/* Color */
.text-white { color: white; } .text-gray-300 { color: var(--gray-300); } .text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); } .text-gray-600 { color: var(--gray-600); } .text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); } .text-gray-900 { color: var(--gray-900); }
.text-orange-400 { color: var(--orange-400); } .text-orange-500 { color: var(--orange-500); }
.text-orange-600 { color: var(--orange-600); } .text-orange-700 { color: var(--orange-700); } .text-orange-800 { color: var(--orange-800); }
.text-green-600 { color: var(--green-600); } .text-green-700 { color: var(--green-700); }
.text-red-400 { color: var(--red-400); } .text-red-500 { color: var(--red-500); } .text-red-600 { color: var(--red-600); } .text-red-700 { color: var(--red-700); }
.text-blue-600 { color: var(--blue-600); } .text-blue-700 { color: var(--blue-700); }
.text-purple-400 { color: var(--purple-400); } .text-purple-600 { color: var(--purple-600); } .text-purple-700 { color: var(--purple-700); }
.text-yellow-400 { color: var(--yellow-400); } .text-yellow-600 { color: var(--yellow-600); } .text-yellow-700 { color: var(--yellow-700); }
.bg-white { background-color: white; } .bg-gray-50 { background-color: var(--gray-50); } .bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-200 { background-color: var(--gray-200); } .bg-gray-300 { background-color: var(--gray-300); } .bg-gray-600 { background-color: var(--gray-600); }
.bg-orange-50 { background-color: var(--orange-50); } .bg-orange-100 { background-color: var(--orange-100); }
.bg-orange-400 { background-color: var(--orange-400); } .bg-orange-500 { background-color: var(--orange-500); } .bg-orange-600 { background-color: var(--orange-600); }
.bg-green-50 { background-color: var(--green-50); } .bg-green-100 { background-color: var(--green-100); }
.bg-red-50 { background-color: var(--red-50); } .bg-red-600 { background-color: var(--red-600); }
.bg-blue-50 { background-color: var(--blue-50); } .bg-blue-100 { background-color: var(--blue-100); }
.bg-purple-50 { background-color: var(--purple-50); } .bg-yellow-50 { background-color: var(--yellow-50); } .bg-yellow-100 { background-color: var(--yellow-100); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--orange-400), var(--orange-600)); }

/* Borders, radii, shadows */
.border { border: 1px solid var(--gray-200); } .border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top: 1px solid var(--gray-200); } .border-b { border-bottom: 1px solid var(--gray-200); }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-transparent { border-color: transparent; } .border-white { border-color: white; }
.border-gray-100 { border-color: var(--gray-100); } .border-gray-200 { border-color: var(--gray-200); } .border-gray-300 { border-color: var(--gray-300); }
.border-orange-200 { border-color: #fed7aa; } .border-orange-300 { border-color: #fdba74; } .border-orange-400 { border-color: var(--orange-400); } .border-orange-600 { border-color: var(--orange-600); }
.border-green-200 { border-color: #bbf7d0; } .border-green-300 { border-color: #86efac; }
.border-red-200 { border-color: var(--red-200); } .border-blue-200 { border-color: var(--blue-200); } .border-yellow-200 { border-color: var(--yellow-200); }
.border-t-transparent { border-top-color: transparent; } .border-t-orange-600 { border-top-color: var(--orange-600); }
.divide-y > * + * { border-top: 1px solid var(--gray-200); } .divide-gray-100 > * + * { border-color: var(--gray-100); }
.rounded { border-radius: .25rem; } .rounded-lg { border-radius: var(--radius); } .rounded-xl { border-radius: .85rem; }
.rounded-2xl { border-radius: 1rem; } .rounded-full { border-radius: 9999px; } .rounded-r { border-radius: 0 .25rem .25rem 0; }
.rounded-t-lg { border-radius: var(--radius) var(--radius) 0 0; } .rounded-t-xl { border-radius: .85rem .85rem 0 0; }
.shadow { box-shadow: var(--shadow-sm); } .shadow-sm { box-shadow: var(--shadow-sm); } .shadow-md { box-shadow: var(--shadow-md); } .shadow-lg { box-shadow: var(--shadow-lg); }

/* Media and overflow */
.object-cover { object-fit: cover; } .overflow-hidden { overflow: hidden; } .overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; } .overflow-y-auto { overflow-y: auto; }
.select-all { -webkit-user-select: all; user-select: all; }

.api-token-panel {
  border-color: #fed7aa;
  background: #fff7ed;
}
.api-token-row {
  display: flex;
  align-items: stretch;
  gap: .75rem;
}
.api-token-value {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  padding: .9rem 1rem;
  border: 1px solid #111827;
  border-radius: var(--radius);
  background: #111827;
  color: #f9fafb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.4;
  white-space: nowrap;
  -webkit-user-select: all;
  user-select: all;
}
.api-token-value:focus-visible {
  outline: 3px solid rgba(234, 88, 12, .35);
  outline-offset: 2px;
}
.api-token-copy { flex: 0 0 auto; }
.api-token-status {
  min-height: 1.25rem;
  margin-top: .6rem;
  color: #166534;
  font-size: .85rem;
}
@media (max-width: 600px) {
  .api-token-row { align-items: stretch; flex-direction: column; }
  .api-token-copy { width: 100%; }
}
.list-none { list-style: none; } .list-disc { list-style: disc; }

/* State and interaction */
.opacity-0 { opacity: 0; } .opacity-25 { opacity: .25; } .opacity-50 { opacity: .5; } .opacity-60 { opacity: .6; } .opacity-75 { opacity: .75; }
.transition-all { transition: all 160ms ease; } .transition-colors { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.transition-opacity { transition: opacity 160ms ease; } .transition-shadow { transition: box-shadow 160ms ease; } .transition-transform { transition: transform 160ms ease; }
.animate-spin { animation: spin .75s linear infinite; } .animate-pulse { animation: pulse 1.5s ease-in-out infinite; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.disabled\:opacity-30:disabled { opacity: .3; }
.cursor-pointer { cursor: pointer; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:shadow-sm:hover { box-shadow: var(--shadow-sm); } .hover\:shadow-md:hover { box-shadow: var(--shadow-md); }
.hover\:opacity-100:hover, .group:hover .group-hover\:opacity-100 { opacity: 1; }
.hover\:bg-gray-50:hover { background: var(--gray-50); } .hover\:bg-gray-100:hover { background: var(--gray-100); } .hover\:bg-gray-200:hover { background: var(--gray-200); }
.hover\:bg-gray-700:hover { background: var(--gray-700); } .hover\:bg-orange-50:hover { background: var(--orange-50); }
.hover\:bg-orange-100:hover { background: var(--orange-100); } .hover\:bg-orange-700:hover { background: var(--orange-700); }
.hover\:bg-green-50:hover { background: var(--green-50); } .hover\:bg-red-50:hover { background: var(--red-50); }
.hover\:bg-red-700:hover { background: var(--red-700); } .hover\:bg-purple-100:hover { background: #f3e8ff; }
.hover\:text-gray-500:hover { color: var(--gray-500); } .hover\:text-gray-600:hover { color: var(--gray-600); } .hover\:text-gray-700:hover { color: var(--gray-700); }
.hover\:text-orange-600:hover { color: var(--orange-600); } .hover\:text-orange-700:hover { color: var(--orange-700); }
.hover\:text-green-600:hover { color: var(--green-600); } .hover\:text-red-500:hover { color: var(--red-500); } .hover\:text-red-600:hover { color: var(--red-600); }
.hover\:border-orange-300:hover { border-color: #fdba74; }
.active\:bg-gray-100:active { background: var(--gray-100); } .active\:bg-orange-50:active { background: var(--orange-50); }
.active\:bg-orange-100:active { background: var(--orange-100); } .active\:bg-orange-700:active { background: var(--orange-700); }
.active\:bg-green-100:active { background: var(--green-100); } .active\:bg-red-100:active { background: #fee2e2; }
.focus\:outline-none:focus { outline: none; } .focus\:ring-2:focus, .focus-visible\:ring-2:focus-visible { outline: 2px solid rgb(249 115 22 / .35); outline-offset: 2px; }
.focus\:border-orange-500:focus { border-color: var(--orange-500); } .focus\:border-transparent:focus { border-color: transparent; }
.group:hover .group-hover\:h-1\.5 { height: .375rem; }
.group[open] .group-open\:rotate-180 { transform: rotate(180deg); }

/* Controls */
input[type="checkbox"] { accent-color: var(--orange-600); }
input[type="file"] { padding: .35rem; }
input[type="file"]::file-selector-button { margin-right: .75rem; border: 0; border-radius: .5rem; background: var(--orange-50); color: var(--orange-700); padding: .5rem 1rem; font-weight: 500; }

@media (min-width: 640px) {
  .sm\:block { display: block !important; } .sm\:flex { display: flex !important; } .sm\:grid { display: grid !important; } .sm\:hidden { display: none !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:gap-0 { gap: 0; } .sm\:gap-3 { gap: .75rem; } .sm\:gap-6 { gap: 1.5rem; }
  .sm\:mb-0 { margin-bottom: 0; } .sm\:p-6 { padding: 1.5rem; } .sm\:py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:w-14 { width: 3.5rem; } .sm\:w-24 { width: 6rem; } .sm\:w-28 { width: 7rem; } .sm\:w-32 { width: 8rem; }
  .sm\:w-64 { width: 16rem; } .sm\:w-72 { width: 18rem; }
  .sm\:h-14 { height: 3.5rem; } .sm\:h-24 { height: 6rem; } .sm\:h-28 { height: 7rem; } .sm\:h-32 { height: 8rem; }
  .sm\:h-64 { height: 16rem; } .sm\:h-72 { height: 18rem; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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