:root {
  color-scheme: dark;
  --bg: #111;
  --panel: #1c1c1c;
  --card: #050505;
  --text: #f7f7f7;
  --muted: #aaa;
  --line: #333;
  --accent: #f4d735;
  --danger: #ff6961;
  --bottom-nav-space: 86px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:has(.bottom-nav) {
  padding-bottom: calc(var(--bottom-nav-space) + env(safe-area-inset-bottom));
}

button, input, select {
  font: inherit;
}

button,
select,
input[type="button"],
input[type="reset"],
input[type="submit"],
summary,
a[href],
label[for] {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
}

a { color: inherit; }

a { text-decoration-thickness: 1px; }

svg[data-lucide] {
  width: 1em;
  height: 1em;
  stroke-width: 2.4;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 10px;
  background: rgba(17, 17, 17, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar h1, .login-panel h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.app-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 14px 14px 34px;
}

.app-shell > section + section {
  margin-top: 10px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 -14px 18px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  padding: 18px 10px 14px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 900;
}

.tabs a.active {
  color: var(--text);
  border-bottom: 4px solid var(--text);
}

.list {
  display: grid;
  gap: 12px;
}

.media-card {
  display: grid;
  grid-template-columns: 96px 1fr 64px;
  min-height: 118px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.media-card-completing {
  background: #153d24;
  border-color: #3f9f5a;
  box-shadow: 0 0 0 1px rgba(71, 210, 120, .32);
}

.media-card-completing .poster {
  background: #173521;
}

.media-card-completing .check-button {
  background: #7bd13b;
  color: #fff;
  transform: scale(1.06);
}

.poster {
  display: grid;
  place-items: center;
  background: #282828;
  color: #777;
  font-size: 32px;
  font-weight: 900;
  text-decoration: none;
}

.poster svg {
  width: 34px;
  height: 34px;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-copy {
  min-width: 0;
  padding: 16px 14px;
}

.media-copy h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.status-badge-success {
  border-color: rgba(123, 209, 59, .55);
  background: rgba(123, 209, 59, .14);
  color: #9eea6c;
}

.media-copy p {
  margin: 0;
  color: var(--muted);
}

.subtitle {
  color: var(--text) !important;
  font-size: 24px;
  font-weight: 900;
}

.check-button, .icon-button {
  border: 0;
  cursor: pointer;
  line-height: 0;
}

.check-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 35px 12px 0 0;
  border-radius: 50%;
  background: #fff;
  color: #777;
  font-size: 28px;
  font-weight: 900;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.check-button svg,
.icon-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 3;
}

.as-link {
  text-decoration: none;
}

.add-button {
  color: #111;
  background: var(--accent);
}

.add-button svg {
  stroke-width: 3.4;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2a2a2a;
  color: var(--text);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(5, 5, 5, .96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 9px 6px calc(10px + env(safe-area-inset-bottom));
}

.bottom-nav a {
  display: grid;
  gap: 4px;
  place-items: center;
  color: #777;
  text-decoration: none;
  font-size: 26px;
  min-height: 54px;
  border-radius: 8px;
}

.bottom-nav svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.bottom-nav span {
  font-size: 12px;
  font-weight: 700;
}

.bottom-nav a.active {
  color: var(--text);
  background: #111;
}

.empty, .panel, .manual-add {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty h2, .panel h2, .manual-add h2 {
  margin-top: 0;
}

.pill-button, .primary-button, .search-box button, .inline-form button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0 18px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

.primary-button:disabled,
.primary-button.is-loading {
  cursor: wait;
  opacity: .78;
}

.button-spinner {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid rgba(17, 17, 17, .35);
  border-top-color: #111;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .32);
}

.form-stack, .search-box, .inline-form {
  display: grid;
  gap: 12px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #0a0a0a;
  color: var(--text);
}

.search-box {
  grid-template-columns: 1fr auto;
  margin-bottom: 16px;
}

.manual-add {
  margin-bottom: 20px;
}

.manual-add-secondary {
  margin-top: 24px;
  background: #151515;
}

.manual-add-secondary p {
  margin-top: -4px;
  color: var(--muted);
}

.inline-form {
  grid-template-columns: 1fr auto auto;
}

.alert, .notice {
  padding: 12px;
  border-radius: 8px;
}

.alert {
  background: rgba(255, 105, 97, .14);
  border: 1px solid rgba(255, 105, 97, .5);
}

.alert a {
  font-weight: 800;
}

.notice {
  background: rgba(244, 215, 53, .14);
  border: 1px solid rgba(244, 215, 53, .5);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stats-grid div {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-grid strong {
  display: block;
  font-size: 28px;
}

.stats-grid span, .activity-list span, .activity-list time {
  color: var(--muted);
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-list article {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.import-result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
}

.activity-list .import-result {
  border-bottom: 1px solid var(--line);
}

.import-result-success {
  border-color: rgba(102, 217, 94, 0.55);
  background: linear-gradient(135deg, rgba(102, 217, 94, 0.16), rgba(21, 21, 21, 0.96) 54%);
}

.import-result-warning {
  border-color: rgba(244, 215, 53, 0.9);
  box-shadow: inset 4px 0 0 var(--accent);
  background: linear-gradient(135deg, rgba(244, 215, 53, 0.18), rgba(35, 24, 4, 0.96) 58%);
}

.import-result-running {
  border-color: rgba(170, 170, 170, 0.55);
}

.import-result-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.import-result-header > div {
  display: grid;
  gap: 4px;
}

.import-result-summary {
  text-align: right;
}

.import-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.import-metric {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.24);
}

.import-metric strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.import-metric-success {
  border-color: rgba(102, 217, 94, 0.45);
}

.import-metric-warning {
  border-color: rgba(244, 215, 53, 0.85);
  color: var(--text);
  background: rgba(244, 215, 53, 0.12);
}

.import-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff4b8;
  background: rgba(244, 215, 53, 0.12);
}

.profile-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.push-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.push-status {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 900;
}

.push-status[data-push-state="active"] {
  border-color: #4aa35f;
  color: #8ce28f;
}

.push-status[data-push-state="denied"],
.push-status[data-push-state="unsupported"] {
  border-color: rgba(255, 105, 97, .55);
  color: #ff9a94;
}

.profile-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading a {
  color: var(--muted);
  font-weight: 800;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
}

.loading-overlay[hidden] {
  display: none;
}

.loading-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}

.loading-panel p {
  margin: 0;
  color: var(--muted);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}

.confirm-panel h2,
.confirm-panel p {
  margin: 0;
}

.confirm-panel p {
  color: var(--muted);
}

.watch-date-panel {
  width: min(460px, 100%);
}

.watch-date-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.watch-date-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.watch-date-fields input {
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}

.watch-date-fields input:disabled {
  opacity: .45;
}

.watch-date-error {
  min-height: 18px;
  color: var(--danger) !important;
  font-weight: 800;
}

.watch-date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #333;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

.media-hero {
  position: relative;
  min-height: 340px;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 24px 18px 28px;
  background-color: #050505;
  background-position: center;
  background-size: cover;
}

.back-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  text-decoration: none;
  line-height: 0;
}

.back-link svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.6;
}

.media-hero-copy {
  width: min(980px, 100%);
  margin: 0 auto;
}

.media-hero:has(.media-hero-watch) .media-hero-copy {
  padding-right: 72px;
}

.media-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(34px, 8vw, 58px);
  letter-spacing: 0;
}

.media-hero p {
  margin: 8px 0 0;
  font-size: 20px;
}

.progress-label {
  color: var(--accent);
  font-weight: 900;
}

.media-hero-watch {
  position: absolute;
  right: max(18px, calc((100% - 980px) / 2 + 18px));
  bottom: 28px;
}

.media-hero-watch .check-button {
  margin: 0;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .38);
}

.watch-action-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.media-hero-watch .watch-action-group {
  justify-content: flex-end;
}

.media-hero-watch .watch-choice-popover {
  top: auto;
  right: 0;
  bottom: 60px;
}

.media-hero-watch .note-popover {
  top: calc(100% + 12px);
  right: 0;
  bottom: auto;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watch-panel {
  display: grid;
  gap: 18px;
}

.watch-panel h2,
.watch-panel .attribution {
  margin: 0;
}

.media-note-list {
  display: grid;
  gap: 10px;
}

.media-note-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.media-note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.media-note-meta strong,
.media-note-meta span {
  color: var(--text);
}

.watch-availability-group {
  display: grid;
  gap: 6px;
}

.watch-availability-group h3 {
  margin: 0;
  font-size: 17px;
}

.watch-availability-copy {
  margin: 0;
  font-weight: 800;
}

.provider-list p {
  margin: 0;
}

.provider-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #080808;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.provider-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.continue-panel {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #070707;
}

.continue-panel .episode-poster {
  min-height: 124px;
  overflow: hidden;
  border-radius: 8px;
}

.continue-copy h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.continue-copy p:not(.eyebrow) {
  margin: 0 0 4px;
}

.continue-panel .check-button {
  margin: 0;
}

.attribution, small {
  color: var(--muted);
}

.attribution a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.episodes-section h2 {
  margin: 24px 0 12px;
}

.season-panel {
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.season-panel summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 7px;
  cursor: pointer;
  background: #050505;
  font-size: 22px;
  font-weight: 900;
}

.season-panel[open] summary {
  border-radius: 7px 7px 0 0;
}

.season-panel summary > span:first-child {
  min-width: 0;
}

.season-optional-label {
  display: inline-flex;
  margin-left: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  vertical-align: middle;
}

.season-summary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.season-check {
  display: grid;
  place-items: center;
}

.season-check .check-button {
  width: 40px;
  height: 40px;
  margin: 0;
}

.season-check-form {
  display: none;
}

.season-check .check-button:disabled {
  opacity: 1;
}

.danger-zone button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
}

.episode-list {
  display: grid;
}

.episode-row {
  display: grid;
  grid-template-columns: 92px 1fr 112px;
  column-gap: 14px;
  min-height: 104px;
  border-top: 1px solid var(--line);
  background: #050505;
}

.episode-row:last-child {
  border-radius: 0 0 7px 7px;
}

.episode-row:last-child .episode-poster {
  border-bottom-left-radius: 7px;
  overflow: hidden;
}

.episode-row.watched {
  background: #101310;
}

.episode-row h3 {
  margin: 14px 0 4px;
  font-size: 24px;
}

.episode-row p {
  margin: 0 0 4px;
}

.episode-row small {
  display: inline-block;
  margin-right: 8px;
}

.episode-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 0 10px 0 0;
}

.episode-watch-form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 10px 0 0;
}

.episode-actions .check-button,
.episode-watch-form .check-button {
  margin: 0;
}

.watch-menu-wrap,
.note-menu-wrap {
  position: relative;
}

.note-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #777;
  line-height: 0;
  opacity: .7;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.note-button:hover,
.note-button:focus-visible {
  border-color: #666;
  color: var(--text);
  opacity: 1;
}

.note-button-filled {
  border-color: var(--accent);
  background: var(--accent);
  color: #111;
  opacity: 1;
}

.note-button svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.6;
}

.note-save-status {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  white-space: nowrap;
  color: #9eea6c;
  font-size: 12px;
  font-weight: 800;
}

.watch-choice-popover {
  position: absolute;
  top: 84px;
  right: 12px;
  z-index: 5;
  width: 180px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .45);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  cursor: default;
}

.watch-choice-popover[hidden] {
  display: none;
}

.note-popover {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 6;
  width: min(380px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .45);
}

.note-popover[hidden] {
  display: none;
}

.note-popover form,
.note-popover label {
  display: grid;
  gap: 10px;
}

.note-popover label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.note-popover textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #0a0a0a;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.series-notes-popover {
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  color: var(--text);
}

.series-notes-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.series-notes-heading strong {
  font-size: 15px;
}

.series-notes-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.series-notes-popover .media-note-list {
  max-height: min(360px, calc(100vh - 220px));
  overflow: auto;
}

.series-notes-popover .media-note-item p {
  margin: 0;
}

.note-date-group {
  display: grid;
  gap: 10px;
}

.note-date-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.note-date-heading small {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.note-date-fields {
  gap: 8px;
}

.note-date-fields input {
  min-height: 38px;
  padding: 8px 6px;
  font-size: 16px;
  font-weight: 800;
}

.note-date-error {
  min-height: 16px;
  margin: -2px 0 0;
  font-size: 13px;
}

.note-date-shortcuts {
  gap: 8px;
}

.note-date-shortcuts .pill-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.note-actions .pill-button,
.note-actions .primary-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.watch-choice-popover p,
.watch-choice-popover > span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.watch-choice-popover form {
  display: grid;
}

.watch-choice-popover button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.episode-poster {
  min-height: 104px;
}

.watched-button {
  background: #7bd13b;
  color: #fff;
}

.season-check .watch-choice-popover {
  top: 48px;
  right: 0;
}

@media (max-width: 640px) {
  .profile-summary,
  .section-heading {
    display: grid;
  }

  .profile-actions {
    justify-content: flex-start;
  }

  .media-card {
    grid-template-columns: 86px 1fr 58px;
  }

  .subtitle {
    font-size: 20px;
  }

  .search-box, .inline-form {
    grid-template-columns: 1fr;
  }

  .media-hero {
    min-height: 300px;
  }

  .episode-row {
    grid-template-columns: 78px 1fr 102px;
  }

  .episode-actions {
    gap: 12px;
    padding-right: 8px;
  }

  .episode-watch-form {
    padding-right: 8px;
  }

  .episode-actions .check-button,
  .episode-actions .note-button {
    width: 38px;
    height: 38px;
  }

  .continue-panel {
    grid-template-columns: 78px 1fr 58px;
    gap: 12px;
  }

  .continue-copy h2 {
    font-size: 22px;
  }

  .confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .watch-date-shortcuts {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  :root {
    --bottom-nav-space: 108px;
  }

  .bottom-nav {
    width: min(560px, calc(100% - 48px));
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
  }

  .bottom-nav a {
    min-height: 52px;
  }
}

@media (min-width: 1180px) {
  :root {
    --bottom-nav-space: 0px;
  }

  .bottom-nav {
    width: 78px;
    left: min(calc(100% - 94px), calc(50% + 506px));
    top: 148px;
    bottom: auto;
    transform: none;
    grid-template-columns: 1fr;
    gap: 6px;
    border-radius: 18px;
    padding: 8px;
  }

  .bottom-nav a {
    min-height: 66px;
  }
}
