*{box-sizing:border-box}body{margin:0;background:#f1ebe0;color:#273c42;font:18px system-ui}main{max-width:760px;margin:40px auto;padding:24px}nav{display:flex;gap:12px;flex-wrap:wrap}button{font:inherit;background:#d9eae1;border:2px solid #adc7bb;border-radius:16px;padding:12px 20px;box-shadow:3px 4px #adc7bb;cursor:pointer}button:disabled{opacity:.5}section{background:#fffaf0;border:2px solid #c8b99c;border-radius:24px;padding:24px;margin-top:24px;box-shadow:4px 5px #c8b99c}label{display:block;margin:14px 0}input,select{display:block;width:100%;font:inherit;padding:12px;border:1px solid #adc7bb;border-radius:12px;margin-top:8px}#status{min-height:28px}article{padding:16px;margin:12px 0;border:1px solid #adc7bb;border-radius:14px}
.family-creator{text-align:center}.family-creator [hidden]{display:none!important}.creator-choices{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:24px 0}.creator-avatar{background:#dceee5;padding:20px;border-radius:26px}.creator-avatar:nth-child(2){background:#f4dfe6;border-color:#d2a8b5;box-shadow:4px 5px #d2a8b5}.creator-avatar svg{display:block;width:100%;height:220px}.creator-avatar b{display:block;font-size:22px;margin-top:10px}.family-creator fieldset{border:0;padding:0;margin:0;min-width:0}.creator-layout{display:grid;grid-template-columns:minmax(130px,1fr) minmax(230px,1.3fr);gap:24px;align-items:center;margin:20px 0}.creator-preview{background:linear-gradient(145deg,#e2efda,#b2d9de);border:2px solid #acc6b8;border-radius:28px;box-shadow:4px 5px #acc6b8;padding:18px}.creator-preview svg{width:100%;max-height:320px}.creator-setting{background:#f3ecda;border:2px solid #d0bea0;border-radius:20px;box-shadow:3px 4px #d0bea0;padding:10px;margin-bottom:16px}.creator-setting h3{font-size:17px;margin:0 0 8px}.creator-picker{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px}.creator-picker button{padding:3px;font-size:32px;min-height:44px;background:#e0edf0}.creator-option svg{height:65px;width:70px;display:block;margin:auto}.creator-option b{display:block;font-size:15px;min-height:36px}.creator-start{background:#fed966;border-color:#bd9e43;box-shadow:4px 5px #bd9e43;font-weight:700;margin:12px}.creator-cancel{margin-top:20px}.family-creator button:hover:not(:disabled){filter:brightness(1.04)}.family-creator button:focus-visible{outline:3px solid #428c98;outline-offset:4px}@media(max-width:540px){main{padding:12px;margin:12px auto}section{padding:16px}.creator-layout{grid-template-columns:1fr}.creator-preview svg{height:180px}.creator-avatar svg{height:160px}.creator-choices{gap:12px}}
:root{--family-ink:#47483f;--family-paper:#f6f0e4}body{color:var(--family-ink);background:radial-gradient(ellipse at 10% 10%,#e3eee0 0,transparent 45%),radial-gradient(ellipse at 95% 70%,#e9e2f0 0,transparent 40%),var(--family-paper);min-height:100vh;font-size:18px;line-height:1.45}main{max-width:1000px;margin:24px auto;padding:24px 30px 40px}.family-brand{display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:28px}.family-brand svg{width:110px;flex:none}.family-brand h1{font-size:clamp(27px,4vw,40px);margin:0;color:#568d85;letter-spacing:-.02em}.family-brand p{margin:3px 0;color:#776f61}nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}nav button{display:flex;justify-content:center;align-items:center;gap:10px;padding:15px 12px;min-height:64px;font-weight:700}nav [data-screen=register]{background:#f3dfe6;border-color:#cdaab6;box-shadow:4px 5px #cdaab6}nav [data-screen=forgot]{background:#e5e1f1;border-color:#b7accd;box-shadow:4px 5px #b7accd}nav button[aria-pressed=true]{outline:3px solid #62958e;outline-offset:3px}.family-nav-icon{display:inline-grid;place-items:center;width:34px;height:34px;border:2px solid currentColor;border-radius:12px;font-size:25px;flex:none}#logout{background:#f2d6d4;border-color:#ca9e98;box-shadow:4px 5px #ca9e98}#screen{padding:28px;background:#fffaf1;border:2px solid #cdbb9d;border-radius:30px;box-shadow:5px 6px #cdbb9d}#screen h2{font-size:28px;margin:0 0 22px}#screen>form{max-width:620px;margin:auto}#screen>form label{font-weight:600}input,select{min-height:50px;border:2px solid #b9c9bc;background:#fffdf8;line-height:1.35}input[type=checkbox]{display:inline-block;width:24px;min-height:24px;height:24px;margin:0 10px 0 0;vertical-align:middle;accent-color:#488e87}button{min-height:48px;transition:transform .15s,filter .15s}button:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.03)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #488e87;outline-offset:3px}button[type=submit]{background:#ffe18a;border-color:#c6a65e;box-shadow:4px 5px #c6a65e;font-weight:700;margin-top:12px;min-width:180px}#status{margin:20px 0 12px;padding:0 6px;overflow-wrap:anywhere}#status:not(:empty){padding:12px 16px;background:#e6eff0;border:1px solid #afc9cb;border-radius:16px}#screen>article{display:grid;grid-template-columns:90px 1fr;gap:10px 20px;padding:18px;background:#edf3e6;border:2px solid #b6c9b3;border-radius:22px;box-shadow:3px 4px #b6c9b3;margin:18px 0}#screen>article h3{margin:0;align-self:end}#screen>article p{grid-column:2;margin:0 0 8px;font-size:16px}.family-card-portrait{grid-row:1/3;display:grid;place-items:center;background:#d8e9df;border-radius:18px}.family-card-portrait svg{width:80px;height:100px}#screen>article button{grid-column:2;text-align:left}.creator-choices{max-width:650px;margin:24px auto}.creator-avatar svg{height:240px}.creator-layout{grid-template-columns:minmax(180px,1fr) minmax(260px,1.2fr)}.creator-preview svg{max-height:360px}.family-creator form>fieldset>label{max-width:540px;margin:24px auto}.creator-option b{font-size:16px}.family-creator .creator-start{min-width:240px}
@media(max-width:650px){main{margin:12px auto;padding:16px}.family-brand{gap:12px}.family-brand svg{width:75px}.family-brand p{font-size:15px}nav{grid-template-columns:1fr 1fr;gap:12px}nav button{font-size:16px}nav [data-screen=forgot]{grid-column:1/-1}#screen{padding:20px}#screen>article{grid-template-columns:70px 1fr;gap:10px}.family-card-portrait svg{width:65px}#screen>article button{grid-column:1/-1}.creator-layout{grid-template-columns:1fr}.creator-preview svg{height:200px}.creator-avatar svg{height:180px}.creator-picker{grid-template-columns:48px 1fr 48px}}@media(prefers-reduced-motion:reduce){button{transition:none}}
[hidden]{display:none!important}#status:empty{display:none}#screen>h2{max-width:620px;margin-left:auto;margin-right:auto}#screen{margin-top:24px}#screen>form button[type=submit]{width:100%}
svg.family-nav-icon{border:0;border-radius:0;padding:2px;width:32px;height:32px;color:#57766c}
/* Shared proportions, palette and artwork with the adventure-selection menu. */
body{background:#f1ebe0;color:#393c37}main{max-width:1440px;margin:0 auto;padding:28px 4% 45px}.project-top{display:flex;justify-content:space-between;align-items:center;gap:25px;padding:16px 5%;margin-bottom:24px;border-bottom:1px solid #dfd3bf}.project-brand{font-size:44px;font-weight:900;letter-spacing:-4px;color:#393c37}.project-brand span{display:block;font-size:11px;letter-spacing:.8px;font-weight:normal;margin-top:5px}.project-top nav{display:flex;flex-wrap:wrap;gap:14px;margin:0}.project-top .project-nav-button{display:flex;align-items:center;justify-content:center;gap:10px;padding:13px 18px;min-height:70px;border:1.5px solid #abc3b5;border-radius:16px;background:#dfede3;box-shadow:4px 5px #abc3b5}.project-nav-button img{width:40px;height:36px;object-fit:contain}.project-nav-button b{font-size:14px}.project-top .preferences{background:#dceaf0;border-color:#acc4cf;box-shadow:4px 5px #acc4cf}.project-top #logout{background:#f3d1ce;border-color:#ce9d97;box-shadow:4px 5px #ce9d97;color:#9b5952}#screen{margin-top:20px;background:#fffaf0;border-color:#c9bca5;box-shadow:5px 6px #c9bca5}#screen.family-selection{padding:0;border:0;box-shadow:none;background:none}#screen.family-selection>h2{max-width:none;margin:0 0 24px;color:#647e70;font-size:32px}#screen .family-hero-row{display:grid;grid-template-columns:150px minmax(0,1fr) auto;align-items:center;gap:28px;padding:22px 26px;margin:0 0 24px;background:#fffaf0;border:2px solid #c9bca5;border-radius:30px;box-shadow:5px 6px #c9bca5}.family-hero-row .family-card-portrait{grid-row:auto;height:150px;position:relative;background:radial-gradient(ellipse,#faf4ce,#deeadc);border:1px solid #bfcfba;border-radius:24px}.family-card-portrait>.hero-sprite{width:112px;height:138px}.family-companion{position:absolute;width:55px;height:55px;right:0;top:38px}.family-companion svg{width:100%;height:100%;filter:drop-shadow(0 0 5px #bcb2ee)}#screen .family-hero-info h3{font-size:25px;margin:0 0 12px;color:#647e70}#screen .family-hero-info p{margin:0;font-weight:600;color:#7b715e}.family-hero-row.empty-hero .family-card-portrait{background:#eee8dd;border:2px dashed #d4c6b0}#screen .family-hero-row button{grid-column:auto;text-align:center;background:#3c858e;color:white;border:2px solid #28636c;box-shadow:4px 5px #28636c;min-height:56px;font-weight:700;font-size:16px}#screen>.forgot-link{display:block;margin:20px auto 0;background:none;border:0;box-shadow:none;text-decoration:underline;font-size:16px}@media(max-width:700px){.project-top{flex-wrap:wrap;gap:20px}.project-top nav{width:100%}.project-top .project-nav-button{flex:1;padding:10px;gap:6px}.project-nav-button img{width:28px;height:28px}.project-nav-button b{font-size:13px}#screen .family-hero-row{grid-template-columns:100px minmax(0,1fr);gap:16px;padding:18px}.family-hero-row .family-card-portrait{height:130px}.family-card-portrait>.hero-sprite{width:95px;height:118px}.family-companion{width:43px;height:43px}#screen .family-hero-row button{grid-column:1/-1}#screen .family-hero-info h3{font-size:22px}}
/* Hero balances and parent-only deletion. */
#screen .family-hero-row.with-stats{grid-template-columns:minmax(0,1fr) minmax(280px,1.1fr) minmax(0,1fr);align-items:center;gap:24px}
.family-hero-details{min-width:0}.family-currencies{display:flex;gap:12px;margin-bottom:14px}.family-currencies span{display:flex;align-items:center;gap:8px;flex:1;padding:8px 12px;border:2px solid #d5b66d;border-radius:16px;background:#fff0c3;font-weight:700;font-size:22px}.family-currencies span+span{background:#ecdef2;border-color:#bda5cf}.family-currencies img{width:36px;height:36px}.family-hero-details dl{margin:0;font-size:15px}.family-hero-details dl>div{display:flex;justify-content:space-between;gap:12px;padding:4px 0}.family-hero-details dd{margin:0;font-weight:700}.family-hero-actions{display:flex;flex-direction:column;align-self:stretch;justify-content:space-between;gap:20px;padding:10px 0}.family-hero-actions button{width:100%}#screen .family-hero-row .family-delete{background:#f2d6d4;color:#865b56;border-color:#ca9e98;box-shadow:4px 5px #ca9e98;font-size:15px;min-height:48px}
.family-delete-dialog{box-sizing:border-box;width:calc(100% - 32px);max-width:540px;max-height:calc(100dvh - 32px);overflow:auto;border:2px solid #cdbb9d;border-radius:28px;box-shadow:5px 6px #cdbb9d;background:#fffaf1;color:#47483f;padding:28px}.family-delete-dialog::backdrop{background:#28344188}.family-delete-dialog h2{margin-top:0;font-size:26px}.family-delete-dialog p{line-height:1.5}.delete-hero-name{font-weight:bold}.family-delete-dialog input{display:block;box-sizing:border-box;width:100%;margin-top:8px}.delete-error{color:#995b50;font-size:16px}.delete-actions{display:grid;grid-template-columns:1fr 1fr;gap:16px}.delete-actions button{font:inherit;font-weight:bold;border:2px solid #abc3b5;border-radius:18px;box-shadow:4px 5px #abc3b5;background:#dfede3;padding:12px;min-width:0;margin:0}.family-delete-dialog button[type=submit]{min-width:0;margin:0;background:#f2d6d4;border-color:#ca9e98;box-shadow:4px 5px #ca9e98}
@media(max-width:1100px){.family-hero-identity{flex-direction:column;text-align:center}.family-hero-identity .family-card-portrait{width:120px;height:140px}}
@media(max-width:650px){#screen .family-hero-row.with-stats{grid-template-columns:minmax(0,1fr);gap:20px}.family-hero-details,.family-hero-actions{grid-column:1/-1}.family-hero-actions{flex-direction:column}.delete-actions{grid-template-columns:1fr}}

.family-currencies span{justify-content:center;text-align:center}

.family-hero-identity{display:flex;align-items:center;gap:20px;min-width:0}.family-hero-identity .family-card-portrait{flex:0 0 150px;width:150px}.family-hero-identity .family-hero-info{min-width:0;overflow-wrap:anywhere}.with-stats .family-hero-actions{width:100%;max-width:240px;justify-self:end}.with-stats .family-hero-details{align-self:center;width:100%}
@media(max-width:1100px){.family-hero-identity .family-card-portrait{flex-basis:auto;width:120px;height:140px}}
@media(max-width:650px){.with-stats .family-hero-actions{max-width:none}.family-hero-identity{flex-direction:row;text-align:left}}

/* Shared brand proportions in game and family menus. */
.project-brand .project-logo{display:block;width:120px;height:auto;max-width:100%;margin-bottom:6px;object-fit:contain;transform:scale(1.15);transform-origin:left center}

/* Guide families with no characters to the first empty slot. */
.first-hero-shade{position:fixed;inset:0;background:rgba(35,48,60,.52);z-index:40;pointer-events:none}
#screen .first-hero-highlight{position:relative;z-index:41;box-shadow:5px 6px #c9bca5,0 0 0 4px #ffe18a}
#screen .first-hero-highlight .family-play{background:#ffe184;color:#594a2c;border-color:#cfb05c;box-shadow:4px 5px #cfb05c,0 0 22px #ffe18aa6}

/* Match the main menu header inset on narrow screens too. */
@media(max-width:850px){.project-top{padding:18px}}
