/* ==========================================================================
   西西亚艺术学院 · 学生宿舍
   A quiet, paper-and-ink dormitory system.
   ========================================================================== */

:root {
  --bg: #efe5d2;
  --bg-deep: #e5d7bf;
  --panel: #f9f2e3;
  --panel-soft: #f1e6d1;
  --ink: #221d16;
  --ink-2: #554b3c;
  --ink-3: #87795f;
  --line: #d8c7a9;
  --line-soft: #e8dcc4;
  --line-strong: #bda57c;
  --vermilion: #7c2f2a;
  --vermilion-soft: #a35a4b;
  --gold: #a4803f;
  --gold-soft: #c9ac74;
  --green: #2f5d50;
  --indigo: #4a4a8c;
  --shadow: 0 34px 80px -50px rgba(47, 32, 12, 0.55);
  --shadow-soft: 0 18px 40px -32px rgba(47, 32, 12, 0.45);
  --radius: 10px;
  --serif: "Cormorant Garamond", "EB Garamond", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "STSong", "SimSun", serif;
  --sans: "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "STSong", "SimSun", serif;
  --mono: "Courier New", Courier, "Nimbus Mono PS", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 760px at 92% -12%, rgba(168, 135, 76, 0.16), transparent 64%),
    radial-gradient(900px 620px at -6% 24%, rgba(165, 55, 44, 0.06), transparent 60%),
    linear-gradient(180deg, #f7f2e7 0%, #f2ecdf 48%, #f5f0e5 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: rgba(168, 135, 76, 0.28);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* --------------------------------------------------------------------------
   基础组件
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.mono {
  font-family: var(--mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(168, 135, 76, 0.55);
  outline-offset: 2px;
}

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #f8f2e5;
  box-shadow: inset 0 0 0 1px rgba(201, 171, 114, 0.22), 0 10px 24px -18px rgba(29, 27, 23, 0.9);
}

.btn.primary:hover {
  background: #2b2823;
  border-color: #2b2823;
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.24);
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--ink);
  color: var(--ink);
}

.btn.danger {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fdf6ec;
}

.btn.danger:hover {
  background: #8e2c23;
  border-color: #8e2c23;
}

.btn.small {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.18s ease;
}

.text-btn:hover {
  color: var(--vermilion);
}

.text-btn.danger {
  color: var(--vermilion-soft);
}

.text-btn.danger:hover {
  color: var(--vermilion);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
  min-width: 0;
}

.field > span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b0a793;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(168, 135, 76, 0.12);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.field textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.7;
}

.field.compact {
  margin-bottom: 0;
  gap: 5px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  margin: -4px 0 12px;
  padding: 8px 11px;
  border-left: 2px solid var(--vermilion);
  background: rgba(165, 55, 44, 0.06);
  font-size: 11.5px;
  color: var(--vermilion);
  line-height: 1.6;
}

.form-error[hidden] {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(168, 135, 76, 0.32);
  border-radius: 999px;
  background: rgba(168, 135, 76, 0.08);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold);
  white-space: nowrap;
}

.badge.muted {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink-3);
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c, var(--ink));
  color: var(--cf, #fdf7ea);
  font-family: var(--serif);
  font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar.is-dashed {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

.tag.gold {
  border-color: rgba(168, 135, 76, 0.3);
  color: var(--gold);
  background: rgba(168, 135, 76, 0.07);
}

.tag.name {
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   登录 / 注册
   -------------------------------------------------------------------------- */

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 4vw, 56px);
  overflow: hidden;
  color: #ece2cf;
  background:
    radial-gradient(1000px 620px at 78% 10%, rgba(168, 135, 76, 0.2), transparent 60%),
    radial-gradient(720px 520px at 8% 88%, rgba(90, 50, 40, 0.35), transparent 65%),
    linear-gradient(150deg, #1d2028 0%, #171a21 55%, #14161c 100%);
}

.auth-art::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201, 171, 114, 0.14);
  border-radius: 4px;
  pointer-events: none;
}

.auth-art::after {
  content: "";
  position: absolute;
  right: -180px;
  top: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(201, 171, 114, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(201, 171, 114, 0.025), 0 0 0 160px rgba(201, 171, 114, 0.018);
  pointer-events: none;
}

.art-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.art-brand {
  position: relative;
  z-index: 2;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 171, 114, 0.55);
  border-radius: 3px;
  font-family: var(--serif);
  font-size: 23px;
  color: #e9d9b7;
  background: rgba(201, 171, 114, 0.06);
  box-shadow: inset 0 0 0 4px rgba(19, 21, 27, 0.9), inset 0 0 0 5px rgba(201, 171, 114, 0.18);
}

.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.brand-words b {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #efe5d2;
}

.brand-words i {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.22em;
  color: rgba(201, 171, 114, 0.72);
}

.art-copy {
  position: relative;
  z-index: 2;
  margin-top: clamp(26px, 6vh, 64px);
  max-width: 480px;
}

.art-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 4.5vw, 66px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.02em;
  color: #f0e6d3;
}

.art-lede {
  margin: 22px 0 0;
  font-size: 12.5px;
  line-height: 2.1;
  letter-spacing: 0.03em;
  color: rgba(236, 226, 207, 0.58);
}

.art-elevation {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  min-height: 150px;
  max-height: 320px;
  margin: 12px auto 10px;
  color: #c8ad7b;
  opacity: 0.72;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.25));
}

.art-colleges {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.art-college {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(201, 171, 114, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(238, 228, 208, 0.7);
}

.art-college i {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--c);
  color: var(--cf, #fdf8ee);
  font-family: var(--serif);
  font-size: 10px;
  font-style: normal;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.art-meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: rgba(238, 228, 208, 0.36);
}

.art-meta i {
  width: 3px;
  height: 3px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.55;
}

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px clamp(22px, 4vw, 56px) 46px;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(201, 186, 160, 0.24);
  border-radius: 6px;
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 32px 32px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 248, 241, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.auth-tabs {
  position: relative;
  display: flex;
  gap: 28px;
  margin-bottom: 24px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-tab:hover {
  color: var(--ink-2);
}

.auth-tab.is-active {
  color: var(--ink);
}

.tab-ink {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 32px;
  height: 2px;
  background: var(--vermilion);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.auth-tabs[data-tab="register"] .tab-ink {
  transform: translateX(68px);
}

.auth-form h2 {
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.form-sub {
  margin: 0 0 22px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.auth-form .btn.block {
  margin-top: 4px;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 10px;
  color: var(--ink-3);
}

.auth-foot a {
  color: var(--gold);
  transition: color 0.18s ease;
}

.auth-foot a:hover {
  color: var(--vermilion);
}

.auth-copyright {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(140, 130, 115, 0.7);
}

.college-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.college-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.college-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.college-option:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.65);
}

.college-option:has(input:checked) {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 7%, #fffdf8);
  box-shadow: inset 0 0 0 1px var(--c);
}

.college-option:has(input:focus-visible) {
  outline: 2px solid rgba(168, 135, 76, 0.5);
  outline-offset: 2px;
}

.college-seal {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c);
  color: var(--cf, #fdf8ee);
  font-family: var(--serif);
  font-size: 12.5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.college-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.college-text b {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.college-text i {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   应用外壳 / 顶栏
   -------------------------------------------------------------------------- */

.app-shell {
  position: relative;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(222, 211, 189, 0.82);
  background: rgba(246, 241, 230, 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 13px 28px;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 19px;
  border-color: rgba(168, 135, 76, 0.5);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 3px rgba(251, 248, 241, 0.9), inset 0 0 0 4px rgba(168, 135, 76, 0.16);
}

.brand-words .brand-ish,
.topbar .brand-words b {
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--ink);
}

.brand-words i {
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.bell-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 0 2px #f6f1e6;
}

.bell-dot[hidden] {
  display: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.chip-seal {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  color: var(--cf, #fdf8ee);
  font-family: var(--serif);
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.chip-text b {
  font-size: 11.5px;
  font-weight: 600;
}

.chip-text i {
  font-style: normal;
  font-size: 8.5px;
  color: var(--ink-3);
}

.page {
  position: relative;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 28px 28px 56px;
}

/* --------------------------------------------------------------------------
   门禁卡
   -------------------------------------------------------------------------- */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 22px;
  align-items: stretch;
}

.pass-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 442px;
  height: 100%;
  padding: 25px 27px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #efe7d6;
  background:
    radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--c, #a8874c) 34%, transparent) 0%, transparent 56%),
    linear-gradient(142deg, #20242d 0%, #161920 52%, #1f232b 100%);
  box-shadow: 0 36px 70px -40px rgba(18, 17, 14, 0.8), inset 0 0 0 1px rgba(201, 171, 114, 0.28);
}

.pass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(201, 171, 114, 0.045) 0 1px, transparent 1px 15px);
  opacity: 0.7;
  pointer-events: none;
}

.pass-card::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(201, 171, 114, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(201, 171, 114, 0.035), 0 0 0 68px rgba(201, 171, 114, 0.02);
  pointer-events: none;
}

.pass-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.035) 45%, transparent 60%);
  pointer-events: none;
}

.pass-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pass-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seal-mini {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 171, 114, 0.45);
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 14px;
  color: #e5d3ae;
  box-shadow: inset 0 0 0 3px #1b1e25, inset 0 0 0 4px rgba(201, 171, 114, 0.2);
}

.pass-brand b {
  display: block;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ede2cd;
}

.pass-brand i {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.18em;
  color: rgba(201, 171, 114, 0.55);
}

.pass-kind {
  padding-left: 16px;
  border-left: 1px solid rgba(201, 171, 114, 0.22);
  text-align: right;
}

.pass-kind span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(239, 231, 214, 0.72);
}

.pass-kind i {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 6.5px;
  letter-spacing: 0.2em;
  color: rgba(201, 171, 114, 0.5);
}

.pass-mid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-top: auto;
  padding: 20px 0 26px;
}

.pass-chip {
  position: relative;
  grid-column: 1 / -1;
  width: 38px;
  height: 27px;
  margin-bottom: 2px;
  border: 1px solid rgba(84, 62, 22, 0.35);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 248, 220, 0.55), transparent 40%),
    linear-gradient(135deg, #d6b97c, #a8874c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 3px 8px -4px rgba(0, 0, 0, 0.5);
}

.pass-chip::before,
.pass-chip::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 1px;
  background: rgba(70, 52, 18, 0.35);
}

.pass-chip::before {
  top: 9px;
}

.pass-chip::after {
  bottom: 9px;
}

.pass-label {
  display: block;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(201, 171, 114, 0.62);
}

.pass-name {
  margin: 5px 0 9px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.03em;
  color: #f2e8d6;
}

.pass-college {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  border: 1px solid rgba(201, 171, 114, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(239, 231, 214, 0.7);
}

.pass-college i {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c, var(--gold));
  color: var(--cf, #fff);
  font-family: var(--serif);
  font-size: 8px;
  font-style: normal;
}

.pass-room {
  min-width: 128px;
  padding-bottom: 3px;
  text-align: right;
}

.pass-room strong {
  display: block;
  margin: 4px 0 2px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.2vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #d9c193;
}

.pass-room strong.is-empty {
  color: rgba(239, 231, 214, 0.32);
}

.pass-room span {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(239, 231, 214, 0.48);
}

.pass-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 34px);
  padding-top: 16px;
  border-top: 1px solid rgba(201, 171, 114, 0.18);
}

.pass-meta {
  min-width: 0;
}

.pass-meta span {
  display: block;
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: rgba(239, 231, 214, 0.4);
}

.pass-meta b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(239, 231, 214, 0.88);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pass-meta.is-right {
  margin-left: auto;
  text-align: right;
}

.pass-meta.is-right b {
  color: rgba(201, 171, 114, 0.72);
  font-size: 10.5px;
}

.pass-stamp {
  position: absolute;
  right: 27px;
  bottom: 78px;
  z-index: 2;
  padding: 3px 8px 3px 10px;
  border: 1px solid rgba(201, 171, 114, 0.38);
  color: rgba(201, 171, 114, 0.6);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.25em;
  transform: rotate(-7deg);
  pointer-events: none;
}

.pass-veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 0;
  background: rgba(14, 16, 20, 0.5);
  backdrop-filter: blur(4px);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
}

.pass-veil:hover {
  background: rgba(14, 16, 20, 0.42);
}

.veil-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 34px;
  border: 1px dashed rgba(201, 171, 114, 0.45);
  border-radius: 12px;
  background: rgba(24, 26, 32, 0.55);
}

.veil-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border: 1px solid rgba(201, 171, 114, 0.4);
  border-radius: 50%;
  font-size: 17px;
  color: var(--gold-soft);
}

.veil-inner b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #f0e6d4;
}

.veil-inner small {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(239, 231, 214, 0.45);
}

.pass-card.is-locked .pass-name,
.pass-card.is-locked .pass-room {
  filter: blur(1.5px);
}

/* --------------------------------------------------------------------------
   侧栏 · 新生入住 / 我的宿舍
   -------------------------------------------------------------------------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.side-panel {
  display: flex;
  flex-direction: column;
  padding: 23px 23px 19px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.panel-lede {
  margin: 9px 0 15px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.mini-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 8px 11px;
  border: 1px dashed rgba(165, 55, 44, 0.32);
  border-radius: 8px;
  background: rgba(165, 55, 44, 0.045);
  font-size: 10px;
  line-height: 1.6;
  color: var(--vermilion);
}

.mini-alert .text-btn {
  flex: 0 0 auto;
  color: var(--vermilion);
  font-weight: 600;
}

.join-methods {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.join-method {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.join-method:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(2px);
}

.jm-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--gold);
}

.jm-icon svg {
  width: 19px;
  height: 19px;
}

.jm-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.jm-text b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.jm-text i {
  margin-top: 2px;
  overflow: hidden;
  font-style: normal;
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jm-arrow {
  font-size: 13px;
  color: var(--ink-3);
  transition: transform 0.18s ease, color 0.18s ease;
}

.join-method:hover .jm-arrow {
  transform: translateX(2px);
  color: var(--gold);
}

.panel-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.room-no-badge {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.room-no-badge i {
  margin-left: 2px;
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
}

.doorplate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #f1e8d6, #f9f4e9);
}

.dp-main span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.dp-main b {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.invite-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.33);
}

.invite-box.is-full {
  opacity: 0.62;
}

.invite-code span {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.invite-code b {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--vermilion);
}

.invite-hint {
  margin: 5px 0 0;
  font-size: 9px;
  line-height: 1.7;
  color: var(--ink-3);
}

.roommate-box {
  margin-top: 14px;
}

.subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.subhead i {
  font-style: normal;
  font-size: 8.5px;
  color: var(--ink-3);
}

.mate {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
}

.mate-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mate-text b {
  font-size: 12px;
  font-weight: 600;
}

.mate-text b em {
  margin-left: 3px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(168, 135, 76, 0.12);
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.mate-text span {
  font-size: 9.5px;
  color: var(--ink-3);
}

.mate-status {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  font-size: 9px;
  color: var(--ink-2);
  white-space: nowrap;
}

.mate.is-empty .mate-text b {
  color: var(--ink-2);
  font-weight: 500;
}

.status-box {
  margin-top: 14px;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.status-chip span {
  font-size: 10.5px;
  line-height: 1;
}

.status-chip:hover {
  border-color: var(--gold);
  background: #fff;
}

.status-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #f6eddd;
}

.status-chip.is-ghost {
  border-style: dashed;
  color: var(--ink-3);
  background: transparent;
  font-size: 9px;
}

.status-chip.is-ghost:hover {
  color: var(--vermilion);
  border-color: var(--vermilion);
}

.custom-status {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.custom-status[hidden] {
  display: none;
}

.custom-status input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
}

.custom-status input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(168, 135, 76, 0.12);
}

.leave-btn {
  align-self: flex-start;
  margin-top: 12px;
  font-size: 9.5px;
}

.room-tip {
  margin: 8px 0 0;
  font-size: 8.5px;
  color: var(--ink-3);
}

.side-panel.is-pulsing {
  animation: panel-pulse 1.1s ease 2;
}

/* --------------------------------------------------------------------------
   宿舍楼探索
   -------------------------------------------------------------------------- */

.explorer {
  margin-top: 22px;
  overflow: hidden;
}

.explorer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px 16px;
}

.explorer-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.jump-form {
  display: flex;
  align-items: center;
  gap: 7px;
}

.jump-form label {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  white-space: nowrap;
}

.jump-form input {
  width: 130px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.45);
  font-family: var(--mono);
  font-size: 11px;
}

.jump-form input:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(168, 135, 76, 0.1);
}

.explorer-body {
  display: grid;
  grid-template-columns: 184px 154px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.rail {
  min-width: 0;
  padding: 17px 16px;
  border-right: 1px solid var(--line-soft);
  background: rgba(246, 240, 228, 0.52);
}

.rail-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-2);
}

.rail-title i {
  font-style: normal;
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.building-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.building-btn {
  position: relative;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.building-btn:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: #fffdf8;
}

.building-btn.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #f3ead8;
  box-shadow: inset 0 0 0 1px rgba(201, 171, 114, 0.3);
}

.b-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}

.building-btn.has-residents .b-dot {
  background: var(--gold);
}

.building-btn.has-residents:not(.is-active) {
  border-color: rgba(168, 135, 76, 0.35);
  background: rgba(255, 251, 238, 0.9);
  color: var(--ink-2);
}

.rail-note {
  margin: 10px 0 0;
  font-size: 7.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.floor-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.floor-btn {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.floor-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line-soft);
}

.floor-btn.is-active {
  border-color: var(--line);
  background: #fffdf8;
  box-shadow: var(--shadow-soft);
}

.f-tag {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}

.floor-btn.is-active .f-tag {
  color: var(--vermilion);
}

.f-bar {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line-soft);
}

.f-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--gold-soft);
  transition: width 0.4s ease;
}

.floor-btn.is-active .f-bar i {
  background: var(--vermilion-soft);
}

.f-count {
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--ink-3);
  text-align: right;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(700px 300px at 80% -10%, rgba(168, 135, 76, 0.06), transparent 60%),
    var(--panel);
}

.plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px 10px;
}

.plan-top h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.plan-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.unit-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(29, 27, 23, 0.04);
}

.unit-tab {
  padding: 4px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.unit-tab:hover {
  color: var(--ink);
}

.unit-tab.is-active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 2px 8px -5px rgba(40, 30, 10, 0.45);
}

.plan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 8.5px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.plan-stats b {
  color: var(--ink-2);
  font-weight: 600;
}

.picking-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 22px 8px;
  padding: 7px 11px;
  border: 1px dashed rgba(168, 135, 76, 0.55);
  border-radius: 7px;
  background: rgba(168, 135, 76, 0.07);
  font-size: 9.5px;
  color: var(--ink-2);
}

.picking-bar[hidden] {
  display: none;
}

.picking-bar .text-btn {
  color: var(--vermilion);
  flex: 0 0 auto;
}

.plan-scroll {
  position: relative;
  flex: 1;
  padding: 6px 22px 12px;
  overflow-x: auto;
}

.room-grid-wrap {
  min-width: 0;
  max-width: 760px;
  margin: 0 auto;
}

.grid-note {
  padding: 58px 20px;
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-3);
}

.grid-note.is-error {
  color: var(--vermilion);
}

.floor-block {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 728px;
  margin: 0 auto;
}

.block-tag {
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.5;
  color: var(--ink-3);
  letter-spacing: -0.02em;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cell-no {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.cell-dots {
  display: flex;
  gap: 2px;
  height: 4px;
}

.cell-dots i {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.8;
}

.cell[data-count="1"] {
  border-color: #ddcaa4;
  background: #f6ecd8;
}

.cell[data-count="1"] .cell-no {
  color: #7b6234;
}

.cell[data-count="2"] {
  border-color: #23262e;
  background: #23262e;
}

.cell[data-count="2"] .cell-no {
  color: #eadfc8;
}

.cell[data-count="2"] .cell-dots i {
  background: #c9ab72;
}

.cell:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -7px rgba(60, 45, 20, 0.6);
  z-index: 2;
}

.cell.is-mine {
  outline: 2px solid var(--vermilion);
  outline-offset: 1px;
  z-index: 3;
}

.cell.is-mine::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--vermilion);
}

.plan.is-picking .cell[data-count="0"] {
  border-style: dashed;
  border-color: var(--gold);
  background: rgba(255, 251, 239, 0.8);
  animation: cell-breathe 2.4s ease-in-out infinite;
}

.corridor {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 728px;
  margin: 2px auto;
  color: var(--ink-3);
  font-size: 6.5px;
  letter-spacing: 0.32em;
  white-space: nowrap;
}

.corridor::before,
.corridor::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 10px);
}

.plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 22px 12px;
  border-top: 1px solid var(--line-soft);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  color: var(--ink-3);
}

.sw {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
}

.sw.half {
  border-color: #ddcaa4;
  background: #f6ecd8;
}

.sw.full {
  border-color: #23262e;
  background: #23262e;
}

.sw.mine {
  border: 2px solid var(--vermilion);
  background: transparent;
}

.plan-hint {
  font-size: 8px;
  color: var(--ink-3);
  white-space: nowrap;
}

.travel-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(251, 248, 241, 0.97);
}

.plan.is-traveling .travel-overlay {
  display: flex;
}

.travel-overlay > * {
  grid-area: auto;
}

.travel-doors {
  position: relative;
  display: flex;
  width: 108px;
  height: 138px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 52px 52px 0 0;
  background: linear-gradient(#fdf9ee, #efe6d5);
  box-shadow: 0 24px 50px -30px rgba(47, 36, 18, 0.55), inset 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.travel-doors i {
  flex: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(201, 186, 160, 0.28));
  border-right: 1px solid rgba(201, 186, 160, 0.55);
}

.travel-doors i:last-child {
  border-right: 0;
}

.travel-doors::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 8px rgba(165, 55, 44, 0.75);
}

.travel-stairs {
  display: none;
  width: 86px;
  height: 86px;
  color: var(--ink-3);
  opacity: 0.8;
}

.travel-overlay p {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.plan[data-travel="stairs"] .travel-doors {
  display: none;
}

.plan[data-travel="stairs"] .travel-stairs {
  display: block;
}

.plan[data-travel="stairs"] .travel-overlay {
  background:
    repeating-linear-gradient(135deg, rgba(201, 186, 160, 0.08) 0 12px, transparent 12px 24px),
    rgba(251, 248, 241, 0.97);
}

.plan[data-travel="stairs"] .travel-overlay p {
  letter-spacing: 0.24em;
}

.plan.grid-enter .floor-block {
  animation: grid-in 0.35s ease both;
}

.plan.grid-enter .floor-block:nth-child(3) {
  animation-delay: 0.06s;
}

.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   弹窗
   -------------------------------------------------------------------------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-root[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 20, 16, 0.56);
  backdrop-filter: blur(5px);
  animation: fade-in 0.18s ease;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 44px);
  padding: 26px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 44px 100px -32px rgba(0, 0, 0, 0.55);
  animation: modal-in 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.modal-card.is-leaving {
  animation: modal-out 0.16s ease both;
}

.modal-card::-webkit-scrollbar {
  width: 8px;
}

.modal-card::-webkit-scrollbar-thumb {
  border: 2px solid var(--panel);
  border-radius: 4px;
  background: var(--line-strong);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.modal-x {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.modal-x:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.modal-actions.is-stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.confirm-message {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 2;
  color: var(--ink-2);
}

/* 通知信 */

.modal-card.is-notice {
  width: min(560px, 100%);
  padding: 0;
  overflow: hidden;
  border-color: rgba(201, 186, 160, 0.85);
  background: #f8f2e4;
}

.notice-card {
  position: relative;
  padding: 34px 36px 26px;
  background:
    radial-gradient(600px 300px at 50% -20%, rgba(168, 135, 76, 0.14), transparent 65%),
    repeating-linear-gradient(0deg, rgba(201, 186, 160, 0.055) 0 1px, transparent 1px 26px);
}

.notice-card::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(168, 135, 76, 0.26);
  border-radius: 13px;
  pointer-events: none;
}

.notice-pin {
  width: 42px;
  height: 3px;
  margin: 0 auto 20px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.notice-head {
  position: relative;
  text-align: center;
}

.notice-head h2 {
  margin: 4px 0 7px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.notice-date {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.notice-letter {
  position: relative;
  margin: 18px 0 20px;
  padding: 20px 22px 24px;
  border: 1px solid rgba(222, 211, 189, 0.9);
  background: rgba(255, 253, 247, 0.55);
  box-shadow: inset 0 0 24px rgba(168, 135, 76, 0.045);
}

.notice-letter p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 2;
  color: var(--ink-2);
}

.notice-letter p:last-of-type {
  margin-bottom: 0;
}

.notice-letter b {
  color: var(--ink);
  font-weight: 600;
}

.notice-sign {
  margin-top: 16px !important;
  padding-right: 48px;
  text-align: right;
  font-size: 9.5px !important;
  letter-spacing: 0.08em;
  color: var(--ink-3) !important;
}

.notice-id {
  margin: 12px 0 !important;
  padding: 8px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(168, 135, 76, 0.07);
  font-size: 11px !important;
  line-height: 1.9 !important;
  color: var(--ink-2) !important;
}

.notice-id b {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.notice-seal {
  position: absolute;
  right: 16px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c, var(--vermilion));
  color: var(--cf, #fdf8ee);
  font-family: var(--serif);
  font-size: 23px;
  transform: rotate(-9deg);
  box-shadow: 0 7px 16px -8px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.28);
  opacity: 0.92;
}

.notice-seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.notice-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

/* 上楼方式 */

.transport-lede {
  margin: 14px 0 18px;
  font-size: 12px;
  color: var(--ink-3);
}

.transport-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.transport-op {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.transport-op:hover {
  border-color: var(--gold);
  background: #fffdf8;
  transform: translateY(-2px);
}

.t-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(168, 135, 76, 0.3);
  border-radius: 10px;
  background: #f6edda;
  color: var(--gold);
}

.t-icon svg {
  width: 23px;
  height: 23px;
}

.transport-op b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.transport-op i {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* 房间弹窗 */

.modal-card.is-room {
  width: min(540px, 100%);
}

.room-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}

.room-note {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.occupants {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.occupant {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.38);
}

.occupant.is-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.16);
}

.occupant-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.occupant-text b {
  font-size: 12.5px;
  font-weight: 600;
}

.occupant-text b em {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(165, 55, 44, 0.1);
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.06em;
  color: var(--vermilion);
}

.occupant-text span {
  font-size: 9.5px;
  color: var(--ink-3);
}

.occupant-status {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  font-size: 9px;
  color: var(--ink-2);
  white-space: nowrap;
}

.invite-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding: 9px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.3);
  font-size: 9.5px;
  color: var(--ink-3);
}

.invite-strip b {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--vermilion);
}

.room-self-note {
  padding: 11px 13px;
  border-left: 2px solid var(--gold);
  background: rgba(168, 135, 76, 0.055);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-2);
}

.room-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* 邀请码 */

.invite-lede {
  margin: 12px 0 18px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-3);
}

.code-input {
  font-family: var(--mono) !important;
  font-size: 21px !important;
  letter-spacing: 0.32em !important;
  text-align: center;
  text-transform: uppercase;
  padding: 13px 10px !important;
  background: #fffdf8 !important;
}

.invite-foot {
  margin: 10px 0 0;
  text-align: center;
  font-size: 8.5px;
  color: var(--ink-3);
}

/* 抽签 */

.modal-card.is-lottery {
  width: min(470px, 100%);
}

.lottery-stage {
  position: relative;
  padding: 32px 18px 26px;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(120% 130% at 50% 0%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 60%),
    linear-gradient(150deg, #20242d, #15181e);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(201, 171, 114, 0.28);
}

.lottery-stage::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 171, 114, 0.12);
  border-radius: 9px;
  pointer-events: none;
}

.lottery-code {
  display: block;
  font-family: var(--mono);
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: 0.1em;
  color: #e8d6b0;
  text-shadow: 0 0 30px rgba(201, 171, 114, 0.3);
}

.lottery-caption {
  display: block;
  margin-top: 8px;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(239, 231, 214, 0.42);
}

.lottery-stage.is-settled {
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(111, 156, 131, 0.3), transparent 60%),
    linear-gradient(150deg, #202a26, #151c19);
  animation: settle 0.55s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.lottery-note {
  margin: 12px 0 0;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--ink-3);
  text-align: center;
}

.lottery-result {
  padding-top: 16px;
  text-align: center;
}

.lottery-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.lottery-room {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 21px;
  color: var(--vermilion);
  letter-spacing: 0.04em;
}

.lottery-error {
  padding: 10px 0 4px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Toast / 纸屑
   -------------------------------------------------------------------------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: min(92vw, 520px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 9px 17px 9px 13px;
  border: 1px solid rgba(201, 171, 114, 0.28);
  border-radius: 999px;
  background: #1e211f;
  color: #f3ecdd;
  font-size: 11.5px;
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(9px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast-mark {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 171, 114, 0.12);
}

.toast-success .toast-mark {
  background: #7daa90;
  box-shadow: 0 0 0 3px rgba(125, 170, 144, 0.14);
}

.toast-error .toast-mark {
  background: #d07161;
  box-shadow: 0 0 0 3px rgba(208, 113, 97, 0.14);
}

.toast-text {
  line-height: 1.5;
}

.confetti {
  position: fixed;
  top: -24px;
  z-index: 500;
  border-radius: 1px;
  pointer-events: none;
  animation: confetti-fall 1.8s linear forwards;
}

/* --------------------------------------------------------------------------
   动画
   -------------------------------------------------------------------------- */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes modal-out {
  to { opacity: 0; transform: translateY(6px) scale(0.99); }
}

@keyframes cell-breathe {
  0%, 100% { border-color: rgba(168, 135, 76, 0.45); }
  50% { border-color: var(--gold); background: rgba(255, 250, 235, 1); }
}

@keyframes grid-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@keyframes panel-pulse {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 0 0 3px rgba(168, 135, 76, 0.22), var(--shadow); }
}

@keyframes settle {
  0% { transform: scale(0.97); filter: brightness(0.7); }
  60% { transform: scale(1.015); }
  100% { transform: none; filter: none; }
}

@keyframes confetti-fall {
  0% { transform: translate3d(0, -10px, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--drift, 30px), 105vh, 0) rotate(520deg); opacity: 0; }
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   宿管端 · 登录
   -------------------------------------------------------------------------- */

.admin-body {
  background:
    radial-gradient(1100px 700px at 88% -10%, rgba(168, 135, 76, 0.14), transparent 65%),
    linear-gradient(180deg, #f7f2e7, #f0e9db 60%, #f4eee2);
}

.admin-auth {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
}

.admin-auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(34px, 4vw, 56px);
  overflow: hidden;
  color: #ece2cf;
  background:
    radial-gradient(900px 600px at 80% 8%, rgba(168, 135, 76, 0.18), transparent 60%),
    radial-gradient(700px 520px at 0% 90%, rgba(60, 72, 60, 0.3), transparent 65%),
    linear-gradient(150deg, #1c1f26 0%, #15181e 58%, #12141a 100%);
}

.admin-auth-art::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201, 171, 114, 0.13);
  pointer-events: none;
}

.admin-auth-art::after {
  content: "宿";
  position: absolute;
  right: -30px;
  bottom: -70px;
  font-family: var(--serif);
  font-size: 340px;
  line-height: 1;
  color: rgba(201, 171, 114, 0.035);
  pointer-events: none;
}

.admin-auth-art .art-copy {
  margin-top: clamp(40px, 10vh, 110px);
}

.admin-auth-art .art-copy h1 {
  font-size: clamp(46px, 5vw, 72px);
}

.admin-rules {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 430px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-auth-art .art-meta {
  margin-top: 22px;
}

.admin-rules div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.admin-rules span {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(201, 171, 114, 0.25);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--gold);
}

.admin-rules p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.8;
  color: rgba(238, 228, 208, 0.5);
}

.admin-auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 46px clamp(22px, 4vw, 56px);
}

.admin-login-card {
  width: min(400px, 100%);
}

.admin-login-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
}

.admin-login-card .auth-foot {
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   宿管端 · 工作台
   -------------------------------------------------------------------------- */

.admin-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100vh;
  padding: 26px 20px;
  overflow-y: auto;
  border-right: 1px solid #2b2e37;
  background:
    radial-gradient(600px 400px at 50% -10%, rgba(168, 135, 76, 0.13), transparent 65%),
    linear-gradient(180deg, #1b1e25, #16181e);
  color: #efe6d4;
}

.admin-sidebar .brand {
  gap: 10px;
}

.admin-sidebar .brand-mark.small {
  color: #e9d9b7;
  border-color: rgba(201, 171, 114, 0.4);
  background: rgba(201, 171, 114, 0.05);
  box-shadow: inset 0 0 0 3px #1a1d23, inset 0 0 0 4px rgba(201, 171, 114, 0.14);
}

.admin-sidebar .brand-words b {
  color: #ede2cd;
  font-size: 13px;
}

.admin-sidebar .brand-words i {
  color: rgba(201, 171, 114, 0.6);
  font-size: 6.5px;
  letter-spacing: 0.16em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(239, 230, 212, 0.58);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.admin-nav button i {
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: rgba(239, 230, 212, 0.26);
}

.admin-nav button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #efe6d4;
}

.admin-nav button.is-active {
  border-color: rgba(201, 171, 114, 0.24);
  background: rgba(201, 171, 114, 0.1);
  color: #f3e8d3;
}

.admin-nav button.is-active i {
  color: var(--gold-soft);
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-who {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 3px;
}

.who-seal {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 171, 114, 0.32);
  border-radius: 50%;
  background: rgba(201, 171, 114, 0.13);
  color: #e8d6b0;
  font-family: var(--serif);
  font-size: 12px;
}

.admin-who b {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #efe6d4;
}

.admin-who i {
  display: block;
  font-style: normal;
  font-size: 8px;
  color: rgba(239, 230, 212, 0.38);
  letter-spacing: 0.04em;
}

.sidebar-link {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: rgba(239, 230, 212, 0.42);
  cursor: pointer;
  transition: color 0.16s ease;
}

.sidebar-link:hover {
  color: var(--gold-soft);
}

.admin-main {
  min-width: 0;
  padding: 30px clamp(20px, 3vw, 40px) 56px;
}

.admin-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-top h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.admin-top-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
}

.admin-view {
  max-width: 1260px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 19px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(251, 248, 241, 0.9));
  box-shadow: var(--shadow-soft);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(168, 135, 76, 0.14);
  border-radius: 50%;
}

.stat-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.stat-value {
  margin: 7px 0 4px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.stat-note {
  font-size: 8.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 16px;
  margin-bottom: 16px;
}

.rooms-grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.card-box {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.card-box + .card-box {
  margin-top: 0;
}

.admin-view > .card-box {
  margin-bottom: 16px;
}

.box-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.box-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.box-meta {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  white-space: nowrap;
  padding-top: 2px;
}

.box-note {
  margin: 12px 0 0;
  font-size: 8.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.head-count {
  display: inline-block;
  margin-left: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(168, 135, 76, 0.1);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
  vertical-align: middle;
}

.college-bars {
  display: flex;
  flex-direction: column;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.bar-row:last-child {
  border-bottom: 0;
}

.bar-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
}

.college-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c);
}

.bar-label b {
  font-weight: 500;
  white-space: nowrap;
}

.bar-label i {
  margin-left: auto;
  padding-left: 10px;
  font-style: normal;
  font-size: 8.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

.bar-track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--panel-soft);
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--c, var(--gold));
  transition: width 0.5s ease;
}

.bar-pct {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
  text-align: right;
}

.building-admin-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.building-admin-grid.is-compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mini-building {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  height: 30px;
  padding: 0 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.4);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.mini-building:hover {
  border-color: var(--gold);
  background: #fffdf8;
}

.mini-building span {
  font-size: 9px;
}

.mini-building i {
  font-style: normal;
  font-size: 7px;
  color: var(--ink-3);
}

.mini-building em {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--w, 0%);
  height: 2px;
  background: var(--gold);
}

.mini-building.has-use {
  border-color: rgba(168, 135, 76, 0.35);
  background: #fbf6e9;
}

.mini-building.has-use span {
  color: var(--ink);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-hint {
  display: none;
  margin: 8px 0 0;
  font-size: 8.5px;
  color: var(--ink-3);
  text-align: right;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 10.5px;
}

.data-table th {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.42);
}

.data-table .is-actions {
  text-align: right;
}

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

.person b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.person i {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-3);
  white-space: nowrap;
}

.college-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 7%, transparent);
  font-size: 8.5px;
  color: var(--ct, var(--c));
  white-space: nowrap;
}

.room-cell {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  white-space: nowrap;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 8.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.card-state {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 8px;
  white-space: nowrap;
}

.card-state.is-ok {
  border-color: rgba(47, 93, 80, 0.24);
  background: rgba(47, 93, 80, 0.06);
  color: var(--green);
}

.card-state.is-pending {
  border-color: rgba(165, 55, 44, 0.24);
  background: rgba(165, 55, 44, 0.06);
  color: var(--vermilion);
}

.muted {
  color: var(--ink-3);
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
}

.actions-cell .text-btn {
  margin-left: 9px;
}

.box-head.is-toolbar {
  align-items: center;
  flex-wrap: wrap;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 7px;
}

.searchbox input {
  width: clamp(180px, 24vw, 280px);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 10.5px;
}

.searchbox input:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(168, 135, 76, 0.1);
}

.empty-state {
  padding: 26px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
  font-size: 10px;
  line-height: 1.8;
  color: var(--ink-3);
  text-align: center;
}

.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--ink-3);
  font-size: 10.5px;
}

.loading-panel.is-small {
  padding: 26px 16px;
  border: 0;
  background: transparent;
}

.loading-panel.is-error {
  color: var(--vermilion);
}

.loading-panel p {
  margin: 0;
}

.loading-ring {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

.room-lookup {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 7px;
  align-items: end;
  padding-bottom: 15px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.room-lookup .field > span {
  font-size: 8px;
}

.room-lookup select {
  padding: 7px 9px;
  font-size: 10.5px;
}

.room-result {
  min-height: 200px;
}

.room-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.room-admin-head h3 {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.room-admin-head > div > span {
  font-size: 9px;
  color: var(--ink-3);
}

.room-admin-head > div > span b {
  font-size: 10px;
  color: var(--vermilion);
  letter-spacing: 0.1em;
}

.admin-occupants {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 13px 0;
  padding-bottom: 13px;
  border-bottom: 1px dashed var(--line);
}

.admin-occupant {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.admin-occupant.is-empty {
  border-style: dashed;
  background: transparent;
}

.admin-occupant > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-occupant b {
  font-size: 11px;
  font-weight: 600;
}

.admin-occupant span {
  font-size: 8.5px;
  color: var(--ink-3);
}

.admin-occupant .text-btn {
  margin-left: auto;
}

.room-edit {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form-grid {
  display: grid;
  gap: 9px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.form-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.room-edit .field > span {
  font-size: 8px;
}

.room-edit input,
.room-edit textarea {
  padding: 8px 10px;
  font-size: 10.5px;
}

.room-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.move-student {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel-soft);
}

.move-student > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.move-student b {
  font-size: 12px;
}

.move-student span {
  font-size: 9px;
  color: var(--ink-3);
}

.move-student .room-cell {
  margin-left: auto;
}

.move-form .form-grid.four {
  gap: 8px;
}

.move-preview {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  line-height: 1.8;
  color: var(--ink-3);
}

.move-preview b {
  color: var(--ink-2);
}

.move-preview.is-warn {
  border-color: rgba(165, 55, 44, 0.35);
  color: var(--vermilion);
  background: rgba(165, 55, 44, 0.045);
}

.modal-card.is-move {
  width: min(520px, 100%);
}

/* ==========================================================================
   Belle Époque · vintage European refinement
   ========================================================================== */

body {
  font-size: 14.5px;
  letter-spacing: 0.012em;
  background:
    radial-gradient(1200px 720px at 92% -10%, rgba(164, 128, 63, 0.2), transparent 62%),
    radial-gradient(900px 640px at -6% 16%, rgba(124, 47, 42, 0.09), transparent 60%),
    linear-gradient(180deg, #f5eddd 0%, #efe4d0 46%, #f4ebda 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='168' viewBox='0 0 168 168'%3E%3Cg fill='none' stroke='%23a4803f' stroke-width='0.8'%3E%3Cpath d='M84 20c10 13 10 28 0 41-10-13-10-28 0-41Z'/%3E%3Cpath d='M84 148c10-13 10-28 0-41-10 13-10 28 0 41Z'/%3E%3Cpath d='M20 84c13-10 28-10 41 0-13 10-28 10-41 0Z'/%3E%3Cpath d='M148 84c-13 10-28 10-41 0 13-10 28-10 41 0Z'/%3E%3Ccircle cx='84' cy='84' r='4.5'/%3E%3Ccircle cx='84' cy='84' r='17'/%3E%3Cpath d='M67 67l34 34M101 67l-34 34' opacity='0.35'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(125% 110% at 50% 46%, transparent 56%, rgba(57, 36, 15, 0.07) 100%);
}

.eyebrow {
  font-size: 8.5px;
  letter-spacing: 0.3em;
}

.eyebrow::before {
  content: "◆";
  margin-right: 0.7em;
  font-size: 4.5px;
  color: var(--gold);
  vertical-align: middle;
}

.art-motto {
  margin: 16px 0 0;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.32em;
  color: var(--gold-soft);
}

.art-motto i {
  margin: 0 0.7em;
  font-style: normal;
  color: var(--gold);
}

.auth-form h2::after,
.panel-head h2::after,
.explorer-head h2::after,
.box-head h3::after,
.admin-top h1::after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin-top: 8px;
  background: linear-gradient(90deg, rgba(164, 128, 63, 0.85), rgba(164, 128, 63, 0));
}

.admin-top h1::after {
  width: 46px;
  margin-top: 10px;
}

/* ---- frames ------------------------------------------------------------- */

.side-panel,
.auth-card,
.modal-card,
.card-box,
.stat-card {
  border-color: rgba(189, 165, 124, 0.88);
  box-shadow: var(--shadow), inset 0 0 0 5px var(--panel), inset 0 0 0 6px rgba(164, 128, 63, 0.17);
  border-radius: 10px;
}

.card-box,
.stat-card {
  box-shadow: var(--shadow-soft), inset 0 0 0 5px var(--panel), inset 0 0 0 6px rgba(164, 128, 63, 0.17);
}

.side-panel,
.card-box {
  position: relative;
}

.side-panel::before,
.card-box::before {
  content: "❦";
  position: absolute;
  top: -16px;
  left: 50%;
  z-index: 4;
  padding: 0 9px;
  background: transparent;
  color: var(--gold);
  font-family: "Segoe UI Symbol", "Apple Symbols", Georgia, serif;
  font-size: 15px;
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.auth-card {
  border-radius: 12px;
  background: rgba(249, 242, 227, 0.92);
}

.auth-card::before {
  top: -19px;
  left: 50%;
  right: auto;
  width: auto;
  height: auto;
  padding: 0 12px;
  background: transparent;
  color: var(--gold);
  font-family: "Segoe UI Symbol", "Apple Symbols", Georgia, serif;
  font-size: 17px;
  line-height: 1;
  content: "❦";
  transform: translateX(-50%);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(164, 128, 63, 0.17);
  border-radius: 6px;
  pointer-events: none;
}

.explorer {
  position: relative;
  border-color: var(--line-strong);
  border-radius: 10px;
}

.explorer::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 3;
  border: 1px solid rgba(164, 128, 63, 0.18);
  border-radius: 6px;
  pointer-events: none;
}

.modal-card {
  border-radius: 9px;
}

.modal-card.is-notice {
  background: #f7efdf;
}

/* ---- buttons & fields --------------------------------------------------- */

.btn {
  padding: 11px 20px;
  border-radius: 3px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.09em;
}

.btn.primary {
  border-color: #33291d;
  background: linear-gradient(180deg, #2e271e, #1f1a13);
  box-shadow: inset 0 0 0 1px rgba(201, 172, 116, 0.34), 0 10px 22px -18px rgba(31, 26, 19, 0.9);
}

.btn.primary:hover {
  border-color: #44382a;
  background: linear-gradient(180deg, #3b3125, #2a2319);
}

.btn.ghost {
  border-radius: 3px;
  background: rgba(255, 251, 241, 0.38);
}

.btn.small {
  border-radius: 2px;
  letter-spacing: 0.06em;
}

.field > span {
  font-size: 9.5px;
  letter-spacing: 0.18em;
}

.field input,
.field select,
.field textarea,
.jump-form input,
.searchbox input,
.custom-status input {
  border-radius: 2px;
  background: rgba(255, 252, 243, 0.64);
  box-shadow: inset 0 1px 2px rgba(60, 40, 20, 0.055);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.jump-form input:focus,
.searchbox input:focus,
.custom-status input:focus {
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(164, 128, 63, 0.13), inset 0 1px 2px rgba(60, 40, 20, 0.04);
}

.badge,
.tag,
.status-chip,
.mate-status,
.occupant-status,
.college-pill {
  border-radius: 2px;
}

.user-chip {
  border-radius: 3px;
}

.topbar {
  border-bottom-color: rgba(164, 128, 63, 0.32);
  background: rgba(247, 240, 226, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 22px -22px rgba(50, 35, 15, 0.55);
}

.page-foot {
  letter-spacing: 0.15em;
}

/* ---- auth art ----------------------------------------------------------- */

.auth-art {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='168' viewBox='0 0 168 168'%3E%3Cg fill='none' stroke='%23c9ac74' stroke-width='0.9' opacity='0.1'%3E%3Cpath d='M84 20c10 13 10 28 0 41-10-13-10-28 0-41Z'/%3E%3Cpath d='M84 148c10-13 10-28 0-41-10 13-10 28 0 41Z'/%3E%3Cpath d='M20 84c13-10 28-10 41 0-13 10-28 10-41 0Z'/%3E%3Cpath d='M148 84c-13 10-28 10-41 0 13-10 28-10 41 0Z'/%3E%3Ccircle cx='84' cy='84' r='4.5'/%3E%3Ccircle cx='84' cy='84' r='17'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(1000px 620px at 78% 8%, rgba(164, 128, 63, 0.24), transparent 60%),
    radial-gradient(720px 520px at 4% 92%, rgba(90, 45, 36, 0.4), transparent 66%),
    linear-gradient(150deg, #221f1b 0%, #1a1714 56%, #15120f 100%);
  background-size: 168px 168px, auto, auto, auto;
}

.auth-art::before {
  inset: 14px;
  border-color: rgba(201, 171, 114, 0.22);
  border-radius: 2px;
}

.auth-art::after {
  border-color: rgba(201, 171, 114, 0.1);
  box-shadow: 0 0 0 80px rgba(201, 171, 114, 0.03), 0 0 0 160px rgba(201, 171, 114, 0.018);
}

.art-copy h1 {
  font-weight: 500;
  letter-spacing: 0.035em;
}

.art-copy .eyebrow {
  color: var(--gold-soft);
}

.art-etching {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 590px;
  min-height: 190px;
  max-height: 368px;
  margin: 20px auto 8px;
  padding: 22px 24px 0;
  overflow: hidden;
  border: 1px solid rgba(201, 171, 114, 0.24);
  border-bottom: 0;
  border-radius: 280px 280px 0 0;
  background: radial-gradient(130% 100% at 50% 100%, rgba(201, 171, 114, 0.075), transparent 62%);
}

.art-etching::before {
  content: "";
  position: absolute;
  inset: 8px 8px 0;
  border: 1px solid rgba(201, 171, 114, 0.12);
  border-bottom: 0;
  border-radius: 270px 270px 0 0;
  pointer-events: none;
}

.art-etching .art-elevation {
  width: 100%;
  height: 100%;
  min-height: 120px;
  max-height: none;
  margin: 0;
  color: #f0d7a4;
  opacity: 0.98;
  filter: drop-shadow(0 0 12px rgba(201, 171, 114, 0.18));
}

.art-etching figcaption {
  position: relative;
  z-index: 1;
  padding: 10px 0 13px;
  color: rgba(236, 226, 207, 0.34);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.22em;
  text-align: center;
}

.art-college {
  border-radius: 2px;
  letter-spacing: 0.06em;
}

.auth-tabs {
  border-bottom-color: var(--line-strong);
}

.auth-tab {
  font-weight: 500;
}

.tab-ink {
  background: var(--vermilion);
}

.college-option {
  border-radius: 3px;
}

.auth-foot {
  color: var(--ink-3);
}

/* ---- access card -------------------------------------------------------- */

.pass-card {
  border-radius: 12px;
  padding: 28px 30px;
  background:
    repeating-linear-gradient(115deg, rgba(201, 171, 114, 0.045) 0 1px, transparent 1px 16px),
    radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--c, #a4803f) 31%, transparent) 0%, transparent 56%),
    linear-gradient(142deg, #23221f 0%, #171614 52%, #211f1b 100%);
  box-shadow:
    0 40px 80px -46px rgba(25, 20, 12, 0.8),
    inset 0 0 0 1px rgba(201, 171, 114, 0.42),
    inset 0 0 0 5px #171512,
    inset 0 0 0 6px rgba(201, 171, 114, 0.18);
}

.pass-card::after {
  border-color: rgba(201, 171, 114, 0.13);
}

.pass-name {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.pass-kind span {
  font-size: 9.5px;
  letter-spacing: 0.22em;
}

.pass-kind i {
  letter-spacing: 0.14em;
}

.pass-label {
  font-size: 7.5px;
  letter-spacing: 0.24em;
}

.pass-room strong {
  font-weight: 500;
  font-feature-settings: "lnum" 1;
}

.pass-college {
  border-radius: 2px;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.pass-bottom {
  border-top-color: rgba(201, 171, 114, 0.22);
}

.pass-meta span {
  font-size: 7.5px;
  letter-spacing: 0.18em;
}

.pass-stamp {
  right: 27px;
  bottom: 72px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1.5px solid rgba(190, 92, 78, 0.68);
  border-radius: 50%;
  color: rgba(214, 118, 102, 0.92);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-12deg);
  box-shadow: inset 0 0 0 2px rgba(190, 92, 78, 0.1);
}

.pass-veil {
  background: rgba(17, 15, 12, 0.56);
}

.veil-inner {
  border-radius: 3px;
  background: rgba(24, 21, 17, 0.62);
}

.pass-room .pass-label,
.pass-mid .pass-label {
  color: rgba(201, 171, 114, 0.66);
}

/* ---- panels ------------------------------------------------------------- */

.room-no-badge,
.room-admin-head h3,
.stat-value {
  font-feature-settings: "lnum" 1;
}

.doorplate {
  border-radius: 3px;
  background: linear-gradient(135deg, #f2e6d1, #faf4e8);
  box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 4px rgba(164, 128, 63, 0.14);
}

.invite-box {
  border-radius: 3px;
  background: rgba(255, 251, 241, 0.4);
}

.invite-code b,
.invite-strip b {
  font-family: var(--mono);
  font-weight: 700;
}

.status-chip {
  padding: 4px 8px;
  border-color: var(--line);
  background: rgba(255, 252, 244, 0.45);
  font-size: 9.5px;
}

.status-chip.is-active {
  border-color: var(--ink);
  background: linear-gradient(180deg, #30291f, #221d16);
  color: #f5ecd9;
  box-shadow: inset 0 0 0 1px rgba(201, 171, 114, 0.25);
}

.join-method {
  border-radius: 3px;
  background: rgba(255, 252, 244, 0.4);
}

.jm-icon {
  border-radius: 2px;
}

.panel-note {
  letter-spacing: 0.05em;
}

/* ---- explorer ----------------------------------------------------------- */

.explorer-head {
  border-bottom: 1px solid rgba(201, 186, 160, 0.45);
}

.rail {
  background:
    linear-gradient(180deg, rgba(232, 219, 196, 0.52), rgba(246, 238, 224, 0.42));
}

.building-btn {
  height: 32px;
  border-radius: 2px;
  background: rgba(255, 252, 244, 0.44);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.building-btn.is-active {
  border-color: #4b1f1a;
  background: linear-gradient(180deg, #843a32, #682721);
  color: #f8eedb;
  box-shadow: inset 0 0 0 1px rgba(201, 171, 114, 0.45), 0 6px 12px -10px rgba(60, 20, 15, 0.7);
}

.building-btn.has-residents:not(.is-active) {
  border-color: rgba(164, 128, 63, 0.42);
  background: rgba(255, 250, 236, 0.95);
}

.floor-btn {
  border-radius: 2px;
}

.floor-btn.is-active {
  border-color: var(--line-strong);
  background: #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(164, 128, 63, 0.12);
}

.unit-tabs {
  border-radius: 2px;
  background: rgba(34, 29, 22, 0.055);
}

.unit-tab {
  border-radius: 1px;
}

.unit-tab.is-active {
  background: #fffaf0;
}

.plan {
  background:
    linear-gradient(rgba(164, 128, 63, 0.045) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(164, 128, 63, 0.045) 1px, transparent 1px) 0 0 / 26px 26px,
    radial-gradient(700px 300px at 80% -10%, rgba(164, 128, 63, 0.07), transparent 60%),
    var(--panel);
}

.plan::after {
  content: "❦";
  position: absolute;
  right: 17px;
  bottom: 38px;
  z-index: 0;
  color: rgba(164, 128, 63, 0.07);
  font-family: "Segoe UI Symbol", "Apple Symbols", Georgia, serif;
  font-size: 62px;
  line-height: 1;
  pointer-events: none;
}

.plan-top {
  position: relative;
  z-index: 1;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(201, 186, 160, 0.55);
}

.plan-scroll,
.plan-foot,
.picking-bar {
  position: relative;
  z-index: 1;
}

.cell {
  height: 44px;
  border-radius: 2px;
  background: rgba(255, 252, 244, 0.55);
}

.cell[data-count="2"] {
  background:
    repeating-linear-gradient(45deg, rgba(201, 171, 114, 0.07) 0 1px, transparent 1px 5px),
    #24211d;
  border-color: #24211d;
}

.cell.is-mine {
  outline: 2px solid var(--vermilion);
  outline-offset: 1px;
}

.legend .sw {
  border-radius: 1px;
}

.plan-scroll::-webkit-scrollbar {
  height: 7px;
}

.plan-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(164, 128, 63, 0.32);
}

/* ---- modals ------------------------------------------------------------- */

.modal-backdrop {
  background: rgba(24, 20, 15, 0.62);
}

.modal-card {
  border-color: var(--line-strong);
}

.modal-head h2 {
  font-weight: 500;
}

.modal-card.is-notice {
  box-shadow: 0 44px 100px -30px rgba(0, 0, 0, 0.55), inset 0 0 0 5px #f7efdf, inset 0 0 0 6px rgba(164, 128, 63, 0.1);
}

.notice-card {
  background:
    radial-gradient(600px 300px at 50% -20%, rgba(164, 128, 63, 0.15), transparent 65%),
    repeating-linear-gradient(0deg, rgba(201, 186, 160, 0.05) 0 1px, transparent 1px 26px);
}

.notice-head h2 {
  font-weight: 500;
  letter-spacing: 0.06em;
}

.notice-date {
  letter-spacing: 0.2em;
}

.notice-head::after {
  content: "❦";
  display: block;
  margin: 7px auto 0;
  color: var(--gold);
  font-family: "Segoe UI Symbol", "Apple Symbols", Georgia, serif;
  font-size: 13px;
  line-height: 1;
}

.notice-letter {
  border-color: var(--line-strong);
  background: rgba(255, 252, 244, 0.6);
  box-shadow: inset 0 0 0 3px rgba(255, 252, 244, 0.6), inset 0 0 0 4px rgba(164, 128, 63, 0.12);
}

.notice-id {
  border-left-color: var(--vermilion);
  background: rgba(164, 128, 63, 0.08);
}

.notice-id .email {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0;
  word-break: break-all;
}

.notice-seal {
  border-radius: 47% 53% 49% 51%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.28), transparent 42%),
    var(--c, var(--vermilion));
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 7px 15px -7px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.notice-seal::before {
  border-color: rgba(255, 255, 255, 0.4);
}

.transport-op {
  border-radius: 3px;
  background: rgba(255, 252, 244, 0.4);
}

.t-icon {
  border-radius: 2px;
}

.occupant,
.invite-strip,
.admin-occupant {
  border-radius: 3px;
}

.lottery-stage {
  border-radius: 3px;
}

.code-input {
  border-radius: 2px !important;
}

.invite-card {
  border-radius: 3px;
}

/* ---- admin -------------------------------------------------------------- */

.admin-auth-art {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='168' viewBox='0 0 168 168'%3E%3Cg fill='none' stroke='%23c9ac74' stroke-width='0.9' opacity='0.1'%3E%3Cpath d='M84 20c10 13 10 28 0 41-10-13-10-28 0-41Z'/%3E%3Cpath d='M84 148c10-13 10-28 0-41-10 13-10 28 0 41Z'/%3E%3Cpath d='M20 84c13-10 28-10 41 0-13 10-28 10-41 0Z'/%3E%3Cpath d='M148 84c-13 10-28 10-41 0 13-10 28-10 41 0Z'/%3E%3Ccircle cx='84' cy='84' r='4.5'/%3E%3Ccircle cx='84' cy='84' r='17'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(900px 600px at 80% 8%, rgba(164, 128, 63, 0.22), transparent 60%),
    radial-gradient(700px 520px at 0% 90%, rgba(70, 50, 30, 0.35), transparent 65%),
    linear-gradient(150deg, #201d19 0%, #171411 58%, #12100e 100%);
  background-size: 168px 168px, auto, auto, auto;
}

.admin-sidebar {
  border-right-color: rgba(201, 171, 114, 0.22);
  background:
    repeating-linear-gradient(135deg, rgba(201, 171, 114, 0.025) 0 1px, transparent 1px 13px),
    radial-gradient(600px 400px at 50% -10%, rgba(164, 128, 63, 0.15), transparent 65%),
    linear-gradient(180deg, #231e18, #161310);
}

.admin-sidebar::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 171, 114, 0.1);
  border-radius: 2px;
  pointer-events: none;
}

.admin-nav button {
  border-radius: 2px;
}

.admin-nav button.is-active {
  border-color: rgba(201, 171, 114, 0.3);
  background: linear-gradient(90deg, rgba(124, 47, 42, 0.36), rgba(201, 171, 114, 0.08));
  box-shadow: inset 2px 0 0 var(--gold);
}

.admin-main {
  position: relative;
  z-index: 1;
}

.stat-card {
  border-radius: 3px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(249, 242, 227, 0.92));
}

.stat-value {
  font-weight: 500;
}

.card-box {
  border-radius: 3px;
}

.mini-building {
  border-radius: 2px;
}

.searchbox input {
  border-radius: 2px;
}

.data-table th {
  border-bottom-color: var(--line-strong);
  font-family: var(--serif);
  letter-spacing: 0.14em;
}

.data-table td {
  border-bottom-style: dotted;
}

.data-table tbody tr:hover {
  background: rgba(164, 128, 63, 0.055);
}

.person b {
  letter-spacing: 0.02em;
}

.person i {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person .sid {
  margin-left: 5px;
  padding: 0 4px;
  border: 1px solid rgba(164, 128, 63, 0.22);
  border-radius: 2px;
  background: rgba(164, 128, 63, 0.06);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.01em;
  vertical-align: 1px;
  white-space: nowrap;
}

.loading-ring {
  border-color: rgba(164, 128, 63, 0.22);
  border-top-color: var(--gold);
}

.admin-login-card {
  border-radius: 12px;
}

.admin-rules span {
  border-radius: 1px;
}

.admin-rules p {
  font-size: 10px;
  line-height: 1.8;
}

.foot-right {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.foot-right i {
  font-style: normal;
  color: var(--gold);
}

.foot-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(164, 128, 63, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.foot-link:hover {
  color: var(--vermilion);
  text-decoration-color: rgba(124, 47, 42, 0.4);
}

.service-alert {
  margin-bottom: 14px;
  padding: 8px 11px;
  border-left: 2px solid var(--vermilion);
  background: rgba(165, 55, 44, 0.06);
  color: var(--vermilion);
  font-size: 11px;
  line-height: 1.7;
}

.auth-copyright .foot-link {
  color: var(--gold);
}

.sidebar-copy {
  margin-top: 3px;
  color: rgba(239, 230, 212, 0.46);
  font-size: 8px;
  letter-spacing: 0.06em;
}

/* ---- about -------------------------------------------------------------- */

.modal-card.is-about {
  width: min(620px, 100%);
  padding: 0;
  background: #f8f1e1;
}

.about-sheet {
  position: relative;
  padding: 40px 44px 26px;
  background:
    radial-gradient(520px 280px at 50% -10%, rgba(164, 128, 63, 0.13), transparent 68%),
    repeating-linear-gradient(0deg, rgba(201, 186, 160, 0.045) 0 1px, transparent 1px 28px),
    #f8f1e1;
}

.about-sheet::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(164, 128, 63, 0.28);
  border-radius: 3px;
  pointer-events: none;
}

.about-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
}

.about-head {
  position: relative;
  padding: 0 32px;
  text-align: center;
}

.about-head h2 {
  margin: 5px 0 7px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.about-sub {
  margin: 0;
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

.about-seal {
  position: absolute;
  top: 38px;
  left: 35px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 47% 53% 49% 51%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.22), transparent 42%),
    var(--vermilion);
  color: #f8eddb;
  font-family: var(--serif);
  font-size: 20px;
  transform: rotate(-9deg);
  box-shadow: 0 7px 15px -7px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.about-seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.about-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 19px;
  margin: 24px 0 17px;
}

.about-section h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.about-section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(164, 128, 63, 0.45), transparent);
}

.about-section p {
  margin: 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 2.1;
  white-space: pre-line;
}

.about-signature {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px dashed rgba(164, 128, 63, 0.35);
}

.about-sign-name {
  padding: 0 6px 2px;
  border-bottom: 1px solid rgba(124, 47, 42, 0.55);
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.12em;
}

.about-sign-note {
  color: var(--ink-3);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.about-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.about-editor {
  max-width: 880px;
}

.about-form {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
}

.about-form .field {
  margin-bottom: 12px;
}

.about-form textarea {
  min-height: 118px;
  font-size: 12.5px;
  line-height: 1.9;
}

.about-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.about-updated {
  color: var(--ink-3);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

/* ---- 21F 顶层单人间 ------------------------------------------------------ */

.floor-btn.is-attic {
  border-color: rgba(168, 135, 76, 0.42);
  background: rgba(168, 135, 76, 0.06);
}

.floor-btn.is-attic .f-tag {
  color: var(--gold);
}

.floor-btn.is-attic.is-active {
  background: #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(168, 135, 76, 0.2);
}

.suite-plan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 260px;
  padding: 24px 12px 34px;
}

.suite-head {
  text-align: center;
}

.suite-kicker {
  display: block;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.28em;
}

.suite-head h4 {
  margin: 7px 0 4px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.suite-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.suite-grid {
  display: flex;
  justify-content: center;
  width: 100%;
}

.suite-grid .cell {
  width: 176px;
  max-width: 78%;
  height: 92px;
  gap: 8px;
  border-radius: 4px;
  box-shadow: 0 10px 24px -20px rgba(47, 36, 18, 0.6);
}

.suite-grid .cell-no {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.suite-grid .cell-dots i {
  width: 5px;
  height: 5px;
}

.suite-grid .cell:hover {
  transform: none;
}

.single-suite-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(168, 135, 76, 0.32);
  border-radius: 3px;
  background: rgba(168, 135, 76, 0.06);
}

.single-suite-strip > div > span {
  display: block;
  color: var(--ink-3);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.single-suite-strip > div > b {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.single-badge {
  padding: 3px 9px;
  border: 1px solid rgba(168, 135, 76, 0.35);
  border-radius: 2px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.avatar.is-single-mark {
  background: var(--gold);
  color: #fffaf0;
  font-family: var(--serif);
  font-size: 15px;
}

@media (max-width: 860px) {
  .art-etching {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art-etching {
    display: none;
  }
}



@media (max-width: 1120px) {
  .explorer-body {
    grid-template-columns: 168px 142px minmax(0, 1fr);
  }

  .building-grid {
    gap: 4px;
  }

  .building-btn {
    height: 30px;
    font-size: 9.5px;
  }

  .floor-btn {
    padding: 6px 5px;
  }
}

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .pass-card {
    min-height: 400px;
  }

  .side-panel {
    min-height: 0;
  }

  .explorer-body {
    grid-template-columns: 1fr;
  }

  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 20px;
  }

  .rail-buildings .building-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .rail-floors .floor-list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .floor-btn {
    grid-template-columns: 20px 1fr;
    gap: 4px;
    padding: 8px 7px;
  }

  .floor-btn .f-count {
    display: none;
  }

  .rail-note {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid-2 {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    top: 0;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    width: 100%;
    height: auto;
    padding: 13px 18px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #2b2e37;
  }

  .admin-sidebar .brand-words i {
    display: none;
  }

  .admin-nav {
    flex-direction: row;
    gap: 2px;
    margin-left: auto;
  }

  .admin-nav button {
    padding: 8px 11px;
  }

  .admin-nav button i {
    display: none;
  }

  .sidebar-foot {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .admin-who {
    margin: 0;
  }

  .admin-who i {
    display: none;
  }

  .admin-main {
    padding: 24px 20px 50px;
  }
}

@media (max-width: 860px) {
  .auth-shell,
  .admin-auth {
    grid-template-columns: 1fr;
  }

  .auth-art,
  .admin-auth-art {
    min-height: 0;
    padding: 30px 26px 26px;
  }

  .auth-art::before,
  .admin-auth-art::before {
    inset: 10px;
  }

  .art-copy {
    margin-top: 26px;
  }

  .art-copy h1 {
    font-size: clamp(34px, 7vw, 46px);
  }

  .art-lede {
    margin-top: 14px;
    font-size: 11.5px;
  }

  .art-elevation {
    display: none;
  }

  .art-colleges {
    margin-top: 20px;
  }

  .art-meta {
    margin-top: 12px;
  }

  .auth-panel,
  .admin-auth-panel {
    padding: 30px 20px 60px;
  }

  .auth-panel::before {
    display: none;
  }

  .auth-copyright {
    bottom: 14px;
  }

  .admin-rules {
    display: none;
  }

  .admin-auth-art .art-copy {
    margin-top: 20px;
  }

  .admin-auth-art .art-copy h1 {
    font-size: 42px;
  }

  .admin-auth-art .art-meta {
    margin-top: 14px;
  }

  .admin-auth-art::after {
    display: none;
  }

  .topbar-inner {
    padding: 11px 18px;
  }

  .page {
    padding: 20px 18px 50px;
  }

  .explorer-head {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 20px 20px 14px;
  }

  .jump-form {
    margin-left: auto;
  }

  .plan-top {
    flex-wrap: wrap;
    padding: 15px 18px 8px;
  }

  .plan-top-right {
    align-items: flex-start;
  }

  .plan-scroll {
    padding: 6px 18px 10px;
  }

  .plan-foot {
    flex-wrap: wrap;
    padding: 9px 18px 11px;
  }

  .plan-hint {
    display: none;
  }

  .picking-bar {
    margin: 0 18px 8px;
  }

  .page-foot {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .admin-top {
    flex-wrap: wrap;
    gap: 10px;
  }

  .admin-top h1 {
    font-size: 29px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-lookup {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .room-lookup .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .auth-art {
    padding: 24px 20px 22px;
  }

  .brand-words b {
    font-size: 13px;
  }

  .art-colleges {
    display: none;
  }

  .art-copy h1 {
    font-size: 32px;
  }

  .art-lede {
    font-size: 10.5px;
  }

  .auth-card {
    padding: 24px 20px 18px;
  }

  .auth-form h2 {
    font-size: 24px;
  }

  .tab-ink {
    width: 28px;
  }

  .auth-tabs[data-tab="register"] .tab-ink {
    transform: translateX(60px);
  }

  .auth-tabs {
    gap: 24px;
  }

  .college-picker {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .topbar-inner {
    gap: 10px;
  }

  .topbar .brand-words {
    display: none;
  }

  .chip-text i {
    display: none;
  }

  .page {
    padding: 16px 12px 44px;
  }

  .pass-card {
    min-height: 360px;
    padding: 20px 20px;
  }

  .pass-name {
    font-size: 33px;
  }

  .pass-room {
    min-width: 104px;
  }

  .pass-room strong {
    font-size: 32px;
  }

  .pass-bottom {
    gap: 14px;
  }

  .pass-meta:nth-child(2) {
    max-width: 90px;
  }

  .pass-meta.is-right {
    display: none;
  }

  .pass-stamp {
    right: 20px;
    bottom: 72px;
  }

  .veil-inner {
    padding: 18px 20px;
  }

  .side-panel {
    padding: 18px 18px 16px;
  }

  .panel-head h2 {
    font-size: 22px;
  }

  .explorer {
    margin-top: 14px;
  }

  .explorer-head {
    padding: 18px 16px 12px;
  }

  .explorer-head h2 {
    font-size: 23px;
  }

  .jump-form {
    width: 100%;
    margin-left: 0;
  }

  .jump-form input {
    flex: 1;
    width: auto;
  }

  .rail {
    padding: 12px 16px;
  }

  .rail-buildings .building-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 3px;
  }

  .building-btn {
    height: 27px;
    font-size: 8px;
    border-radius: 4px;
  }

  .rail-floors .floor-list {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
  }

  .floor-btn {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 6px 5px;
    border-radius: 5px;
  }

  .floor-btn .f-tag {
    font-size: 8px;
    text-align: center;
  }

  .floor-btn .f-bar {
    display: block;
    width: 100%;
    height: 2px;
  }

  .plan-top h3 {
    font-size: 18px;
  }

  .plan-top-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .plan-stats {
    gap: 7px;
    font-size: 7.5px;
  }

  .unit-tab {
    padding: 4px 9px;
    font-size: 9px;
  }

  .room-grid-wrap {
    min-width: 0;
  }

  .cell {
    height: 40px;
  }

  .cell-no {
    font-size: 8px;
  }

  .floor-block {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 5px;
  }

  .block-tag {
    font-size: 6px;
  }

  .plan-foot {
    padding: 8px 16px 10px;
  }

  .legend {
    gap: 8px;
  }

  .legend span {
    font-size: 7.5px;
  }

  .modal-root {
    padding: 12px;
    align-items: end;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
    padding: 22px 20px;
    border-radius: 18px;
  }

  .modal-card.is-notice {
    max-height: calc(100vh - 24px);
  }

  .notice-card {
    padding: 26px 22px 20px;
  }

  .notice-head h2 {
    font-size: 22px;
  }

  .notice-letter {
    padding: 16px 16px 22px;
  }

  .notice-letter p {
    font-size: 11px;
  }

  .notice-seal {
    width: 44px;
    height: 44px;
    font-size: 19px;
    right: 12px;
    bottom: 10px;
  }

  .transport-options {
    grid-template-columns: 1fr;
  }

  .modal-head h2 {
    font-size: 21px;
  }

  .toast-root {
    bottom: 18px;
  }

  .admin-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px 12px;
    padding: 10px 14px;
  }

  .admin-sidebar .brand {
    display: flex;
    gap: 8px;
    min-width: 0;
  }

  .admin-sidebar .brand-mark.small {
    width: 31px;
    height: 31px;
    font-size: 15px;
  }

  .admin-sidebar .brand-words b {
    font-size: 11px;
  }

  .admin-sidebar .brand-words i {
    display: none;
  }

  .admin-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 4px;
    margin: 0;
  }

  .admin-nav button {
    flex: 1;
    justify-content: center;
    padding: 7px 6px;
    font-size: 10.5px;
  }

  .sidebar-foot {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .admin-who {
    display: none;
  }

  .sidebar-link {
    font-size: 9px;
    white-space: nowrap;
  }

  .admin-main {
    padding: 20px 14px 44px;
  }

  .admin-top-meta {
    width: 100%;
    justify-content: space-between;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 14px 14px 12px;
  }

  .stat-value {
    font-size: 27px;
  }

  .stat-note {
    font-size: 7.5px;
  }

  .card-box {
    padding: 16px 15px;
  }

  .box-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .searchbox {
    width: 100%;
  }

  .searchbox input {
    flex: 1;
    width: auto;
  }

  .building-admin-grid,
  .building-admin-grid.is-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .room-lookup {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid.four {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 640px;
  }

  .table-hint {
    display: block;
  }

  .admin-occupant > div span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .room-admin-head {
    flex-direction: column;
  }

  .about-sheet {
    padding: 30px 22px 20px;
  }

  .about-seal {
    top: 27px;
    left: 20px;
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .about-head {
    padding: 0;
  }

  .about-head h2 {
    font-size: 27px;
  }

  .about-body {
    gap: 16px;
    margin-top: 22px;
  }

  .about-section p {
    font-size: 11.5px;
    line-height: 2;
  }

  .about-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-foot .foot-right {
    justify-content: flex-start;
  }

  .sidebar-copy {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
