/* Account page — same language as the landing (landing.css): dark chrome bars, parchment cards, orange primary. */
.account-page{--ink:var(--theme-ink,#392711);--muted:var(--theme-muted,#654824);--paper:var(--theme-paper,#eed69e);--card:var(--theme-card,#fff0c7);--line:var(--theme-border,#b68742);--chrome:var(--theme-chrome,#302714);--chrome2:var(--theme-chrome-2,#44371d);--ctext:var(--theme-chrome-text,#fff0be);--cmuted:var(--theme-chrome-muted,#d4be8c);--wrap:min(1120px,100% - 32px)}
.account-page *{box-sizing:border-box}
body.account-page{margin:0;min-height:100dvh;display:flex;flex-direction:column;background:var(--theme-bg,#f4e3b3);color:var(--ink);font:15px/1.6 var(--font-ui,system-ui,sans-serif);-webkit-font-smoothing:antialiased}
.account-page [hidden]{display:none!important}.account-page a{color:inherit;text-decoration:none}.account-page button{font:inherit;cursor:pointer}.account-page img{display:block;max-width:100%}
.account-page :is(h1,h2,p,dl,dd){margin:0}.account-page :is(h1,h2){font-family:var(--font-display);font-weight:400;line-height:1.12}
.account-page :is(a,button,input):focus-visible{outline:3px solid #ec8526;outline-offset:3px;border-radius:4px}
.portal-skip{position:fixed;top:-60px;left:12px;z-index:20;padding:10px 14px;background:var(--card);font-weight:700}.portal-skip:focus{top:12px}
.portal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:8px max(16px,calc((100vw - 1120px)/2));background:var(--chrome);color:var(--ctext)}
.portal-brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:.22em;font-size:15px;line-height:1.2}.portal-brand img{width:28px;height:28px}.portal-brand small{display:none}
.portal-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 18px;border:1px solid var(--line);border-radius:6px;background:var(--card);color:var(--ink);font-weight:800;font-size:14px;line-height:1.2;text-align:center;transition:transform .15s,box-shadow .15s}
.portal-button:hover{transform:translateY(-1px);box-shadow:0 6px 16px #0003}.portal-button:disabled{opacity:.6;transform:none}
.portal-primary,.portal-header .portal-button{background:linear-gradient(#ec8526,#c9620f);border-color:#7c3a06;color:#fff;box-shadow:inset 0 1px #ffffff55,0 2px 0 #7c3a06}
.portal-small{min-height:40px;padding:7px 14px}
.portal-text-link{font-weight:800;font-size:14px;text-decoration:underline;text-underline-offset:3px;color:var(--muted);padding:8px 2px}
.account-shell{flex:1;width:var(--wrap);margin:0 auto;padding:36px 0 56px}
.portal-intro{margin-bottom:20px}.portal-intro h1{font-size:clamp(32px,6vw,46px);margin:6px 0 4px}.portal-intro p{color:var(--muted)}
.portal-eyebrow{display:block;font-size:12px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--theme-accent-ink,#365d0a)}
.portal-notice{margin-bottom:18px;padding:10px 14px;border-left:4px solid var(--theme-accent,#477316);border-radius:4px;background:var(--paper);font-size:14px;font-weight:600}
.portal-notice.is-error{border-color:var(--theme-negative,#a33025);color:var(--theme-negative,#a33025)}#portal-retry{margin:-6px 0 18px}
.portal-grid{display:grid;gap:14px}
.portal-card{display:flex;flex-direction:column;gap:12px;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--card);box-shadow:inset 0 1px #ffffff80,0 1px 0 var(--line)}
.portal-card h2{font-size:24px;overflow-wrap:anywhere}.portal-card>p{color:var(--muted)}
.portal-card-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
.portal-badge{padding:3px 10px;border:1px solid var(--line);border-radius:999px;background:var(--paper);font-size:12px;font-weight:800}
.character-preview{display:flex;gap:16px;align-items:center}
.portal-portrait{flex:none;width:84px;height:84px;border:1px solid var(--line);border-radius:8px;background:var(--paper);overflow:hidden}.portal-portrait img{width:100%;height:100%;object-fit:cover;object-position:top}
.character-preview>div:last-child{flex:1;min-width:0}#portal-character-meta{color:var(--muted);font-weight:600}
.portal-xp{margin-top:8px}.portal-xp label{display:block;font-size:12px;font-weight:700;color:var(--muted)}
.portal-xp progress{width:100%;height:10px;appearance:none;border:1px solid var(--line);border-radius:999px;background:var(--paper);overflow:hidden}
.portal-xp progress::-webkit-progress-bar{background:var(--paper)}.portal-xp progress::-webkit-progress-value{background:linear-gradient(90deg,#c9620f,#ec8526)}.portal-xp progress::-moz-progress-bar{background:#d8701a}
.portal-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.portal-numbers div{display:grid;justify-items:center;gap:2px;padding:10px 6px;border:1px solid var(--line);border-radius:8px;background:var(--paper);text-align:center}
.portal-numbers img{width:22px;height:22px}.portal-numbers strong{font-size:18px}.portal-numbers span{font-size:12px;color:var(--muted);line-height:1.2}
.portal-save-line,.portal-small-note{font-size:13px;color:var(--muted)}
.portal-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.portal-signout{background:transparent}
.portal-save-help dl{display:grid;gap:10px}.portal-save-help dt{display:flex;align-items:center;gap:8px;font-weight:800}.portal-save-help dd{font-size:14px;color:var(--muted)}
.save-type-dot{width:10px;height:10px;border-radius:50%;background:#c9620f}.save-type-dot.online{background:var(--theme-accent,#477316)}
.portal-footer{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;padding:24px max(16px,calc((100vw - 1120px)/2)) 32px;background:var(--chrome);color:var(--ctext);font-size:13px;font-weight:700}
.portal-footer p{flex-basis:100%;color:var(--cmuted);font-weight:400}.portal-footer a:hover{text-decoration:underline}
@media(min-width:860px){.portal-grid{grid-template-columns:1.3fr 1fr}.account-shell{padding:56px 0 80px}.portal-header{min-height:76px}.portal-brand small{display:block;font-size:12px;letter-spacing:.12em;font-weight:600;color:var(--cmuted)}}
@media(prefers-reduced-motion:reduce){.portal-button{transition:none}}
.account-page .portal-primary,.account-page .portal-header .portal-button{color:#fff!important}.account-page .portal-footer p{color:var(--cmuted)!important;opacity:1}
.portal-footer-legal{display:flex;flex-wrap:wrap;gap:8px 20px;margin-left:auto}.portal-footer p+p{margin-top:-4px}@media(max-width:640px){.portal-footer-legal{margin-left:0;flex-basis:100%}}

/* En-tête mobile : marque entière, bouton sur une ligne. */
@media(max-width:520px){.portal-header{gap:8px}.portal-brand{min-width:0;flex:1}.portal-brand span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.12em}.portal-header .portal-small{white-space:nowrap;padding:9px 14px}.portal-long{display:none}.portal-header [lang-switch],.portal-header .lang-switch{flex:none}}
