/* Shared application shell additions. The Königshof shell itself lives in
   tree-of-tales.css; this file only adds the parts that depend on body.app-shell. */
:root {
  --tot-page-title:var(--av-h1);
  --tot-section-title:var(--av-h2);
  --tot-content-text:var(--av-body);
  --tot-header-height:var(--av-header-h);
  --tot-create-width:calc(var(--av-sp-16) * 17);
}
[hidden] {display:none!important;}
body.authenticated .portal-top .landing-nav {display:none;}
body.app-shell #content :is(h1,.campaign-page-heading h1) {font-size:var(--tot-page-title);line-height:var(--av-lh-h1);}
body.app-shell #content h2 {font-size:var(--tot-section-title);line-height:var(--av-lh-heading);}
body.app-shell #content h3 {font-size:var(--av-h3);line-height:var(--av-lh-heading);}
body.app-shell #content :is(p,li,dd,textarea,input,select) {font-size:var(--tot-content-text);}
body.app-shell #content :is(label,legend,summary) {font-size:var(--av-meta);}
body.app-shell #content :is(button,.button) {font-size:var(--av-button-font);}
body.app-shell #content :is(.meta,small,time) {font-size:var(--av-meta);}

/* Size the outer dialog first, then let its contents use available space. */
#modal.campaign-create-dialog {width:min(var(--tot-create-width),calc(100vw - var(--av-modal-inset)));max-width:none;padding:var(--av-modal-pad);max-height:calc(100dvh - var(--av-modal-inset));}
#modal.campaign-create-dialog .campaign-create {width:100%;max-height:none;overflow:visible;padding:0;}
.campaign-create-dialog #campaign-create-form {grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--av-gap);}
.campaign-create-dialog .campaign-form-section:first-child {grid-row:span 2;}
.campaign-create-dialog :is(.campaign-chapters,.campaign-form-actions) {grid-column:1 / -1;}
.campaign-create-dialog .campaign-form-section fieldset>label {flex-basis:100%;align-items:flex-start;}
.campaign-create-dialog .campaign-genre-picker>label {flex-basis:auto;}
.campaign-create-dialog .campaign-form-section :is(input,select,textarea) {min-width:0;max-width:100%;}
.campaign-create-dialog .campaign-form-section input[type=radio] {width:auto;flex-shrink:0;margin-top:var(--av-sp-1);}
.campaign-create-dialog .campaign-form-actions {background:var(--av-paper);}
.campaign-create-dialog {font-size:var(--tot-content-text);}
.campaign-create-dialog :is(label,legend) {font-size:var(--av-meta);}
.campaign-create-dialog h2 {font-size:var(--tot-section-title);}
@media(max-width:800px) {
 #modal.campaign-create-dialog {padding:var(--av-panel-mobile-pad);}
 .campaign-create-dialog #campaign-create-form {grid-template-columns:minmax(0,1fr);}
 .campaign-create-dialog .campaign-form-section:first-child {grid-row:auto;}
}
@media(max-width:620px) {
 #modal.campaign-create-dialog {width:calc(100vw - var(--av-modal-inset));}
}

/* Identity values show the exact entered case. */
body #auth-menu input:is([name="name"],[name="email"]),
body #content .account-layout input:is([name="display_name"],[type="email"]),
body #content .account-layout .account-identity dd {
 font-family:var(--av-font-ui);
 font-variant:normal;
 font-variant-caps:normal;
 font-feature-settings:normal;
 text-transform:none;
 letter-spacing:normal;
}

/* Landing paths (1.4.0): open columns with hairline separators, styled in public-pages.css. */
#navigation .nav-chevron {width:var(--av-pill-icon);height:var(--av-pill-icon);flex:0 0 var(--av-pill-icon);}
#navigation :is(button,.nav-group summary)>span {overflow-wrap:break-word;hyphens:auto;}
@media(max-width:620px) {
 .top-brand .top-brand-name,.public-screen .top-brand .top-brand-name {font-size:var(--av-brand-mobile);}
 .top-brand img,.public-screen .top-brand img {width:var(--av-brand-mark-mobile);height:var(--av-brand-mark-mobile);}
 /* Mobile header: wordmark and "Menü" only; notifications and the dice tray stay reachable in the menu. */
 .portal-top :is(.bell,.dice-launch) {display:none;}
}

/* Königshof 1.4.0 (04.11.2026, operator template): signed-in pages open with a parchment page heading
   (sentence H1, one line of context, double gold line) instead of the landscape image. Visibility rules
   of the individual screens (dashboard, character, sessions, public pages) stay untouched. */
body.authenticated:not(.public-screen) .portal-hero {min-height:0;height:auto;align-items:stretch;padding:var(--av-content-pad-y) var(--av-content-pad-x) 0;background:var(--av-paper);background-image:none;color:var(--av-ink);border-bottom:0;}
body.authenticated:not(.public-screen) .portal-hero .hero-content {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--av-gap);align-items:center;width:100%;max-width:none;padding:0 0 var(--av-gap);border-bottom:var(--av-double-line) double var(--av-gold);}
body.authenticated:not(.public-screen) .portal-hero .hero-content>:not(.hero-page-action) {grid-column:1;}
.hero-page-action {grid-column:2;grid-row:1 / span 3;}
.hero-page-action:empty {display:none;}
.hero-page-action .button .av-icon {width:var(--av-nav-icon);height:var(--av-nav-icon);color:var(--av-gold-icon);}
body.authenticated:not(.public-screen) .portal-hero h1 {color:var(--av-ink);}
body.authenticated:not(.public-screen) .portal-hero p {max-width:none;margin-top:var(--av-sp-2);color:var(--av-muted);}
body.authenticated:not(.public-screen) .portal-hero :is(.hero-actions,.hero-quote,#hero-subtitle) {display:none;}
@media (max-width:1100px) {body.authenticated:not(.public-screen) .portal-hero {padding:var(--av-content-tablet-pad) var(--av-content-tablet-pad) 0;}}
@media (max-width:620px) {body.authenticated:not(.public-screen) .portal-hero {padding:var(--av-content-mobile-y) var(--av-content-mobile-x) 0;}body.authenticated:not(.public-screen) .portal-hero .hero-content {grid-template-columns:minmax(0,1fr);row-gap:var(--av-sp-4);}.hero-page-action {grid-column:1;grid-row:auto;}.hero-page-action .button {width:100%;}}
