:root {
  color-scheme: dark;
  --bg: #0c1016;
  --surface: #111a22;
  --text: #e4ebed;
  --quiet: #a4b0b7;
  --line: #39474f;
  --accent: #e6ad61;
  --ice: #9edbe3;
  --green: #a6dcae;
  --gold: #efbf5e;
  --text-scale: 1;
  --ui-scale: 1;
  font: calc(14px * var(--text-scale)) / 1.34 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  background: #080c11;
  color: var(--text);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(ellipse 44% 13% at 71% 5%, #24506288, transparent 95%),
    radial-gradient(ellipse 65% 38% at 85% 0%, #20333e, transparent 92%),
    radial-gradient(ellipse 65% 32% at 0% 95%, #23332d88, transparent 85%),
    repeating-linear-gradient(0deg, #10242a30 0 1px, transparent 1px 5px),
    var(--bg);
}
button, a, input, textarea, select { -webkit-tap-highlight-color: #a1dbe334; }
a { color: var(--ice); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .42; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}
button, a { touch-action: manipulation; }
h1, h2, h3, .total, .wordmark, .featured strong, .film-line strong {
  font-family: 'Bahnschrift Condensed', 'Arial Narrow', Impact, sans-serif;
  font-stretch: condensed;
  letter-spacing: .035em;
}
h1, h2, h3, p { margin: 0 0 .65rem; }
h1 { font-size: 1.42rem; line-height: 1; }
h2 { font-size: 1.30rem; line-height: 1.1; }
h3 { font-size: 1.1rem; }
small, .quiet { color: var(--quiet); }
small { font-size: .81em; }
strong, b { font-weight: 700; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
label { display: block; }
label > small { padding-left: .35rem; }
input:not([type="checkbox"], [type="range"], [type="file"]), textarea, select {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #10171deb;
  min-inline-size: 0;
}
label > input:not([type="checkbox"], [type="range"], [type="file"]), label > textarea {
  display: block;
  width: 100%;
  padding: .62rem;
  margin-top: .28rem;
}
textarea { resize: vertical; min-height: 4em; }
input[type="range"], input[type="checkbox"] { accent-color: var(--ice); }
input[type="checkbox"] { inline-size: 1.32rem; block-size: 1.32rem; }
form label + label { margin-top: .8rem; }
form { margin-bottom: .7rem; }
form > .button { margin-top: .65rem; }
select { padding: .35rem; max-width: min(52vw, 18rem); }
button, .button { user-select: none; }
.button, .icon-button {
  display: inline-flex;
  gap: .4em;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  background: #161e26;
  border: 1px solid #52616a;
  border-radius: 3px;
  color: var(--text);
  min-height: calc(34px * var(--ui-scale));
  padding: .24rem .62rem;
  line-height: 1.08;
}
.button:not(:disabled):hover, .icon-button:hover { border-color: var(--ice); }
.button[aria-pressed="true"] { color: var(--ice); border-color: #65939a; background: #192c34; }
.accent { color: #f7c681; border-color: #af7840; background: #342618; font-weight: 700; }
.quiet-button { background: transparent; border-color: transparent; }
.note-button { color: var(--green); }
.full { width: 100%; }
.icon-button { border: 0; background: transparent; min-width: 32px; padding: .16rem; flex: none; }
.icon-button svg { width: 1.45em; height: 1.45em; }
#app {
  max-width: 760px;
  min-height: 100dvh;
  margin-inline: auto;
  background: radial-gradient(ellipse 65% 110px at 73% 0%, #34657a3d, transparent), #0e141a5c;
}
.top {
  min-height: calc(52px * var(--ui-scale));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5em;
  padding: env(safe-area-inset-top) .8rem 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, #141b22f0 32%, #1a2b35b0 78%, #0b1217e0);
}
.top > div { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.top h1 { margin: 0; }
.top > div > h1:only-child { text-transform: uppercase; letter-spacing: .11em; }
.wordmark { white-space: nowrap; font-size: .82rem; color: #b7c7cd; letter-spacing: .13em; }
.content { padding: .9rem .8rem calc(4.8rem + env(safe-area-inset-bottom)); }
.content section + section { margin-top: 1.05rem; }
.content section + section { border-top: 1px solid var(--line); padding-top: .9rem; }
.section-head, .actions, .segments, .pager { display: flex; align-items: center; gap: .45rem; }
.section-head { justify-content: space-between; margin-bottom: .32rem; }
.section-head > * { margin-bottom: 0; }
.actions { margin: .65rem 0; flex-wrap: wrap; }
.actions > * { flex: 1 1 auto; }
.section-head > a { font-size: .87rem; }
.bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 760px);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: .23rem 0 calc(.25rem + env(safe-area-inset-bottom));
  background: #111920fa;
  border-top: 1px solid #47565d;
}
.bottom a {
  min-height: calc(42px * var(--ui-scale));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .18em;
  font-size: .77rem;
  text-decoration: none;
  color: var(--quiet);
}
.bottom a[aria-current="page"] { color: var(--accent); }
.bottom svg { width: 1.62em; height: 1.62em; }
.home-intro {
  position: relative;
  isolation: isolate;
  padding: .85rem .7rem .75rem;
  margin: -.35rem -.18rem .8rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(96deg, #111922c9 20%, #0b141a4d), radial-gradient(ellipse at 73% 27%, #6193a435, transparent 57%);
}
.home-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 5px;
  right: 0;
  width: 53%;
  height: 105px;
  background: linear-gradient(94deg, #9cbdcd4f, #37556811 78%);
  clip-path: polygon(2% 52%, 100% 0, 100% 100%);
}
.home-intro p { max-width: 27ch; color: #bdc9ce; }
.home-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 86px;
  height: 86px;
  right: 11px;
  top: 3px;
  border-radius: 50%;
  opacity: .43;
  background: repeating-conic-gradient(from 15deg, #6b8b994c 0deg 13deg, transparent 13deg 60deg);
  mask: radial-gradient(circle, transparent 14%, #000 15% 22%, transparent 23% 29%, #000 30% 54%, transparent 55% 61%, #000 62% 65%, transparent 66%);
}
.home-intro .full { margin-top: .7rem; }
.featured { display: grid; grid-template-columns: min(23%, 84px) 1fr; align-items: center; gap: .85rem; text-decoration: none; color: var(--text); }
.featured strong { font-size: 1.43rem; }
.featured small, .film-line small, .compare-films small, .all-scores small { display: block; }
.progress-label { display: block; color: var(--quiet); margin-top: .55rem; }
progress { width: 100%; height: .58rem; accent-color: var(--ice); }
.cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid #47535c;
  border-radius: 2px;
}
.placeholder { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, #2f515f, #131a24 68%); color: #98b5bf; }
.film-line {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .58rem;
  min-height: 2.9rem;
  padding: .36rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.film-line strong { overflow-wrap: anywhere; }
.film-line .total { text-align: right; font-size: 1.24rem; }
.total { color: var(--ice); font-variant-numeric: tabular-nums; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score sup { margin-left: .11em; font-size: .65em; line-height: 0; }
.red { color: #ff858a; }
.white { color: #fbfcfd; }
.blue { color: #a9ddf2; }
.yellow { color: #e8cf84; }
.green { color: var(--green); }
.unset { color: #aab4bb; }
.scoring {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.scoring-top { flex: none; }
.scoring-top h1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scoring-top > div > div { min-width: 0; }
.scoring-top .quiet { font-size: .79rem; }
.scoring-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-inline: .55rem;
}
.rating-grid {
  display: grid;
  flex: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(10, clamp(30px, calc((100dvh - 185px) / 10), calc(52px * var(--ui-scale))));
  column-gap: .55rem;
  align-content: start;
}
.rating-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 1px 1px 2px;
}
.category-name {
  background: transparent;
  border: 0;
  text-align: left;
  padding: 0;
  font-weight: 650;
  font-size: .82rem;
  line-height: 1;
  letter-spacing: -.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-controls { display: flex; justify-content: space-between; gap: 2px; }
.stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; width: min(64%, 116px); }
.stepper button, .note-chip {
  border: 1px solid #53636d;
  border-radius: 3px;
  height: clamp(17px, calc((100dvh - 382px) / 10), calc(31px * var(--ui-scale)));
  padding: 0 .15em;
  background: #15202a;
  line-height: 1;
  font-size: 1.03rem;
}
.note-chip {
  color: var(--green);
  border-color: #3d6451;
  background: #172821;
  display: inline-flex;
  gap: .22em;
  align-items: center;
  justify-content: center;
  padding: 0 .32em;
  font-size: .72rem;
}
.note-chip.has-note { background: #2c5140; border-color: #8bbd96; color: #d2f4d8; }
.comparison-panel { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.comparison-panel h2 { font-size: 1.03rem; margin: .33rem 0 .12rem; color: #d2b99a; }
.compact-message { font-size: .82rem; margin-top: .25rem; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .25rem .28rem; border-bottom: 1px solid var(--line); }
th { text-align: left; }
td { text-align: center; }
table button { border: 0; background: transparent; color: inherit; padding: 0; text-align: inherit; }
.compare-summary { width: 100%; table-layout: auto; font-size: .78rem; }
.compare-summary th, .compare-summary td { padding: .18rem .21rem; }
.compare-summary th:nth-child(2), .compare-summary th:nth-child(3) { width: 1%; text-align: center; white-space: nowrap; }
.compare-summary th:last-child { text-align: center; }
.closest { display: inline-flex; gap: .25em; align-items: baseline; max-width: 100%; }
.closest > span:first-child { overflow: hidden; text-overflow: ellipsis; max-width: 24ch; white-space: nowrap; }
.score-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: .5rem;
  background: #111920;
  border-top: 1px solid var(--line);
  min-height: calc(51px * var(--ui-scale));
  padding: .2rem .65rem calc(.2rem + env(safe-area-inset-bottom));
}
.score-footer > div { white-space: nowrap; font-size: .83rem; }
.score-footer .total { margin-left: .25rem; font-size: 1.48rem; }
.score-footer .button { font-size: .85rem; }
.film-hero { display: grid; grid-template-columns: minmax(64px, 32%) minmax(0, 1fr); align-items: center; gap: .85rem; }
.film-hero .cover { max-width: 115px; }
.film-hero h2 { overflow-wrap: anywhere; font-size: 1.55rem; }
.film-hero p { margin-bottom: .33rem; }
.detail-total, .review-summary > div { display: grid; margin-bottom: .48rem; }
.detail-total .total, .review-summary .total { font-size: 1.5rem; line-height: 1.1; }
.stars-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: .55rem 0; margin-top: .65rem; border-block: 1px solid var(--line); }
.stars {
  color: #53606b;
  display: inline-block;
  position: relative;
  font-family: Arial, sans-serif;
  letter-spacing: .04em;
  white-space: nowrap;
  line-height: 1.22;
}
.star-fill { color: var(--gold); overflow: hidden; position: absolute; inset: 0 auto 0 0; }
.star-slider { position: relative; font-size: 1.58rem; }
.star-slider input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.star-slider:focus-within { outline: 2px solid var(--ice); outline-offset: 3px; }
.detail-categories, .history-list, .library-lines, .guide-list { list-style: none; padding: 0; margin: 0; }
.detail-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .65rem; }
.detail-categories li, .history-list li, .guide-list a { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--line); min-height: 2rem; padding-block: .23rem; }
.detail-categories li > :first-child, .guide-list a > :first-child { flex: 1; }
.detail-categories li { gap: .2rem; font-size: .87rem; }
.detail-categories .note-chip { height: 20px; min-width: 20px; }
.detail-categories .note-chip span { display: none; }
.detail-categories .score { text-align: right; min-width: 2em; }
.history-list li { display: grid; grid-template-columns: 1fr auto; }
.history-list li p { grid-column: 1 / -1; margin: 0; color: var(--quiet); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-summary { display: flex; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--line); margin-bottom: .65rem; font-size: 1.08rem; }
.review-summary small { display: block; }
.gold-label { color: var(--gold); }
.brown-label { color: #d4a889; }
.gold-label input, .brown-label input { color: var(--text); }
.search-field, #movie-search { display: flex; align-items: center; gap: .48rem; }
.search-field {
  padding-left: .42rem;
  border: 1px solid var(--line);
  background: #10171d;
  border-radius: 3px;
  flex: 1 1 auto;
}
.search-field > input[type="search"] { margin: 0; border: 0; background: transparent; flex: 1; padding-left: .2rem; }
#movie-search .button { margin-top: 0; align-self: stretch; }
.library-toolbar { margin-top: .45rem; flex-wrap: wrap; }
.library-sort { font-size: .86rem; margin: .34rem 0; }
.library-sort .button { min-height: 27px; }
.sort-label { display: inline-flex; align-items: center; gap: .24rem; white-space: nowrap; }
.library-lines .film-line { grid-template-columns: 2.25rem minmax(0, 1fr) auto 3.1rem; }
.library-lines .stars { font-size: .83rem; }
.pager { margin-block: .63rem; justify-content: center; }
.table-scroll { overflow: auto; max-height: min(62dvh, 40rem); }
.all-scores { width: 100%; font-size: .83rem; }
.all-scores th, .all-scores td { min-width: 2.5rem; max-width: 5rem; padding: .27rem .28rem; }
.all-scores thead th { position: sticky; top: 0; z-index: 1; background: #1b2830; line-height: 1.08; }
.all-scores thead th button { display: block; min-height: 2.2rem; text-align: center; width: 100%; }
.all-scores th:first-child { position: sticky; left: 0; min-width: 6.2rem; max-width: 7.35rem; background: #15212a; z-index: 1; overflow-wrap: anywhere; }
.all-scores thead th:first-child { z-index: 2; background: #1b2830; }
.all-scores tbody th a { color: var(--text); text-decoration: none; }
.compare-films { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.compare-films a { display: grid; grid-template-columns: clamp(34px, 11vw, 70px) minmax(0, 1fr); gap: .42rem; align-items: center; text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.compare-films .total { font-size: 1.45rem; }
.duel { width: 100%; font-size: .89rem; }
.duel th:not(:first-child) { text-align: center; width: 22%; overflow-wrap: anywhere; }
.duel .win .score { text-decoration: underline; text-underline-offset: 3px; font-weight: 900; }
.duel .left-win { background: #9c681923; }
.duel .right-win { background: #3293ac20; }
.check-row { display: flex; gap: .45rem; align-items: center; margin: .24rem 0; }
.differences { padding-top: .35rem; margin-top: .5rem; border-top: 1px solid var(--line); }
.guide-list a { color: var(--text); text-decoration: none; }
details { margin: .65rem 0; border-block: 1px solid var(--line); padding: .45rem 0; }
summary { cursor: pointer; color: var(--ice); }
.guide-field { margin-top: .55rem; }
.setting-range { padding: .45rem 0; }
.setting-range output { float: right; color: var(--ice); }
.setting-range input { display: block; width: 100%; margin: .38rem 0; }
#credits p { margin: .45rem 0; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.search-result { grid-template-columns: 1.85rem minmax(0, 1fr) auto; width: 100%; text-align: left; background: #16202a; border: 1px solid var(--line); padding: .25rem .52rem; margin-bottom: .26rem; }
.search-result[aria-pressed="true"], .poster-choices button[aria-pressed="true"] { border-color: var(--ice); }
.poster-choices { display: flex; gap: .38rem; overflow: auto; padding: 2px 2px .55rem; }
.poster-choices button { flex: 0 0 57px; border: 1px solid var(--line); background: var(--surface); padding: 2px; height: 84px; }
.poster-choices img { width: 100%; height: 100%; object-fit: cover; }
#new-cover .cover { width: 52px; margin-top: .45rem; }
#search-status:not(:empty) { margin: .38rem 0; }
.export-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .42rem; font-size: .88rem; }
dialog {
  background: #162028;
  color: var(--text);
  border: 1px solid #5d737c;
  border-radius: 5px;
  padding: .7rem;
  width: min(calc(100% - 1.1rem), 495px);
  max-height: 84dvh;
  overflow: auto;
}
dialog::backdrop { background: #05080ac7; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: .55rem; }
.dialog-head h2 { margin: 0; }
dialog form { margin-bottom: 0; }
#notice:not(:empty) {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(85%, 25rem);
  bottom: calc(4.4rem + env(safe-area-inset-bottom));
  z-index: 4;
  border: 1px solid #5b7580;
  border-radius: 3px;
  background: #1c2b33;
  color: var(--text);
  padding: .55rem;
  text-align: center;
  pointer-events: none;
}
.loading { padding: .8rem; }
@media (min-height: 825px) {
  .rating-grid { grid-template-rows: repeat(10, min(calc(55px * var(--ui-scale)), calc((100dvh - 220px) / 10))); }
}
@media (max-height: 670px) {
  .scoring-top { min-height: 42px; }
  .score-footer { min-height: 42px; }
  .scoring-main .category-name { font-size: .77rem; }
}
@media (max-width: 345px) {
  .note-chip { font-size: .64rem; }
  .scoring-main { padding-inline: .33rem; }
  .rating-grid { column-gap: .34rem; }
}
