:root {
  color-scheme: dark;
  --bg: #101316;
  --panel: #171c20;
  --panel-2: #20262b;
  --line: #2a3238;
  --text: #f4f0e8;
  --muted: #aeb5b5;
  --teal: #2fd0b4;
  --coral: #ff6f59;
  --gold: #f4b860;
  --green: #68d391;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f7;
  --panel: #ffffff;
  --panel-2: #edf2f1;
  --line: #d8e0df;
  --text: #101316;
  --muted: #64706f;
  --teal: #0f9f8d;
  --coral: #d84f3b;
  --gold: #d99a25;
  --green: #228456;
  --shadow: 0 18px 50px rgba(18, 31, 34, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(47, 208, 180, .12), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .58;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(24rem, .95fr);
  background: var(--bg);
}

.auth-media {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.auth-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.95) contrast(1.06);
}

.auth-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 19, 22, .2), rgba(16, 19, 22, .92));
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(1rem, 5vw, 4rem);
}

.auth-brand {
  margin-bottom: 2.5rem;
}

.auth-panel h1 {
  max-width: 29rem;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.02;
}

.auth-copy {
  max-width: 29rem;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: .85rem;
  width: min(100%, 28rem);
  margin-top: 1.25rem;
}

.auth-form.is-hidden {
  display: none;
}

.auth-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  width: min(100%, 28rem);
  margin-top: 1.25rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1113;
}

.auth-toggle button {
  min-height: 2.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-toggle button.active {
  background: var(--panel-2);
  color: var(--text);
}

.auth-form label span {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1113;
  color: var(--text);
  padding: .9rem;
  outline: none;
}

.auth-form input[type="file"],
.composer input[type="file"] {
  padding: .7rem;
}

.auth-message {
  min-height: 1.4rem;
  width: min(100%, 28rem);
  margin: .8rem 0 0;
  color: var(--coral);
  font-size: .9rem;
}

.text-button {
  width: fit-content;
  margin-top: 1rem;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

.auth-screen.is-hidden {
  display: none;
}

.app.is-locked {
  display: none;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  background: rgba(16, 19, 22, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
  font-weight: 800;
  font-size: 1.25rem;
}

.mark,
.avatar {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 900;
  overflow: hidden;
}

.avatar.image {
  background: var(--panel-2);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rail-item,
.tab-item {
  border: 0;
  background: transparent;
}

.rail-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem .75rem;
  border-radius: 8px;
  color: var(--muted);
}

.rail-item.active,
.rail-item:hover {
  background: var(--panel-2);
  color: var(--text);
}

.post-trigger {
  margin: .75rem 0;
  background: var(--teal);
  color: #07110f;
  font-weight: 800;
}

main {
  width: min(74rem, 100%);
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

.topbar,
.section-heading,
.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar h1,
.section-heading h2,
.profile-header h2,
.composer h2 {
  margin: 0;
  line-height: 1.03;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.eyebrow {
  margin: 0 0 .4rem;
  color: var(--teal);
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.feed-controls {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: 1rem 0;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: .65rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(32, 38, 43, .96), rgba(23, 28, 32, .96));
}

.empty-state.compact {
  padding: 1rem;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.5;
}

.empty-mark {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
}

.chip,
.ghost-button,
.primary-button {
  min-height: 2.45rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: .55rem .85rem;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
}

.chip.active,
.primary-button {
  border-color: transparent;
  background: var(--teal);
  color: #07110f;
  font-weight: 900;
}

.ranking-card {
  display: block;
  overflow: hidden;
  padding: 0;
  margin: 0 auto 1.25rem;
  max-width: 42rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(32, 38, 43, .96), rgba(23, 28, 32, .96));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .16);
}

.ranking-card.spotlight {
  border-color: rgba(47, 208, 180, .45);
}

.poster {
  min-height: 26rem;
  border-radius: 0;
  margin: .8rem -1rem .85rem;
  background-size: cover;
  background-position: center;
}

body[data-theme="light"] .auth-screen,
body[data-theme="light"] .auth-toggle,
body[data-theme="light"] .auth-form input,
body[data-theme="light"] .composer input,
body[data-theme="light"] .composer select,
body[data-theme="light"] .composer textarea,
body[data-theme="light"] .scale-grid label span {
  background: #ffffff;
}

.rank-photo {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 72vh;
  border-radius: 0;
  object-fit: cover;
  display: block;
  scroll-snap-align: start;
}

.photo-strip {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  margin: .8rem -1rem .85rem;
  background: #07090a;
  scrollbar-width: none;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.photo-count {
  width: fit-content;
  margin: -.45rem 0 .8rem auto;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: rgba(14, 17, 19, .78);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

.poster.restaurant {
  background-image: linear-gradient(145deg, rgba(255, 111, 89, .2), rgba(16, 19, 22, .15)), url("assets/pillion-collage.png");
}

.poster.headphones {
  background-image: linear-gradient(145deg, rgba(47, 208, 180, .24), rgba(16, 19, 22, .2)), url("assets/pillion-collage.png");
  background-position: 68% 35%;
}

.poster.film {
  background-image: linear-gradient(145deg, rgba(244, 184, 96, .24), rgba(16, 19, 22, .2)), url("assets/pillion-collage.png");
  background-position: 20% 65%;
}

.ranking-body {
  min-width: 0;
  padding: 1rem;
}

.meta-row,
.score-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.meta-row {
  justify-content: space-between;
  color: var(--muted);
  font-size: .86rem;
}

.meta-row strong {
  color: var(--text);
}

.name-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  text-align: left;
}

.name-button:hover {
  color: var(--teal);
}

.name-button.large {
  display: block;
  font-size: 1rem;
}

.ranking-card h3 {
  margin: .6rem 0 .2rem;
  font-size: 1.35rem;
}

.category,
.scale,
.review,
.person-card span,
.discover-card span,
.profile-header p,
.stats span {
  color: var(--muted);
}

.category {
  margin: 0 0 .75rem;
}

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  min-height: 3rem;
  border-radius: 8px;
  font-size: 1.65rem;
  font-weight: 950;
}

.score.grade {
  background: var(--gold);
  color: #1b1200;
}

.score.numeric {
  background: var(--teal);
  color: #07110f;
}

.score.stars {
  min-width: 7rem;
  background: var(--panel-2);
  color: var(--green);
  font-size: 1.2rem;
}

.review {
  max-width: 52rem;
  line-height: 1.52;
}

.notice-panel {
  max-width: 42rem;
  margin: 0 auto 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(47, 208, 180, .38);
  border-radius: 8px;
  background: rgba(47, 208, 180, .08);
}

.notice-panel p {
  margin: .35rem 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.notice-panel strong {
  color: var(--text);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.search-box {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-box input,
.composer input,
.composer select,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1113;
  color: var(--text);
  padding: .85rem;
  outline: none;
}

.search-box input {
  border: 0;
  padding: 0;
  background: transparent;
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.discover-card,
.person-card,
.stats,
.shelf {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.discover-card {
  min-height: 9rem;
  padding: 1rem;
  text-align: left;
}

.discover-card strong {
  display: block;
  margin: .9rem 0 .35rem;
  font-size: 1.2rem;
}

.pill {
  display: inline-flex;
  border: 1px solid rgba(47, 208, 180, .4);
  border-radius: 999px;
  padding: .25rem .55rem;
  color: var(--teal);
}

.people-list {
  display: grid;
  gap: .75rem;
}

.search-results {
  margin-top: 1rem;
}

.person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .85rem;
}

.person-card strong,
.person-card span {
  display: block;
}

.avatar.coral {
  background: var(--coral);
  color: #1c0703;
}

.avatar.gold {
  background: var(--gold);
  color: #1b1200;
}

.avatar.large {
  width: 5rem;
  font-size: 2rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-edit-trigger {
  margin: 1rem 0 0;
}

.profile-theme-trigger {
  margin: 1rem 0 0 .5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0;
  overflow: hidden;
}

.stats div {
  padding: 1rem;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  font-size: 1.6rem;
}

.shelf {
  padding: 1rem;
}

.shelf h3 {
  margin: 0 0 .85rem;
}

.shelf span {
  display: inline-flex;
  margin: 0 .45rem .45rem 0;
  padding: .45rem .65rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
}

.saved-category {
  margin-bottom: 1rem;
}

.saved-category h3 {
  margin: 0 0 .7rem;
}

.card-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.card-actions .ghost-button.small,
.people-list .ghost-button.small {
  width: auto;
  min-width: 4.5rem;
  padding: 0 .7rem;
}

.saved-note {
  color: var(--teal);
  font-size: .86rem;
  font-weight: 800;
}

.small-text {
  width: auto;
  min-width: 5.8rem;
  padding: 0 .7rem;
}

.ghost-button.danger {
  border-color: rgba(255, 111, 89, .45);
  color: var(--coral);
}

.profile-rankings {
  margin-top: 1rem;
}

.section-heading.compact {
  margin-bottom: .8rem;
}

.attached-rankings {
  display: grid;
  gap: .5rem;
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.attached-rankings h4 {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.attached-ranking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem .7rem;
  align-items: center;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 17, 19, .66);
}

.attached-card .photo-strip,
.attached-card .poster {
  display: none;
}

.owner-appreciations {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .8rem;
  padding: .65rem;
  border-radius: 8px;
  background: rgba(47, 208, 180, .08);
  color: var(--muted);
  font-size: .86rem;
}

.owner-appreciations strong {
  color: var(--teal);
}

.list-card .ranking-body {
  padding-bottom: .8rem;
}

.ranked-list {
  display: grid;
  gap: .55rem;
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
}

.ranked-list li {
  display: grid;
  grid-template-columns: 2rem 3.8rem minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 17, 19, .32);
}

body[data-theme="light"] .ranked-list li {
  background: #f8fbfa;
}

.ranked-list img,
.list-fallback {
  width: 3.8rem;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel-2);
}

.list-position {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal);
  color: #07110f;
  font-weight: 950;
}

.ranked-list strong,
.ranked-list p {
  display: block;
  margin: 0;
}

.ranked-list p {
  margin-top: .18rem;
  color: var(--muted);
  line-height: 1.35;
  font-size: .9rem;
}

.list-expander summary {
  margin-top: .65rem;
  color: var(--teal);
  font-weight: 850;
  cursor: pointer;
}

.ranking-items-editor {
  display: grid;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 17, 19, .36);
}

.ranking-items-editor.is-hidden,
.is-hidden {
  display: none !important;
}

.ranking-item-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ranking-item-position {
  grid-row: span 4;
  display: grid;
  place-items: center;
  align-self: start;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1200;
  font-weight: 950;
}

.ranking-item-editor textarea {
  min-height: 4.8rem;
}

.attached-ranking p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.score.mini {
  min-width: 2.75rem;
  min-height: 2rem;
  border-radius: 6px;
  font-size: .9rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.icon-button.small,
.ghost-button.small {
  width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
}

.icon {
  position: relative;
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
}

.icon.home::before {
  content: "";
  position: absolute;
  inset: .36rem .18rem .08rem;
  border: 2px solid currentColor;
  border-top: 0;
}

.icon.home::after {
  content: "";
  position: absolute;
  left: .22rem;
  top: .1rem;
  width: .78rem;
  height: .78rem;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon.search::before {
  content: "";
  position: absolute;
  width: .7rem;
  height: .7rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon.search::after {
  content: "";
  position: absolute;
  width: .55rem;
  height: 2px;
  right: .08rem;
  bottom: .18rem;
  background: currentColor;
  transform: rotate(45deg);
}

.icon.plus::before,
.icon.plus::after,
.icon.close::before,
.icon.close::after {
  content: "";
  position: absolute;
  inset: .56rem .14rem auto;
  height: 2px;
  background: currentColor;
}

.icon.plus::after {
  transform: rotate(90deg);
}

.icon.close::before {
  transform: rotate(45deg);
}

.icon.close::after {
  transform: rotate(-45deg);
}

.icon.circle::before {
  content: "";
  position: absolute;
  inset: .16rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon.circle::after {
  content: "";
  position: absolute;
  right: .02rem;
  bottom: .04rem;
  width: .48rem;
  height: .48rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--panel);
}

.icon.user::before {
  content: "";
  position: absolute;
  left: .4rem;
  top: .08rem;
  width: .42rem;
  height: .42rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon.user::after {
  content: "";
  position: absolute;
  left: .2rem;
  bottom: .08rem;
  width: .82rem;
  height: .52rem;
  border: 2px solid currentColor;
  border-radius: 999px 999px 0 0;
}

.icon.bookmark::before {
  content: "";
  position: absolute;
  inset: .12rem .28rem .08rem;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: .12rem .12rem 0 0;
}

.icon.bookmark::after {
  content: "";
  position: absolute;
  left: .36rem;
  right: .36rem;
  bottom: .08rem;
  height: .58rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.icon.check::before {
  content: "";
  position: absolute;
  left: .25rem;
  top: .45rem;
  width: .7rem;
  height: .35rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.tabbar {
  display: none;
}

.composer {
  width: min(36rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.composer::backdrop {
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(8px);
}

.composer form {
  display: grid;
  gap: .95rem;
  padding: 1rem;
}

.composer label span,
.composer legend {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.composer textarea {
  min-height: 7rem;
  resize: vertical;
}

.composer fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}

.scale-grid label {
  display: block;
}

.scale-grid input {
  position: absolute;
  opacity: 0;
}

.scale-grid label span {
  display: grid;
  place-items: center;
  min-height: 2.8rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0e1113;
}

.scale-grid input:checked + span {
  border-color: var(--teal);
  background: rgba(47, 208, 180, .14);
  color: var(--teal);
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
}

@media (max-width: 820px) {
  .auth-screen {
    display: block;
    min-height: 100vh;
  }

  .auth-media {
    min-height: 15rem;
    height: 32vh;
  }

  .auth-media::after {
    background: linear-gradient(180deg, rgba(16, 19, 22, .05), var(--bg));
  }

  .auth-panel {
    min-height: auto;
    padding: 1rem 1rem 2rem;
  }

  .auth-brand {
    margin-bottom: 1.5rem;
  }

  .auth-panel h1 {
    font-size: 2.65rem;
  }

  .app {
    display: block;
  }

  .rail {
    display: none;
  }

  main {
    padding: 1rem 1rem 6.25rem;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: 2.45rem;
  }

  .ranking-card {
    max-width: 100%;
  }

  .poster {
    min-height: 22rem;
  }

  .rank-photo {
    max-height: 70vh;
  }

  .ranking-card h3 {
    font-size: 1.12rem;
  }

  .review {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .grid-list {
    grid-template-columns: 1fr;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: .55rem max(.75rem, env(safe-area-inset-left)) calc(.55rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: rgba(16, 19, 22, .92);
    backdrop-filter: blur(18px);
  }

  .tab-item {
    display: grid;
    place-items: center;
    min-height: 2.6rem;
    color: var(--muted);
  }

  .tab-item.active {
    color: var(--teal);
  }

  .tab-item.raised {
    justify-self: center;
    width: 3rem;
    border-radius: 50%;
    background: var(--teal);
    color: #07110f;
  }
}

@media (max-width: 520px) {
  .topbar h1 {
    font-size: 2rem;
  }

  .ranking-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .poster {
    min-height: 20rem;
  }

  .rank-photo {
    max-height: 68vh;
  }

  .meta-row {
    display: block;
  }

  .score {
    min-width: 3.2rem;
    min-height: 2.5rem;
    font-size: 1.25rem;
  }

  .score.stars {
    min-width: 5.8rem;
    font-size: 1rem;
  }

  .scale-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats div:last-child {
    border-bottom: 0;
  }
}
