:root {
  color-scheme: light;
  font-family:
    "Noto Sans SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203f38;
  background: #f5f1e7;
  font-size: 16px;
  line-height: 1.5;
}
.character-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 24px;
}
.character-gallery canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 8px;
}
@media (max-width: 700px) {
  .character-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.character-gallery button {
  text-align: left;
  padding: 12px;
  background: #edf2f0;
  color: #264c50;
  border: 1px solid #c6d7d3;
  border-radius: 12px;
  font-size: 13px;
}
.character-gallery button[aria-pressed="true"] {
  background: #244e58;
  color: white;
  border-color: #244e58;
  box-shadow: 0 0 0 2px #d6ae70;
}
#avatar-preview canvas {
  display: block;
  width: 100%;
  border-radius: 20px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header,
main,
footer {
  max-width: 1180px;
  margin: auto;
  padding: 24px 32px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dbded0;
  gap: 20px;
}
a {
  color: #235b4d;
  text-underline-offset: 4px;
}
.brand {
  font:
    600 32px Georgia,
    serif;
  text-decoration: none;
  letter-spacing: -1px;
}
.brand span {
  display: block;
  font:
    10px system-ui,
    "Noto Sans SC",
    sans-serif;
  letter-spacing: 2px;
}
nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.intro {
  padding: 26px 0 4px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #4a5d3e;
  font-weight: 700;
}
h1 {
  font:
    400 clamp(36px, 6vw, 64px) Georgia,
    serif;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 14px 0;
}
h2 {
  font:
    400 27px Georgia,
    serif;
  margin: 0 0 15px;
}
p {
  max-width: 65ch;
}
.private,
.muted,
small {
  font-size: 13px;
  color: #5c6d5b;
}
.panel {
  border: 1px solid #dce0d2;
  border-radius: 20px;
  background: #fffdf7;
  padding: 28px;
  box-shadow: 0 8px 30px #293f3210;
}
#auth {
  max-width: 610px;
  margin: 25px auto;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tabs button[aria-pressed="true"] {
  background: #173f36;
  color: #fff8e6;
}
button,
input,
select {
  font: inherit;
}
input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #9ba99a;
  border-radius: 8px;
  background: #fffef9;
  color: #233e36;
  padding: 10px 12px;
}
input[type="range"] {
  padding: 10px 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 17px;
  min-width: 0;
}
.check {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
}
.check input {
  width: 20px;
  min-height: 20px;
  flex-shrink: 0;
}
button {
  border: 1px solid #a4afa0;
  border-radius: 9px;
  background: #f6f4e9;
  color: #254a3d;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
}
.primary {
  background: #1d5141;
  color: #fff8e8;
  border-color: #1d5141;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #a76635;
  outline-offset: 3px;
}
fieldset {
  border: 0;
  border-top: 1px solid #d9dfd0;
  padding: 22px 0 5px;
  min-width: 0;
  margin: 25px 0 0;
}
legend {
  font-size: 14px;
  font-weight: 700;
  padding: 0 12px 0 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
  gap: 24px;
}
.preview {
  align-self: start;
  position: sticky;
  top: 20px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #ede8d6 0, #f5f1e6 70%);
}
.preview svg {
  width: 100%;
  max-width: 320px;
  max-height: 380px;
  display: block;
  margin: auto;
}
.preview label {
  text-align: left;
}
.preview p {
  margin-left: auto;
  margin-right: auto;
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
#notice {
  border-left: 3px solid #89a57f;
  background: #e9eee1;
  padding: 14px 18px;
  border-radius: 5px;
  max-width: none;
  overflow-wrap: anywhere;
}
#notice.error {
  border-color: #a14736;
  background: #f6e6df;
  color: #772d21;
}
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  font-size: 13px;
  padding: 10px 24px 22px;
}
.account-security {
  margin-top: 25px;
}
.account-security form {
  max-width: 600px;
  margin-top: 22px;
}
footer {
  font-size: 12px;
  color: #5f705e;
  border-top: 1px solid #dce0d2;
  margin-top: 35px;
}
.skip {
  position: absolute;
  top: -100px;
  left: 10px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 5px;
}
#credentials small {
  display: block;
  margin: -9px 0 20px;
}
#preview-name {
  overflow-wrap: anywhere;
  font-weight: 700;
}
.account-security p,
#account-summary {
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  header,
  main,
  footer {
    padding: 18px;
  }
  .brand {
    font-size: 27px;
  }
  .brand span {
    font-size: 8px;
    letter-spacing: 1px;
  }
  nav {
    gap: 10px;
  }
  nav a {
    font-size: 14px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .preview {
    position: static;
    padding: 20px;
  }
  .preview svg {
    max-height: 290px;
  }
  .panel {
    padding: 21px;
  }
  .fields {
    gap: 0 12px;
  }
  .steps {
    gap: 8px 24px;
  }
  .tabs button {
    font-size: 13px;
    padding: 9px 11px;
  }
  h1 {
    font-size: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Lightweight bevel: CSS only; source images and canvas resolution stay unchanged. */
:where(
  button,
  .card,
  .district,
  .resident,
  .journey li,
  .journey-summary,
  .scene-label,
  .location-chip,
  .bottom-hud,
  .view-tools,
  .error-card,
  dialog,
  aside
) {
  box-shadow:
    inset 0 1px 0 #ffffff55,
    inset 1px 0 0 #ffffff20,
    inset 0 -2px 0 #080e2a55,
    0 3px 0 #080e2a30,
    0 7px 16px #080e2a20;
}
:where(img) {
  outline: 1px solid #ffffff35;
  outline-offset: -1px;
  box-shadow:
    0 2px 0 #080e2a35,
    0 6px 14px #080e2a25;
}
button:active:not(:disabled) {
  box-shadow:
    inset 0 2px 4px #080e2a44,
    inset 0 -1px 0 #ffffff35;
}
@media (forced-colors: active) {
  :where(button, .card, .district, .resident, dialog, aside, img) {
    box-shadow: none;
  }
}

/* Owner-approved blue/white brand surfaces; semantic alerts keep their own colours. */
:root {
  --lumora-blue: #245da0;
  --lumora-ink: #142f52;
  --lumora-white: #f5faff;
}
body {
  color: var(--lumora-ink);
  background-color: var(--lumora-white);
}
button,
select,
input,
textarea {
  color: #142f52;
  background-color: #f5faff;
  border-color: #91b8df;
}
button:hover:not(:disabled),
button[aria-pressed="true"],
button[aria-selected="true"] {
  background: #c7d9ff;
  color: #142f52;
  border-color: #5478a9;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline-color: #245da0;
}
.card,
.scene-label,
.location-chip,
.bottom-hud,
.view-tools,
dialog {
  background: #f5faff;
  color: #142f52;
  border-color: #91b8df;
}
.eyebrow,
.overline,
.brand,
.brand strong {
  color: #245da0;
}
