:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-2: #edf2f8;
  --text: #18283b;
  --muted: #526579;
  --accent: #2457a6;
  --accent-2: #194682;
  --border: #d8e2ec;
  --error: #a12736;
  --success: #22624c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-2); }
button, input { font: inherit; }
button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button-link:hover { background: var(--accent-2); color: #fff; }
button:disabled { cursor: wait; opacity: .65; }
.button-secondary { background: var(--panel); border-color: var(--border); color: var(--text); }
.button-secondary:hover { background: var(--panel-2); color: var(--text); }
:where(a, button, input, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #a9bacd;
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
input::placeholder { color: #67798c; opacity: 1; }
label { display: block; margin: 20px 0 7px; font-size: 14px; font-weight: 600; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.35; }
h1 { margin: 0 0 16px; font-size: clamp(28px, 3.2vw, 38px); font-weight: 650; letter-spacing: -.6px; }
h2 { margin: 0 0 12px; font-size: 23px; font-weight: 650; }
p { margin: 0 0 16px; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 32px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 19px; font-weight: 650; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand img { display: block; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.quiet-link { color: var(--muted); font-size: 14px; }
.site-footer { margin-top: 36px; padding: 22px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.site-footer p { margin-bottom: 5px; }
.muted, .field-hint { color: var(--muted); }
.field-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.status-message, .error, .msg { min-height: 24px; margin-top: 14px; font-size: 14px; overflow-wrap: anywhere; }
.error, [data-state="error"] { color: var(--error); }
[data-state="success"] { color: var(--success); }
.notice { padding: 16px 18px; border-left: 3px solid var(--accent); background: #eaf0f9; color: #314968; font-size: 14px; }
.notice p:last-child { margin-bottom: 0; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.entry-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 100px); align-items: start; padding: 52px 0 28px; }
.entry-intro { padding-top: 18px; }
.entry-intro h1 { max-width: 13em; margin-bottom: 22px; }
.entry-lead { max-width: 32em; color: var(--muted); font-size: 17px; line-height: 1.85; }
.mail-illustration { margin: 0 0 28px; width: 160px; height: 100px; }
.entry-details { margin: 30px 0 0; padding: 0; }
.entry-details div { padding: 16px 0; border-top: 1px solid var(--border); }
.entry-details dt { font-weight: 600; margin-bottom: 4px; }
.entry-details dd { margin: 0; color: var(--muted); font-size: 14px; }
.entry-panel { padding: 30px; }
.entry-panel h2 { margin-bottom: 6px; }
.entry-panel .notice { margin-top: 20px; padding: 12px 14px; font-size: 13px; }
.form-action { width: 100%; margin-top: 24px; }
.entry-help { margin-top: 18px; margin-bottom: 0; font-size: 13px; color: var(--muted); }
.inbox-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 32px 0 10px; }
.inbox-heading h1 { margin-bottom: 7px; }
.inbox-heading p { margin: 0; color: var(--muted); }
.inbox-status { min-height: 28px; margin: 10px 0 20px; font-size: 14px; color: var(--muted); }
.inbox-status[data-state="error"] { color: var(--error); }
.notification-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding: 28px 0; border-top: 1px solid var(--border); }
.section-heading h2 { font-size: 20px; margin-bottom: 8px; }
.section-heading p { color: var(--muted); font-size: 13px; max-width: 24em; }
.notification-list { min-width: 0; }
.item { margin-bottom: 12px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); overflow-wrap: anywhere; }
.item:last-child { margin-bottom: 0; }
.code { color: var(--accent-2); font-family: Consolas, "SFMono-Regular", monospace; font-size: 32px; font-weight: 600; letter-spacing: 4px; }
.item-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.meta { font-size: 13px; color: var(--muted); margin-top: 8px; }
.link-host { font-size: 14px; margin: 10px 0; }
.link-address { margin: 12px 0; }
.link-address summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.link-text { display: block; margin-top: 10px; padding: 12px; background: var(--bg); font-size: 13px; overflow-wrap: anywhere; user-select: text; white-space: pre-wrap; }
.item .button-link { margin-top: 6px; font-size: 14px; }
.empty { padding: 20px 0; color: var(--muted); font-size: 14px; }
.page-admin-entry .entry-layout { max-width: 980px; margin: 0 auto; }
.page-admin-entry .entry-intro h1 { font-size: 32px; }
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .site-header { padding: 20px 0; gap: 12px; }
  .brand { font-size: 17px; }
  .quiet-link { font-size: 13px; }
  .entry-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 20px; }
  .entry-intro { padding-top: 0; }
  .entry-intro h1 { max-width: none; }
  .entry-details { margin-top: 20px; }
  .entry-details div { padding: 12px 0; }
  .mail-illustration { width: 128px; height: 80px; margin-bottom: 18px; }
  .entry-panel { padding: 24px; }
  .notification-section { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 24px 0; }
  .section-heading p { max-width: none; }
  .inbox-heading { align-items: start; padding-top: 20px; }
  .inbox-heading button { flex-shrink: 0; }
  .item { padding: 18px; }
}
@media (max-width: 380px) {
  .wrap { padding: 0 16px; }
  .site-header { flex-wrap: wrap; }
  .entry-panel { padding: 20px; }
  .inbox-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
