/* Shared chrome and reading rhythm. Game boards keep their own dimensions. */
:root {
  --auberge-control-size: 44px;
  --auberge-reading-size: 17px;
  --auberge-detail-size: 15px;
}

.auberge-header.app-header {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
  min-height: 88px;
  padding: 12px max(20px, calc((100vw - 1500px) / 2));
  z-index: 100;
}
.auberge-header .brand-button {
  flex: none;
  min-width: 0;
  margin: 0;
  gap: 10px;
  color: #f0e8d9;
  text-decoration: none;
}
.auberge-header .brand-button strong { font: 700 26px/1.1 Georgia, serif; }
.auberge-header .brand-seal { width: 48px; height: 48px; flex: none; }
.auberge-header .app-nav {
  position: static;
  display: flex;
  flex: none;
  justify-content: flex-start;
  gap: 4px;
  width: auto;
  padding: 4px;
  border: 1px solid #c8aa6f2b;
  border-radius: 14px;
  background: #11191070;
}
.auberge-header .nav-button {
  justify-content: center;
  min-height: var(--auberge-control-size);
  padding: 10px 12px;
  gap: 7px;
  font: 600 15px/1.35 system-ui, sans-serif;
  white-space: nowrap;
  text-decoration: none;
}
.auberge-header .nav-icon { width: 19px; height: 19px; }
.auberge-header .portal-date {
  display: block;
  flex: 1;
  min-width: 190px;
  margin: 0;
  color: #ead9b5;
  font: 500 clamp(23px, 2vw, 30px)/1.3 Georgia, serif;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
}
.auberge-header [data-notifications-slot]:empty { display: none; }
.auberge-header .news-link { font-size: 14px; }
.auberge-header .account-zone { flex: none; min-width: 0; gap: 10px; margin-left: 0; }
.auberge-header :is(.header-profile-name, .server-profile-name) {
  max-width: 15ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.auberge-header .profile-button { width: 44px; height: 44px; flex: none; cursor: pointer; }
.header-account-menu { position: relative; }
.header-account-menu > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.header-account-menu > summary::-webkit-details-marker { display: none; }
.header-account-menu .server-profile-name { color: #eadabe; }
.header-account-menu .profile-menu { display: none; }
.header-account-menu[open] .profile-menu { display: grid; }
.auberge-header .profile-menu {
  position: absolute;
  z-index: 110;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid #c8aa6f55;
  border-radius: 16px;
  background: #242c23;
  color: #f0e8d9;
  box-shadow: 0 18px 45px #0006;
}
.auberge-header .profile-menu :is(a, button) {
  display: flex;
  align-items: center;
  min-height: var(--auberge-control-size);
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: 500 15px/1.4 system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.auberge-header .profile-menu :is(a, button):hover { background: #d2b87b18; }
.auberge-header .profile-menu form { margin: 0; }
.auberge-header :is(a, button, summary):focus-visible { outline: 2px solid #ecd5a5; outline-offset: 4px; }

/* Universe cards share a grid and a baseline, while retaining their colors. */
.common-home #home-view .world-grid {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
.common-home #home-view .world-card { display: flex; flex-direction: column; border-radius: 22px; }
.common-home .world-card[hidden] { display: none; }
.common-home .world-scene { flex: none; height: auto; min-height: 0; aspect-ratio: 16 / 10; }
.common-home .world-content { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.common-home .world-content h3 { min-height: 1.15em; font-size: clamp(28px, 2.5vw, 36px); line-height: 1.15; }
.common-home .world-label span { font-size: 14px; letter-spacing: .08em; }
.common-home .world-content ul { gap: 8px; margin: 16px 0 20px; }
.common-home .world-content li { padding: 8px 10px; font-size: var(--auberge-detail-size); line-height: 1.4; }
.common-home .world-content > p { font-size: var(--auberge-reading-size); line-height: 1.6; }
.common-home .world-content > .world-footer:last-child { margin-top: auto; }
.common-home .world-daily-scores { padding-top: 18px; }
.common-home .world-daily-scores :is(header, dl > div, small) { font-size: var(--auberge-detail-size); line-height: 1.5; }
.common-home .world-daily-scores dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.common-home .world-daily-scores dt { overflow-wrap: anywhere; }
.common-home #home-view .home-score-card { align-self: start; justify-content: flex-start; min-height: 0; padding: 24px; }
.common-home .score-card-title > span { font-size: 42px; }
.common-home .score-card-title h3 { margin: 8px 0 22px; font-size: 30px; }
.common-home .home-score-card .score-history-table :is(thead th, tbody th, small) { font-size: 15px; line-height: 1.45; }
.common-home .home-score-card .score-history-table th:first-child { width: 30%; }
.common-home .home-score-card .score-history-nav { font-size: 15px; }
.common-home .home-score-card .score-history-nav button { width: 44px; min-height: 44px; flex: none; }
.common-home .home-score-card .score-history-more { font-size: 14px; padding: 10px 0; }

/* Account and social pages use comfortable text without changing legal copy. */
.common-interface :is(.account-panel, .social-panel, .friend-row, .stack-form, .player-history) { font-size: var(--auberge-reading-size); line-height: 1.6; }
.common-interface .account-heading h1 { font-size: clamp(30px, 3.5vw, 42px); line-height: 1.15; }
.common-interface .account-layout .account-tabs { width: 100%; top: 110px; }
.common-interface .account-layout .account-tabs a { font-size: 16px; line-height: 1.4; }
.common-interface :is(.account-tabs a small, .settings-note, .account-detail, .banner-form label, .notification-choice small) { font-size: var(--auberge-detail-size); }
.common-interface :is(.account-panel p, .social-panel p) { line-height: 1.65; }
.common-interface :is(.account-panel, .social-panel, .stack-form) label { font-size: 15px; }
.common-interface :is(.account-panel, .social-panel, .stack-form) :is(input:not([type=radio]):not([type=checkbox]):not([type=range]), select, textarea) { font-size: 16px; }
.common-interface .account-detail strong { font-size: 16px; }
.common-interface .account-social-actions > .auberge-button { flex: 1 1 200px; justify-content: center; text-align: center; }
.common-interface .friend-identity { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.common-interface .friend-identity small { display: block; font-size: 14px; line-height: 1.5; }
.common-interface .friend-actions { flex-wrap: wrap; }
.common-interface .friend-actions form { margin: 0; }
.common-interface .errorlist { padding: 12px 16px 12px 32px; color: #ffd7ca; border-left: 3px solid #d88e76; background: #d88e7610; font-size: 15px; }
.common-interface .portrait-editor { flex-wrap: wrap; }
.common-interface .account-layout .account-tabs a[aria-selected=true] { color: #22291e; }
.common-interface :is(.auberge-button, .primary, .secondary) { font-size: 15px; }
.server-login .login-card label > span { font-size: 15px; }
.server-login .login-card :is(input, .login-intro) { font-size: 16px; }
.auth-card .stack-form :is(input, label, button) { font-size: 16px; }
.auth-card .stack-form input { min-height: 46px; }
.auth-card :is(p, .helptext, .errorlist) { font-size: 15px; line-height: 1.6; }

@media (max-width: 1200px) {
  .auberge-header.app-header { gap: 12px; flex-wrap: wrap; }
  .auberge-header .portal-date { order: 5; flex-basis: 100%; font-size: 23px; }
  .auberge-header .account-zone { margin-left: auto; }
  .common-interface .account-layout .account-tabs { top: 145px; }
  .common-home #home-view .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .common-home #home-view .home-score-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .auberge-header.app-header { gap: 8px 12px; padding: 10px 16px; min-height: 0; }
  .auberge-header .brand-button strong { font-size: 22px; }
  .auberge-header .brand-seal { width: 40px; height: 40px; }
  .auberge-header :is(.header-profile-name, .server-profile-name) { display: none; }
  .auberge-header .app-nav {
    position: fixed;
    inset: auto 12px max(12px, env(safe-area-inset-bottom));
    z-index: 1100;
    justify-content: center;
    padding: 5px;
    border-color: #c8aa6f55;
    background: #20281ff5;
    box-shadow: 0 5px 24px #0005;
  }
  .auberge-header .nav-button { flex: 1; padding: 10px 8px; font-size: 15px; }
  .auberge-header .portal-date { min-width: 0; font-size: 21px; }
  .auberge-header .account-zone { gap: 6px; }
  .auberge-header .profile-menu.open,
  .auberge-header .header-account-menu .profile-menu {
    position: fixed;
    top: 76px;
    right: 12px;
    width: min(280px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
  }
  .auberge-header .news-link { display: none; }
  .common-home #home-view .world-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .common-home .world-content { padding: 22px; }
  .common-home .world-content h3 { min-height: 0; font-size: 32px; }
  .common-interface .account-layout .account-tabs { position: static; }
}
@media (max-width: 400px) {
  .common-interface .auberge-header.app-header { gap: 6px; padding-inline: 12px; }
  .common-interface .auberge-header .brand-button { gap: 6px; }
  .common-interface .auberge-header .brand-button strong { display: block; font-size: 20px; }
  .common-interface .auberge-header .brand-seal { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .common-home .world-card[data-world] { transition: none; }
  .common-home .world-card[data-world]:is(:hover, :focus) { transform: none; }
}
