/* HanyangRun portal — 深青 / 米金，无外部依赖 */
[hidden] { display: none !important; }
:root {
  --bg-deep: #0f2424;
  --bg-panel: #163333;
  --bg-input: #0c1e1e;
  --teal: #2d6b6b;
  --teal-light: #3d8585;
  --gold: #c9b896;
  --gold-dim: #a89470;
  --gold-soft: #e8dcc8;
  --text: #e6ecec;
  --text-muted: #9fb4b4;
  --danger: #c76b6b;
  --danger-bg: rgba(199, 107, 107, 0.12);
  --ok: #6ba88a;
  --border: rgba(201, 184, 150, 0.28);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --focus: #d4c4a0;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(165deg, var(--bg-deep) 0%, #122e2e 45%, var(--bg-deep) 100%);
  line-height: 1.5;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--gold-soft);
  text-decoration: underline;
}

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.page--admin {
  justify-content: flex-start;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem 1.35rem;
}

.card--wide {
  max-width: 880px;
}

.brand {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
}

.subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hint {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.875rem;
  color: var(--gold);
}

.input-row {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
}

.input-row input {
  flex: 1;
  min-width: 0;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

input::placeholder {
  color: #6a8585;
}

input:disabled,
select:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bg-deep);
  background: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: var(--gold-soft);
}

.btn--ghost {
  color: var(--gold);
  background: transparent;
  border-color: var(--border);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(201, 184, 150, 0.1);
  color: var(--gold-soft);
}

.btn--danger {
  color: #fff;
  background: var(--danger);
  border-color: #a85555;
}

.btn--small {
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
}

.btn--block {
  width: 100%;
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.btn-toggle {
  flex-shrink: 0;
  min-width: 4.5rem;
}

.form-error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  color: #f0c0c0;
  background: var(--danger-bg);
  border: 1px solid rgba(199, 107, 107, 0.35);
  border-radius: var(--radius);
}

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

.status {
  min-height: 1.25rem;
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.status--ok {
  color: var(--ok);
}

.status--err {
  color: #f0a8a8;
}

.toolbar {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel {
  width: 100%;
  max-width: 880px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}

.panel__title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  padding: 0.5rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid rgba(201, 184, 150, 0.15);
}

th {
  color: var(--gold);
  font-weight: 500;
  white-space: nowrap;
}

td.actions {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.badge--admin {
  color: var(--gold-soft);
  border-color: var(--gold-dim);
}

.badge--off {
  color: #f0a8a8;
  border-color: rgba(199, 107, 107, 0.45);
  background: var(--danger-bg);
}

.empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem;
}

/* 游戏页顶栏 / 底栏（play-session.js 注入） */
.hy-portal-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--text);
  background: rgba(15, 36, 36, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.hy-portal-bar--footer {
  top: auto;
  bottom: 0;
  border-bottom: none;
  border-top: 1px solid var(--border);
}

header > .hy-portal-bar {
  position: static;
  order: 3;
  flex: 0 0 auto;
  margin-left: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.hy-portal-bar__user {
  color: var(--gold-soft);
}

.hy-portal-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hy-portal-bar .btn {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
}

.hy-portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 20, 20, 0.78);
}

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

.hy-portal-overlay__box {
  max-width: 360px;
  padding: 1.1rem 1rem;
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hy-portal-overlay__msg {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.toolbar .brand{margin:0;font-size:1.15rem}.toolbar .subtitle{margin:.25rem 0 0}.field--compact{margin:0}.create-submit{margin-top:.85rem}
