:root {
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px)
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px)
}

body {
  margin: 0;
  padding: 0;
  font: 14px -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  color: #000
}

img {
  max-width: 100%
}

[hidden]:not([hidden=until-found i]) {
  display: none !important
}

/* Layout: logo cell + top bar over a left sidebar and a content area, as in the mockups.
   Dark navy surfaces, one bright blue accent, yellow stars, red close buttons. */
:root {
  --bg: #081120;
  --surface: #0e1c31;
  --surface2: #142842;
  --line: #243857;
  --text: #f3f6fb;
  --muted: #9aabc3;
  --accent: #1a7bf5;
  --accent-soft: rgba(26, 123, 245, .16);
  --danger: #ff4040;
  --star: #ffd23f;
  --ok: #3ecf8e;
  --side: 190px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-align: inherit
}

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

.ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none
}

.ic.fill {
  fill: currentColor
}

.ic.sm {
  width: 16px;
  height: 16px
}

.app {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  grid-template-rows: 72px 1fr;
  min-height: 100vh;
  grid-template-areas: "logo top" "side main"
}

.logo-cell {
  grid-area: logo;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 1px;
  cursor: pointer
}

.logo img {
  display: block;
  height: 60px;
  width: auto;
  max-width: 100%
}

.topbar {
  grid-area: top;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 28px;
  position: relative;
  min-width: 0
}

.nav {
  display: flex;
  gap: 8px;
  min-width: 0
}

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 500;
  color: #e8eef8;
  white-space: nowrap
}

.pill:hover {
  background: var(--accent-soft)
}

.pill.on {
  border-color: var(--accent);
  background: transparent
}

.right {
  display: flex;
  align-items: center;
  gap: 14px
}

.ddwrap {
  position: relative
}

.iconbtn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center
}

.iconbtn:hover {
  background: var(--accent-soft)
}

.dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg)
}

.avbtn {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 6px 3px 3px
}

.avbtn:hover {
  background: var(--accent-soft)
}

.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d9dde3;
  display: grid;
  place-items: center;
  color: #18263c;
  font-weight: 700;
  font-size: 14px;
  flex: none
}

.av.sm {
  width: 28px;
  height: 28px;
  font-size: 12px
}

.av.lg {
  width: 84px;
  height: 84px;
  font-size: 32px
}

.caret {
  width: 10px;
  height: 6px
}

.dd {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  min-width: 200px;
  padding: 10px
}

.dd .who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 10px;
  font-weight: 600
}

.dd .it {
  display: block;
  width: 100%;
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: #e6edf8;
  text-align: center
}

.dd .it:hover {
  color: var(--accent)
}

.dd .out {
  color: var(--danger);
  font-size: 11px;
  text-align: center;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  width: 100%
}

.dd.notif {
  width: min(340px, 86vw);
  padding: 0
}

.dd.notif header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600
}

.dd.notif header button {
  color: var(--accent);
  font-size: 12px
}

.nrow {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px
}

.nrow:last-child {
  border-bottom: 0
}

.nrow small {
  display: block;
  color: var(--muted);
  font-size: 11px
}

.nrow .u {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex: none
}

.nrow .u.read {
  background: transparent
}

.side {
  grid-area: side;
  border-right: 1px solid var(--line);
  padding: 26px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0
}

.sitem {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 500;
  color: #e8eef8;
  min-width: 0
}

.sitem:hover {
  background: var(--accent-soft)
}

.sitem.on {
  background: var(--accent);
  color: #fff
}

.sitem span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.promo {
  margin: 26px 16px 0;
  border: 1px solid #28507f;
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center
}

.promo b {
  font-size: 12px;
  line-height: 1.25
}

.promo p {
  margin: 0;
  font-size: 10.5px;
  color: var(--muted)
}

.promo .ic {
  color: var(--accent);
  width: 26px;
  height: 26px
}

.btn {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center
}

.btn:hover {
  filter: brightness(1.12)
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: none
}

.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: #fff
}

.btn.ghost:hover {
  background: var(--accent-soft);
  filter: none
}

.btn.sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 7px
}

.btn.danger {
  background: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger)
}

.newcom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  text-align: left
}

.newcom i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none
}

.newcom:hover i {
  filter: brightness(1.15)
}

.main {
  grid-area: main;
  padding-top: 26px;
  padding-bottom: 64px;
  padding-left: max(32px, env(safe-area-inset-left, 0px));
  padding-right: max(32px, env(safe-area-inset-right, 0px));
  min-width: 0
}

.h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0
}

.h1 span {
  display: block;
  color: var(--accent)
}

.sub {
  margin: 8px 0 18px;
  color: #d0dbeb;
  font-size: 13px;
  max-width: 60ch
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 780px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: #0a1527;
  padding: 4px 5px 4px 4px;
  height: 48px
}

.search .lead {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: none
}

.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
  height: 100%
}

.search input::placeholder {
  color: #7d90ad
}

.search .go {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none
}

.search .clr {
  color: var(--muted);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%
}

.search .clr:hover {
  background: var(--surface2)
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 8px
}

.sortby {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d0dbeb
}

select,
.in,
textarea.in {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  min-width: 0
}

select {
  padding-right: 6px
}

select option {
  background: var(--surface);
  color: var(--text)
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500
}

.chip-btn:hover,
.chip-btn.on {
  border-color: var(--accent);
  background: var(--accent-soft)
}

.chip-btn em {
  font-style: normal;
  background: var(--accent);
  border-radius: 999px;
  font-size: 10px;
  padding: 1px 6px;
  font-weight: 700
}

.chip-btn em:empty,
.chip-btn em[hidden] {
  display: none
}

.link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500
}

.link:hover {
  text-decoration: underline
}

.fpanel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px;
  margin: 6px 0 10px;
  max-width: 980px
}

.fgroup {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0
}

.fgroup.wide {
  grid-column: 1/-1
}

.fgroup>label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600
}

.fgroup select,
.fgroup .in {
  width: 100%
}

.range {
  display: flex;
  align-items: center;
  gap: 6px
}

.range input {
  width: 100%
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  color: #dbe5f3
}

.chip:hover {
  border-color: var(--accent)
}

.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff
}

.sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 10px
}

.sec h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px
}

.sec h2 .ic {
  color: var(--accent)
}

.sec .more {
  font-size: 11px;
  color: #cdd8e8;
  display: flex;
  align-items: center;
  gap: 4px
}

.sec .more:hover {
  color: var(--accent)
}

.sec .more .ic {
  width: 12px;
  height: 12px
}

.row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 18px;
  padding: 4px 2px
}

body.compact .grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px
}

body.compact .card {
  width: 118px
}

.cardwrap {
  position: relative;
  flex: none
}

.grid .cardwrap,
.grid .card {
  width: 100%
}

.card {
  position: relative;
  display: block;
  width: 158px;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .07);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  background: var(--surface)
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55);
  border-color: var(--accent)
}

.art {
  position: absolute;
  inset: 0
}

.art svg {
  width: 100%;
  height: 100%;
  display: block
}

.art .cov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 10px 9px;
  background: linear-gradient(to top, rgba(3, 7, 15, .94), rgba(3, 7, 15, 0))
}

.cap b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere
}

.cap i {
  font-style: normal;
  font-size: 11px;
  color: #e3eaf5;
  display: block;
  margin-top: 2px
}

.star {
  color: var(--star)
}

body.norate .cap i {
  display: none
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(8, 17, 32, .82);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px
}

.rm {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(8, 17, 32, .85);
  border: 1.5px solid var(--danger);
  color: var(--danger);
  display: none;
  place-items: center
}

.cardwrap:hover .rm,
.rm:focus-visible {
  display: grid
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 560px
}

.empty b {
  color: var(--text);
  font-size: 15px
}

.rhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #d0dbeb
}

.alsoin {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px
}

/* detail */
.detail {
  position: relative;
  padding-top: 4px
}

.xbtn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  color: var(--danger);
  display: grid;
  place-items: center;
  flex: none;
  background: transparent
}

.xbtn:hover {
  background: rgba(255, 64, 64, .15)
}

.xbtn .ic {
  width: 13px;
  height: 13px;
  stroke-width: 3
}

.d-top {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) 190px;
  gap: 28px;
  margin-top: 12px;
  align-items: start
}

.d-poster .card {
  width: 100%;
  pointer-events: none
}

.d-poster small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #d0dbeb;
  text-align: center
}

.d-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1
}

.d-title small {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 6px;
  color: #d0dbeb
}

.d-title u {
  cursor: pointer;
  text-underline-offset: 2px
}

.d-title u:hover {
  color: var(--accent)
}

.d-text {
  margin: 0 0 18px;
  font-size: 13px;
  color: #e2eaf6;
  max-width: 62ch;
  line-height: 1.55
}

.tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  flex-wrap: wrap
}

.tabs button {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 0;
  border-bottom: 2px solid transparent
}

.tabs button.on {
  border-bottom-color: var(--accent);
  color: #fff
}

.tabs button:hover {
  color: #fff
}

.tabpanel {
  padding: 14px 0;
  min-height: 80px;
  font-size: 13px
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.plain li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 12px
}

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 22px;
  margin: 0
}

.kv dt {
  color: var(--muted)
}

.kv dd {
  margin: 0
}

.ratings {
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center
}

.ratings h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #4a5d7c;
  padding: 0 16px 4px
}

.score {
  font-size: 34px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1
}

.score .star {
  font-size: 28px
}

.score:hover {
  filter: brightness(1.2)
}

.addlist {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #e6edf8
}

.addlist:hover {
  color: var(--accent)
}

.addlist.on {
  color: var(--ok)
}

.mine {
  font-size: 12px;
  color: var(--muted)
}

.mine b {
  color: var(--star)
}

.reviews {
  margin-top: 34px;
  max-width: 780px
}

.reviews>h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #4a5d7c;
  padding-bottom: 6px
}

.rev {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  margin-bottom: 20px
}

.rev .nm {
  font-size: 12px;
  font-weight: 500
}

.rev .nm small {
  color: var(--muted);
  margin-left: 6px;
  font-size: 10px
}

.rev p {
  margin: 3px 0 4px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line
}

.like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #e2eaf6
}

.like .ic {
  width: 13px;
  height: 13px;
  color: var(--danger)
}

.like.on .ic {
  fill: var(--danger)
}

.wr {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-top: 8px
}

.wr textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border-radius: 10px
}

.sharesel {
  max-width: 100%
}

/* chat */
.chat {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-top: 4px
}

.msg {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px
}

.msg .nm {
  font-size: 12px;
  font-weight: 500
}

.msg p {
  margin: 2px 0 4px;
  font-size: 13px
}

.chatin {
  display: flex;
  gap: 8px;
  max-width: 720px;
  margin-top: 16px
}

.chatin .in {
  flex: 1;
  border-radius: 999px;
  padding: 9px 16px;
  border: 1.5px solid var(--accent);
  background: transparent
}

.csub {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 4px
}

/* dashboard */
.dgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 6px 0 14px;
  max-width: 760px
}

.tile {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px
}

.tile b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums
}

.tile span {
  font-size: 11px;
  color: var(--muted)
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600
}

.act {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none
}

.act li {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px
}

.act small {
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
  padding-top: 2px
}

.bars {
  display: grid;
  gap: 10px
}

.bar {
  display: grid;
  grid-template-columns: 60px 1fr 24px;
  gap: 8px;
  align-items: center;
  font-size: 12px
}

.bar i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: var(--surface2);
  overflow: hidden
}

.bar i s {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px
}

.bar span {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted)
}

/* account */
.form {
  display: grid;
  gap: 16px;
  max-width: 560px
}

.field {
  display: grid;
  gap: 6px
}

.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600
}

.field .in {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px
}

.sw {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px
}

.sw small {
  display: block;
  color: var(--muted);
  font-size: 11px
}

.sw input {
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 99px;
  background: #2a3d5c;
  position: relative;
  flex: none;
  cursor: pointer;
  transition: background .15s
}

.sw input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s
}

.sw input:checked {
  background: var(--accent)
}

.sw input:checked::after {
  transform: translateX(18px)
}

.pstats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 6px
}

.prof {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px
}

.prof b {
  font-size: 20px;
  display: block
}

.prof small {
  color: var(--muted)
}

.clist {
  display: grid;
  gap: 16px;
  max-width: 820px
}

.ccard {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 20px;
  display: grid;
  gap: 14px
}

.chead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap
}

.chead h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere
}

.badge2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--muted)
}

.badge2.admin {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-soft)
}

.cmeta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px
}

.rename {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.rename .in {
  border-color: var(--accent);
  min-width: 200px
}

.codes {
  display: grid;
  gap: 8px
}

.codes h4 {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.code {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  flex-wrap: wrap
}

.code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: .06em;
  flex: 1;
  min-width: 150px;
  overflow-wrap: anywhere
}

.code small {
  color: var(--muted);
  font-size: 11px
}

/* modal */
#modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 14, .7);
  backdrop-filter: blur(2px)
}

#modal[hidden] {
  display: none
}

.mcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6)
}

.mcard.flush {
  padding: 0
}

.mcard>.xbtn {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2
}

.mcard h3 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 15px
}

.mtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  padding-left: 30px
}

.mtabs button {
  padding: 14px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff
}

.mtabs button.on {
  color: var(--accent)
}

.mtabs button+button {
  border-left: 1px solid var(--line)
}

.mbody {
  padding: 24px;
  display: grid;
  gap: 14px
}

.pin {
  border: 1.5px solid var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  width: 100%;
  font-size: 14px
}

textarea.pin {
  border-radius: 16px;
  min-height: 110px;
  resize: vertical
}

.pin::placeholder {
  color: #6f87aa
}

.err {
  color: #ff7b7b;
  font-size: 12px;
  margin: 0
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0
}

.big {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  letter-spacing: .08em;
  text-align: center;
  margin: 18px 0;
  overflow-wrap: anywhere
}

.mrow {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap
}

.stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 6px 0 4px
}

.st {
  padding: 2px;
  color: #cfd8e6
}

.st svg {
  width: 26px;
  height: 26px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.6
}

.st.on {
  color: var(--star)
}

.st.on svg {
  fill: var(--star)
}

.stars:hover .st {
  color: var(--star)
}

.stars:hover .st svg {
  fill: var(--star)
}

.stars .st:hover~.st {
  color: #cfd8e6
}

.stars .st:hover~.st svg {
  fill: transparent
}

.mlist {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none
}

.mlist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-top: 1px solid var(--line)
}

.mlist li:first-child {
  border-top: 0
}

.mlist .nm {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500
}

.disc {
  display: grid;
  gap: 8px
}

.disc .dr {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px
}

.disc .dr small {
  display: block;
  color: var(--muted);
  font-size: 11px
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 80;
  max-width: 90vw;
  text-align: center
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}

.gate {
  max-width: 480px
}

@media (max-width:1060px) {
  .dgrid {
    grid-template-columns: 1fr
  }

  .d-top {
    grid-template-columns: 150px minmax(0, 1fr)
  }

  .ratings {
    grid-column: 1/-1;
    grid-auto-flow: column;
    justify-content: start;
    text-align: left;
    gap: 20px;
    align-items: center
  }
}

@media (max-width:760px) {
  :root {
    --side: 116px
  }

  .app {
    grid-template-rows: 60px auto 1fr;
    grid-template-areas: "logo top" "side side" "main main"
  }

  .side {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
    gap: 6px;
    align-items: center
  }

  .sitem {
    width: auto;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap
  }

  .promo {
    display: none
  }

  .newcom {
    margin: 0 0 0 auto;
    padding: 6px 10px;
    white-space: nowrap
  }

  .pill span {
    display: none
  }

  .pill {
    padding: 8px 11px
  }

  .topbar {
    padding: 0 10px
  }

  .right {
    gap: 4px
  }

  .main {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-top: 20px
  }

  .d-top {
    grid-template-columns: 1fr
  }

  .d-poster {
    max-width: 180px
  }

  .logo img {
    height: 44px
  }

  .card {
    width: 140px
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important
  }
}
/* Backdrop from the media API behind the detail header */
.detail { isolation: isolate }
.detail[style*="--bd"]::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 17, 32, .45), var(--bg) 95%), var(--bd) center 20% / cover no-repeat;
  opacity: .5; border-radius: 14px
}

/* Dashboard on small screens: stop the card rows from stretching the page, show touch-friendly remove buttons */
.dgrid > * { min-width: 0 }
.act li span { min-width: 0; overflow-wrap: anywhere }
@media (max-width:1060px) {
  .dgrid { grid-template-columns: minmax(0, 1fr); gap: 20px }
}
@media (max-width:760px) {
  .sitem { flex: none }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .tile b { font-size: 22px }
  .dgrid .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px }
  .dgrid .row { gap: 12px }
  .panel { padding: 14px }
}
@media (hover:none) {
  .rm { display: grid; width: 28px; height: 28px }
}