/* First-life builder. Controls stay beside the settings they change. */
#character-creation[hidden], #creation-reopen[hidden], #character-creation [hidden] { display:none !important; }
#character-creation { position:fixed; z-index:80; inset:48px 16px 72px; overflow:auto; border:1px solid #68675a; border-radius:12px; background:#16201f; color:#eee9dc; font:16px/1.5 Georgia,serif; box-shadow:0 18px 60px #000b; }
.creation-toolbar { position:sticky; top:0; z-index:2; display:flex; gap:12px; flex-wrap:wrap; align-items:center; justify-content:space-between; padding:12px 20px; background:#172320f5; border-bottom:1px solid #4d5b51; font:14px/1.4 system-ui,sans-serif; }
#creation-body { display:grid; grid-template-columns:minmax(180px,25%) minmax(0,1fr); gap:32px; padding:28px; }
#character-creation button, #creation-reopen { min-height:44px; padding:9px 15px; border:1px solid #92957c; border-radius:6px; background:#30433b; color:#fff3d5; font:600 15px/1.35 system-ui,sans-serif; cursor:pointer; }
#character-creation button:hover:not(:disabled) { background:#415a4c; }
#character-creation button:disabled { opacity:.48; cursor:default; }
#character-creation :focus-visible { outline:3px solid #ebc476; outline-offset:3px; }
#character-creation h2 { color:#f6e3b7; font-size:32px; margin:4px 0 14px; line-height:1.2; }
#character-creation h3 { font-size:21px; margin:0 0 8px; }
#character-creation h4 { font-size:18px; margin:0 0 6px; }
#character-creation p { margin:6px 0 16px; }
.creation-main { min-width:0; max-width:1100px; }
.creation-intro { font-size:18px; }
.creation-identity { min-width:0; }
.creation-portrait { background:linear-gradient(0deg,#16201f00,#16201f55),url('../brand/creation/arrival.webp') center/cover; border-radius:10px; }
.creation-portrait img { display:block; max-width:100%; width:100%; height:320px; object-fit:contain; }
.creation-identity h3 { margin-top:15px !important; }
.creation-identity ol { padding-left:22px; line-height:2; color:#b3bfb0; }
.creation-identity [aria-current] { color:#f7d795; font-weight:bold; }
.creation-small, .creation-eyebrow { font:14px/1.5 system-ui,sans-serif; color:#c4cbbb; }
.creation-filters { display:flex; gap:16px; flex-wrap:wrap; margin-top:24px; }
.creation-filters label { display:grid; gap:6px; flex:1; min-width:160px; font:15px/1.4 system-ui,sans-serif; }
.creation-filters input, .creation-filters select { box-sizing:border-box; width:100%; min-height:44px; border:1px solid #788579; background:#101c19; color:#eee9dc; padding:10px; border-radius:5px; font:16px/1.4 system-ui,sans-serif; }
.creation-stories { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)); gap:16px; }
.creation-stories article { padding:20px; border:1px solid #596b5d; border-radius:8px; background:#20312b; }
.creation-lock { padding:12px; border-left:3px solid #e8c079; background:#342f21; }
.creation-guild, .creation-confirm { padding:16px; background:#263a31; border-radius:6px; }
.creation-budget { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; align-items:center; margin:26px 0 8px; color:#f4d491; }
.creation-offer { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; padding:18px 0; border-bottom:1px solid #435348; }
.creation-offer p { font:15px/1.5 system-ui,sans-serif; }
.creation-adjust { display:flex; gap:10px; align-items:center; font:16px/1.4 system-ui,sans-serif; white-space:nowrap; }
.creation-adjust span { min-width:70px; text-align:center; }
.creation-adjust button { min-width:44px; }
.creation-offer details { font:14px/1.5 system-ui,sans-serif; }
.creation-offer summary { cursor:pointer; padding:5px 0; color:#e7d6ac; }
.creation-actions { display:flex; flex-wrap:wrap; gap:12px; margin:28px 0; }
#creation-reopen { position:fixed; z-index:70; right:20px; top:65px; }
@media(max-width:650px) {
 #character-creation { inset:8px 8px 70px; }
 #creation-body { display:block; padding:18px; }
 .creation-identity { display:grid; grid-template-columns:80px 1fr; column-gap:14px; align-items:center; margin-bottom:20px; }
 .creation-identity .creation-portrait { grid-row:1 / 3; }
 .creation-portrait img { height:100px; }
 .creation-identity ol, .creation-identity .creation-small { display:none; }
 .creation-identity h3, .creation-identity p { margin:0 !important; }
 #character-creation h2 { font-size:27px; }
 .creation-toolbar { padding:10px; gap:8px; }
 #creation-status { flex-basis:100%; }
 .creation-offer { grid-template-columns:1fr; gap:8px; }
 .creation-adjust { justify-content:flex-end; }
}

#creation-reply { margin:0 28px 24px; padding:16px; background:#101916; white-space:pre-wrap; font:14px/1.5 system-ui,sans-serif; border:1px solid #516359; border-radius:6px; }

/* Race catalogue, detail and comparison share the game's IDs and units. */
.creation-race-current { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px; border:1px solid #9d9978; border-radius:8px; background:#283d32; }
.creation-race-current > div { flex:1; }
.creation-race-current p:last-child { margin-bottom:0 !important; }
.creation-race-current button { flex-shrink:0; max-width:100%; }
.creation-races { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:8px; margin:16px 0 24px; }
.creation-races button { width:100%; height:100%; }
#character-creation [aria-pressed="true"] { background:#e2c991; color:#17201b; border-color:#f3dfb6; }
.creation-race-detail { display:grid; grid-template-columns:minmax(150px,32%) minmax(0,1fr); gap:24px; margin:24px 0; padding-top:20px; border-top:1px solid #596b5d; }
.creation-race-art { height:390px; border-radius:10px; background:linear-gradient(0deg,#16201f00,#16201f55),url('../brand/creation/arrival.webp') center/cover; }
.creation-race-figure { display:block; width:100%; height:100%; object-fit:contain; }
.creation-lore { white-space:pre-line; }
.creation-race-detail li { margin-bottom:8px; }
.creation-race-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.creation-race-stats > div { border-bottom:1px solid #596b5d; padding:16px 0; }
.creation-race-stats p, .creation-comparison dl { font:15px/1.5 system-ui,sans-serif; }
.creation-comparison { margin:28px 0; }
.creation-comparison-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:16px; margin:20px 0; }
.creation-comparison article { padding:16px; border:1px solid #596b5d; border-radius:8px; }
.creation-comparison dt { font-weight:bold; margin-top:12px; }
.creation-comparison dd { margin:0; }
.creation-size-space { height:160px; display:flex; align-items:flex-end; border-bottom:1px solid #92957c; margin-top:20px; }
.creation-size-bar { width:36px; background:#d8c594; border-radius:4px 4px 0 0; }
.creation-profession { display:flex; align-items:flex-start; gap:24px; padding:20px; margin:20px 0; border:1px solid #596b5d; border-radius:8px; background:#20312b; }
.creation-profession > div { flex:1; min-width:0; }
.creation-profession figure { width:150px; flex-shrink:0; margin:0; }
.creation-profession img { width:100%; height:210px; object-fit:contain; }
.creation-profession figcaption { font:13px/1.4 system-ui,sans-serif; color:#c4cbbb; }
.creation-profession summary, .creation-race-detail summary { cursor:pointer; padding:10px 0; color:#e7d6ac; }
@media(max-width:950px) {
 .creation-race-current { flex-direction:column; align-items:flex-start; }
 .creation-race-detail { display:block; }
 .creation-race-art { height:280px; max-width:320px; margin:0 auto 20px; }
}
@media(max-width:650px) {
 .creation-races { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .creation-race-stats { grid-template-columns:1fr; }
 .creation-race-current { gap:12px; }
 .creation-profession { flex-direction:column; gap:16px; padding:16px; }
 .creation-profession figure { width:100%; }
 .creation-profession img { height:240px; }
 .creation-profession figcaption { text-align:center; }
}
.creation-race-current { margin-bottom:12px; }
.creation-race-current h3 { margin:0 !important; }
@media(max-width:650px) {
 #character-creation[data-creation-step="race"] .creation-identity { display:none; }
 .creation-race-current { padding:12px; }
 .creation-race-current .creation-eyebrow { margin:0 0 4px !important; }
}

/* Registration and player-owned prose use full-size, labelled controls. */
.creation-entry-art { min-height:420px; border-radius:8px; background:url('../brand/creation/arrival.webp') center/cover; }
#creation-entry-form { max-width:40rem; }
#character-creation form > label { display:block; margin:18px 0 8px; }
#character-creation form input:not([type=checkbox]), #character-creation textarea { box-sizing:border-box; width:100%; padding:12px; min-height:46px; border:1px solid #859380; border-radius:5px; background:#101c19; color:#eee9dc; font:17px/1.5 system-ui,sans-serif; }
#character-creation .creation-checkbox { display:flex; align-items:flex-start; gap:12px; margin:20px 0; }
.creation-checkbox input { width:22px; height:22px; flex:none; margin-top:3px; }
#character-creation a { color:#f5d993; text-underline-offset:3px; }
@media(max-width:650px) { .creation-entry-art { min-height:130px; margin-bottom:22px; } }

/* Full first-life draft and arrival. */
.creation-identity ol button { text-align:left; width:100%; margin:.15rem 0; }
.creation-identity li[aria-current] button { border-color:var(--accent, #d6b06b); }
.creation-main textarea { display:block; box-sizing:border-box; width:100%; padding:.8rem; font:inherit; line-height:1.6; color:#eee; background:#152029; border:1px solid #89949b; border-radius:6px; resize:vertical; }
.creation-main fieldset { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; border:1px solid #62737e; }
.creation-profession-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)); gap:1rem; }
.creation-profession-options article,.creation-review-section { border:1px solid #62737e; border-radius:8px; padding:1rem; margin-bottom:1rem; }
.creation-profession-options img { width:100%; height:240px; object-fit:contain; background:#64717b; border-radius:6px; }
.creation-profession-options button[aria-pressed=true] { border:2px solid #e8c886; }
.creation-review-section dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:.5rem; }
.creation-review-section dd { margin:0; }
.creation-prose { white-space:pre-wrap; overflow-wrap:anywhere; }
.creation-arrival-scene { height:210px; background:url('../brand/creation/arrival.webp') center/cover; border-radius:8px; }

@media(max-width:650px) {
 #character-creation[data-creation-version="2"] .creation-identity { display:grid; }
 #character-creation[data-creation-version="2"] .creation-identity ol { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:6px; list-style:none; padding:0; margin:12px 0 0; }
 #character-creation[data-creation-version="2"] .creation-identity ol li:last-child { align-self:center; }
 #character-creation[data-creation-version="2"] .creation-identity ol button { padding:7px 10px; }
}
