

@keyframes save-character-pulse {
  0%, 100% { transform: scale(1); box-shadow: inset 0 1px #f5d29a26, 0 0 0 0 #c29a6033, 0 0 8px #c29a601a; }
  50% { transform: scale(1.025); box-shadow: inset 0 1px #f5d29a40, 0 0 0 5px #c29a6000, 0 0 24px #c29a6059; }
}.welcome-panel { position: relative; }
.character-picker { position: relative; height: 342px; background: radial-gradient(ellipse 50% 42% at 50% 42%, #86704c26, transparent 100%); }
.character-hero { height: 252px; }
.character-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.starter-choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; position: relative; }
.account-code-actions { display: flex; justify-content: space-between; gap: 10px; }

@media(width <= 580px) {
  .character-picker { height: 232px; }
  .character-hero { height: 164px; }
  .starter-choices { max-width: 280px; margin: auto; }
}
.starter-choices button { height: 76px; padding: 0; min-width: 0; background: #12120f; border: 1px solid #443d32; }

@media(width <= 580px) {
  .starter-choices button { height: 64px; }
}
.ui-surface .text-action { min-height: 32px; padding: 4px; border: 0; background: none; box-shadow: none; color: var(--ui-muted); font-size: 13px; }
.ui-surface .save-character { min-height: 44px; padding: 10px 20px; border: 1px solid #d5a66a; background: #765332; color: #fff0d3; font-size: 16px; text-decoration: none; animation: save-character-pulse 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .ui-surface .save-character { animation: none; box-shadow: 0 0 16px #c29a6033; }
}
.starter-choices button[aria-pressed="true"] { background: #393022; border-color: #c29a60; box-shadow: inset 0 -2px #c29a60; }
.ui-surface .text-action:hover { color: var(--ui-text); background: none; text-decoration: underline; }
.ui-surface .save-character:hover { background: #8b633a; color: #fff0d3; text-decoration: none; }
#character-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
#character-form { display: flex; flex-direction: column; gap: 18px; text-align: left; }
:is(#character-status, #account-status) { font-size: 13px; color: #d5aa83; margin: 0; text-align: left; }
#welcome-character { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 12px 0 24px; }
#welcome-avatar { flex: 0 0 112px; height: 144px; background: radial-gradient(ellipse, #86704c26, transparent 70%); }
#welcome-name { max-width: 280px; margin: 0; font: 600 28px/32px "Barlow Condensed", sans-serif; color: var(--ui-accent); text-align: left; overflow-wrap: anywhere; }
#welcome-account { margin-top: 12px; }
#account-dialog { width: min(380px, calc(100vw - 32px)); padding: 28px; z-index: 60; }
#account-close { position: absolute; top: 16px; right: 16px; }
#account-code { font: 500 24px monospace; letter-spacing: 6px; }
#code-destination { font-size: 13px; margin: 0; color: var(--ui-muted); }

@media(width <= 580px) {
  #character-setup { grid-template-columns: 1fr; gap: 14px; }
  #character-form { gap: 12px; }
}
#account-dialog form { display: flex; flex-direction: column; gap: 18px; text-align: left; }
#character-form label, #account-dialog label { display: flex; flex-wrap: wrap; gap: 5px; font-size: 13px; color: var(--ui-muted); }
#character-form input, #account-dialog input { width: 100%; height: 44px; font-size: 16px; background: var(--ui-input); }
#account-dialog h2 { font: 600 32px/36px "Barlow Condensed", sans-serif; margin: 0 36px 24px 0; }
#account-dialog p { overflow-wrap: anywhere; }
#character-form .terms-check { flex-wrap: nowrap; align-items: flex-start; gap: 8px; line-height: 18px; }
#character-form .primary, #account-dialog .primary { width: 100%; height: 44px; margin: 4px 0 0; font-size: 16px; }
#welcome-account.save-character { display: block; width: min(260px, 100%); margin: 12px auto 0; }
#character-form .terms-check input { width: 18px; height: 18px; flex: none; margin: 0; }
#character-form .terms-check a { color: var(--ui-accent); text-underline-offset: 2px; }
.welcome-panel:has(#character-setup:not([hidden])) { width: min(640px, 100%); padding: 24px 32px 28px; }

@media(width <= 580px) {
  .welcome-panel:has(#character-setup:not([hidden])) { padding: 20px; }
}
.welcome-panel:has(#character-setup:not([hidden])) h2 { font-size: 44px; line-height: 48px; margin: 0 0 12px; }
#account-dialog #account-status { margin-top: 16px; }
body:has(#account-dialog[open]) #crosshair { display: none; }
