:root {
  --b1: #fff1f2;
  --b2: #fecaca;
  --b3: #e5e7eb;
  --gl: rgba(255, 255, 255, .5);
  --bd: rgba(255, 255, 255, .8);
  --tx: #3b0a0a;
  --mu: #6b4f4f;
  --ac: #b91c1c;
  --ok: #047857;
  --bad: #b91c1c;
  --warn: #b45309;
  --in: rgba(255, 255, 255, .7);
  --sh: rgba(30, 41, 99, .15);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --b1: #1a0505;
    --b2: #5a0f14;
    --b3: #27272a;
    --gl: rgba(255, 255, 255, .08);
    --bd: rgba(255, 255, 255, .2);
    --tx: #fef2f2;
    --mu: #d6c4c4;
    --ac: #fca5a5;
    --ok: #6ee7b7;
    --bad: #fca5a5;
    --warn: #fcd34d;
    --in: rgba(255, 255, 255, .1);
    --sh: rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --b1: #1a0505;
  --b2: #5a0f14;
  --b3: #27272a;
  --gl: rgba(255, 255, 255, .08);
  --bd: rgba(255, 255, 255, .2);
  --tx: #fef2f2;
  --mu: #d6c4c4;
  --ac: #fca5a5;
  --ok: #6ee7b7;
  --bad: #fca5a5;
    --warn: #fcd34d;
  --in: rgba(255, 255, 255, .1);
  --sh: rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  min-height: 100%;
  font: 15px/1.5 Manrope, system-ui, sans-serif;
  color: var(--tx);
  background: linear-gradient(135deg, var(--b1), var(--b2) 55%, var(--b3)) fixed;
}

h1, h2, h3 { font-family: Fraunces, Georgia, serif; margin: 0; }
h2 { font-size: 26px; margin-bottom: 14px; }
h3 { font-size: 17px; }
p  { margin: 0 0 8px; }

.mu    { color: var(--mu); }
.ok    { color: var(--ok); }
.bad   { color: var(--bad); }
.small { font-size: 12px; }
.mt    { margin-top: 14px; }
.mb    { margin-bottom: 14px; }
.m0    { margin: 0; }

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
}
.b1 { width: 380px; height: 380px; background: #dc2626; top: -90px; left: -80px; }
.b2 { width: 340px; height: 340px; background: #fca5a5; bottom: -80px; right: -60px; }
.b3 { width: 260px; height: 260px; background: #9ca3af; top: 40%; left: 55%; }

#app {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  height: 100dvh;
  margin: 0 auto;
  padding: 12px;
}

.grid  { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.f2    { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; }
.row > .fixed { flex: none; }
.row.nowrap { flex-wrap: nowrap; }
.row.center { align-items: center; }
.row.tools { flex: none; align-items: center; }
.row.tools > * { flex: none; }

.mi  { max-width: 70px; }
.pad { padding: 16px; }

.page.enter { animation: pageIn .45s var(--ease) both; }

.g {
  background: var(--gl);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border: 1px solid var(--bd);
  border-radius: 22px;
  box-shadow: none;
}

.top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 10px 16px;
  margin: 0;
  min-height: 66px;
}

.brand {
  font-family: Fraunces, serif;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.brand small { display: block; font: 600 11px Manrope, sans-serif; color: var(--mu); }

.lg  { width: 44px; height: 44px; object-fit: contain; flex: none; }
.lgx { width: 92px; height: 92px; }

nav { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 4px 2px; }

button, .btn {
  position: relative;
  overflow: hidden;
  font: 600 14px Manrope, sans-serif;
  color: var(--tx);
  background: var(--in);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform .28s var(--ease),
    box-shadow .28s var(--ease),
    background-color .28s ease,
    color .28s ease,
    border-color .28s ease,
    filter .28s ease;
}

button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px var(--sh); filter: brightness(1.08); }

button:active { transform: translateY(0) scale(.96); box-shadow: 0 2px 6px var(--sh); transition-duration: .1s; }

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

button.on, button.pri { background: var(--ac); color: #fff; border-color: transparent; }

:root[data-theme="dark"] button.on,
:root[data-theme="dark"] button.pri { color: #3b0a0a; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) button.on,
  :root:not([data-theme="light"]) button.pri { color: #3b0a0a; }
}

button:disabled { opacity: .5; cursor: not-allowed; }
button:disabled:hover { transform: none; box-shadow: none; filter: none; }

button.linkbtn {
  justify-self: start;
  background: none;
  border: none;
  padding: 4px 0;
  text-decoration: underline;
  box-shadow: none;
}
button.linkbtn:hover { box-shadow: none; transform: translateX(3px); }

input, select {
  font: inherit;
  color: var(--tx);
  background: var(--in);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

select option, select optgroup { color: var(--tx); background-color: var(--b1); }

input:hover, select:hover { border-color: var(--ac); }
input:focus, select:focus { box-shadow: 0 0 0 4px var(--sh); }

label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }

.err { color: var(--bad); font-weight: 600; min-height: 20px; }

.search-field { position: relative; }
.search-field > svg {
  position: absolute; top: 50%; left: 13px;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  fill: none; stroke: var(--mu); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.search-field .search { margin: 0; padding-left: 40px; }

.filter-fields { margin-top: 14px; }
.book-count    { margin: 14px 0 10px; }

input::placeholder { color: var(--mu); opacity: .8; }

.hdr { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.hdr h2 { margin: 0; }
.hdr p  { margin: 4px 0 0; }

.st b { display: block; font: 700 34px Fraunces, serif; }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--bd);
  background: var(--in);
}

.book { overflow: hidden; display: flex; flex-direction: column; }
.book .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.book h3   { margin: 8px 0 2px; }
.book .row { margin-top: auto; }
.book .row + .row { margin-top: 8px; }

.cov { display: block; width: 100%; height: auto; }
.cov .ic {
  fill: none; stroke: #fff; stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
}
.cov text { fill: #fff; stroke: none; font: 700 28px Georgia, serif; text-anchor: middle; }
.cov text.m { font-size: 44px; }
.cov text.b { font-size: 70px; }

.h0 .c1 { fill: #8f1018; } .h0 .c2 { fill: #b91c1c; } .h0 .c3 { fill: #5f0a10; }
.h1 .c1 { fill: #9a3412; } .h1 .c2 { fill: #c2410c; } .h1 .c3 { fill: #6b2209; }
.h2 .c1 { fill: #1e40af; } .h2 .c2 { fill: #3b5fd6; } .h2 .c3 { fill: #14286b; }
.h3 .c1 { fill: #065f46; } .h3 .c2 { fill: #059669; } .h3 .c3 { fill: #033f2f; }
.h4 .c1 { fill: #6b21a8; } .h4 .c2 { fill: #9333ea; } .h4 .c3 { fill: #431569; }

.tw { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; min-width: 640px; }

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--bd);
  font-size: 14px;
}
th { font-size: 13px; color: var(--mu); }

tbody tr, tr { transition: background-color .25s ease; }
tr:hover td  { background: var(--in); }

.seats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 10px;
}
.seat { min-height: 46px; padding: 14px 0; text-align: center; }
.seat.x { background: rgba(220, 38, 38, .35); }
.seat.o { background: rgba(5, 150, 105, .3); }
.seat:disabled { opacity: 1; cursor: default; }

.cbox {
  display: block;
  min-width: 0;
  color: var(--tx);
  text-decoration: none;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s ease;
}
.cbox:hover  { transform: translateY(-3px); box-shadow: none; border-color: var(--ac); }
.cbox:active { transform: scale(.98); }
.cbox span   { display: block; font-size: 13px; margin-bottom: 4px; }
.cbox b      { display: block; font-size: 15px; overflow-wrap: anywhere; line-height: 1.45; }

.auth-page {
  min-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth { width: min(100%, 920px); margin: auto; }

.hero { text-align: center; margin-bottom: 20px; }
.auth .lgx { width: 72px; height: 72px; }
.hero h1 { font-size: 36px; }
.hero p  { max-width: 420px; margin: 6px auto 0; }

.auth-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 690px;
  --curve: 160px;
  background: color-mix(in srgb, var(--b1) 92%, transparent);
  box-shadow: none;
}
.auth-card button.pri { width: 100%; min-height: 46px; }

.auth-form-title { text-align: center; font-size: 30px; margin: 0 0 18px; }

.forgot-row { display: flex; justify-content: flex-end; margin-top: -4px; }
.forgot-row .linkbtn { color: var(--ac); font-weight: 700; }

.auth-switch { margin: 18px 0 0; text-align: center; color: var(--mu); }
.auth-link { background: none; border: 0; padding: 2px 3px; color: var(--ac); font-weight: 700; }
.auth-link:hover { transform: none; box-shadow: none; filter: none; text-decoration: underline; }

.form-pane {
  position: absolute;
  top: 0;
  height: 100%;
  width: 55%;
  padding: 26px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  z-index: 2;
}
.form-pane form { gap: 10px; }

.pane-in { left: 45%; opacity: 1; visibility: visible; transition: opacity .3s .5s, visibility 0s .5s; }
.pane-up { left: 0;   opacity: 0; visibility: hidden;  transition: opacity .2s,    visibility 0s .2s; }

.slider.up .pane-in { opacity: 0; visibility: hidden;  transition: opacity .2s,    visibility 0s .2s; }
.slider.up .pane-up { opacity: 1; visibility: visible; transition: opacity .3s .5s, visibility 0s .5s; }

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  z-index: 3;
  border-radius: 0 var(--curve) var(--curve) 0;
  background: linear-gradient(160deg, #8f161d, #7a0f16 50%, #5c0a10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
  overflow: hidden;
}

.overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%);
}
.slider.up .overlay { left: 55%; border-radius: var(--curve) 0 0 var(--curve); }

.slider.to-up .overlay { animation: ovToRight 1s ease-in-out; }
.slider.to-in .overlay { animation: ovToLeft 1s ease-in-out; }

@keyframes ovToRight {
  0%   { left: 0;   width: 45%;  border-radius: 0 var(--curve) var(--curve) 0; }
  50%  { left: 0;   width: 100%; border-radius: 0; }
  100% { left: 55%; width: 45%;  border-radius: var(--curve) 0 0 var(--curve); }
}
@keyframes ovToLeft {
  0%   { left: 55%; width: 45%;  border-radius: var(--curve) 0 0 var(--curve); }
  50%  { left: 0;   width: 100%; border-radius: 0; }
  100% { left: 0;   width: 45%;  border-radius: 0 var(--curve) var(--curve) 0; }
}

.ov-text {
  position: absolute;
  top: 0;
  height: 100%;
  width: 45%;
  z-index: 4;
  padding: 0 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.ov-text h2 { margin: 12px 0 6px; font-size: 32px; }
.ov-text p  { margin-bottom: 18px; opacity: .92; }
.ov-text h2, .ov-text p { text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }

.text-login { left: 0;   opacity: 1; visibility: visible; transition: opacity .3s .5s, visibility 0s .5s; }
.text-reg   { left: 55%; opacity: 0; visibility: hidden;  transition: opacity .2s,    visibility 0s .2s; }
.slider.up .text-login { opacity: 0; visibility: hidden;  transition: opacity .2s,    visibility 0s .2s; }
.slider.up .text-reg   { opacity: 1; visibility: visible; transition: opacity .3s .5s, visibility 0s .5s; }

.ov-text button.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
  border-radius: 99px;
  padding: 9px 38px;
}
.ov-text button.ghost:hover { background: rgba(255, 255, 255, .2); }

.auth-card label:not(.agree) {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.auth-card input:not([type="checkbox"]),
.auth-card select {
  padding: 12px 42px 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tx) 8%, transparent);
}
.auth-card input:not([type="checkbox"]):focus,
.auth-card select:focus { border-color: var(--ac); }

.fld { position: relative; }
.fld .fi {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx);
  pointer-events: none;
  display: grid;
}
.fi svg, .quick svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.auth-card.slider form button.pri {
  background: linear-gradient(90deg, #4a0a0f, #dc2626);
  color: #fff;
  border: 0;
  border-radius: 10px;
}

.or    { text-align: center; margin: 16px 0 10px; font-size: 13px; color: var(--mu); }
.quick { display: flex; justify-content: center; gap: 12px; }
.quick a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--tx);
  border: 1px solid var(--bd);
  border-radius: 8px;
  transition: transform .28s var(--ease), border-color .28s ease, color .28s ease;
}
.quick a:hover { transform: translateY(-2px); border-color: var(--ac); color: var(--ac); }

.terms {
  font-size: 13px;
  color: var(--mu);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--in);
}
.terms summary { cursor: pointer; font-weight: 600; color: var(--tx); }
.terms ul { margin: 8px 0 2px; padding-left: 18px; }
.terms li { margin-bottom: 4px; }

label.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
label.agree input { width: auto; flex: none; margin-top: 3px; accent-color: var(--ac); }

.terms-scroll { max-height: 150px; overflow-y: auto; margin-top: 8px; padding-right: 6px; overscroll-behavior: contain; scroll-behavior: smooth; }
.terms-scroll:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; border-radius: 6px; }
label.agree:has(input:disabled) { opacity: .6; }
label.agree input:disabled { cursor: not-allowed; }
label.agree { transition: opacity .35s ease; }

.spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
button.loading { opacity: .85; }

.password-field { position: relative; }
.password-field input { padding-right: 50px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 7px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
}
.password-toggle:hover, .password-toggle:active { transform: translateY(-50%); box-shadow: none; filter: none; }
.password-toggle svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.auth-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 4px 8px;
  border-top: 1px solid var(--bd);
  color: var(--mu);
  font-size: 13px;
}
.auth-footer p { margin: 0; }
.auth-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.auth-footer .footer-email { color: var(--tx); font-weight: 700; }
.auth-footer a { color: var(--tx); font-weight: 700; text-decoration: none; }
.auth-footer a:hover { color: var(--ac); text-decoration: underline; }

@media (min-width: 701px) {
  .auth-page {
    position: fixed;
    inset: 0;
    z-index: 5;
    min-height: 0;
    display: block;
    padding: 0;
  }
  .auth { width: 100%; height: 100%; margin: 0; }

  .auth-card {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    border: 0;
    --curve: clamp(140px, 20vw, 280px);
  }

  .form-pane { padding: 28px 5vw; }
  .form-pane > * { width: 100%; max-width: 440px; align-self: center; }

  .ov-text h2 { font-size: clamp(30px, 3.2vw, 46px); }
  .ov-text p  { font-size: 16px; }
  .auth .ov-text .lgx { width: 100px; height: 100px; }

  .auth-footer { display: none; }
}

.app-shell { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 12px; }

.theme-button { width: 42px; height: 42px; padding: 9px; display: grid; place-items: center; flex: none; }
.theme-button svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 12px;
}

.sidebar { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 12px; }
.user-tag { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sidebar nav { flex-direction: column; overflow-x: visible; overflow-y: auto; padding: 0; }

.nav-button, .logout-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 9px 11px;
  border-color: transparent;
  background: transparent;
}
.nav-button.on { background: var(--ac); color: #fff; }
.nav-icon { width: 22px; flex: none; text-align: center; font-size: 17px; }

.logout-button { margin-top: auto; border-color: var(--bd); background: var(--in); }
.logout-button span { font-size: 18px; }

.maincontent {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 4px 8px 2px;
  scrollbar-gutter: stable;
}
.maincontent > .fill-panel { flex: 1; min-height: 0; }
.contact-panel { display: flex; flex-direction: column; }
.seats-panel   { display: flex; flex-direction: column; justify-content: flex-start; }

.data-panel.is-empty { flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.data-panel.is-empty > .empty-state { flex: 1; }

.cards {
  grid-auto-rows: max-content;
  max-height: min(64vh, 720px);
  overflow-y: auto;
  align-content: start;
  padding: 2px 6px 6px 2px;
  scrollbar-gutter: stable;
}
.cards > .empty-state { grid-column: 1 / -1; }
.cards.is-empty { flex: 1; min-height: 180px; max-height: none; display: flex; }
.cards.is-empty > .empty-state { flex: 1; }

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
  color: var(--mu);
  text-align: center;
}
.empty-state p { margin: 0; }
.empty-state > span {
  width: 28px; height: 28px;
  display: grid; place-items: center; flex: none;
  border: 1px solid var(--bd);
  border-radius: 50%;
  color: var(--ac);
  font-weight: 700;
}

.blob { animation: drift 18s ease-in-out infinite alternate; }
.b2 { animation-duration: 22s; animation-delay: -6s; }
.b3 { animation-duration: 26s; animation-delay: -12s; }
@keyframes drift {
  to { transform: translate(60px, 40px) scale(1.12); }
}

.app-shell { position: relative; z-index: 1; }
.app-shell.reveal { animation: reveal 1.1s cubic-bezier(.65, 0, .2, 1) backwards; }
@keyframes reveal {
  from { clip-path: circle(0 at 56px 50px); }
  to   { clip-path: circle(150vmax at 56px 50px); }
}
.curtain {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, #5a0f14, #1a0505 70%);
  animation: curtainOut 1.5s forwards;
  pointer-events: none;
}
@keyframes curtainOut {
  0%, 75% { opacity: 1; visibility: visible; }
  100%    { opacity: 0; visibility: hidden; }
}

@keyframes pageIn {
  from { opacity: 0; filter: blur(12px); transform: translateY(10px) scale(.99); }
  to   { opacity: 1; filter: none; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.maincontent.enter > *,
.maincontent.enter .stats > *,
.maincontent.enter .cards > :nth-child(-n+12) {
  animation: pop .6s var(--ease) backwards;
}
.maincontent.enter > :nth-child(2) { animation-delay: .10s; }
.maincontent.enter > :nth-child(3) { animation-delay: .22s; }
.maincontent.enter > :nth-child(4) { animation-delay: .34s; }
.maincontent.enter > :nth-child(5) { animation-delay: .46s; }
.maincontent.enter .stats > :nth-child(1) { animation-delay: .15s; }
.maincontent.enter .stats > :nth-child(2) { animation-delay: .22s; }
.maincontent.enter .stats > :nth-child(3) { animation-delay: .29s; }
.maincontent.enter .stats > :nth-child(4) { animation-delay: .36s; }
.maincontent.enter .stats > :nth-child(5) { animation-delay: .43s; }
.maincontent.enter .cards > :nth-child(1)  { animation-delay: .10s; }
.maincontent.enter .cards > :nth-child(2)  { animation-delay: .16s; }
.maincontent.enter .cards > :nth-child(3)  { animation-delay: .22s; }
.maincontent.enter .cards > :nth-child(4)  { animation-delay: .28s; }
.maincontent.enter .cards > :nth-child(5)  { animation-delay: .34s; }
.maincontent.enter .cards > :nth-child(6)  { animation-delay: .40s; }
.maincontent.enter .cards > :nth-child(n+7) { animation-delay: .46s; }

.st, .book { transition: transform .3s var(--ease), border-color .3s ease; }
.st:hover, .book:hover { transform: translateY(-4px); border-color: var(--ac); }

.hdr {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #3b0a0a, #8f1018 70%, #b91c1c);
  border-color: rgba(255, 255, 255, .15);
}
.hdr h2 { color: #fff; }
.hdr .mu { color: rgba(255, 255, 255, .8); }
.page.enter .hdr::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .2) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 1.6s .7s ease-out 1 forwards;
  pointer-events: none;
}
@keyframes shine { to { transform: translateX(100%); } }

@media (min-width: 601px) {
  .workspace { grid-template-columns: 218px minmax(0, 1fr); }

  .sidebar {
    position: relative;
    z-index: 10;
    align-items: stretch;
    padding: 14px 12px;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, #3b0a0a, #5f0a10);
    border-color: rgba(255, 255, 255, .12);
  }
  .user-tag { display: inline-block; color: #fff; border-color: rgba(255, 255, 255, .25); }
  .sidebar nav { align-items: stretch; gap: 6px; overflow: visible; }

  .nav-button, .logout-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    justify-content: flex-start;
    border-radius: 14px;
    color: #fff;
  }
  .nav-label { display: inline; }
  .nav-icon  { width: 22px; font-size: 17px; transition: transform .3s var(--ease); }

  .nav-button:hover {
    background: rgba(255, 255, 255, .14);
    transform: translateX(4px);
    box-shadow: none;
    filter: none;
  }
  .nav-button:hover .nav-icon { transform: scale(1.2) rotate(-6deg); }
  .nav-button:active { transform: translateX(2px) scale(.96); }

  .nav-button.on {
    background: transparent;
    color: #3b0a0a;
    font-weight: 700;
  }
  .nav-button.on:hover { background: transparent; }
  .nav-button.on::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 14px;
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
  }

  .sidebar.enter .nav-button.on::before { animation: pillIn .5s var(--ease) both; transform-origin: left center; }
  .sidebar.enter .nav-button.on::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .65) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shine 1.1s .35s ease-out 1 forwards;
    pointer-events: none;
  }
  .sidebar.enter .nav-button.on .nav-icon { animation: iconPop .5s .15s var(--ease) backwards; }

  .sidebar.intro .nav-button { animation: navIn .55s var(--ease) backwards; }
  .sidebar.intro .nav-button:nth-child(1) { animation-delay: .35s; }
  .sidebar.intro .nav-button:nth-child(2) { animation-delay: .42s; }
  .sidebar.intro .nav-button:nth-child(3) { animation-delay: .49s; }
  .sidebar.intro .nav-button:nth-child(4) { animation-delay: .56s; }
  .sidebar.intro .nav-button:nth-child(5) { animation-delay: .63s; }
  .sidebar.intro .nav-button:nth-child(6) { animation-delay: .70s; }
  .sidebar.intro .nav-button:nth-child(7) { animation-delay: .77s; }

  .logout-button { margin-top: auto; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); }
  .logout-button:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); box-shadow: none; }
}

@keyframes pillIn  { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes iconPop { 0% { transform: scale(.4) rotate(-30deg); } 60% { transform: scale(1.3); } 100% { transform: none; } }
@keyframes navIn   { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

@media (min-width: 701px) {
  .auth-card {
    background: var(--gl);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
  }
}

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease,
              fill .5s ease, stroke .5s ease !important;
}

.form-in { animation: formIn .5s var(--ease) both; transform-origin: top center; }
@keyframes formIn {
  from { opacity: 0; transform: translateY(-14px) scaleY(.92); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.book.added {
  animation:
    bookIn .8s cubic-bezier(.34, 1.56, .64, 1) both,
    bookGlow 1.8s .35s ease-out 1;
}
@keyframes bookIn {
  0%   { opacity: 0; transform: translateY(30px) scale(.7) rotate(-3deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes bookGlow {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, .65); }
  100% { box-shadow: 0 0 0 28px rgba(220, 38, 38, 0); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, #3b0a0a, #b91c1c);
  color: #fff;
  font: 600 14px Manrope, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  pointer-events: none;
  animation: toastIn .5s var(--ease) both, toastOut .4s 2.4s ease-in forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px) scale(.9); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 10px); } }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: .28;
  transform: scale(0);
  pointer-events: none;
  animation: ripple .65s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rowIn   { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes rowOut  { to { opacity: 0; transform: translateX(40px); } }
@keyframes bookOut { to { opacity: 0; transform: scale(.8) translateY(10px); filter: blur(4px); } }
@keyframes seatPop { 0% { transform: scale(.6) rotate(-8deg); } 60% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes shake   { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes iconSpin { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tick    { 50% { transform: scale(1.35); } }
@keyframes pageOut { to { opacity: 0; filter: blur(8px); transform: translateY(-8px) scale(.99); } }

.page.maincontent.leave { animation: pageOut .18s ease-in forwards; pointer-events: none; }

.err:not(:empty) { animation: shake .45s ease; }

.maincontent.enter tr { animation: rowIn .5s var(--ease) backwards; }
.maincontent.enter tr:nth-child(1) { animation-delay: .20s; }
.maincontent.enter tr:nth-child(2) { animation-delay: .26s; }
.maincontent.enter tr:nth-child(3) { animation-delay: .32s; }
.maincontent.enter tr:nth-child(4) { animation-delay: .38s; }
.maincontent.enter tr:nth-child(5) { animation-delay: .44s; }
.maincontent.enter tr:nth-child(6) { animation-delay: .50s; }
.maincontent.enter tr:nth-child(n+7) { animation-delay: .56s; }

.maincontent tr.row-out { animation: rowOut .35s ease 0s forwards !important; }

.book.removing { animation: bookOut .4s ease 0s forwards !important; pointer-events: none; }

.cards.refresh > * { animation: pop .45s var(--ease) backwards; }
.cards.refresh > :nth-child(2) { animation-delay: .05s; }
.cards.refresh > :nth-child(3) { animation-delay: .10s; }
.cards.refresh > :nth-child(4) { animation-delay: .15s; }
.cards.refresh > :nth-child(5) { animation-delay: .20s; }
.cards.refresh > :nth-child(6) { animation-delay: .25s; }
.cards.refresh > :nth-child(n+7) { animation-delay: .30s; }

.search-field > svg { transition: stroke .25s ease, transform .3s var(--ease); }
.search-field:focus-within > svg { stroke: var(--ac); transform: translateY(-50%) scale(1.18); }

.maincontent.enter .seats > * { animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 14ms + .1s); }
.seat:not(:disabled):hover { transform: translateY(-2px) scale(1.08); }
.seat.flip { animation: seatPop .5s var(--ease); }

.maincontent.enter .cbox { animation: pop .6s var(--ease) backwards; }
.maincontent.enter .cbox:nth-child(1) { animation-delay: .25s; }
.maincontent.enter .cbox:nth-child(2) { animation-delay: .35s; }

.brand .lg { transition: transform .5s var(--ease); }
.brand:hover .lg { transform: rotate(-8deg) scale(1.08); }

.theme-button svg { transition: transform .4s var(--ease); }
.theme-button:hover svg { transform: rotate(20deg); }
.theme-button.spin-once svg { animation: iconSpin .7s var(--ease); }

label.agree input:checked { animation: tick .3s ease; }
.terms[open] ul { animation: fadeUp .35s var(--ease); }

:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > * { animation: fadeUp .5s var(--ease) backwards; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(1) { animation-delay: .10s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(2) { animation-delay: .16s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(3) { animation-delay: .22s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(4) { animation-delay: .28s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(5) { animation-delay: .34s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(6) { animation-delay: .40s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(7) { animation-delay: .46s; }
:is(.auth-page.enter .form-pane, .form-pane.pane-swap) form > :nth-child(n+8) { animation-delay: .52s; }

@media (max-width: 600px) {
  #app { height: auto; min-height: 100dvh; padding: 8px; }
  .app-shell { height: auto; min-height: calc(100dvh - 16px); }
  .top { min-height: 58px; padding: 8px 11px; }
  .brand { font-size: 19px; gap: 8px; }
  .lg { width: 38px; height: 38px; }

  .workspace { display: flex; flex-direction: column; min-height: 0; }
  .sidebar { gap: 8px; padding: 9px; }
  .user-tag { display: none; }
  .sidebar nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .nav-button { width: auto; min-width: max-content; min-height: 38px; padding: 7px 10px; }
  .nav-icon { width: auto; }
  .logout-button { width: auto; align-self: flex-end; min-height: 36px; margin-top: 0; }

  .maincontent { overflow: visible; padding: 2px 1px 8px; }
  .cards { max-height: 58vh; }
  .pad { padding: 14px; }

  .auth-page { min-height: calc(100dvh - 16px); }
  .auth { margin: 24px auto; }
  .auth-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 2px 8px; }

  h2 { font-size: 22px; }
  .hero h1 { font-size: 30px; }
  .hdr { flex-direction: column; text-align: center; }
}

@media (min-width: 601px) and (max-width: 850px) {
  .workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

@media (min-width: 701px) { .m-only { display: none; } }
@media (max-width: 700px) {
  .auth { width: min(100%, 460px); }
  .auth-card { min-height: 0; overflow: visible; }
  .form-pane {
    position: static; width: 100%; height: auto; padding: 22px;
    opacity: 1; visibility: visible; transition: none;
  }
  .pane-up { display: none; }
  .slider.up .pane-up { display: flex; }
  .slider.up .pane-in { display: none; }
  .overlay, .ov-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .spin { animation: spin 1.4s linear infinite !important; }
}

@media (max-width: 600px) {
  .sidebar {
    position: sticky;
    top: 6px;
    z-index: 20;
    background: color-mix(in srgb, var(--b1) 88%, transparent);
  }
  .sidebar nav { scroll-snap-type: x proximity; }
  .nav-button { scroll-snap-align: center; }
}

.wv {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  filter: blur(46px);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
  translate: 0 0;
  transition: translate 1.5s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
  animation: wvFloat 22s ease-in-out infinite alternate;
}
.w1 { width: 95%;  height: 58%; top: -24%;    left: 14%;   background: #1c0305;                     opacity: .92; animation-duration: 24s; }
.w2 { width: 125%; height: 62%; bottom: -30%; left: -16%;  background: #e0313b;                     opacity: .95; animation-duration: 20s; animation-delay: -6s; }
.w3 { width: 75%;  height: 46%; top: 26%;     left: -28%;  background: #a3131b;                     opacity: .85; animation-duration: 27s; animation-delay: -11s; }
.w4 { width: 58%;  height: 38%; bottom: -8%;  right: -14%; background: rgba(255, 116, 122, .75);    opacity: .70; animation-duration: 18s; animation-delay: -3s; }

.slider.up .w1 { translate: -34% 46%; }
.slider.up .w2 { translate: 28% -12%; }
.slider.up .w3 { translate: 92% -18%; }
.slider.up .w4 { translate: -70% -34%; }

@keyframes wvFloat {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1);          border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; }
  50%  { transform: translate(9%, 7%) rotate(16deg) scale(1.12);    border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%; }
  100% { transform: translate(-7%, -5%) rotate(-12deg) scale(.96);  border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; }
}

.lo-back {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(30, 3, 6, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: loFade .22s ease both;
}
.lo-back.out { animation: loFadeOut .18s ease both; }

.lo-card {
  width: min(360px, 100%);
  padding: 28px 24px 22px;
  text-align: center;
  color: var(--tx);
  border-radius: 24px;
  background: var(--gl);
  background: light-dark(rgba(255, 255, 255, .72), rgba(48, 10, 14, .58));
  border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: loPop .35s var(--ease) both;
}
.lo-back.out .lo-card { animation: loPopOut .18s ease both; }

.lo-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c62832;
  background: rgba(198, 40, 50, .14);
  box-shadow: 0 0 0 8px rgba(198, 40, 50, .07);
}
:root[data-theme="dark"] .lo-icon { color: #ff8b92; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lo-icon { color: #ff8b92; }
}

.lo-card h3 { font-size: 24px; margin: 0 0 6px; }
.lo-card p  { margin: 0 0 22px; color: var(--mu); font-size: 14px; }

.lo-card button {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  font: 700 14px Manrope, system-ui, sans-serif;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s ease, background .2s ease;
}
.lo-yes {
  margin-bottom: 10px;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #d12a35, #a3131b);
  box-shadow: 0 8px 20px rgba(163, 19, 27, .38);
}
.lo-yes:hover  { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(163, 19, 27, .5); filter: brightness(1.06); }
.lo-no {
  color: var(--tx);
  background: var(--in);
  border: 1px solid var(--bd);
}
.lo-no:hover { transform: translateY(-2px); box-shadow: none; background: var(--in); filter: brightness(1.04); }
.lo-card button:active { transform: scale(.98); }
.lo-card button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(198, 40, 50, .6); }

@keyframes loFade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes loFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes loPop     { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes loPopOut  { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  .wv, .lo-back, .lo-card { animation: none; }
}

.tm-card { max-width: 420px; text-align: left; }
.tm-card h3 { font-size: 20px; text-align: center; margin-bottom: 12px; }
.tm-card .terms-scroll { max-height: min(46vh, 280px); margin: 0 0 12px; font-size: 14px; color: var(--mu); }
.tm-card .terms-scroll ul { margin: 0; padding-left: 18px; }
.tm-card .terms-scroll li { margin-bottom: 8px; line-height: 1.5; }
.tm-card .tm-hint { margin: 0 0 14px; font-size: 13px; text-align: center; }
.tm-agree:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); transform: none; box-shadow: none; }
label.agree .linkbtn { font-size: inherit; text-align: left; }

.tm-card { width: min(420px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 400px) { .tm-card { padding: 22px 16px 18px; } }
@media (max-height: 520px) { .tm-card .terms-scroll { max-height: 28vh; } .tm-card h3 { margin-bottom: 8px; } }

.m0 { margin: 0; }
.sub-h { margin-top: 22px; }

.seat-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 12px; }
.seat-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--mu); }
.seat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.seat-legend i { width: 14px; height: 14px; border-radius: 5px; border: 1px solid var(--bd); }
.seat-legend i.o { background: rgba(5, 150, 105, .55); }
.seat-legend i.x { background: rgba(220, 38, 38, .6); }
.seat-legend i.mine { background: linear-gradient(145deg, #fecaca, #f87171); box-shadow: 0 0 0 2px rgba(248, 113, 113, .45); }

.seat {
  position: relative;
  display: grid; place-items: center;
  min-height: 54px; padding: 0;
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .25s var(--ease), box-shadow .3s ease, background .35s ease, border-color .35s ease, color .3s ease;
}
.seat.o { background: linear-gradient(145deg, rgba(16, 185, 129, .38), rgba(5, 150, 105, .12)); border-color: rgba(52, 211, 153, .55); }
.seat.x { background: linear-gradient(145deg, rgba(220, 38, 38, .45), rgba(127, 29, 29, .18)); border-color: rgba(248, 113, 113, .45); }
.seats.ro .seat.x:not(.mine) { cursor: not-allowed; opacity: .8; }
.seats.ro .seat.x:not(.mine):hover { transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); filter: none; }
.seat.o:hover { box-shadow: 0 10px 22px rgba(5, 150, 105, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }

.seat.mine {
  color: #3b0a0a;
  background: linear-gradient(145deg, #fee2e2, #f87171);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .5), 0 10px 26px rgba(220, 38, 38, .45);
  animation: minePulse 2.4s ease-in-out infinite;
}
@keyframes minePulse {
  50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, .14), 0 10px 26px rgba(220, 38, 38, .45); }
}
.seat.no { animation: shake .4s ease; }

.seat-status {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)), var(--gl);
  animation: seatBannerIn .5s var(--ease) both;
}
.seat-status.has { border-color: rgba(248, 113, 113, .65); box-shadow: 0 10px 30px rgba(220, 38, 38, .22); }
.ss-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: #c62832; background: rgba(198, 40, 50, .14); box-shadow: 0 0 0 6px rgba(198, 40, 50, .07);
}
.seat-status.has .ss-icon { color: #fff; background: linear-gradient(135deg, #d12a35, #a3131b); box-shadow: 0 0 0 6px rgba(198, 40, 50, .18); }
.ss-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-text b { font: 700 18px Fraunces, serif; }
.ss-text .mu { font-size: 13px; }
.seat-status button { flex: none; }
@keyframes seatBannerIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
:root[data-theme="dark"] .ss-icon { color: #ff8b92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ss-icon { color: #ff8b92; } }
:root[data-theme="dark"] .seat-status.has .ss-icon { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seat-status.has .ss-icon { color: #fff; } }

.seat-sub { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 20px; }
.seated { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 10px; }
.seated-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  transition: transform .3s var(--ease), border-color .3s ease;
}
.seated-card:hover { transform: translateY(-3px); border-color: var(--ac); }
.seated-card.late { border-color: rgba(248, 113, 113, .7); }
.sc-seat {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font: 700 18px Fraunces, serif; color: #fff; background: linear-gradient(135deg, #d12a35, #a3131b);
}
.sc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maincontent.enter .seated > * { animation: pop .5s var(--ease) backwards; }
.maincontent.enter .seated > :nth-child(2) { animation-delay: .06s; }
.maincontent.enter .seated > :nth-child(3) { animation-delay: .12s; }
.maincontent.enter .seated > :nth-child(n+4) { animation-delay: .18s; }

.lo-icon.ok { color: #059669; background: rgba(5, 150, 105, .14); box-shadow: 0 0 0 8px rgba(5, 150, 105, .07); }
.lo-body p { margin: 0 0 22px; color: var(--mu); font-size: 14px; }
.lo-body p b { color: var(--tx); overflow-wrap: anywhere; }
.lo-info {
  margin: 0 0 18px; padding: 6px 14px; border-radius: 16px; text-align: left; font-size: 13px;
  background: var(--in); border: 1px solid var(--bd);
}
.lo-info > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; }
.lo-info > div + div { border-top: 1px solid var(--bd); }
.lo-info b { text-align: right; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .seat.mine, .seat-status { animation: none; }
}

.book .copies { margin: -4px 0 10px; }
.book .copies b { font-weight: 700; }

.copy-hint {
  max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
  font-size: 13px; font-weight: 700;
  transition: max-height .35s var(--ease), opacity .3s ease, margin-top .3s ease;
}
.copy-hint.show { max-height: 40px; opacity: 1; margin-top: 8px; }
.copy-hint.ok  { color: var(--ok); }
.copy-hint.low { color: var(--bad); }

.book .loc-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 10px 0; padding: 8px 10px 8px 12px; border-radius: 14px;
  text-align: left; font-size: 13px; font-weight: 600; color: var(--tx);
  background: var(--in); border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.loc-btn .pin-ic { flex: none; color: #c62832; }
.loc-btn .loc-txt { flex: 1; min-width: 0; line-height: 1.3; }
.loc-btn .loc-go {
  flex: none; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #d12a35, #a3131b);
}
.book .loc-btn:hover { border-color: var(--ac); }
:root[data-theme="dark"] .loc-btn .pin-ic { color: #ff8b92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .loc-btn .pin-ic { color: #ff8b92; } }

.lo-card.map-card { width: min(780px, 100%); text-align: left; padding: 22px 22px 18px; }
.map-card .lo-icon { width: 52px; height: 52px; margin: 0 0 8px; box-shadow: 0 0 0 6px rgba(198, 40, 50, .07); }
.map-card h3 { font-size: 22px; overflow-wrap: anywhere; }
.map-card .lo-body p { margin: 0; }
.map-where { margin: 0 0 14px !important; font-size: 14px; color: var(--mu); }
.map-where b { color: var(--tx); }
.map-copies { margin: 14px 0 16px !important; font-size: 13px; }
.map-card button { max-width: 420px; margin-left: auto; margin-right: auto; }

.map-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.map-box {
  padding: 12px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.map-box h4 { margin: 0 0 10px; font: 700 14px Manrope, sans-serif; color: var(--tx); }
.map-note { margin: 10px 0 0 !important; font-size: 12px; text-align: center; color: var(--mu) !important; }

.floor {
  padding: 16px 12px 12px; border-radius: 16px;
  background-color: rgba(70, 86, 108, .38);
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid rgba(255, 255, 255, .25);
}

@keyframes caseGlow { 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, .3), 0 0 28px rgba(239, 68, 68, .95); } }
@keyframes pinBounce { 50% { transform: translateY(-5px); } }

.floor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ottomans { display: flex; gap: 8px; }
.ottomans i {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #86a3bf, #4b6a86); box-shadow: 0 3px 6px rgba(0, 0, 0, .35);
}
.door {
  padding: 3px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(20, 30, 45, .55); border: 1px solid rgba(255, 255, 255, .25);
}

.cv {
  width: min(250px, 100%); margin: 0 auto; padding: 9px 9px 12px; border-radius: 12px 12px 5px 5px;
  background: linear-gradient(135deg, #dca561, #b97832);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cv-in { padding: 4px 5px 0; border-radius: 6px; background: linear-gradient(180deg, #6f8dab, #4b6a86); }
.lvl {
  position: relative; display: flex; align-items: flex-end; height: 40px; padding: 0 4px 0 22px;
  border-bottom: 6px solid #c58a4a;
}
.lvl .spines {
  flex: 1; height: 30px; border-radius: 2px 2px 0 0;
  background: repeating-linear-gradient(90deg,
    hsl(calc(var(--s) * 47) 52% 50%) 0 7px, hsl(calc(var(--s) * 47 + 35) 58% 40%) 7px 11px,
    hsl(calc(var(--s) * 47 + 80) 50% 58%) 11px 15px, hsl(calc(var(--s) * 47 + 20) 55% 46%) 15px 21px);
}
.lvl-n { position: absolute; left: 6px; bottom: 9px; font-size: 11px; font-weight: 700; color: #fff; opacity: .9; }
.lvl.hit::before {
  content: ""; position: absolute; inset: 1px 0 -3px 0; border-radius: 6px; z-index: 1; pointer-events: none;
  background: rgba(255, 255, 255, .26); border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .8), 0 0 20px rgba(239, 68, 68, .9);
  animation: rowIn .6s .35s var(--ease) backwards, caseGlow 1.8s ease-in-out 1s infinite;
}
.lvl.hit .lvl-n { z-index: 2; }
.lvl.hit .hit-tag {
  position: absolute; z-index: 2; right: 8px; top: 2px; padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #d12a35, #a3131b);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4); animation: pop .5s .6s var(--ease) backwards;
}
@keyframes rowIn { from { opacity: 0; transform: scaleX(.6); } to { opacity: 1; transform: none; } }

.map-card .lo-card h3 { margin-top: 0; }
.lo-body p b.ok  { color: var(--ok); }
.lo-body p b.bad { color: var(--bad); }

.floor-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  max-width: 420px; padding: 4px; margin: 0 0 14px; border-radius: 18px;
  background: var(--in); border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}
.floor-tabs .glider {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 14px;
  background: linear-gradient(135deg, #d12a35, #a3131b); box-shadow: 0 8px 18px rgba(163, 19, 27, .4);
}
.floor-tabs.on-floor-2 .glider { transform: translateX(100%); }
.floor-tabs.move.on-floor-2 .glider { animation: glToRight .45s var(--ease); }
.floor-tabs.move.on-floor-1 .glider { animation: glToLeft .45s var(--ease); }
@keyframes glToRight { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes glToLeft  { from { transform: translateX(100%); } to { transform: translateX(0); } }

.floor-tabs .ft {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 8px 6px; min-height: 48px; border: 0; border-radius: 14px; background: transparent;
  font-weight: 700; color: var(--tx); transition: color .3s ease;
}
.floor-tabs .ft small { font-size: 12px; font-weight: 600; opacity: .8; }
.floor-tabs .ft.on { color: #fff; }
.floor-tabs .ft:hover, .floor-tabs .ft:active { transform: none; box-shadow: none; filter: none; background: transparent; }

.seats.in-right { animation: seatsInR .45s var(--ease) both; }
.seats.in-left  { animation: seatsInL .45s var(--ease) both; }
@keyframes seatsInR { from { opacity: 0; transform: translateX(26px); }  to { opacity: 1; transform: none; } }
@keyframes seatsInL { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

.sc-seat { flex-direction: column; line-height: 1; gap: 2px; }
.sc-seat small { font: 700 10px Manrope, sans-serif; opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  .floor-tabs .glider { animation: none !important; }
}

.room {
  container-type: inline-size; container-name: room;
  padding: 14px; border-radius: 22px;
  background-color: rgba(70, 86, 108, .34);
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.room-in { --s: 30px; --g: 4px; display: grid; gap: 18px 24px; }
@supports (width: 1cqw) {
  .room-in { --s: clamp(24px, 5.4cqw, 40px); --g: clamp(3px, .8cqw, 6px); }
}
.rf1 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "book" "tables" "small"; }
.rf2 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tables" "foot"; }
.zone-small { grid-area: small; } .zone-book { grid-area: book; } .zone-tables { grid-area: tables; } .room-foot { grid-area: foot; }

.solo { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.desk {
  width: calc(var(--s) * 1.5); height: 8px; border-radius: 5px;
  background: linear-gradient(135deg, rgba(220, 165, 97, .9), rgba(185, 120, 50, .75));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.zone-book { display: flex; flex-direction: column; align-items: center; }
.book-zone {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: calc(var(--s) * .5); border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease;
}
.book-zone:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .45); }
.side-seats { display: flex; flex-direction: row; justify-content: center; gap: calc(var(--g) * 1.8); }
.shelf-strip {
  width: 100%; height: 18px; border-radius: 6px; border: 3px solid #c58a4a;
  background: repeating-linear-gradient(90deg,
    hsl(8 55% 56%) 0 4px, hsl(40 62% 46%) 4px 8px, hsl(200 50% 56%) 8px 12px, hsl(125 40% 46%) 12px 16px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(0, 0, 0, .18);
}

.zone-tables { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 22px 24px; }
.tbl {
  display: grid; align-items: center; justify-items: center; gap: var(--g);
  grid-template-columns: repeat(var(--cols), var(--s));
  grid-template-rows: var(--s) calc(var(--s) * 1.5) var(--s);
}
.tbl-top {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(145deg, #dca561, #b97832);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
  color: #fff; font: 700 12px Manrope, sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
@supports (width: 1cqw) { .tbl-top { font-size: clamp(10px, 1.7cqw, 13px); } }

.room-foot { display: flex; justify-content: center; }

.room .seat {
  position: relative; width: var(--s); height: var(--s); min-height: 0 !important; padding: 0;
  border-radius: 11px 11px 14px 14px; font-size: 12px;
}
@supports (width: 1cqw) { .room .seat { font-size: clamp(10px, calc(var(--s) * .38), 14px); } }
.room .seat::after { content: ""; position: absolute; inset: -3px; }
.room .seat svg { width: 62%; height: 62%; }
.room.ro .seat.x:not(.mine) { cursor: not-allowed; opacity: .8; }
.room.ro .seat.x:not(.mine):hover { transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); filter: none; }

.maincontent.enter .room .seat { animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--i) * 12ms + .1s); }
.maincontent.enter .room .tbl-top { animation: pop .5s var(--ease) backwards; animation-delay: .1s; }
.room.in-right { animation: seatsInR .45s var(--ease) both; }
.room.in-left  { animation: seatsInL .45s var(--ease) both; }

.room-in.rf1 { gap: calc(var(--s) * .9); }
@supports (width: 1cqw) {
  .room-in.rf1 { --s: clamp(18px, calc((100cqw - 40px) / 12.5), 40px); }
}

.rf1 .zone-tables { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: calc(var(--s) * .8); }
.tbl-side {
  display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--s) * .6);
  padding: calc(var(--s) * .5); border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease;
}
.tbl-side:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .4); border-color: rgba(255, 255, 255, .45); }

.tblv {
  display: grid; align-items: center; justify-items: center; gap: var(--g);
  grid-template-columns: var(--s) calc(var(--s) * 1.2) var(--s);
  grid-template-rows: repeat(5, var(--s));
}
.tblv-top {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(160deg, rgba(220, 165, 97, .92), rgba(185, 120, 50, .78));
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: #fff; font: 700 11px Manrope, sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  writing-mode: vertical-rl; letter-spacing: .06em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@supports (width: 1cqw) { .tblv-top { font-size: clamp(9px, calc(var(--s) * .34), 13px); } }
.tblv:hover .tblv-top { transform: scale(1.04); box-shadow: 0 12px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .55); }

.zone-small { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: calc(var(--s) * .6); }
.small-grp { display: flex; justify-content: center; gap: calc(var(--s) * .5); }
.zone-small .door { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }

.maincontent.enter .room .zone-book,
.maincontent.enter .room .tbl-side,
.maincontent.enter .room .zone-small { animation: pop .55s var(--ease) backwards; }
.maincontent.enter .room .zone-book { animation-delay: .05s; }
.maincontent.enter .room .tbl-side:nth-child(1) { animation-delay: .12s; }
.maincontent.enter .room .tbl-side:nth-child(2) { animation-delay: .2s; }
.maincontent.enter .room .zone-small { animation-delay: .28s; }
.maincontent.enter .room .tblv-top { animation: pop .5s var(--ease) backwards; animation-delay: .1s; }

@container room (min-width: 720px) {
  .room-in.rf1 { --s: clamp(20px, calc((100cqw - 40px) / 26), 40px); }
  .zone-book { align-items: flex-start; margin-left: 58%; }
  .rf1 .zone-tables { flex-wrap: nowrap; justify-content: space-between; }
  .tbl-side { flex-wrap: nowrap; }
}
@container room (max-width: 719px) {
  .zone-small { grid-template-columns: 1fr 1fr; }
  .zone-small .door { grid-column: 1 / -1; order: 3; justify-self: center; }
}
@media (hover: none) {
  .tbl-side:hover, .tblv:hover .tblv-top, .book-zone:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tbl-side, .tblv-top, .book-zone { transition: none; }
  .maincontent.enter .room .zone-book, .maincontent.enter .room .tbl-side,
  .maincontent.enter .room .zone-small, .maincontent.enter .room .tblv-top { animation: none; }
}

.maincontent > .fill-panel.seats-panel { flex: 1 0 auto; min-height: auto; }
.floor-tabs .ft { justify-content: center; }

.warn { color: var(--warn); }
b.warn { font-weight: 700; }

.shelf-room {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px clamp(10px, 4vw, 24px);
  width: min(100%, 400px); margin: 0 auto; padding: 32px 6px 4px;
}
.shelf-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.shelf-case {
  position: relative; width: 100%; aspect-ratio: 3 / 4.4; border-radius: 12px; border: 3px solid #c58a4a;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 48%),
    repeating-linear-gradient(0deg,
      hsl(calc(var(--n) * 37) 55% 58% / .9) 0 4px, hsl(calc(var(--n) * 37 + 40) 60% 46% / .9) 4px 8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .5);
  display: grid; place-items: center;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--n) * 60ms + .1s);
}
.shelf-case:hover { transform: translateY(-3px); box-shadow: 0 14px 22px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .5); }
.shelf-case b {
  font-size: clamp(12px, 3.4vw, 16px); line-height: 1; padding: 4px 9px; border-radius: 9px; color: #fff;
  background: rgba(20, 30, 45, .55); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.shelf-case.target {
  z-index: 2; border-color: #fff;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .85), 0 0 22px rgba(239, 68, 68, .9);
  animation: pop .5s var(--ease) backwards, caseGlow 1.8s ease-in-out .7s infinite;
  animation-delay: calc(var(--n) * 60ms + .1s), 0s;
}
.shelf-case .pin { position: absolute; left: 50%; top: -30px; margin-left: -12px; animation: pinBounce 1.3s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.shelf-name {
  max-width: 100%; padding: 2px 9px; border-radius: 99px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(20, 30, 45, .55); border: 1px solid rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.resv-panel .resv-intro { margin: 0 0 12px; }
.resv-list { display: grid; gap: 10px; }
.resv-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px;
  padding: 12px 14px; border-radius: 16px;
  background: var(--in); border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease, opacity .3s ease;
  animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--k) * 60ms);
}
.resv-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px var(--sh), inset 0 1px 0 rgba(255, 255, 255, .28); }
.resv-card.resv-out { opacity: 0; transform: translateX(24px) scale(.97); pointer-events: none; }
.resv-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.resv-title { overflow-wrap: anywhere; }
.resv-time {
  padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap;
  color: var(--warn); background: rgba(245, 158, 11, .16); border: 1px solid rgba(245, 158, 11, .4);
}
.resv-time.low { color: var(--bad); background: rgba(220, 38, 38, .14); border-color: rgba(248, 113, 113, .5); }
.resv-btns { display: flex; gap: 8px; }
.resv-note {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 12px;
  border-radius: 12px; color: var(--warn); background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.resv-note span { font-weight: 600; }
.book .tgl.is-off { color: var(--bad); background: rgba(220, 38, 38, .16); border-color: rgba(248, 113, 113, .5); }
.book .tgl { transition: background .3s ease, color .3s ease, border-color .3s ease, transform .28s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .shelf-case, .shelf-case .pin, .resv-card { animation: none !important; transition: none; }
}
@media (hover: none) {
  .shelf-case:hover, .resv-card:hover { transform: none; }
}

.book .loc-btn .loc-txt { white-space: normal; overflow-wrap: anywhere; text-align: left; }

.book .book-actions { margin-top: 10px; gap: 8px; }
.book .book-actions > button { flex: 1 1 120px; white-space: nowrap; }
.book .row.center + .book-actions { margin-top: 12px; }

.lo-alt {
  margin-bottom: 10px;
  color: var(--tx);
  background: var(--in);
  border: 1px solid var(--bd);
}
.lo-alt:hover { transform: translateY(-2px); box-shadow: none; filter: brightness(1.06); }

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 5px;
  margin-bottom: 8px;
  border-radius: 99px;
  background: var(--gl);
  border: 1px solid var(--bd);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.seg button {
  position: relative;
  z-index: 1;
  min-height: 42px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  box-shadow: none;
  font-weight: 700;
  transition: color .35s var(--ease), transform .25s var(--ease);
}
.seg button:hover { transform: none; background: transparent; filter: none; }
.seg button.on, .seg button.on:hover { background: transparent; color: #fff; }
:root[data-theme="dark"] .seg button.on { color: #3b0a0a; }
.seg-pill {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 99px;
  background: linear-gradient(135deg, #d12a35, #a3131b);
  box-shadow: 0 8px 20px rgba(163, 19, 27, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .45s var(--ease);
}
:root[data-theme="dark"] .seg-pill { background: linear-gradient(135deg, #fecaca, #fca5a5); box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.seg-note { margin: 0 4px 12px; }

.swap-in { animation: swapIn .45s var(--ease) both; }
@keyframes swapIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

.ab-general, .ab-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 10px 30px var(--sh), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: abIn .6s var(--ease) backwards;
  animation-delay: calc(var(--k, 0) * 90ms + 80ms);
  transition: transform .4s var(--ease), border-color .3s ease, box-shadow .4s var(--ease);
}
.ab-general::before, .ab-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 70%; height: 90%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .32), transparent);
  opacity: .55;
  pointer-events: none;
  transition: opacity .4s ease, transform .6s var(--ease);
}
.ab-card:hover { transform: translateY(-4px); border-color: var(--ac); }
.ab-card:hover::before { opacity: .9; transform: translate(14%, 10%); }
@keyframes abIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.ab-general { display: block; margin-bottom: 16px; }
.ab-general h3 { margin: 0 0 8px; font-family: Fraunces, serif; font-size: 22px; }
.ab-general p { margin: 0 0 10px; line-height: 1.65; }
.ab-general p:last-child { margin-bottom: 0; }

.ab-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #d12a35, #a3131b);
  box-shadow: 0 8px 18px rgba(163, 19, 27, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .45s var(--ease);
}
.ab-card:hover .ab-ico { transform: rotate(-8deg) scale(1.08); }
:root[data-theme="dark"] .ab-ico { color: #3b0a0a; background: linear-gradient(135deg, #fecaca, #fca5a5); }

.ab-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: stretch; }
.ab-card { display: flex; flex-direction: column; gap: 14px; }
.ab-head { display: flex; gap: 14px; align-items: center; }
.ab-head h3 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; }

.ab-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.ab-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--in);
  border: 1px solid var(--bd);
  line-height: 1.5;
  transition: transform .3s var(--ease), background .3s ease;
}
.ab-list li:hover { transform: translateX(4px); }
.ab-list li b { flex: none; min-width: 30px; color: var(--ac); font-variant-numeric: tabular-nums; }
.ab-list li span { min-width: 0; overflow-wrap: anywhere; }

.sidebar.intro .nav-button:nth-child(8) { animation-delay: .84s; }

@media (prefers-reduced-motion: reduce) {
  .ab-general, .ab-card, .swap-in { animation: none; }
  .seg-pill, .ab-ico, .ab-list li { transition: none; }
}
@media (hover: none) {
  .ab-card:hover, .ab-list li:hover { transform: none; }
}

.ab-text p { margin: 0 0 12px; line-height: 1.7; }
.ab-text p:last-child { margin-bottom: 0; }
.ab-head h3 { margin: 0; }

.resv-card.ready {
  border-color: rgba(110, 231, 183, .6);
  background: linear-gradient(135deg, rgba(16, 185, 129, .16), var(--gl));
  animation: pop .5s var(--ease) backwards, readyGlow 2.4s ease-in-out .5s infinite;
}
@keyframes readyGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .0); }
  50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, .16); }
}
.resv-time.ready-chip { color: var(--ok); background: rgba(16, 185, 129, .16); border-color: rgba(16, 185, 129, .45); }
.ready-flag {
  align-self: flex-start; padding: 2px 10px; margin-bottom: 4px; border-radius: 99px;
  font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 4px 12px rgba(4, 120, 87, .35);
}
.ready-help { color: var(--ok); font-weight: 600; }
.resv-note.ready { color: var(--ok); background: rgba(16, 185, 129, .14); border-color: rgba(16, 185, 129, .4); }
.ready-panel { border-color: rgba(110, 231, 183, .55); }
@media (prefers-reduced-motion: reduce) { .resv-card.ready { animation: none; } }

.maincontent > * { flex-shrink: 0; }
.hdr { flex-shrink: 0; min-height: max-content; }

.lg, .lgx {
  height: auto;
  aspect-ratio: 528 / 500;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  overflow: visible;
}
.hdr .lgx { width: 104px; }
.hdr.pad { padding: 14px 22px; }

.ab-general, .ab-card { flex-shrink: 0; min-height: min-content; }
.ab-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; flex-shrink: 0; }
@media (min-width: 700px) {
  .ab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ab-list { grid-auto-rows: max-content; }
.ab-list li { flex-shrink: 0; min-height: min-content; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.sec-head h2, .sec-head h3 { margin: 0; }
.sec-head.sub-h { margin-top: 22px; }

.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acts > * { flex: 0 0 auto; }
.head-tools { gap: 10px; }

.danger-btn {
  color: var(--bad);
  background: transparent;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.danger-btn:hover:not(:disabled) { background: rgba(185, 28, 28, .12); }
:root[data-theme="dark"] .danger-btn { color: #fca5a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .danger-btn { color: #fca5a5; } }

.cnt {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--ac);
}
:root[data-theme="dark"] .cnt { color: #3b0a0a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cnt { color: #3b0a0a; } }

.trash-btn { display: inline-flex; align-items: center; gap: 8px; }

.chip {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, .25);
}
.chip.ok  { color: var(--ok); }
.chip.bad { color: var(--bad); }
.chip-note { display: block; margin-top: 4px; max-width: 220px; white-space: normal; }
.stu-table tr.is-banned td { background: rgba(185, 28, 28, .06); }
.stu-table td:last-child, .stu-table th:last-child { white-space: nowrap; }
.stu-table { min-width: 760px; }

.trash-panel { animation: pop .45s var(--ease) both; }
.trash-list { display: grid; gap: 10px; margin-top: 4px; }
.trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--in);
  border: 1px solid var(--bd);
  animation: rowIn .4s var(--ease) backwards;
  transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.trash-item:hover { transform: translateY(-2px); border-color: var(--ac); box-shadow: 0 8px 18px var(--sh); }
.trash-item:nth-child(2) { animation-delay: .06s; }
.trash-item:nth-child(3) { animation-delay: .12s; }
.trash-item:nth-child(n+4) { animation-delay: .18s; }
.trash-item.removing { animation: bookOut .35s ease forwards !important; pointer-events: none; }
.trash-info { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }

.lo-card.wide { width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.lo-card b { color: var(--tx); overflow-wrap: anywhere; }
.pop-l { display: block; margin: 10px 2px 4px; text-align: left; font-size: 13px; font-weight: 700; color: var(--mu); }
.lo-card input { width: 100%; text-align: left; }
.pop-err { min-height: 18px; margin: 6px 2px 10px; font-size: 13px; text-align: left; }
.lo-card p { margin-bottom: 16px; }
.lo-card .pop-err + button { margin-top: 2px; }
.ban-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.lo-card .ban-presets button { min-height: 40px; padding: 8px 4px; font-size: 13px; width: auto; margin: 0; }

.sec-head, .danger-btn, .trash-btn, .chip, .cnt, .acts button, .ban-presets button {
  transition: transform .3s var(--ease), background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease, opacity .3s ease, filter .3s ease;
}
.lo-card.wide, .lo-card { animation-timing-function: var(--ease); }
.stu-table tr { transition: background-color .35s ease, opacity .35s ease; }
.maincontent.enter .sec-head { animation: pop .5s var(--ease) backwards; }
.hdr .lgx { transition: transform .6s var(--ease); }
.hdr:hover .lgx { transform: rotate(-6deg) scale(1.05); }
.ab-card, .ab-general, .ab-list li, .hdr { transition-timing-function: var(--ease); }

@media (hover: none) {
  .hdr:hover .lgx { transform: none; }
  .trash-item:hover { transform: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .trash-panel, .trash-item, .maincontent.enter .sec-head { animation: none; }
  .hdr:hover .lgx { transform: none; }
}

.stu-table td { vertical-align: middle; }
.stu-table td:nth-child(5), .stu-table th:nth-child(5) { text-align: center; width: 210px; }
.stu-table .chip { display: inline-flex; align-items: center; justify-content: center; min-width: 176px; text-align: center; }
.stu-table .chip-note { max-width: 176px; margin-left: auto; margin-right: auto; text-align: center; }
.stu-table td:last-child, .stu-table th:last-child { width: 220px; }
.stu-table .acts { display: grid; grid-template-columns: repeat(2, 100px); gap: 8px; justify-content: start; }
.stu-table .acts button { width: 100%; min-width: 0; justify-content: center; text-align: center; white-space: nowrap; }

input.bad-date { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(185, 28, 28, .18); animation: shakeX .4s var(--ease); }
.err:not(:empty) { animation: errIn .35s var(--ease) both; }
@keyframes errIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes shakeX { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.seat-status:not(.has) { border-color: var(--bd); }
.room.ro .seat.o { cursor: not-allowed; }
.room:not(.ro) .seat, .room:not(.ro) .seat.o, .room:not(.ro) .seat.x { cursor: pointer; }
body:has(.stu-seat-lock) .seat.o:hover { transform: none; }

html { scroll-behavior: smooth; }
a, button, input, select, textarea, .g, .nav-button, .logout-button, .seat, .chip, tr, .toast, .book, .stat, .card {
  transition-property: transform, background-color, color, border-color, box-shadow, opacity, filter;
  transition-duration: .3s;
  transition-timing-function: var(--ease);
}
.maincontent { animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
tr { animation: rowIn .4s var(--ease) backwards; }
.lo-back { animation: fadeBack .25s ease both; }
@keyframes fadeBack { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .maincontent, tr, .lo-back, .err:not(:empty), input.bad-date { animation: none !important; }
  a, button, input, select, textarea, .g, .nav-button, .seat, .chip { transition-duration: .01ms; }
}

.lo-back { background: radial-gradient(120% 120% at 50% 0%, rgba(143, 16, 24, .32), rgba(20, 2, 5, .55)); -webkit-backdrop-filter: blur(10px) saturate(130%); backdrop-filter: blur(10px) saturate(130%); }
.lo-card { background: light-dark(rgba(255, 255, 255, .6), rgba(54, 12, 16, .5)); border: 1px solid light-dark(rgba(255, 255, 255, .7), rgba(255, 255, 255, .16)); -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%); }
.lo-card .lo-icon { animation: loIconPop .55s var(--ease) .08s both; }
.lo-card h3, .lo-card .lo-body, .lo-card p { animation: loRise .45s var(--ease) .12s both; }
.lo-card button { animation: loRise .45s var(--ease) both; }
.lo-card .lo-yes { animation-delay: .18s; }
.lo-card .lo-alt { animation-delay: .22s; }
.lo-card .lo-no { animation-delay: .26s; }
.lo-back.out .lo-card button, .lo-back.out .lo-card h3, .lo-back.out .lo-card .lo-body { animation: none; }
@keyframes loIconPop { from { opacity: 0; transform: scale(.4) rotate(-12deg); } 60% { transform: scale(1.1) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes loRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.resv-card.resv-out { transition: opacity .32s var(--ease), transform .32s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .lo-card .lo-icon, .lo-card h3, .lo-card .lo-body, .lo-card p, .lo-card button { animation: none !important; }
}

.avatar {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffd9bd, #ff8f5e);
  color: #5a1608;
  font: 800 14px Manrope, system-ui, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar .pres {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #34d58a;
  border: 2px solid light-dark(#fff1f2, #2a1013);
  box-shadow: 0 0 0 0 rgba(52, 213, 138, .6);
  animation: presPulse 2.6s ease-out infinite;
}
.avatar.xl { width: 76px; height: 76px; font-size: 26px; }
.avatar.xl .pres { width: 16px; height: 16px; right: 2px; bottom: 2px; }
@keyframes presPulse { 0% { box-shadow: 0 0 0 0 rgba(52, 213, 138, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(52, 213, 138, 0); } }

.profile-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--bd);
  background: var(--in);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.profile-card:hover .avatar { transform: scale(1.06); }
.pc-text { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.pc-text b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-text small { font-size: 12px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-more {
  flex: none;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--mu);
}
.pc-more:hover { background: var(--in); color: var(--tx); transform: none; box-shadow: none; }
.pc-more[aria-expanded="true"] { background: var(--in); color: var(--tx); }
.pc-more svg { transition: transform .35s var(--ease); }
.pc-more[aria-expanded="true"] svg { transform: rotate(90deg); }

.pmenu {
  position: fixed;
  z-index: 1100;
  min-width: 232px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  border-radius: 18px;
  background-color: light-dark(rgba(255, 255, 255, .72), rgba(44, 12, 16, .66));
  border: 1px solid light-dark(rgba(255, 255, 255, .85), rgba(255, 255, 255, .18));
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
  animation: pmIn .26s var(--ease) both;
}
.pmenu.up { transform-origin: 20% 100%; }
.pmenu.down { transform-origin: 20% 0; }
.pmenu.out { animation: pmOut .16s ease both; pointer-events: none; }
@keyframes pmIn { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes pmOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px) scale(.95); } }
.pm-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--tx);
  text-align: left;
  font-weight: 700;
  animation: pmItem .35s var(--ease) both;
}
.pm-item:nth-child(2) { animation-delay: .05s; }
.pm-item:hover, .pm-item:focus-visible { background: var(--in); transform: translateX(3px); box-shadow: none; filter: none; }
.pm-item.pm-out { color: light-dark(#b91c1c, #ff9aa1); }
.pm-item svg { flex: none; }
@keyframes pmItem { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

.set-hero { flex-wrap: wrap; }
.set-who { min-width: 0; flex: 1; }
.set-who h2 { margin: 0; }
.set-who p { overflow-wrap: anywhere; }
.set-photo { display: inline-flex; align-items: center; gap: 8px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}
.set-card { animation: setIn .55s var(--ease) calc(var(--k, 0) * 70ms) backwards; }
@keyframes setIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.set-card h3 { margin-bottom: 4px; }
.set-card > p { margin-bottom: 14px; }
.set-wide { grid-column: 1 / -1; }
.set-f { display: grid; gap: 5px; }
.set-l { font-size: 12px; font-weight: 700; color: var(--mu); }
.set-ro { display: grid; gap: 0; }
.set-ro > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
.set-ro > div + div { border-top: 1px solid var(--bd); }
.set-ro b { overflow-wrap: anywhere; text-align: right; }

.skin-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.skin-opt {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 10px 10px 14px;
  text-align: left;
  border-radius: 20px;
  background: var(--in);
  border: 2px solid var(--bd);
  color: var(--tx);
}
.skin-opt b, .skin-opt.on b { font-size: 15px; padding: 6px 4px 0; color: var(--tx); }
.skin-opt small { padding: 0 4px; color: var(--mu); font-size: 12px; font-weight: 600; }
.skin-opt.on { border-color: var(--ac); box-shadow: 0 10px 28px var(--sh); background: var(--in); color: var(--tx); }
.skin-opt.on::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  animation: loPop .4s var(--ease) both;
}
.skin-prev {
  position: relative;
  display: block;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  isolation: isolate;
}
.skin-prev i { position: absolute; border-radius: 12px; }
.sp-classic { background: linear-gradient(135deg, #fff1f2, #fecaca 60%, #e5e7eb); }
.sp-classic i:nth-child(1) { inset: 14px 46% 14px 14px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .9); }
.sp-classic i:nth-child(2) { inset: 14px 14px 14px 58%; background: rgba(185, 28, 28, .85); }
.sp-liquid { background: #1a0d08; }
.sp-liquid::before, .sp-liquid::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.sp-liquid::before { width: 90px; height: 90px; left: -10px; top: -30px; background: radial-gradient(circle, #ff9a2e, transparent 68%); animation: spDrift 7s ease-in-out infinite alternate; }
.sp-liquid::after { width: 100px; height: 100px; right: -14px; bottom: -40px; background: radial-gradient(circle, #ff4d2a, transparent 68%); animation: spDrift 9s ease-in-out infinite alternate-reverse; }
.sp-liquid i { background: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sp-liquid i:nth-child(1) { inset: 14px 46% 14px 14px; }
.sp-liquid i:nth-child(2) { inset: 14px 14px 14px 58%; }
@keyframes spDrift { from { translate: 0 0; } to { translate: 40px 24px; } }

.liquid-bg { display: none; }

:root[data-skin="liquid"] {
  --lq-b1: light-dark(#f8e6d6, #150b07);
  --lq-b2: light-dark(#f3cdb0, #2a130c);
  --lq-hi: light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .2));
  --lq-edge: light-dark(rgba(255, 255, 255, .8), rgba(255, 255, 255, .2));
  --lq-fill: light-dark(rgba(255, 255, 255, .2), rgba(20, 11, 8, .46));
  --gl: var(--lq-fill);
  --bd: var(--lq-edge);
  --in: light-dark(rgba(255, 255, 255, .42), rgba(255, 255, 255, .09));
}
:root[data-skin="liquid"] body { background: linear-gradient(135deg, var(--lq-b1), var(--lq-b2)) fixed; }
:root[data-skin="liquid"] .blob { display: none; }
:root[data-skin="liquid"] .liquid-bg { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.lq {
  position: absolute;
  display: block;
  width: 62vmax;
  height: 62vmax;
  border-radius: 50%;
  will-change: translate, scale, opacity;
  animation: lqIn 2s var(--ease) both, lqDrift var(--t, 24s) ease-in-out 2s infinite alternate;
}
.l1 { --t: 23s; --dx: 34vw; --dy: 22vh; left: -20vmax; top: -22vmax; background: radial-gradient(circle, light-dark(rgba(255, 160, 50, .75), rgba(255, 140, 35, .6)), transparent 66%); }
.l2 { --t: 29s; --dx: -30vw; --dy: -26vh; right: -24vmax; bottom: -26vmax; background: radial-gradient(circle, light-dark(rgba(255, 96, 52, .6), rgba(255, 78, 30, .5)), transparent 66%); animation-delay: .2s, 2.2s; }
.l3 { --t: 31s; --dx: 26vw; --dy: -30vh; left: 6vw; bottom: -34vmax; width: 52vmax; height: 52vmax; background: radial-gradient(circle, light-dark(rgba(214, 120, 60, .55), rgba(140, 66, 24, .75)), transparent 66%); animation-delay: .4s, 2.4s; }
.l4 { --t: 27s; --dx: -34vw; --dy: 24vh; right: 4vw; top: -30vmax; width: 50vmax; height: 50vmax; background: radial-gradient(circle, light-dark(rgba(198, 40, 50, .4), rgba(198, 40, 50, .5)), transparent 66%); animation-delay: .6s, 2.6s; }
.l5 { --t: 21s; --dx: 22vw; --dy: 18vh; left: 34vw; top: 26vh; width: 42vmax; height: 42vmax; background: radial-gradient(circle, light-dark(rgba(255, 255, 255, .9), rgba(255, 205, 140, .22)), transparent 66%); animation-delay: .8s, 2.8s; }
@keyframes lqIn { from { opacity: 0; scale: .35; } to { opacity: 1; scale: 1; } }
@keyframes lqDrift {
  0% { translate: 0 0; }
  50% { translate: var(--dx) var(--dy); }
  100% { translate: calc(var(--dx) * -.5) calc(var(--dy) * .7); }
}

:root[data-skin="liquid"] .g,
:root[data-skin="liquid"] .lo-card,
:root[data-skin="liquid"] .pmenu,
:root[data-skin="liquid"] .toast {
  background-color: var(--lq-fill);
  background-image:
    radial-gradient(130% 100% at 0% 0%, var(--lq-hi), transparent 52%),
    linear-gradient(160deg, light-dark(rgba(255, 255, 255, .32), rgba(255, 255, 255, .08)), light-dark(rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)));
  border: 1px solid var(--lq-edge);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -1px 0 rgba(255, 255, 255, .1),
    inset 1px 0 0 rgba(255, 255, 255, .12),
    0 22px 46px -14px rgba(20, 6, 2, .5);
}
:root[data-skin="liquid"] .g .g {
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 10px 24px -12px rgba(20, 6, 2, .4);
}
:root[data-skin="liquid"] .lo-back {
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 120, 40, .18), rgba(15, 4, 2, .55));
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
}
:root[data-skin="liquid"] button:not(.pri):not(.on):not(.lo-yes):not(.linkbtn):not(.password-toggle):not(.nav-button):not(.pm-item):not(.pc-more):not(.skin-opt):not(.seg-b),
:root[data-skin="liquid"] input,
:root[data-skin="liquid"] select,
:root[data-skin="liquid"] textarea {
  background-color: var(--in);
  border-color: var(--lq-edge);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
:root[data-skin="liquid"] .nav-button:not(.on) { background-color: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
:root[data-skin="liquid"] .nav-button:not(.on):hover { background-color: var(--in); }
:root[data-skin="liquid"] .nav-button.on,
:root[data-skin="liquid"] button.pri,
:root[data-skin="liquid"] .lo-yes {
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .28), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 24px -8px rgba(185, 28, 28, .6);
}
:root[data-skin="liquid"] .profile-card { background-color: var(--in); border-color: var(--lq-edge); }
:root[data-skin="liquid"] .avatar .pres { border-color: light-dark(#f6d8c3, #2a130c); }
:root[data-skin="liquid"] .skin-opt { -webkit-backdrop-filter: none; backdrop-filter: none; }

html.theme-fade .liquid-bg { transition: opacity .8s ease; }

.sidebar.intro .nav-button:nth-child(9) { animation-delay: .96s; }

@media (prefers-reduced-motion: reduce) {
  .lq, .sp-liquid::before, .sp-liquid::after, .avatar .pres, .set-card, .pmenu, .pm-item { animation: none !important; }
  .lq { opacity: 1; }
}
@media (max-width: 700px), (pointer: coarse) {
  :root[data-skin="liquid"] .g,
  :root[data-skin="liquid"] .lo-card,
  :root[data-skin="liquid"] .pmenu,
  :root[data-skin="liquid"] .toast { -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
  :root[data-skin="liquid"] .g .g { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

/* =====================================================================
   SETTINGS REDESIGN  (glass rows, Customize button, switches, glide)
   ===================================================================== */
:root { --glide: linear-gradient(120deg, #8f161d, #dc2626, #b91c1c, #8f161d); }
:root[data-skin="liquid"] { --glide: linear-gradient(120deg, #f26b3a, #e5484d, #f59a6b, #d9363e, #f26b3a); }
@keyframes glideX { to { background-position: 300% 0; } }

.set-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.set-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.set-list {
  background: var(--in);
  border: 1px solid var(--bd);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 14px;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 56px;
  border-bottom: 1px solid var(--bd);
  transition: background .25s ease;
}
.set-row:last-child { border-bottom: 0; }
.set-row:hover { background: var(--in); }
.set-row p { flex: 1; margin: 0; font-weight: 700; min-width: 0; }
.set-row small { display: block; margin-top: 2px; color: var(--mu); font-weight: 600; font-size: 12px; }
.set-lbl { flex: 0 0 34%; max-width: 150px; color: var(--mu); font-weight: 700; font-size: 14px; }
.set-val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.set-hint { margin: 10px 2px 0; }

.set-edit { display: none; margin-top: 14px; }
.set-profile.editing .set-edit { display: block; animation: setIn .45s var(--ease) backwards; }
.set-profile.editing .set-view { display: none; }
.set-edit-actions { display: flex; gap: 10px; }
.set-edit-actions > * { flex: 1; }

:root .set-profile button.set-custom {
  background-image: var(--glide);
  background-size: 300% 100%;
  animation: glideX 6s linear infinite;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  border: 0;
}

.sw { position: relative; width: 52px; height: 32px; flex: none; display: block; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: rgba(120, 125, 160, .38); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18); transition: background .35s ease; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.sw input:checked + span { background-image: var(--glide); background-size: 300% 100%; animation: glideX 6s linear infinite; }
.sw input:checked + span::after { transform: translateX(20px); }
.sw input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 40%, transparent); }

/* Reduce motion: finish every animation instantly (keeps end states, so nothing gets stuck on screen) */
html.no-motion *, html.no-motion *::before, html.no-motion *::after {
  animation-duration: .001ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
html.no-motion .lq { opacity: 1; }

/* Login / register gliding panel: liquid glass colors (Classic keeps BSU red) */
:root[data-skin="liquid"] .overlay { background: linear-gradient(160deg, #e0612f, #c93a3f 55%, #8f2418); }
:root[data-skin="liquid"] .w1 { background: #7a2414; }
:root[data-skin="liquid"] .w2 { background: #ff9a4d; }
:root[data-skin="liquid"] .w3 { background: #e5484d; }
:root[data-skin="liquid"] .w4 { background: rgba(255, 205, 160, .8); }
:root[data-skin="liquid"] .auth-card.slider form button.pri {
  background: linear-gradient(145deg, rgba(255, 255, 255, .28), transparent 55%), linear-gradient(90deg, #c2410c, #e5484d, #f59a6b);
}


/* ---- Settings v2: glass profile (no red band), segmented theme, tap rows ---- */
.set-profile .set-top { background: none; color: inherit; margin-bottom: 0; }
.set-who h2, .set-who .mu { color: inherit; }
.set-who .mu { color: var(--mu); }
:root .set-profile .set-photo {
  background: var(--in);
  color: var(--tx);
  border: 1px solid var(--bd);
  box-shadow: none;
}
.set-card .set-h { margin: 0 0 12px; font: 700 12px Manrope, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.set-card .seg + .set-list { margin-top: 12px; }
.set-view { animation: setIn .4s var(--ease) backwards; }

.set-tap { cursor: pointer; user-select: none; }
.set-tap:hover { background: var(--in); }
.set-tap:active { transform: scale(.995); }
.set-tap:focus-visible { outline: 2px solid var(--ac); outline-offset: -2px; }
.set-chev { flex: none; opacity: .55; transition: transform .35s var(--ease), opacity .25s; }
.set-tap:hover .set-chev { opacity: 1; transform: translateX(2px); }
.set-tap.open .set-chev { transform: rotate(90deg); opacity: 1; }
.set-chev[hidden], .set-badge[hidden] { display: none; }
.set-badge { flex: none; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--in); border: 1px solid var(--bd); color: var(--mu); }
.set-danger b { color: light-dark(#b91c1c, #ff9aa1); }

.set-pw { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.set-pw > div { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .45s; }
.set-pw.open { grid-template-rows: 1fr; }
.set-pw.open > div { visibility: visible; transition-delay: 0s; }
.set-pwform { padding: 6px 16px 16px; border-bottom: 1px solid var(--bd); }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--in); border: 1px solid var(--bd); border-radius: 16px; padding: 4px; }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 12px;
  background-color: var(--ac);
  background-image: var(--glide);
  background-size: 300% 100%;
  animation: glideX 6s linear infinite;
  box-shadow: 0 4px 14px -3px rgba(0, 0, 0, .35);
  transition: transform .5s cubic-bezier(.3, 1.2, .4, 1);
}
.seg[data-i="1"] .seg-thumb { transform: translateX(100%); }
.seg .seg-b {
  position: relative; z-index: 1;
  background: none; border: 0; box-shadow: none; filter: none;
  padding: 11px 8px; border-radius: 12px;
  font-weight: 700; color: var(--tx);
  transition: color .3s ease;
}
.seg .seg-b:hover { transform: none; box-shadow: none; filter: none; }
.seg .seg-b.on { background: none; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

.sw input { padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.no-glide .set-custom, html.no-glide .sw input:checked + span, html.no-glide .seg-thumb { animation: none; }


/* ---- Settings v3: fill cards, equal buttons, smooth swaps ---- */
.settings-grid { align-items: stretch; margin-top: 14px; }
.settings-grid > .set-card { display: flex; flex-direction: column; }
.settings-grid > .set-card .set-list { flex: 1; display: flex; flex-direction: column; }
.settings-grid > .set-card .set-list > .set-row { flex: 1 1 auto; }
.set-actions { margin-left: auto; min-width: min(100%, 300px); }
.set-actions > * { flex: 1 1 0; justify-content: center; white-space: nowrap; }
.set-view, .set-edit { transition: opacity .2s ease, transform .2s ease; }
.set-view.leaving, .set-edit.leaving { opacity: 0; transform: translateY(-8px); }
.set-card .set-row { animation: rowIn .5s var(--ease) calc(var(--k, 0) * 70ms + var(--r, 0) * 55ms + 120ms) backwards; }
.set-list > .set-row:nth-child(1) { --r: 0; } .set-list > .set-row:nth-child(2) { --r: 1; }
.set-list > .set-row:nth-child(3) { --r: 2; } .set-list > .set-row:nth-child(4) { --r: 3; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.set-still, .set-still .set-row, .set-still .set-view { animation: none !important; }
.set-edit .row { gap: 10px; }
@media (max-width: 600px) { .set-actions { min-width: 100%; margin-left: 0; } }


/* ---- Admin account recovery ---- */
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 4px; }
.rec-head .set-h { margin: 0; }
.rec-search { flex: 1 1 240px; max-width: 380px; min-width: 0; }
.rec-note { margin: 6px 0 14px; }
.rec-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.rec-col { display: flex; flex-direction: column; min-width: 0; }
.rec-title { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.rec-title span { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: var(--in); border: 1px solid var(--bd); color: var(--mu); }
.rec-list { margin-top: 0; flex: 1; display: flex; flex-direction: column; max-height: min(58vh, 520px); overflow: auto; overscroll-behavior: contain; }
.rec-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--bd); transition: opacity .25s ease, transform .25s ease, background .25s ease; animation: rowIn .45s var(--ease) backwards; }
.rec-row:last-child { border-bottom: 0; }
.rec-row:hover { background: var(--in); }
.rec-row[hidden] { display: none; }
.rec-row.leaving { opacity: 0; transform: translateX(16px); }
.rec-info { flex: 1; min-width: 0; }
.rec-info b { display: block; overflow-wrap: anywhere; }
.rec-info span { display: block; font-size: 12.5px; color: var(--mu); font-weight: 600; overflow-wrap: anywhere; }
.rec-btn { flex: none; white-space: nowrap; }
.rec-empty { flex: 1; display: grid; place-items: center; padding: 22px 16px; color: var(--mu); font-weight: 600; text-align: center; }
.rec-code { font: 700 28px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; padding: 14px 10px; margin: 0 0 16px; border-radius: 14px; background: var(--in); border: 1px solid var(--bd); user-select: all; overflow-wrap: anywhere; text-align: center; animation: loPop .4s var(--ease) both; }
.set-still .rec-row { animation: none; }
@media (max-width: 900px) { .rec-cols { grid-template-columns: 1fr; } .rec-list { max-height: 46vh; } }
@media (max-width: 480px) {
  .rec-row { flex-wrap: wrap; padding: 12px; }
  .rec-btn { flex: 1 1 100%; }
  .rec-search { max-width: none; flex-basis: 100%; }
  .rec-code { font-size: 22px; }
}

/* ---- Liquid glass, light mode: readable sidebar, role tag and page headers ----
   (the sidebar and .hdr were styled for dark red backgrounds, so their white text vanished on light glass) */
:root[data-skin="liquid"] .nav-button,
:root[data-skin="liquid"] .logout-button { color: light-dark(var(--tx), #fff); }
:root[data-skin="liquid"] .nav-button.on { color: #3b0a0a; }
:root[data-skin="liquid"] .nav-button:not(.on):hover { background-color: light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .14)); }
:root[data-skin="liquid"] .nav-icon { opacity: 1; }
:root[data-skin="liquid"] .user-tag {
  color: light-dark(var(--tx), #fff);
  background-color: light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .08));
  border-color: light-dark(rgba(59, 10, 10, .22), rgba(255, 255, 255, .25));
  font-weight: 700;
}
:root[data-skin="liquid"] .hdr { color: light-dark(var(--tx), #fff); }
:root[data-skin="liquid"] .hdr h2 { color: light-dark(var(--tx), #fff); }
:root[data-skin="liquid"] .hdr .mu { color: light-dark(var(--mu), rgba(255, 255, 255, .8)); }
:root[data-skin="liquid"] .hdr .small, :root[data-skin="liquid"] .hdr p { color: light-dark(var(--mu), rgba(255, 255, 255, .8)); }

/* ---- Settings v4: account card hugs its rows, mini buttons, smooth swaps ---- */
.settings-grid > .set-acct .set-list { flex: 0 0 auto; }
.settings-grid > .set-acct .set-list > .set-row { flex: 0 0 auto; }
.rec-mini { flex: none; white-space: nowrap; padding: 8px 12px; min-height: 38px; font-size: 13px; }
.set-card, .set-list, .set-row, .set-badge, .rec-row { transition-property: background-color, border-color, box-shadow, color, opacity, transform; transition-duration: .35s; transition-timing-function: var(--ease); }
@media (max-width: 480px) { .rec-mini { flex: 1 1 calc(50% - 6px); } .rec-row .rec-btn:not(.rec-mini) { flex: 1 1 calc(50% - 6px); } }
@media (max-width: 480px) { .rec-info { flex: 1 1 100%; } }

/* ---- Settings v5: two even columns, full-width account, richer liquid glass ---- */
.settings-grid > .set-acct { grid-column: 1 / -1; }
.settings-grid > .set-acct .set-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.settings-grid > .set-acct .set-list > .set-row { border-bottom: 0; }
.settings-grid > .set-acct .set-list > .set-row + .set-row { border-left: 1px solid var(--bd); }
@media (max-width: 600px) { .settings-grid > .set-acct .set-list > .set-row + .set-row { border-left: 0; border-top: 1px solid var(--bd); } }
.settings-grid > .set-card:not(.set-acct) .set-list { flex: 1; }

:root[data-skin="liquid"] .g,
:root[data-skin="liquid"] .lo-card {
  position: relative;
  -webkit-backdrop-filter: blur(28px) saturate(185%) brightness(1.04);
  backdrop-filter: blur(28px) saturate(185%) brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -1px 0 rgba(255, 255, 255, .12),
    inset 0 0 28px rgba(255, 255, 255, .10),
    0 18px 44px -14px rgba(120, 40, 20, .35);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background-color .45s ease, border-color .45s ease;
}
:root[data-skin="liquid"] .set-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 65%, rgba(255, 255, 255, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 1px;
}
:root[data-skin="liquid"] .set-card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 26px 54px -16px rgba(120, 40, 20, .42); }
:root[data-skin="liquid"] .set-list { background: light-dark(rgba(255, 255, 255, .42), rgba(255, 255, 255, .07)); -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
:root[data-skin="liquid"] .set-row:hover { background: light-dark(rgba(255, 255, 255, .55), rgba(255, 255, 255, .1)); }
:root[data-skin="liquid"] .seg-thumb { box-shadow: 0 8px 20px -6px rgba(229, 72, 77, .6), inset 0 1px 0 rgba(255, 255, 255, .55); }
:root[data-skin="liquid"] .sw span::after { box-shadow: 0 3px 8px rgba(0, 0, 0, .3), inset 0 -2px 3px rgba(0, 0, 0, .08); }
@media (hover: none) { :root[data-skin="liquid"] .set-card:hover { transform: none; } }
@media (max-width: 600px) { :root[data-skin="liquid"] .g, :root[data-skin="liquid"] .lo-card { -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); } }


/* ---- Profile photo cropper ---- */
.crop-card { text-align: center; }
.crop-vp { --v: min(300px, calc(100vw - 88px), calc(100dvh - 330px)); position: relative; width: var(--v); height: var(--v); min-width: 140px; min-height: 140px; margin: 0 auto 14px; overflow: hidden; border-radius: 22px; background: #1b0b0d; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 14px 34px -12px rgba(0, 0, 0, .45); }
.crop-vp.drag { cursor: grabbing; }
.crop-vp img { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; width: auto; height: auto; transform-origin: center; pointer-events: none; will-change: transform; }
.crop-vp::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent calc(50% - 1px), rgba(15, 4, 6, .6) calc(50% + 1px)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.crop-vp::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 0 4px 16px; font-weight: 800; color: var(--mu); }
.crop-zoom input { flex: 1; width: auto; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; accent-color: var(--ac); height: 28px; cursor: pointer; }
@media (max-height: 520px) { .crop-card p { display: none; } .crop-vp { --v: min(220px, calc(100dvh - 200px)); } }


/* ---- Students: table turns into cards when its panel is narrow (any device) ---- */
.stu-panel { container-type: inline-size; container-name: stu; }
@container stu (max-width: 780px) {
  .stu-panel .tw { overflow: visible; }
  .stu-table, .stu-table tbody { display: block; min-width: 0 !important; width: 100%; }
  .stu-table .stu-head { display: none; }
  .stu-table tr.stu-row {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px;
    padding: 14px; margin: 0 0 12px; border: 1px solid var(--bd); border-radius: 18px; background: var(--in);
    animation: rowIn .45s var(--ease) backwards;
  }
  .stu-table tr.stu-row:last-child { margin-bottom: 0; }
  .stu-table tr.stu-row.is-banned { background: rgba(185, 28, 28, .08); border-color: rgba(185, 28, 28, .3); }
  .stu-table tr.stu-row td, .stu-table tr.is-banned td { display: block; padding: 0; border: 0; background: none; width: auto !important; text-align: left !important; min-width: 0; overflow-wrap: anywhere; white-space: normal !important; }
  .stu-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); }
  .stu-table td:first-child { grid-column: 1 / -1; font-size: 16px; font-weight: 800; }
  .stu-table td:first-child::before { display: none; }
  .stu-table td:nth-child(5), .stu-table td:last-child { grid-column: 1 / -1; }
  .stu-table .chip { min-width: 0; max-width: 100%; justify-content: flex-start; text-align: left; }
  .stu-table .chip-note { max-width: none; margin: 4px 0 0; text-align: left; }
  .stu-table .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .stu-table .acts button { min-height: 44px; }
}
@container stu (max-width: 340px) { .stu-table tr.stu-row { grid-template-columns: 1fr; } }
@container stu (max-width: 780px) {
  .stu-table .acts { justify-content: stretch; }
  .stu-table td:last-child::before { display: none; }
}
@container stu (max-width: 780px) {
  .stu-table td .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; width: 100%; }
  .stu-table td .acts button { width: 100%; }
}
@container stu (min-width: 520px) and (max-width: 780px) {
  .stu-table tr.stu-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stu-table td:nth-child(5) { grid-column: auto; }
  .stu-table td:nth-child(5) .chip { white-space: normal; text-align: left; }
  .stu-table td:last-child { grid-column: 1 / -1; }
  .stu-table td:last-child .acts { max-width: 360px; }
}