/* Preserve the classic portal: native CSS, existing sky, stone and parchment assets. */
/* DESIGN_VARIANCE: 2; MOTION_INTENSITY: 1; VISUAL_DENSITY: 7. */
:root { --portal-width: 1100px; --ink: #50351c; --wine: #740900; --gold: #e1c779; }
body, body.portal-home { background: #080907; color: var(--ink); font: 14px/1.7 Verdana, Arial, sans-serif; }
.skyline, .layout { width: calc(100% - 32px); max-width: var(--portal-width); margin-inline: auto; }
.skyline { margin-top: 16px; border: 2px ridge #737568; border-bottom: 0; border-radius: 0; overflow: visible; background: none; }
.masthead {
  height: 66px;
  max-width: none;
  margin: 0;
  gap: 16px;
  padding: 0 20px 0 14px;
  border: 0;
  border-bottom: 1px solid #89907d;
  background: #151329 url('/classic-assets/sky.svg') center left / cover no-repeat;
}
.masthead::after { display: none; }
.wordmark { min-width: 0; gap: 17px; text-decoration: none !important; }
.wordmark span { color: #e7c546; font: bold italic 51px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: -3px; text-shadow: -1px -1px #fff0a6, 2px 3px 2px #070500; }
.wordmark i { padding: 0; color: #f1e4bb; font: 10px Georgia, serif; letter-spacing: 2px; white-space: nowrap; text-shadow: 1px 1px #080907; }
.motto { margin: 0; color: #eee4cc; font: italic 13px/1.45 Georgia, serif; letter-spacing: normal; }
.motto span { color: #d0c9c6; font-size: 11px; }
.topnav { display: flex; max-width: none; min-height: 33px; border: 0; border-bottom: 2px ridge #797a66; background: #42463f url('/classic-assets/stone.svg'); }
.topnav a {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 6px 8px;
  border-right: 1px solid #252822;
  border-left: 1px solid #73776a;
  color: #f5eee3;
  font: bold 15px/1.15 Georgia, 'Times New Roman', serif;
  text-shadow: 1px 2px 1px #10110e;
}
.topnav a:first-child { border-left: 0; }
.topnav a:last-child { border-right: 0; }
.topnav a:hover, .topnav a:focus { background: #71644b; color: #fff0b3; text-decoration: none; }
.topnav a[aria-current] { background: #282c24; color: #f2d77f; box-shadow: inset 0 2px #a88c49, inset 0 -2px #151912; }
.language-switcher { width: 100%; max-width: none; margin: 0; gap: 6px; padding: 4px 10px; border: 0; border-bottom: 2px ridge #747562; background: #343831 url('/classic-assets/stone.svg'); font-size: 11px; }
.language-label { color: #ddd1ae; }
.language-switcher a { min-height: 26px; padding: 3px 7px; border: 2px ridge #8d876d; border-radius: 0; background: #373c32; font-size: 11px; }
.language-switcher a:hover { background: #645941; color: #fff0b3; }
.language-switcher a[aria-current=true] { border-color: #c9ae64; background: #514329; color: #fff0a6; box-shadow: inset 0 0 0 1px #25241c; }

.layout, .portal-home .layout { grid-template-columns: 188px minmax(0, 1fr); gap: 12px; margin-bottom: 24px; }
.sidebar { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #f5ead9; }
.stone-menu, .portal-home .stone-menu,
.world-note, .portal-home .world-note,
.side-news, .portal-home .side-news {
  margin: 0;
  padding: 11px 12px 13px;
  border: 2px ridge #858474;
  border-radius: 0;
  background: #42463f url('/classic-assets/stone.svg');
  color: #ece4d1;
  box-shadow: inset 0 0 0 1px #292c25, inset 0 -4px 9px #191c1859;
  font: 12px/1.55 Verdana, Arial, sans-serif;
}
.stone-menu, .portal-home .stone-menu { border-top: 0; }
.stone-menu h2, .portal-home .stone-menu h2,
.world-note h2, .portal-home .world-note h2,
.side-news h2, .portal-home .side-news h2 {
  margin: 0 0 8px;
  padding: 0 0 8px;
  border-bottom: 2px ridge #b19a5f;
  color: var(--gold);
  font: bold 18px/1.2 Georgia, 'Times New Roman', serif;
  text-align: center;
  text-shadow: 1px 2px #171a13;
}
.stone-menu a, .portal-home .stone-menu a { padding: 7px 3px; color: #f7f2e6; font: bold 14px/1.35 Georgia, 'Times New Roman', serif; overflow-wrap: anywhere; }
.stone-menu a:hover, .side-news a:hover, .portal-home .side-news a:hover { background: #252b22; color: #ffe299; text-decoration: none; }
.side-rule { height: 3px; margin-top: 11px; border: 0; border-top: 2px ridge #a89b68; }
.side-signature, .portal-home .side-signature { margin: 14px 0 2px; color: #f8edd1; font: italic 28px/1 Georgia, serif; text-shadow: 1px 2px #171a13; }
.side-signature span { margin-top: 5px; color: #d6bd72; font: 9px/1.2 Verdana, sans-serif; }
.world-note, .portal-home .world-note, .side-news, .portal-home .side-news { margin-top: 14px; }
.portal-home .world-note dt { color: #d5cfbe; }
.portal-home .world-note dd { color: #fff0ce; }
.portal-home .world-note .world-caption { margin-top: 10px; padding-top: 9px; border-top: 1px solid #7e806b; color: #ded2b9; font: italic 13px/1.5 Georgia, serif; }
.side-news a, .portal-home .side-news a { padding: 9px 3px; color: #f3ead6; font: bold 13px/1.4 Georgia, 'Times New Roman', serif; }
.side-news a + a, .portal-home .side-news a + a { border-top: 1px solid #747663; }
.side-news time, .portal-home .side-news time { margin-top: 4px; color: #cbc5b6; font: 10px/1.4 Verdana, Arial, sans-serif; }
.sidebar p { overflow-wrap: anywhere; }

.paper, .portal-home .paper, .wiki-paper {
  min-width: 0;
  margin-top: 0;
  padding: 26px 29px 22px;
  border: 4px ridge #c9ad7c;
  border-image: none;
  background: #fff0d2 url('/classic-assets/parchment.svg') repeat;
  box-shadow: inset 0 0 0 1px #f6deb1, inset 0 0 19px #9a71373d;
  overflow-wrap: break-word;
}
.page-title, .portal-home .page-title { display: block; margin: 0 0 25px; padding: 5px 8px 12px; border-top: 2px groove #ab8050; border-bottom: 2px groove #ab8050; box-shadow: none; }
.page-title h1, .wiki-paper .page-title h1 { margin: 0; color: var(--wine); font: normal 38px/1.22 Georgia, 'Times New Roman', serif; letter-spacing: -.8px; }
.page-title p, .portal-home .page-title p { max-width: 70ch; margin: 6px 0 0; font-size: 12px; line-height: 1.6; }
.portal-home .welcome { grid-template-columns: minmax(0, 1fr) 132px; gap: 20px; margin: 0 0 25px; padding: 2px 7px 23px; }
.portal-home .welcome-copy { min-width: 0; }
.portal-home .welcome h1 { max-width: 22ch; margin-bottom: 12px; font-size: 38px; line-height: 1.12; letter-spacing: -.8px; }
.portal-home .intro { max-width: 60ch; font-size: 14px; line-height: 1.7; }
.portal-home .welcome-actions { gap: 8px; margin: 17px 0 14px; }
.button, .portal-home .button { max-width: 100%; min-height: 40px; padding: 9px 17px; border-radius: 0; font: bold 15px/1.3 Georgia, 'Times New Roman', serif; }
.portal-home .welcome-actions .button { padding-inline: 13px; font-size: 14px; }
.button:hover { color: #fff6dd; }
.portal-home .button-secondary:hover { color: #402506; }
.button:active { background: #4b3217; border-style: groove; }
.button:disabled { background: #665b47; border-color: #9c8c6f; color: #e4dccb; text-shadow: none; cursor: default; }
.portal-home .journey-steps { gap: 8px 18px; padding-top: 11px; }
.portal-home .journey-steps li { gap: 6px; font-size: 11px; }
.portal-home .journey-steps b { font-size: 23px; }
.portal-home .welcome-crest { align-self: start; padding-top: 15px; }
.portal-home .welcome-crest span { margin-top: 8px; }
.portal-home .page-title { margin-bottom: 18px; padding: 0 8px 13px; border-top: 0; border-bottom: 1px solid #b58e58; }
.portal-home .page-title h2 { font-size: 31px; }
.portal-home .news-article + .news-article { margin-top: 27px; }
.news-ribbon, .portal-home .news-ribbon { margin: 0 0 16px; padding: 8px 12px; border: 3px ridge #a67b49; box-shadow: none; color: #fff2d7; font: bold 17px/1.3 Georgia, 'Times New Roman', serif; }
.news-ribbon span { white-space: normal; }
.news-ribbon time, .portal-home .news-ribbon time { color: #f0ddbf; font: 10px/1.5 Verdana, Arial, sans-serif; }
.news-ribbon h3 { flex: 1; min-width: 0; margin: 0; color: inherit; font: inherit; }
.news-ribbon time { align-self: center; margin-left: auto; }
.portal-home .dropcap::first-letter { margin: 2px 4px 0 0; font: 38px/.9 Georgia, 'Times New Roman', serif; }
.news-body, .content-section, .portal-home .news-body, .portal-home .content-section { padding: 0 8px 12px; font: 14px/1.75 Verdana, Arial, sans-serif; }
.news-body p, .content-section p, .portal-home .news-body p, .portal-home .content-section p { max-width: 75ch; margin-block: 14px; }
.portal-home .gold-list { max-width: 75ch; }
.section-heading { display: block; margin-bottom: 18px; padding-bottom: 12px; }
.section-heading p { margin: 5px 0 0; }
.account-section input::placeholder { color: #756550; opacity: 1; }
.account-section input:focus, .account-section select:focus { outline-color: #205a87; }
.download-section { flex-wrap: wrap; }
.download-section > div { min-width: 0; }
.download-button { white-space: normal; }
footer, .portal-home footer { color: #6c553b; font-size: 11px; line-height: 1.7; }

/* Keep account and payment content in the same parchment register as the guide. */
.account-page .paper, .coins-page .paper { min-height: 600px; }
.account-page .stone-menu p { margin: 13px 2px 0; color: #ded4bd; font: 12px/1.65 Verdana, Arial, sans-serif; text-align: left; text-shadow: none; }
.account-page .content-section { margin-block: 20px; }
.character-list { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 16px; border-top: 2px groove #c3a780; }
.character-card { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 14px 8px; border: 0; border-bottom: 1px solid #c3a780; background: none; }
.character-card h3 { min-width: 0; margin: 0; font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
.character-card p { margin: 0; font-size: 12px; }
.coin-panel { padding: 20px 8px; border: 0; border-top: 2px groove #b4a17c; background: none; }
.coin-panel h2 { color: #6e160d; font: normal 28px/1.25 Georgia, 'Times New Roman', serif; }
.coin-panel p, .coin-panel li { max-width: 72ch; line-height: 1.7; }
.pix-grid { grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 24px; }
.pix-grid > div { min-width: 0; }
.pix-qr { max-width: 260px; }
.small-note, .order-details dd { overflow-wrap: anywhere; }
.order-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.orders { gap: 0; border-top: 1px solid #b4a17c; }
.orders a { padding: 13px 8px; border: 0; border-bottom: 1px solid #b4a17c; color: #67330b; }
.orders a:hover { background: #e6d0a666; color: #742c12; }
.wiki-page .wiki-layout { grid-template-columns: 200px minmax(0, 1fr); }
.wiki-sidebar .stone-menu { border-top: 2px ridge #858474; }
.wiki-sidebar .stone-menu a { padding: 8px 3px; font-size: 13px; line-height: 1.4; }
.wiki-callout { flex-wrap: wrap; margin-inline: 8px; padding: 13px 0; border: 0; border-top: 1px solid #b99863; border-bottom: 1px solid #b99863; background: none; }
.wiki-callout p { flex: 1 1 210px; font-size: 12px; }
.wiki-callout .button { font-size: 13px; }
.wiki-entry { padding: 21px 8px 19px; }
.wiki-entry p, .wiki-original p { max-width: 72ch; line-height: 1.75; }
.wiki-original { margin-inline: 8px; padding: 18px 0 0; border: 0; border-top: 2px groove #b49a60; background: none; }

/* Compact indexes use the same parchment and inset controls as the portal. */
.classic-index { margin: 0 8px 22px; border: 2px groove #c3a780; background: #ead6af40; }
.classic-index summary { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; color: #67330b; font: bold 12px/1.5 Verdana, Arial, sans-serif; cursor: pointer; list-style: none; }
.classic-index summary::-webkit-details-marker { display: none; }
.classic-index summary::before { content: '+'; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex: 0 0 15px; border: 1px solid #a4895e; background: #f7e8c8; color: #674826; font: 13px/1 monospace; }
.classic-index[open] summary::before { content: '-'; }
.classic-index summary:hover { background: #e0c69666; color: var(--wine); }
.classic-index[open] summary { border-bottom: 1px solid #bfa279; }
.classic-index nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; padding: 10px; }
.classic-index nav a { display: block; min-width: 0; padding: 6px; color: #67330b; font: bold 12px/1.5 Verdana, Arial, sans-serif; overflow-wrap: anywhere; }
.classic-index nav a:hover { background: #d5b77e40; color: var(--wine); text-decoration: underline; }
.classic-index time { display: block; margin-top: 2px; color: #6c553b; font: normal 11px/1.5 Verdana, Arial, sans-serif; }
.wiki-index { display: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: #fff3d8; color: #563006; border: 3px ridge #bba16a; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.button:active { border-style: inset; }
.portal-home .button-secondary:active { background: linear-gradient(#d3b476, #ead2a1); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible,
.portal-home a:focus-visible, .portal-home button:focus-visible { outline: 3px solid #205a87; outline-offset: 3px; }
.topnav a:focus-visible, .sidebar a:focus-visible, .language-switcher a:focus-visible,
.portal-home .sidebar a:focus-visible, .portal-home .topnav a:focus-visible { outline-color: #ffe092; outline-offset: -3px; }

@media (max-width: 900px) {
  .skyline, .layout { width: calc(100% - 20px); }
  .layout, .portal-home .layout { grid-template-columns: 165px minmax(0, 1fr); gap: 8px; }
  .wiki-page .wiki-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .paper, .portal-home .paper, .wiki-paper { padding: 23px 21px 20px; }
  .topnav a { padding-inline: 5px; font-size: 14px; }
  .portal-home .welcome { grid-template-columns: minmax(0, 1fr) 105px; gap: 13px; padding-inline: 3px; }
  .portal-home .welcome h1 { font-size: 33px; }
}
@media (max-width: 760px) {
  .wiki-callout p { flex: none; }
  .wiki-index { display: block; }
}
@media (max-width: 700px) {
  .skyline, .layout { width: 100%; }
  .skyline { margin-top: 0; border-left: 0; border-right: 0; }
  .masthead { height: 64px; padding-inline: 12px; }
  .wordmark { gap: 13px; }
  .wordmark span { font-size: 46px; }
  .wordmark i { font-size: 9px; letter-spacing: 1px; }
  .motto { display: none; }
  .topnav, .portal-home .topnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portal-home .topnav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topnav a, .portal-home .topnav a { min-height: 44px; padding: 7px 5px; border-bottom: 1px solid #252822; font-size: 13px; line-height: 1.25; }
  .language-switcher { flex-wrap: wrap; justify-content: center; gap: 5px; padding: 7px 5px; }
  .language-label { width: 100%; margin: 0; text-align: center; }
  .language-switcher a { min-height: 36px; padding: 5px 8px; }
  .layout, .portal-home .layout, .wiki-page .wiki-layout { display: block; }
  .sidebar, .wiki-sidebar { display: none; }
  .paper, .portal-home .paper, .wiki-paper { min-height: 0; padding: 21px 17px; border-width: 3px; }
  .account-page .paper, .coins-page .paper { min-height: 0; }
  .page-title, .portal-home .page-title { margin-bottom: 20px; padding-inline: 3px; }
  .page-title h1, .wiki-paper .page-title h1 { font-size: 33px; }
  .portal-home .welcome { grid-template-columns: minmax(0, 1fr); margin-bottom: 23px; padding: 2px 3px 20px; }
  .portal-home .welcome h1 { max-width: 23ch; font-size: 34px; }
  .portal-home .welcome-crest { display: none; }
  .portal-home .welcome-actions .button { flex: 1 1 100%; }
  .portal-home .journey-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 7px; }
  .portal-home .journey-steps li { min-height: 44px; font-size: 12px; }
  .portal-home .journey-steps a { display: inline-flex; align-items: center; min-height: 44px; }
  .news-ribbon, .portal-home .news-ribbon { display: block; padding: 8px 10px; font-size: 16px; }
  .news-ribbon time, .portal-home .news-ribbon time { display: block; margin-top: 6px; }
  .news-body, .content-section, .portal-home .news-body, .portal-home .content-section { padding-inline: 3px; }
  .account-section form { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .account-section small, .password-note, .primary, .portal-home .primary { grid-column: 1; }
  .account-section input, .account-section select, .coin-panel select { min-height: 44px; font-size: 16px; }
  .button, .portal-home .button { min-height: 44px; }
  .primary, .download-button { width: 100%; white-space: normal; }
  .character-card { display: block; padding-inline: 3px; }
  .character-card p { margin-top: 6px; }
  .pix-grid, .order-details { grid-template-columns: minmax(0, 1fr); }
  .coin-panel { padding-inline: 3px; }
  .coin-panel form .button, .wiki-callout .button { width: 100%; }
  .wiki-callout, .wiki-original { margin-inline: 3px; }
  .wiki-entry { padding-inline: 3px; }
  .classic-index { margin-inline: 3px; }
  .classic-index summary { min-height: 44px; }
  .classic-index nav { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .classic-index nav a { display: flex; flex-direction: column; justify-content: center; min-height: 44px; }
}
@media (max-width: 380px) {
  .paper, .portal-home .paper, .wiki-paper { padding-inline: 12px; }
  .wordmark span { font-size: 43px; }
  .wordmark { gap: 11px; }
  .portal-home .welcome h1 { font-size: 31px; }
  .topnav a, .portal-home .topnav a { padding-inline: 3px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
