/* RM brand palette: SOP_RM增广VI系统_主色与辅助色使用规范_v2511.
   Use the published HEX column for digital UI; preserve the original logo artwork.
   Official fonts are preferred locally. No font files are redistributed. */
:root {
  --rm-red: #C8161D;
  --rm-brown: #2E201D;
  --rm-gray: #D0CAC3;
  --rm-paper: #F7F5F2;
  --rm-blue: #416075;
  --rm-sky: #BFD1DB;
  --rm-orange: #F08441;
  --rm-green: #215F45;
  font-family: Cabin, "Noto Sans SC", "Noto Sans Hans", "Source Han Sans SC", "思源黑体", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--rm-brown);
  background: var(--rm-paper);
  line-height: 1.65;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px max(24px, calc((100vw - 1112px) / 2));
  background: #fff;
  border-top: 4px solid var(--rm-red);
  border-bottom: 1px solid var(--rm-gray);
}
.brand { display: flex; align-items: center; gap: 28px; color: var(--rm-brown); text-decoration: none; min-width: 0; }
.brand-logo { width: 200px; height: auto; flex-shrink: 0; display: block; }
.brand-product { display: flex; flex-direction: column; padding-left: 28px; border-left: 1px solid var(--rm-gray); white-space: nowrap; }
.brand-product strong { font-size: 21px; font-weight: 700; letter-spacing: .06em; }
.brand-product > span { font-size: 10px; letter-spacing: .12em; color: var(--rm-blue); }
nav { display: flex; gap: 8px; flex-shrink: 0; }
nav a { color: var(--rm-brown); text-decoration: none; padding: 9px 13px; font-size: 14px; border-radius: 5px; }
nav a:hover { color: var(--rm-red); background: var(--rm-paper); }
main { max-width: 1160px; margin: 38px auto; padding: 0 24px; min-height: 65vh; }
h1 { font-size: 28px; line-height: 1.4; margin: 0 0 24px; font-weight: 700; letter-spacing: .03em; }
h1::before { content: ''; display: inline-block; width: 4px; height: 24px; margin-right: 13px; vertical-align: -2px; background: var(--rm-red); }
h2 { font-size: 20px; line-height: 1.55; font-weight: 700; }
h3 { font-size: 17px; }
.card { background: #fff; border: 1px solid var(--rm-gray); border-radius: 8px; padding: 26px; margin: 18px 0; box-shadow: 0 3px 12px #2e201d05; }
.card > h2:first-child { margin-top: 0; margin-bottom: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 16px 0; flex: 1; min-width: 160px; }
.field > span { font-size: 14px; font-weight: 600; }
input, textarea, select, button { font: inherit; }
input:not([type=checkbox]):not([type=radio]), textarea, select { padding: 11px 12px; border: 1px solid var(--rm-gray); border-radius: 5px; width: 100%; background: #fff; color: var(--rm-brown); transition: border-color .15s; }
input:disabled, select:disabled { background: var(--rm-paper) !important; color: var(--rm-blue) !important; }
textarea { min-height: 116px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; vertical-align: middle; accent-color: var(--rm-red); }
button, .button { border: 1px solid transparent; background: var(--rm-red); color: #fff; padding: 10px 18px; border-radius: 5px; cursor: pointer; display: inline-block; text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s; }
button:hover { background: var(--rm-brown); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { background: var(--rm-paper); color: var(--rm-brown); border-color: var(--rm-gray); }
.secondary:hover { background: #ebe7e2; border-color: var(--rm-brown); }
.danger { background: #fff; color: var(--rm-red); border-color: var(--rm-red); }
.danger:hover { background: var(--rm-red); color: #fff; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; padding-bottom: 22px; border-bottom: 1px solid var(--rm-gray); }
.muted, .help { color: var(--rm-blue); }
.help { font-size: 13px; line-height: 1.7; }
.error { color: var(--rm-red); }
.success { color: var(--rm-green); }
.secret { font-family: ui-monospace, monospace; font-size: 18px; overflow-wrap: anywhere; background: var(--rm-paper); padding: 18px; border: 1px solid var(--rm-orange); border-left-width: 4px; border-radius: 4px; white-space: pre-wrap; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--rm-gray); border-radius: 5px; margin: 10px 0; cursor: pointer; }
.choice:hover { background: var(--rm-paper); }
.choice:has(input:checked) { border-color: var(--rm-red); background: #fcf2f2; }
.choice input { flex-shrink: 0; margin-top: 4px; }
.choice span { white-space: pre-wrap; overflow-wrap: anywhere; }
.question-title { white-space: pre-wrap; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--rm-gray); border-radius: 6px; margin-top: 20px; }
.table-wrap > p { padding: 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 14px 13px; border-bottom: 1px solid var(--rm-gray); text-align: left; vertical-align: top; white-space: pre-wrap; }
th { background: #ede9e4; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--rm-paper); }
td button { font-size: 12px; margin: 2px; padding: 6px 10px; }
.timer { position: sticky; top: 0; background: #edf2f5; border: 1px solid var(--rm-sky); border-top: 3px solid var(--rm-blue); border-radius: 5px; color: var(--rm-blue); padding: 14px 18px; z-index: 2; display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.badge { padding: 3px 8px; border-radius: 4px; background: var(--rm-paper); }
#notice { position: fixed; bottom: 24px; right: 24px; max-width: calc(100vw - 48px); background: var(--rm-brown); color: #fff; padding: 15px 22px; border-left: 4px solid var(--rm-red); border-radius: 5px; box-shadow: 0 5px 24px #2e201d25; z-index: 10; display: none; }
#notice.visible { display: block; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 0 auto; max-width: 1112px; padding: 24px 0 30px; border-top: 1px solid var(--rm-gray); color: var(--rm-blue); font-size: 12px; }
.footer-brand { color: var(--rm-brown); font-weight: 600; letter-spacing: .05em; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
a { color: var(--rm-blue); text-underline-offset: 3px; }
details { margin: 16px 0; }
summary { cursor: pointer; font-weight: 600; }
:focus-visible { outline: 2px solid var(--rm-blue); outline-offset: 3px; }
@media (max-width: 900px) {
  header { flex-wrap: wrap; padding: 22px 24px 16px; }
  footer { margin: 0 24px; }
}
@media (max-width: 600px) {
  header { display: block; padding: 20px 18px 12px; }
  .brand { gap: 16px; }
  .brand-logo { width: 147px; }
  .brand-product { padding-left: 16px; }
  .brand-product strong { font-size: 16px; }
  .brand-product > span { font-size: 8px; letter-spacing: .06em; }
  nav { margin-top: 18px; gap: 6px; border-top: 1px solid var(--rm-gray); padding-top: 8px; }
  nav a { padding: 7px 10px; }
  main { padding: 0 16px; margin-top: 26px; }
  h1 { font-size: 23px; margin-bottom: 18px; }
  h2 { font-size: 18px; }
  .card { padding: 20px; margin: 14px 0; }
  .grid { gap: 0; }
  .row > button { flex-grow: 1; }
  .timer { font-size: 13px; padding: 12px; flex-wrap: wrap; }
  .secret { font-size: 15px; }
  footer { margin: 0 16px; flex-direction: column; }
}
@media (max-width: 350px) {
  .brand { gap: 10px; }
  .brand-logo { width: 126px; }
  .brand-product { padding-left: 10px; }
  .brand-product strong { font-size: 14px; }
  .brand-product > span { font-size: 7px; }
}
@media print {
  header { padding: 12px 0; }
  nav, button, #notice { display: none !important; }
  body, :root { background: #fff; }
  main { margin: 20px auto; min-height: auto; }
  .card { break-inside: avoid; box-shadow: none; }
}
