:root {
  font-family: system-ui, -apple-system, "Noto Sans TC", sans-serif;
  color: #19354a;
  background: #f3f7fa;
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }
body.auth main { max-width: 580px; padding-top: clamp(28px, 6vh, 72px); }

header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
h1 { margin: 0; color: #114b6e; font-size: clamp(1.7rem, 3vw, 2rem); line-height: 1.25; }
.subtitle { margin: 6px 0 0; color: #526b79; }
h2 { margin: 0 0 16px; font-size: 1.35rem; }
h3 { margin-top: 0; }

section, .notice {
  margin: 16px 0;
  padding: 24px;
  background: #fff;
  border: 1px solid #d7e2eb;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(18, 56, 78, .045);
}
.notice { background: #eef6fb; border-color: #cddfea; box-shadow: none; }
.notice h2 { margin-bottom: 8px; font-size: 1rem; color: #114b6e; }
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin-bottom: 0; }
#login { padding: 30px; }
#login .muted { margin: -7px 0 22px; }

label { display: block; margin: 0 0 18px; font-weight: 600; }
input, select, textarea {
  display: block;
  width: min(100%, 480px);
  min-height: 44px;
  margin-top: 7px;
  padding: 9px 12px;
  border: 1px solid #a9bac7;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 400;
}
#login input:not([type="radio"]) { width: 100%; }
.role-picker { margin: 0 0 18px; padding: 0; border: 0; }
.role-picker legend { margin-bottom: 7px; font-weight: 600; }
.role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-options label { position: relative; margin: 0; cursor: pointer; }
.role-options input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
}
.role-options span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid #a9bac7;
  border-radius: 8px;
  background: #fff;
  font-weight: 500;
  text-align: center;
}
.role-options input:checked + span { border-color: #12658a; background: #e8f4fa; color: #114b6e; font-weight: 700; }
.role-options input:focus-visible + span { outline: 2px solid #3d84aa; outline-offset: 2px; }
textarea { min-height: 104px; resize: vertical; }
input[type="file"] { height: auto; }

button {
  min-height: 42px;
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  background: #12658a;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #0c4b68; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #3d84aa;
  outline-offset: 2px;
}
#login button { width: 100%; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { padding: 9px; border-bottom: 1px solid #dde6ec; text-align: left; vertical-align: top; }
th { background: #eaf2f6; }
#progress { overflow-x: auto; }
.muted { color: #526b79; }
.signal { color: #9a4d18; font-weight: 600; }
.meme-card { max-width: 540px; margin-top: 16px; padding: 14px; border: 1px solid #eadbb5; border-radius: 12px; background: #fff8e6; }
.meme-card img { display: block; width: 100%; height: auto; border-radius: 8px; }
.meme-card h3 { margin: 12px 0 4px; }
.meme-card p { margin: 6px 0 0; }
#message { font-weight: 600; }
#message:empty { display: none; }

@media (max-width: 600px) {
  main, body.auth main { padding: 22px 16px 48px; }
  header { margin-bottom: 20px; }
  section, .notice, #login { padding: 20px; }
  input, select, textarea { width: 100%; }
}
