:root {
  color-scheme: dark;
  /* iosapp/Reclist/Theme.swift */
  --bg: #0f1217;
  --card: #1c1f26;
  --card-hi: #292b36;
  --accent: #f5a624;
  --record: #ff3833;
  --teal: #2ec4b5;
  --rose: #ff5e73;
  --text: #fff;
  --muted: #a6a7ab;
  --line: #3c3e46;
  font: 1rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.workspace {
  width: min(100%, 46rem);
  margin-inline: auto;
  padding: clamp(2.25rem, 7vh, 5rem) max(1rem, env(safe-area-inset-left)) calc(7rem + env(safe-area-inset-bottom));
}
main, form, article { min-width: 0; }
main:focus { outline: none; }
p, h1, h2, h3, h4, a { overflow-wrap: anywhere; }
p, h1, h2, h3, h4 { margin: 0 0 .55rem; }
h1 { font-size: 2.125rem; line-height: 1.17; letter-spacing: -.035em; font-weight: 700; margin-bottom: 1.4rem; }
h2 { font-size: 1.26rem; line-height: 1.25; letter-spacing: -.015em; margin: 1.5rem 0 .65rem; }
h3, h4 { font-size: 1.06rem; line-height: 1.32; }
a, summary { color: var(--accent); }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .15em; }
.login-brand, nav:empty { display: none; }
body:has(nav:empty) .workspace {
  width: min(100%, 28rem);
  padding: clamp(3rem, 9vh, 6.75rem) 1.25rem max(2.5rem, env(safe-area-inset-bottom));
}
body:has(nav:empty) .login-brand {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.375rem;
  text-align: center;
}
.record {
  width: 3.75rem; height: 3.75rem;
  border: .28rem solid white;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.record::after { content: ""; width: 39%; aspect-ratio: 1; border-radius: 50%; background: var(--record); }
.brand-name { margin: 0; font-size: 2.125rem; line-height: 1.18; letter-spacing: -.035em; font-weight: 700; }
.brand-prompt { margin: 0; font-size: 1.04rem; color: var(--muted); }
body:has(nav:empty) main h1 { font-size: 1.4rem; margin-bottom: .65rem; }
body:has(nav:empty) main form { max-width: none; }
body:has(nav:empty) main > div > p, .auth-footnote { color: var(--muted); }
body:has(nav:empty) main > div > button { margin-block: .45rem; }
.connection-panel > p { margin-bottom: .9rem; }
.connection-panel form, .settings-group, .card, article, .stat-grid > div { background: var(--card); border-radius: 1rem; }
.connection-panel form { padding: .875rem; }
.auth-modes, .segmented { display: flex; padding: .18rem; gap: .12rem; background: var(--card-hi); border-radius: 1rem; }
.auth-modes button, .segmented button {
  flex: 1; min-width: 0; padding: .32rem .15rem; min-height: 2rem; font-size: .875rem;
  border: 0; border-radius: .85rem; font-weight: 550; background: transparent; color: var(--text);
}
.auth-modes button[aria-pressed="true"], .segmented button[aria-pressed="true"] { background: #5d606a; box-shadow: 0 1px 3px #0003; }
.auth-fields { display: grid; gap: .875rem; padding: .875rem; }
.auth-fields a { justify-self: start; }
.auth-footnote { text-align: center; font-size: .875rem; }
body:has(nav:empty) form > button.primary { width: 100%; min-height: 3.1rem; }
nav {
  position: fixed;
  inset-inline: max(.85rem, env(safe-area-inset-left)) max(.85rem, env(safe-area-inset-right));
  bottom: max(.6rem, env(safe-area-inset-bottom));
  z-index: 3;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  display: flex;
  justify-content: space-evenly;
  align-items: stretch;
  gap: .12rem;
  padding: .28rem;
  border: 1px solid #ffffff19;
  border-radius: 2rem;
  background: #2b2d32f5;
  box-shadow: 0 4px 15px #0004;
  backdrop-filter: blur(16px);
}
.tab-link { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .12rem; min-width: 4.3rem; min-height: 3.05rem; padding: .22rem .5rem; border-radius: 1.55rem; color: #e8e9eb; }
.tab-link:hover { background: #ffffff0d; text-decoration: none; }
.tab-icon { width: 1.42rem; height: 1.42rem; }
.tab-label { font-size: .75rem; line-height: 1.1; font-weight: 600; }
.tab-link[aria-current] { background: var(--card); color: var(--accent); }
.screen-heading, .actions, .filters, .byline { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; }
.screen-heading { justify-content: space-between; margin-bottom: 1rem; }
.screen-heading h1 { margin: 0; }
.screen-heading a { font-size: .95rem; font-weight: 600; }
.actions, .filters { margin: .65rem 0; }
.actions .actions { margin: 0; }
.byline { margin-bottom: .45rem; }
.byline a { color: white; font-weight: 600; }
.settings-group { margin-block: .7rem 1.3rem; overflow: hidden; }
.settings-row {
  display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 2.9rem; padding: .68rem .9rem;
  color: var(--text); background-color: transparent; text-align: left; font-weight: 500; border: 0; border-radius: 0;
}
.settings-row + .settings-row { box-shadow: inset 0 1px #ffffff12; }
.settings-row::after { content: ""; margin-left: auto; width: .42rem; height: .42rem; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
.settings-row:hover { background: var(--card-hi); text-decoration: none; }
.title { font-weight: 650; font-size: 1.075rem; line-height: 1.28; color: white; }
article { padding: .875rem; margin-block: .65rem; }
article article { background: var(--card-hi); }
article > :last-child, form > :last-child { margin-bottom: 0; }
article .meta { margin-top: .28rem; }
.review { white-space: pre-wrap; overflow-wrap: anywhere; }
.meta, .status, time, .monthly-stats li { color: var(--muted); font-size: .875rem; }
form, .stack { display: grid; gap: .875rem; }
form { max-width: 38rem; margin: 1rem 0; }
.auth-modes + form { margin-top: 1.35rem; gap: 1.35rem; }
[hidden] { display: none !important; }
label { display: grid; gap: .34rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
label:has(input[type="checkbox"]), label:has(input[type="radio"]) { display: flex; color: var(--text); align-items: center; gap: .55rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  color: var(--text); background-color: var(--card-hi); border: 1px solid transparent; border-radius: .625rem;
  padding: .72rem; min-height: 2.75rem; min-width: 0; max-width: 100%; font-size: 1rem; font-weight: 400;
}
input::placeholder, textarea::placeholder { color: #a0a0aa; }
select {
  appearance: none; padding-right: 2.25rem;
  background-image: linear-gradient(45deg, transparent 48%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 48%, transparent 50%);
  background-position: right 1rem center, right .7rem center; background-size: .32rem .32rem; background-repeat: no-repeat;
}
textarea { min-height: 6rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.1em; height: 1.1em; accent-color: var(--accent); }
button {
  justify-self: start; min-height: 2.65rem; color: var(--accent); background: var(--card-hi); border: 0;
  border-radius: .65rem; padding: .56rem .88rem; font-weight: 600; cursor: pointer;
}
button:hover { background: #343742; }
button.primary { color: #151006; background: var(--accent); border-radius: .875rem; font-weight: 700; }
button.primary:hover { background: #ffb33c; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
details { padding: .4rem 0; }
summary { cursor: pointer; }
details[open] > summary { margin-bottom: .7rem; }
.status:empty { display: none; }
.error, .connection-panel .error { color: var(--rose); }
fieldset { min-width: 0; border: 0; border-radius: 1rem; background: var(--card); display: grid; gap: .45rem; padding: .85rem; }
legend { padding: 0 .3rem; font-weight: 650; }
.skip { position: fixed; top: 0; left: .75rem; z-index: 5; transform: translateY(-150%); background: var(--card); padding: .6rem; }
.skip:focus { transform: none; }
.avatar { display: inline-grid; place-items: center; vertical-align: middle; margin-right: .45rem; overflow: hidden; border-radius: 50%; width: 1.9rem; height: 1.9rem; color: #101518; background: var(--teal); font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo { width: 4.25rem; height: 4.25rem; font-size: 1.5rem; margin-bottom: .8rem; }
.focused-comment { outline: 2px solid var(--accent); outline-offset: -2px; }
.stat-grid, .film-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .65rem; }
.stat-grid > div { padding: .85rem; }
.stat-grid dt { color: var(--muted); font-size: .75rem; font-weight: 650; text-transform: uppercase; }
.stat-grid dd { font-size: 1.4rem; font-weight: 700; margin: .25rem 0 0; }
.film-grid article { margin: 0; }
.rating-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.rating-options button { border-radius: .65rem; }
.monthly-stats { padding-left: 1.6rem; }
.monthly-stats li { padding: .45rem .25rem; }
@media (max-width: 38rem) {
  nav { width: min(100% - 1.7rem, 29rem); }
  .tab-link { min-width: 0; }
}
@media (max-height: 43rem) {
  body:has(nav:empty) .workspace { padding-top: 1.75rem; }
}

.film-row { display: flex; align-items: flex-start; gap: .75rem; }
.film-copy { flex: 1; min-width: 0; }
.film-poster { display: block; flex: none; width: 4rem; aspect-ratio: 2 / 3; overflow: hidden; border-radius: .38rem; border: 1px solid #ffffff14; background: var(--card-hi); }
.film-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-detail-hero .film-poster { width: 6.25rem; }
.film-scores { display: flex; flex-wrap: wrap; gap: .35rem; }
.film-score { display: inline-block; background: var(--card-hi); padding: .16rem .55rem; border-radius: 2rem; font-size: .875rem; font-weight: 650; }
.score-high { color: var(--teal); }
.score-mid { color: var(--accent); }
.score-low { color: var(--rose); }
.list-poster-preview { display: flex; align-items: center; padding-inline-end: .5rem; }
.list-poster-preview .film-poster { width: 2.75rem; margin-right: -.48rem; box-shadow: 0 0 0 1px var(--card); }
.loved-mark { color: var(--rose); font-size: .875rem; font-weight: 650; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.server-disclosure { background: var(--card); border-radius: 1rem; padding: .9rem; margin-top: 1.375rem; }
.server-disclosure summary { color: var(--muted); }
.workspace:has(main h1) .login-brand .brand-name,
.workspace:has(main h1) .login-brand .brand-prompt { display: none; }
