/* ==========================================================================
   计金6 · 登录与班委发布台
   明亮编辑部风格：纸白、浅紫、珊瑚与湖水绿。
   ========================================================================== */

/* --------------------------------------------------------------------------
   通用表单控件
   -------------------------------------------------------------------------- */

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

.field > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.field > span:first-child small {
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field textarea {
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(95, 37, 159, 0.08);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-wide {
  grid-column: 1 / -1;
}

.btn-primary,
.btn-quiet,
.btn-danger,
.studio-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  transition: all 0.3s var(--ease);
}

.btn-primary,
.studio-primary-btn {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.btn-primary:hover,
.studio-primary-btn:hover {
  background: #4c1a7e;
  border-color: #4c1a7e;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(95, 37, 159, 0.2);
}

.btn-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(95, 37, 159, 0.04);
}

.btn-danger {
  border-color: rgba(176, 78, 67, 0.24);
  background: transparent;
  color: var(--red);
}

.btn-danger:hover:not(:disabled) {
  border-color: var(--red);
  background: rgba(176, 78, 67, 0.06);
}

.btn-danger:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   登录弹窗
   -------------------------------------------------------------------------- */

.login-dialog {
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100svh - 36px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  overflow: hidden;
  max-height: calc(100svh - 36px);
  background: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 40px 110px rgba(36, 26, 46, 0.34);
  animation: dialogIn 0.45s var(--ease) both;
}

.login-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 4;
  background: rgba(255, 253, 248, 0.9);
}

.login-aside {
  position: relative;
  overflow: hidden;
  padding: 38px 38px 34px;
  background:
    radial-gradient(520px 400px at 90% 10%, rgba(224, 111, 91, 0.48), transparent 64%),
    radial-gradient(420px 380px at 0% 100%, rgba(47, 125, 115, 0.3), transparent 62%),
    linear-gradient(150deg, #461574, #63279b 58%, #7c3bb2);
  color: var(--white);
  display: flex;
  flex-direction: column;
}

.login-aside::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 253, 248, 0.045), 0 0 0 110px rgba(255, 253, 248, 0.025);
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.login-brand span {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.login-brand small {
  font-family: var(--sans);
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: rgba(255, 253, 248, 0.55);
}

.login-kicker {
  position: relative;
  z-index: 2;
  margin-top: 46px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-2);
}

.login-aside h2 {
  position: relative;
  z-index: 2;
  margin: 16px 0 18px;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.login-aside h2 em {
  color: #ffe7b2;
  font-style: normal;
}

.login-aside-copy {
  position: relative;
  z-index: 2;
  max-width: 32ch;
  font-size: 11.5px;
  line-height: 1.95;
  color: rgba(255, 253, 248, 0.66);
}

.login-perks {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 253, 248, 0.2);
}

.login-perks li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.03em;
  color: rgba(255, 253, 248, 0.72);
}

.login-perks span {
  font-family: var(--display);
  font-size: 10px;
  color: var(--coral-soft);
}

.login-stamp {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 30px;
  font-size: 7px;
  letter-spacing: 0.2em;
  color: rgba(255, 253, 248, 0.38);
}

.login-form {
  overflow-y: auto;
  padding: 45px 44px 38px;
}

.login-form h3 {
  margin: 13px 0 7px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-sub {
  margin-bottom: 26px;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--muted);
}

.login-form .field {
  margin-bottom: 17px;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 58px;
}

.password-wrap button {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 4px 7px;
  border: none;
  background: transparent;
  color: var(--purple);
  font-size: 8px;
  letter-spacing: 0.08em;
  transform: translateY(-50%);
}

.login-error {
  margin-bottom: 14px;
  padding: 9px 12px;
  border-left: 2px solid var(--red);
  background: rgba(176, 78, 67, 0.07);
  color: var(--red);
  font-size: 10px;
}

.login-submit {
  width: 100%;
  min-height: 47px;
  margin-top: 4px;
  border: 1px solid var(--purple);
  background: var(--purple);
  color: var(--white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s var(--ease);
}

.login-submit:hover {
  background: #4b1a7e;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(95, 37, 159, 0.22);
}

.login-submit span {
  color: var(--gold-2);
}

.login-demo-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
  padding: 10px 15px;
  border: 1px dashed rgba(95, 37, 159, 0.26);
  background: rgba(95, 37, 159, 0.035);
  color: var(--purple);
  font-size: 9px;
  letter-spacing: 0.05em;
  transition: background 0.3s ease;
}

.login-demo-btn:hover {
  background: rgba(95, 37, 159, 0.08);
}

.login-demo-btn span {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.login-note {
  margin-top: 21px;
  font-size: 8px;
  line-height: 1.8;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   发布台框架
   -------------------------------------------------------------------------- */

body.studio-open {
  overflow: hidden;
}

.studio {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  flex-direction: column;
  background: #f8f5ee;
  color: var(--ink);
  animation: studioIn 0.45s var(--ease) both;
}

.studio[hidden] {
  display: none !important;
}

.studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 68px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.studio-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.studio-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.studio-brand strong {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.studio-brand small {
  margin-top: 3px;
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

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

.studio-session {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 9px;
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.studio-session i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(47, 125, 115, 0.12);
}

.studio-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  transition: all 0.3s var(--ease);
}

.studio-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.studio-btn-ghost {
  background: transparent;
}

.studio-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.studio-side {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 218px;
  padding: 24px 14px 16px;
  border-right: 1px solid var(--line);
  background: #f2ede3;
}

.studio-side-label {
  padding: 0 11px;
  margin-bottom: 9px;
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.studio-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-align: left;
  transition: all 0.25s ease;
}

.studio-nav span {
  width: 16px;
  font-family: var(--display);
  font-size: 8px;
  color: var(--muted-2);
}

.studio-nav b {
  margin-left: auto;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted-2);
}

.studio-nav:hover {
  background: rgba(95, 37, 159, 0.06);
  color: var(--purple);
}

.studio-nav.is-active {
  background: var(--purple);
  color: var(--white);
}

.studio-nav.is-active span,
.studio-nav.is-active b {
  color: rgba(255, 253, 248, 0.65);
}

.studio-side-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.studio-side-foot button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 11px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 8.5px;
  text-align: left;
}

.studio-side-foot button:hover {
  color: var(--purple);
}

.studio-side-foot button span {
  color: var(--muted-2);
}

.studio-side-foot small {
  display: block;
  padding: 12px 11px 0;
  font-size: 7px;
  line-height: 1.8;
  color: var(--muted-2);
}

.studio-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 36px 40px 64px;
}

.studio-view {
  max-width: 1210px;
  margin: 0 auto;
}

.studio-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.55fr);
  align-items: end;
  gap: 45px;
  margin-bottom: 32px;
}

.studio-welcome h2 {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.studio-welcome h2 em {
  color: var(--purple);
  font-style: normal;
}

.studio-welcome > p {
  padding-bottom: 8px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}

.studio-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.studio-stat {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--white);
}

.studio-stat::after {
  content: "";
  position: absolute;
  right: -27px;
  bottom: -42px;
  width: 100px;
  height: 100px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.13;
}

.studio-stat > span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.studio-stat strong {
  display: block;
  margin: 16px 0 2px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.studio-stat small {
  font-size: 6.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.stat-purple {
  border-top: 3px solid var(--purple);
}

.stat-purple strong {
  color: var(--purple);
}

.stat-coral {
  border-top: 3px solid var(--coral);
}

.stat-coral strong {
  color: var(--coral);
}

.stat-teal {
  border-top: 3px solid var(--teal);
}

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

.stat-gold {
  border-top: 3px solid var(--gold);
}

.stat-gold strong {
  font-size: 26px;
  color: var(--gold-text);
}

.studio-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(260px, 0.62fr);
  gap: 18px;
  margin-bottom: 18px;
}

.studio-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 23px 25px;
}

.studio-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.studio-card-head h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.studio-card-head span {
  font-size: 6.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.quick-actions button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 133px;
  padding: 14px;
  border: none;
  background: var(--cream);
  text-align: left;
  transition: background 0.3s ease;
}

.quick-actions button:hover {
  background: var(--lavender);
}

.quick-actions i {
  font-family: var(--display);
  font-size: 10px;
  font-style: normal;
  color: var(--coral-text);
}

.quick-actions span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.quick-actions small {
  font-family: var(--sans);
  font-size: 7.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted-2);
}

.quick-actions b {
  align-self: flex-end;
  margin-top: 9px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 400;
  color: var(--purple);
}

.studio-note-card {
  background:
    radial-gradient(300px 260px at 100% 0%, rgba(224, 111, 91, 0.12), transparent 62%),
    var(--cream);
}

.studio-note-card h3 {
  margin: 13px 0 11px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
}

.studio-note-card p {
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted);
}

.studio-note-small {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted-2) !important;
}

.studio-recent-card {
  padding-bottom: 12px;
}

.studio-recent {
  display: flex;
  flex-direction: column;
}

.recent-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(36, 26, 46, 0.08);
}

.recent-row i {
  font-family: var(--display);
  font-size: 9px;
  font-style: normal;
  color: var(--coral-text);
}

.recent-row span {
  font-size: 10px;
  color: var(--ink);
}

.recent-row small {
  font-size: 7.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   管理页头 / 列表 / 编辑器
   -------------------------------------------------------------------------- */

.studio-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.studio-page-head h2 {
  margin: 7px 0 6px;
  font-family: var(--serif);
  font-size: clamp(31px, 3.5vw, 43px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.studio-page-head > div > p:last-child {
  max-width: 65ch;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}

.studio-primary-btn {
  flex: none;
}

.manager-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.manager-list {
  border: 1px solid var(--line);
  background: var(--white);
}

.manager-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.manager-list-head b {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 400;
  color: var(--purple);
}

#adminNewsList,
#adminNoticeList,
#adminFinanceList {
  max-height: calc(100svh - 260px);
  overflow-y: auto;
}

.admin-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  border: none;
  border-bottom: 1px solid rgba(36, 26, 46, 0.07);
  background: transparent;
  text-align: left;
  transition: background 0.25s ease;
}

.admin-item:hover {
  background: rgba(95, 37, 159, 0.045);
}

.admin-item.is-active {
  background: var(--lavender);
  box-shadow: inset 3px 0 0 var(--purple);
}

.admin-item-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 44px;
  height: 44px;
  border-radius: 2px;
  background: linear-gradient(145deg, var(--purple), var(--coral));
  color: rgba(255, 253, 248, 0.8);
  font-family: var(--display);
  font-size: 10px;
}

.admin-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-item-main {
  min-width: 0;
}

.admin-item-main strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-item-main span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.admin-item-main em {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(224, 111, 91, 0.12);
  color: var(--coral-text);
  font-style: normal;
}

.admin-item-amount {
  font-family: var(--display);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.admin-item-amount.is-in {
  color: var(--teal);
}

.admin-item-amount.is-out {
  color: var(--coral-text);
}

.admin-empty {
  padding: 35px 20px;
  text-align: center;
  font-size: 9px;
  color: var(--muted-2);
}

.editor-form {
  padding: 24px 26px 22px;
  border: 1px solid var(--line);
  background: var(--white);
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.editor-head h3 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
}

.editor-badge {
  padding: 4px 9px;
  border: 1px solid rgba(95, 37, 159, 0.2);
  color: var(--purple);
  font-size: 6.5px;
  letter-spacing: 0.14em;
}

.editor-form .form-grid {
  gap: 14px;
}

.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  background: rgba(95, 37, 159, 0.025);
  cursor: pointer;
}

.switch-row input {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  accent-color: var(--purple);
}

.switch-row > span {
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink);
}

.switch-row small {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  color: var(--muted-2);
}

.upload-block {
  margin-top: 18px;
}

.upload-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink);
}

.upload-head small {
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.upload-head em {
  font-style: normal;
  font-size: 8px;
  color: var(--purple);
}

.upload-zone {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px dashed rgba(95, 37, 159, 0.28);
  background: rgba(95, 37, 159, 0.025);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.upload-zone:hover {
  border-color: var(--purple);
  background: rgba(95, 37, 159, 0.06);
}

.upload-zone svg {
  width: 20px;
  height: 20px;
  color: var(--purple);
}

.upload-zone span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-zone b {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--purple);
}

.upload-zone small {
  font-size: 7.5px;
  color: var(--muted-2);
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.photo-preview:not(:empty) {
  margin-top: 10px;
}

.admin-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.admin-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-photo button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(36, 26, 46, 0.68);
  color: var(--white);
  font-size: 13px;
  line-height: 1;
}

.admin-photo button:hover {
  background: var(--red);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.editor-actions .btn-primary {
  margin-left: auto;
}

.finance-settings {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--white);
}

.finance-settings .btn-quiet {
  margin-bottom: 1px;
}

#adminFinanceList .admin-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

#adminFinanceList .admin-item-thumb {
  display: none;
}

#adminFinanceList .admin-item-main strong {
  font-family: var(--sans);
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.studio-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 6;
  padding: 12px 18px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  background: var(--ink);
  color: var(--cream);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 40px rgba(36, 26, 46, 0.24);
  animation: toastIn 0.35s var(--ease) both;
}

.studio-toast.is-error {
  background: var(--red);
}

@keyframes studioIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1150px) {
  .studio-side {
    width: 190px;
  }

  .studio-main {
    padding: 30px 28px 56px;
  }

  .manager-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }

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

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .login-aside {
    min-height: 230px;
    padding: 27px 27px 24px;
  }

  .login-aside h2 {
    margin: 9px 0;
    font-size: 42px;
  }

  .login-aside-copy {
    max-width: 48ch;
    font-size: 10px;
  }

  .login-perks {
    display: none;
  }

  .login-stamp {
    display: none;
  }

  .login-form {
    overflow: visible;
    padding: 30px 27px 28px;
  }

  .studio-top {
    height: 60px;
    padding: 0 15px;
  }

  .studio-layout {
    flex-direction: column;
    overflow: hidden;
  }

  .studio-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 7px 10px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background: var(--white);
  }

  .studio-side-label {
    display: none;
  }

  .studio-side-foot {
    display: flex;
    align-items: center;
    flex: none;
    gap: 2px;
    margin: 0 0 0 4px;
    padding: 0 0 0 4px;
    border-top: none;
    border-left: 1px solid var(--line);
  }

  .studio-side-foot button {
    width: auto;
    padding: 8px 10px;
    font-size: 7.5px;
    white-space: nowrap;
  }

  .studio-side-foot .studio-side-label,
  .studio-side-foot small {
    display: none;
  }

  .studio-nav {
    width: auto;
    flex: none;
    padding: 9px 13px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .studio-nav span {
    display: none;
  }

  .studio-nav b {
    margin-left: 5px;
  }

  .studio-main {
    flex: 1;
    min-height: 0;
    padding: 24px 17px 50px;
  }

  .studio-welcome {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .studio-welcome > p {
    padding-bottom: 0;
  }

  .studio-dash-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick-actions button {
    min-height: 82px;
  }

  .quick-actions span {
    margin-top: 10px;
  }

  .quick-actions b {
    position: absolute;
    right: 14px;
  }

  .manager-layout {
    grid-template-columns: 1fr;
  }

  #adminNewsList,
  #adminNoticeList,
  #adminFinanceList {
    max-height: 260px;
  }

  .studio-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .finance-settings {
    grid-template-columns: 1fr 1fr;
  }

  .finance-settings .btn-quiet {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .login-dialog {
    width: calc(100vw - 22px);
  }

  .login-shell {
    max-height: calc(100svh - 22px);
  }

  .login-aside {
    min-height: 0;
    padding: 24px 22px 20px;
  }

  .login-aside h2 {
    font-size: 36px;
  }

  .login-aside-copy {
    font-size: 9.5px;
  }

  .login-brand img {
    width: 42px;
    height: 42px;
  }

  .login-kicker {
    margin-top: 22px;
  }

  .login-form {
    padding: 25px 22px 24px;
  }

  .login-form h3 {
    font-size: 26px;
  }

  .studio-top {
    height: 56px;
  }

  .studio-brand img {
    width: 30px;
    height: 30px;
  }

  .studio-brand strong {
    font-size: 14px;
  }

  .studio-brand small {
    font-size: 5.5px;
  }

  .studio-session {
    display: none;
  }

  .studio-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 7.5px;
  }

  .studio-stats {
    grid-template-columns: 1fr 1fr;
  }

  .studio-stat {
    min-height: 105px;
    padding: 14px;
  }

  .studio-stat strong {
    margin-top: 12px;
    font-size: 31px;
  }

  .stat-gold strong {
    font-size: 21px;
  }

  .studio-card {
    padding: 18px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .editor-form {
    padding: 18px 16px;
  }

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

  .editor-actions {
    flex-wrap: wrap;
  }

  .editor-actions .btn-primary {
    width: 100%;
    margin-left: 0;
    order: 3;
  }

  .finance-settings {
    grid-template-columns: 1fr;
  }

  .studio-toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell,
  .studio,
  .studio-toast {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Classmate login tabs / profile editor
   -------------------------------------------------------------------------- */

.login-tabs {
  display: flex;
  gap: 6px;
  margin: -4px 0 27px;
  border-bottom: 1px solid var(--line);
}

.login-tab {
  position: relative;
  padding: 0 3px 12px;
  border: none;
  background: none;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.login-tab + .login-tab {
  margin-left: 20px;
}

.login-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  transition: background 0.25s ease;
}

.login-tab:hover {
  color: var(--purple);
}

.login-tab.is-active {
  color: var(--purple);
}

.login-tab.is-active::after {
  background: var(--purple);
}

.login-panel h3 {
  margin-top: 13px;
}

.login-panel .login-note b {
  color: var(--purple);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.student-dialog {
  width: min(720px, calc(100vw - 34px));
  max-height: min(820px, calc(100svh - 34px));
  padding: 0;
  border: none;
  background: transparent;
}

.student-profile-panel {
  max-height: min(820px, calc(100svh - 34px));
  padding: 38px 40px 30px;
}

.student-profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.student-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--purple), var(--coral));
  color: var(--white);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.08);
}

.student-avatar img,
.profile-avatar img,
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.student-profile-head h3 {
  margin: 6px 0 4px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.student-profile-head #studentProfileSub {
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.student-profile-panel .form-grid {
  gap: 13px;
}

.student-profile-panel .field input,
.student-profile-panel .field select,
.student-profile-panel .field textarea {
  font-size: 11px;
}

.profile-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px dashed var(--line);
  background: rgba(95, 37, 159, 0.025);
}

.profile-upload strong {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
}

.profile-upload small {
  display: block;
  margin-top: 3px;
  font-size: 7.5px;
  color: var(--muted-2);
}

.profile-upload-actions {
  display: flex;
  flex: none;
  gap: 6px;
}

.profile-upload-actions .btn-quiet {
  min-height: 32px;
  padding: 0 12px;
  font-size: 8px;
  cursor: pointer;
}

.profile-save-status {
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 2px solid var(--teal);
  background: rgba(47, 125, 115, 0.07);
  color: var(--teal);
  font-size: 9px;
}

.student-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.student-actions .btn-primary {
  margin-left: auto;
}

.profile-save-note {
  margin-top: 13px;
  font-size: 7.5px;
  line-height: 1.8;
  color: var(--muted-2);
}

.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 9px 14px;
  border: 1px solid var(--purple);
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font-size: 9px;
  letter-spacing: 0.06em;
  transition: all 0.3s var(--ease);
}

.profile-edit-btn span {
  color: var(--gold-2);
}

.profile-edit-btn:hover {
  background: #4b1a7e;
  transform: translateY(-1px);
}

.member-foot-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.member-edit-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--purple);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  transition: color 0.3s ease;
}

.member-edit-link:hover {
  color: var(--coral-text);
}

@media (max-width: 680px) {
  .student-name-picker {
    max-height: 96px;
  }

  .student-profile-panel {
    padding: 30px 20px 24px;
  }

  .student-profile-head {
    gap: 14px;
  }

  .student-avatar {
    width: 66px;
    height: 66px;
    font-size: 24px;
  }

  .student-profile-head h3 {
    font-size: 24px;
  }

  .profile-upload {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .student-actions {
    align-items: stretch;
  }

  .student-actions .btn-quiet {
    flex: 1;
  }

  .student-actions .btn-primary {
    width: 100%;
    margin-left: 0;
  }

  .member-foot-links {
    justify-content: flex-start;
  }
}

.profile-bio {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 2px solid var(--coral);
  background: rgba(224, 111, 91, 0.05);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

/* Add-member entry / dialog */
.add-member-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: 1px dashed rgba(95, 37, 159, 0.34);
  border-radius: 999px;
  background: transparent;
  color: var(--purple);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: all 0.3s var(--ease);
}

.add-member-entry span {
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.add-member-entry:hover {
  border-style: solid;
  background: rgba(95, 37, 159, 0.06);
}

.add-member-dialog {
  width: min(620px, calc(100vw - 34px));
  max-height: min(760px, calc(100svh - 34px));
  padding: 0;
  border: none;
  background: transparent;
}

.add-member-panel {
  max-height: min(760px, calc(100svh - 34px));
  padding: 38px 38px 30px;
}

.add-member-panel h3 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
}

.add-member-sub {
  margin-bottom: 23px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.8;
}

.add-member-error {
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 2px solid var(--red);
  background: rgba(176, 78, 67, 0.07);
  color: var(--red);
  font-size: 9px;
}

@media (max-width: 680px) {
  .add-member-panel {
    padding: 30px 20px 24px;
  }

  .member-toolbar .add-member-entry {
    width: 100%;
    justify-content: center;
  }
}

.add-member-success {
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 2px solid var(--teal);
  background: rgba(47, 125, 115, 0.07);
  color: var(--teal);
  font-size: 9px;
}

/* Dino game easter egg */
.dino-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--gold-2);
  font-size: 8px;
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.dino-entry svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.dino-entry:hover {
  color: var(--coral);
}

.dino-dialog {
  width: min(820px, calc(100vw - 34px));
  max-height: calc(100svh - 34px);
  padding: 0;
  border: none;
  background: transparent;
}

.dino-panel {
  padding: 32px 34px 24px;
}

.dino-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-right: 25px;
}

.dino-head h3 {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dino-scoreboard {
  display: flex;
  gap: 13px;
  flex: none;
  padding-bottom: 4px;
  font-size: 7px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.dino-scoreboard b {
  color: var(--ink);
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.dino-sub {
  margin-top: 9px;
  font-size: 8.5px;
  color: var(--muted-2);
}

.dino-stage {
  position: relative;
  overflow: hidden;
  margin-top: 17px;
  aspect-ratio: 3 / 1;
  border: 1px solid var(--line-strong);
  background: #fbf7ee;
}

.dino-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.dino-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: rgba(251, 247, 238, 0.58);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-align: center;
}

.dino-overlay[hidden] {
  display: none;
}

.dino-overlay p {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
}

.dino-start,
.dino-restart {
  border: 1px solid var(--purple);
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font-size: 8px;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
}

.dino-start {
  min-height: 34px;
  padding: 0 18px;
}

.dino-restart {
  min-height: 30px;
  padding: 0 13px;
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.dino-start:hover {
  background: #4b1a7e;
}

.dino-restart:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.dino-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 13px;
  font-size: 7px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.dino-actions b {
  color: var(--ink);
  font-family: var(--mono, monospace);
  font-weight: 600;
}

.dino-note {
  margin-top: 12px;
  font-size: 7px;
  color: var(--muted-2);
}

@media (max-width: 680px) {
  .dino-panel {
    padding: 27px 18px 20px;
  }

  .dino-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .dino-head h3 {
    font-size: 27px;
  }

  .dino-scoreboard {
    padding-bottom: 0;
  }

  .dino-stage {
    aspect-ratio: 2.15 / 1;
  }

  .dino-actions {
    flex-wrap: wrap;
  }
}

/* Classmate name picker */
.student-name-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  max-height: 150px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  scrollbar-width: thin;
}

.student-name-picker:focus-visible {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(95, 37, 159, 0.08);
  outline: none;
}

.student-name-option {
  min-height: 28px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: rgba(95, 37, 159, 0.035);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.student-name-option:hover {
  border-color: rgba(95, 37, 159, 0.28);
  color: var(--purple);
}

.student-name-option.is-selected {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
}

.student-picker-note {
  margin-top: 5px;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

@media (max-width: 680px) {
  .student-name-picker {
    max-height: 96px;
  }
}
