:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --surface: #131720;
  --surface-2: #1a202b;
  --surface-3: #222a38;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6f1ea;
  --muted: #929bad;
  --soft: #c3c9d4;
  --accent: #ff6b50;
  --accent-2: #ff967f;
  --ok: #67e8b5;
  --warn: #fbbf24;
  --error: #fb7185;
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-bottom: max(10px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -8%, rgba(255, 107, 80, 0.18), transparent 34rem),
    radial-gradient(circle at 105% 22%, rgba(73, 190, 255, 0.07), transparent 30rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell {
  width: min(1120px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(76px + var(--safe-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: calc(58px + var(--safe-top));
  padding: var(--safe-top) 14px 8px;
  background: linear-gradient(180deg, rgba(10, 12, 17, 0.96), rgba(10, 12, 17, 0.72) 70%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #180e0a;
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(255, 107, 80, 0.24);
}

.brand-mark svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--soft);
  background: transparent;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button svg path[d="M8 5v14l11-7z"] {
  fill: currentColor;
  stroke: none;
}

.back-button {
  grid-column: 1;
  justify-self: start;
}

#headerSettings {
  grid-column: 3;
  justify-self: end;
}

.main-view {
  padding: 8px 18px 28px;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(620px, calc(100% - 24px));
  margin: 0 auto calc(8px + var(--safe-bottom));
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(19, 23, 32, 0.9);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

.tab-item {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 7px 4px 5px;
  border: 0;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.tab-item svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-item.active {
  color: var(--accent);
  background: rgba(255, 107, 80, 0.1);
}

.page-heading {
  display: flex;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
  margin: 12px 2px 18px;
}

.page-heading h1,
.page-heading h2 {
  margin: 0;
  font-size: clamp(30px, 9vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shelf {
  margin: 0 0 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 11px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.section-head span {
  color: var(--muted);
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.resume-row {
  display: grid;
  grid-auto-columns: minmax(150px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding: 0 2px 5px;
  scrollbar-width: none;
}

.resume-row::-webkit-scrollbar {
  display: none;
}

.resume-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-2), rgba(19, 23, 32, 0.7));
  text-align: left;
}

.resume-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-3);
}

.resume-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.35;
}

.resume-card small {
  display: block;
  margin-top: 6px;
  color: var(--accent-2);
  font-size: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
}

.series-card {
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
  aspect-ratio: 7 / 10;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.poster-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.series-card:hover .poster-wrap img {
  transform: scale(1.025);
}

.poster-badge {
  position: absolute;
  right: 7px;
  bottom: 7px;
  max-width: calc(100% - 14px);
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 8px;
  color: #15100d;
  background: rgba(255, 244, 235, 0.9);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.rank-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  display: grid;
  min-width: 27px;
  height: 27px;
  padding: 0 6px;
  place-items: center;
  border-radius: 9px;
  color: #180e0a;
  background: var(--accent);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.series-card strong {
  display: -webkit-box;
  overflow: hidden;
  padding: 0 2px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.4;
}

.series-card small {
  overflow: hidden;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-more,
.primary-button,
.secondary-button,
.text-button {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  font-weight: 650;
}

.primary-button {
  padding: 0 18px;
  color: #180e0a;
  background: var(--accent);
}

.secondary-button {
  padding: 0 16px;
  color: var(--text);
  background: var(--surface-3);
}

.text-button {
  padding: 0 10px;
  color: var(--accent);
  background: transparent;
}

.load-more {
  display: block;
  width: min(240px, 100%);
  margin: 24px auto 4px;
  border: 1px solid var(--line);
  color: var(--soft);
  background: var(--surface);
}

.status-line {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0 2px 12px;
  color: var(--muted);
  font-size: 12px;
}

.status-line i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(103, 232, 181, 0.09);
}

.empty-state,
.error-state {
  display: grid;
  gap: 9px;
  justify-items: center;
  padding: 56px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.error-state strong {
  color: var(--text);
  font-size: 17px;
}

.empty-state small,
.error-state small {
  max-width: 28rem;
  font-size: 12px;
  line-height: 1.6;
}

.error-state strong {
  color: var(--error);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin: 10px 0 20px;
}

.search-box input {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 15px;
  color: var(--text);
  background: var(--surface);
}

.search-box input::placeholder {
  color: #6f7888;
}

.search-box button {
  min-width: 74px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -8px 0 18px;
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.board-tabs {
  display: flex;
  gap: 7px;
  margin: 8px 0 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.board-tabs::-webkit-scrollbar {
  display: none;
}

.board-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.board-tabs button.active {
  border-color: rgba(255, 107, 80, 0.32);
  color: #1a0f0b;
  background: var(--accent);
  font-weight: 700;
}

.detail-view {
  padding-top: 4px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  align-items: start;
  padding: 12px 0 22px;
}

.detail-poster {
  width: 118px;
  aspect-ratio: 7 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(24px, 7vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin: 9px 0 0;
  color: var(--accent-2);
  font-size: 11px;
  line-height: 1.5;
}

.detail-tags {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.detail-description {
  margin: 15px 0 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.detail-description.collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.episode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 11px;
}

.episode-head h2 {
  margin: 0;
  font-size: 17px;
}

.episode-pager {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.episode-pager button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--soft);
  background: var(--surface);
}

.episode-pager button:disabled {
  opacity: 0.3;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.episode-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--soft);
  background: var(--surface);
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.episode-button.current {
  border-color: var(--accent);
  color: #170d09;
  background: var(--accent);
}

.history-list,
.settings-list {
  display: grid;
  gap: 10px;
}

.history-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.history-row img {
  width: 54px;
  height: 74px;
  object-fit: cover;
  border-radius: 9px;
  background: var(--surface-3);
}

.history-body {
  min-width: 0;
}

.history-body strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-body small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.history-progress {
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.history-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.history-delete {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
}

.history-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.settings-group {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.setting-row span {
  color: var(--soft);
  font-size: 13px;
}

.setting-row strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.setting-row button:not(.switch) {
  border: 0;
  color: var(--accent);
  background: transparent;
}

.switch {
  position: relative;
  width: 45px;
  height: 27px;
  border: 0;
  border-radius: 99px;
  background: var(--surface-3);
}

.switch::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--soft);
  content: "";
  transition: 160ms ease;
}

.switch.on {
  background: var(--accent);
}

.switch.on::after {
  background: #1a0f0b;
  transform: translateX(18px);
}

.sheet-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 18px 12px calc(12px + var(--safe-bottom));
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

body.sheet-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

body.player-immersive {
  overflow: hidden;
  background: #000;
}

body.player-immersive .app-shell,
body.player-immersive .tabbar {
  visibility: hidden;
}

.sheet-backdrop {
  z-index: 250;
  overscroll-behavior: none;
}

.sheet {
  width: min(620px, 100%);
  max-height: min(78dvh, 680px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #141922;
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.5);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 17px;
}

.sheet-content {
  max-height: calc(78dvh - 80px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px calc(20px + var(--safe-bottom));
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.option-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--soft);
  background: var(--surface-2);
  font-size: 12px;
}

.option-button.selected {
  border-color: var(--accent);
  color: #170d09;
  background: var(--accent);
  font-weight: 700;
}

.sheet-episodes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  color: #fff;
  background: #000;
}

.player-overlay.force-landscape,
.sheet-backdrop.force-landscape {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 100vh;
  height: 100vw;
  width: 100dvh;
  height: 100dvw;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}

.sheet-backdrop.force-landscape {
  padding: 10px 20px;
}

.sheet-backdrop.force-landscape .sheet {
  max-height: min(calc(100dvw - 20px), 680px);
}

.sheet-backdrop.force-landscape .sheet-content {
  max-height: calc(min(calc(100dvw - 20px), 680px) - 80px);
}

#playerVideo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

#playerVideo.fill {
  object-fit: cover;
}

.player-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 26%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 36%);
}

body.player-immersive .player-shade {
  display: none;
}

.player-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 12px 12px;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.player-top.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.icon-button.light {
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
}

.player-title {
  min-width: 0;
}

.player-title strong,
.player-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-title strong {
  font-size: 14px;
}

.player-title small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.pill-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.player-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0 18px calc(16px + env(safe-area-inset-bottom));
  transition: opacity 180ms ease, transform 180ms ease;
}

.player-controls.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.player-progress input {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.64);
  font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.player-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 10px 0 4px;
}

.player-action {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.player-action svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-action.primary {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #1a0f0b;
  background: var(--accent);
}

.player-action.primary svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
  stroke: none;
}

.player-extra {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 9px;
}

.player-extra button {
  border: 0;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  font-size: 11px;
}

.player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 8px;
  place-content: center;
  justify-items: center;
  background: rgba(0, 0, 0, 0.42);
  text-align: center;
}

.player-loading strong {
  margin-top: 4px;
  font-size: 16px;
}

.player-loading span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
}

.loading-bar {
  width: min(240px, 60vw);
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.loading-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.modal-backdrop {
  z-index: 300;
  align-items: center;
  padding: 20px;
}

.modal-card {
  width: min(380px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #151a23;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
}

.modal-card h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.modal-card p {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.modal-card input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface-2);
}

.modal-card button {
  width: 100%;
  margin-top: 10px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 500;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text);
  background: rgba(28, 34, 45, 0.95);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  font-size: 12px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  content: "";
  animation: shimmer 1.4s infinite;
  transform: translateX(-100%);
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (min-width: 650px) {
  .main-view {
    padding: 16px 34px 36px;
  }

  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .detail-hero {
    grid-template-columns: 176px 1fr;
    gap: 26px;
    padding-top: 20px;
  }

  .detail-poster {
    width: 176px;
  }

  .episode-grid,
  .sheet-episodes {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .app-header {
    padding-right: 34px;
    padding-left: 34px;
  }
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .resume-row {
    grid-auto-columns: minmax(180px, 1fr);
  }
}
