.surface {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.surface:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 80px rgba(62, 34, 14, 0.14);
  border-color: rgba(80, 54, 28, 0.2);
}

.eyebrow {
  margin-bottom: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.headline {
  font-family: Georgia, "Noto Serif SC", serif;
  letter-spacing: -0.03em;
}

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

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-deep);
  border: 1px solid rgba(53, 46, 39, 0.08);
}

.badge-ok {
  background: rgba(78, 147, 108, 0.16);
  color: #245b3d;
}

.badge-warn {
  background: rgba(181, 104, 66, 0.14);
  color: #7c3f1f;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-entry-row > .button,
.auth-entry-row > .button-ghost,
.auth-mode-row > .button-ghost {
  flex: 1 1 0;
  justify-content: center;
}

.button-row-vertical {
  flex-direction: column;
}

.button,
.button-ghost,
.nav-button {
  border: 0;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button-ghost:hover,
.nav-button:hover {
  transform: translateY(-1px);
}

.button {
  padding: 10px 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2f2a25 0%, #171412 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(20, 16, 13, 0.14);
}

.button-ghost {
  padding: 9px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid rgba(53, 46, 39, 0.08);
}

.button-ghost.is-active {
  background: var(--brand-deep);
  color: white;
}

.microsoft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(53, 46, 39, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: #1f1f1f;
  box-shadow: 0 10px 24px rgba(53, 46, 39, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.microsoft-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(53, 46, 39, 0.12);
  border-color: rgba(53, 46, 39, 0.18);
}

.microsoft-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  gap: 2px;
  flex: 0 0 auto;
}

.microsoft-mark-tile {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.microsoft-red {
  background: #f25022;
}

.microsoft-green {
  background: #7fba00;
}

.microsoft-blue {
  background: #00a4ef;
}

.microsoft-yellow {
  background: #ffb900;
}

.nav-button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 251, 246, 0.96);
  color: var(--ink);
  border: 1px solid rgba(180, 90, 43, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 0 rgba(180, 90, 43, 0.04);
}

.nav-button.is-active {
  background: linear-gradient(135deg, #2f2a25 0%, #171412 100%);
  color: white;
  box-shadow: 0 12px 24px rgba(20, 16, 13, 0.16);
}

.nav-rail > .eyebrow {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(180, 90, 43, 0.12);
  color: #b35e34;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
}

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

.profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
}

.profile-panel-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(95, 66, 38, 0.64);
  border-bottom: 2px solid rgba(95, 66, 38, 0.64);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.profile-select {
  appearance: none;
  padding-right: 40px;
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98) 0%, rgba(251, 245, 238, 0.95) 100%);
  border-color: rgba(180, 90, 43, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 26px rgba(53, 46, 39, 0.06);
}

.profile-select:focus {
  outline: none;
  border-color: rgba(180, 90, 43, 0.28);
  box-shadow: 0 0 0 3px rgba(180, 90, 43, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 28px rgba(53, 46, 39, 0.08);
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}

.captcha-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.82);
}

.captcha-row strong {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stack > li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.stack > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.session-note {
  margin-top: 12px;
  color: var(--ink-soft);
}

.auth-form,
.content-form,
.reply-form {
  display: grid;
  gap: 14px;
}

.top-gap {
  margin-top: 10px;
}

.button-copy {
  padding: 7px 11px;
}

.button-icon {
  padding-inline: 12px;
}

.notice-bar {
  background: rgba(255, 253, 249, 0.98);
}

.toast-stack {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 42;
  width: min(560px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(180, 90, 43, 0.16);
  background: rgba(255, 251, 245, 0.96);
  box-shadow: 0 18px 48px rgba(53, 46, 39, 0.16);
  backdrop-filter: blur(18px);
  animation: toast-enter 220ms ease;
}

.toast-card p {
  margin: 0;
  color: var(--ink);
}

.toast-notice {
  border-color: rgba(180, 90, 43, 0.16);
}

.toast-error {
  border-color: rgba(181, 104, 66, 0.26);
  background: rgba(255, 246, 242, 0.97);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(22, 18, 15, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 440px);
  padding: 20px;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
