/* Home layout follows the compact RevivalStory portal proportions. */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&display=swap');

body { background: #3c70a5 url('../images/revival-reference/world-background.webp') center bottom / auto 735px no-repeat fixed; }
.portal-status-strip { min-height: 24px; background: #f0792c; color: #fff; text-align: center; font: 700 13px/24px Oswald, Impact, sans-serif; }
.portal-shell { width: min(1040px, 100%); margin: 0 auto; border: 5px solid #dce4e8; border-top: 0; border-radius: 0; box-shadow: 0 0 18px #243f6580; }
.masthead { display: block; position: relative; }
.masthead-main { width: 100%; }
.brand { position: absolute; z-index: 2; top: 0; left: 0; width: 200px; height: 80px; min-height: 80px; border: 0; background: linear-gradient(#244968, #16334e); padding: 7px 11px 8px 19px; color: #fff; }
.brand-copy { gap: 1px; }
.brand-name { font: italic 30px/1 Georgia, serif; letter-spacing: -2.5px; color: #fff; text-shadow: 2px 2px #192638, -1px -1px #7c9ab0; }
.brand-note { font: bold 9px Verdana, sans-serif; letter-spacing: 1.5px; color: #f5d991; }
.brand img { width: 46px; height: 46px; image-rendering: pixelated; }
.top-nav { height: 80px; margin-left: 200px; background: linear-gradient(#254a67, #173550); border-bottom: 4px solid #fff; }
.top-nav button { font: 700 14px Oswald, Impact, sans-serif; border-right: 1px solid #b1c1c9; padding: 22px 5px 12px; }
.hero { height: 240px; border-bottom: 0; }
.hero-copy { background: linear-gradient(90deg, #fff9e9ed, #fff9e9bb 75%, transparent); }
.hero-ticker { height: 22px; padding: 1px 8px; background: #5559; color: #ffe989; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 13px/20px Arial, sans-serif; }
.body-grid { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 0; padding: 0; background: #fff; }
.left-rail { position: static; width: auto; min-height: 720px; margin: 0; padding: 0 8px 18px; border: 0; border-right: 7px solid #ece6cf; background: #eee7cf url('../images/revival-reference/sidebar-pattern.png') repeat-y center top; }
.member-box { height: 112px; margin: 0 -4px 0; padding: 36px 15px 0; border: 0; box-shadow: none; background: url('../images/revival-reference/login-scroll.png') no-repeat center top; background-size: 222px 552px; }
.member-box h2, .member-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.member-actions { grid-template-columns: 1fr 1fr; gap: 5px; }
.member-actions button { height: 24px; padding: 1px; border: 1px solid #fff; box-shadow: 0 0 0 1px #7b765e, inset 0 0 0 1px #a9825a; font: 700 11px Oswald, Impact, sans-serif; }
.beginner-promo { position: relative; display: block; width: 100%; max-width: 200px; margin: 2px 0 0; padding: 0; border: 0; background: transparent; line-height: 0; }
.beginner-promo img { width: 200px; max-height: none; }
.promo-hitarea { position: absolute; left: 0; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.promo-guide-link { top: 0; height: 72%; }
.promo-download-link { top: 72%; height: 28%; }
.promo-hitarea:focus-visible { outline: 2px solid #9f5a26; outline-offset: -2px; background: #fff5d633; }
.play-button { display: flex; gap: 6px; height: 42px; margin: 0; padding: 3px 5px; border: 0; outline: 0; background: #fff7df; color: #a65d20; text-shadow: none; font: 700 10px Oswald, Impact, sans-serif; }
.play-button img { width: 28px; height: 28px; }
.play-button small { display: block; font: 8px Arial, sans-serif; color: #716658; }
.rail-shortcuts { display: grid; gap: 6px; margin: 5px 5px 10px; }
.rail-link-card { display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; min-height: 42px; padding: 4px 6px; border: 1px solid #c7bea8; border-radius: 1px; background: #f6eed8; color: #6e6452; text-align: left; text-decoration: none; font: 700 9px Verdana, sans-serif; cursor: pointer; }
.rail-link-card:hover, .rail-link-card:focus-visible { background: #fff6e4; color: #a34e24; }
.rail-link-card strong, .rail-link-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-link-card small { margin-top: 2px; color: #807866; font: 8px Arial, sans-serif; }
.rail-link-mark { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #fff; outline: 1px solid #9e885f; background: linear-gradient(#dca958, #b87335); color: #fff; font: 700 15px Georgia, serif; text-shadow: 1px 1px #8c5324; }
.discord-card .rail-link-mark { background: linear-gradient(#7197b0, #496a84); font: 700 13px Arial, sans-serif; }
.support-card .rail-link-mark { background: linear-gradient(#9ea95a, #74833d); }
.server-status-box { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 3px 7px; margin: 0 7px 18px; padding: 6px; border: 1px solid #c6bea8; border-radius: 0; background: #fff9e7; color: #343a38; }
.server-status-copy { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.server-status-box strong { font: 700 12px Oswald, Impact, sans-serif; }
.server-status-box .status-unavailable { color: #826744; font: 8px Arial, sans-serif; text-align: right; }
.server-status-box img { display: block; width: 55px; height: 55px; object-fit: contain; image-rendering: pixelated; }
.server-play-link { grid-column: 1 / -1; display: block; min-width: 0; padding: 5px 6px; border: 1px solid #c9b98e; background: #fff4d4; color: #8d632c; text-align: left; text-decoration: none; font: 700 8px/1.25 Arial, sans-serif; }
.server-play-link:hover, .server-play-link:focus-visible { background: #ffefc5; color: #6f4a23; }
.side-menu { margin: 0 7px 10px; border: 1px solid #c9baa0; background: #fffaf0; }
.side-menu summary { padding: 7px 8px; background: #dcad68; color: #fff; cursor: pointer; font: 700 11px Oswald, Impact, sans-serif; list-style: none; }
.side-menu summary::-webkit-details-marker { display: none; }
.side-menu summary span { float: right; font: 9px Arial, sans-serif; }
.side-menu summary .library-close-label { display: none; }
.side-menu[open] summary .library-open-label { display: none; }
.side-menu[open] summary .library-close-label { display: inline; }
.side-menu nav { display: block; }
.today-tip, .support-banner { display: none; }
main { grid-column: 2; min-width: 0; padding: 8px 10px 20px; background: #fff; }
.class-widget { position: relative; height: 200px; margin: 0 0 14px; border: 7px solid #fff4d7; outline: 1px solid #d5c8a8; overflow: hidden; background: #fff9ed url('../images/revival-reference/class-widget-atlas.webp') left top / 1024px 1024px no-repeat; }
.class-portrait { position: absolute; left: 2px; bottom: 15px; width: 215px; height: 174px; background: url('../images/revival-reference/class-widget-atlas.webp') no-repeat; image-rendering: auto; }
.class-portrait.beginner { background-position: -790px -8px; }
.class-portrait.warrior { background-position: -205px -165px; }
.class-portrait.magician { background-position: -402px -165px; }
.class-portrait.bowman { background-position: -7px -165px; }
.class-portrait.thief { background-position: -605px -165px; }
.class-widget-copy { position: relative; margin: 8px 12px 0 245px; min-height: 126px; }
.class-widget-copy h1 { margin: 0 0 6px; color: #a05c71; font: 500 24px/1.1 Oswald, Impact, sans-serif; }
.class-widget-copy h1 span { color: #ba8a99; }
.class-widget-copy p { max-width: 520px; margin: 0; color: #3f403c; font: 13px/1.45 Arial, sans-serif; }
.class-widget-copy button { position: absolute; top: 2px; right: 0; padding: 3px 12px; border: 0; background: #eca94e; color: #fff; font: 700 10px Arial, sans-serif; }
.class-tabs { position: absolute; z-index: 2; display: flex; align-items: center; left: 0; right: 0; bottom: 0; min-height: 24px; background: #fff; border-top: 1px solid #d2c9b6; }
.class-tabs span { width: 26%; padding: 2px 6px; color: #6a3d3c; text-align: center; font: 700 15px Oswald, Impact, sans-serif; white-space: nowrap; }
.class-tabs button { flex: 1; min-width: 0; height: 22px; padding: 2px 1px; border: 0; border-left: 1px solid #ddd4c8; background: #aaa3a4; color: #fff; font: 700 10px Oswald, Impact, sans-serif; letter-spacing: .2px; }
.class-tabs button.active, .class-tabs button:hover { background: #9c1c19; }
.content-columns, .lower-grid { gap: 16px; }
.content-columns { margin: 3px 4px 12px; }
.section-head { min-height: 27px; margin: 0 0 5px; border-bottom: 3px solid #8094b9; }
.section-head h2 { padding: 0 0 1px 27px; border: 0; color: #111; font: 700 16px/1.2 Oswald, Impact, sans-serif; }
.notice-board:first-child .section-head h2 { background: url('../images/icon_serverchanges.png') left center / 22px 22px no-repeat; }
.resource-board .section-head h2 { background: url('../images/icon_features.png') left center / 22px 22px no-repeat; }
.update-board .section-head h2 { background: url('../images/icon_skillchanges.png') left center / 22px 22px no-repeat; }
.notice-tag.update { background: #8fa450; }
.resource-strip .section-head h2 { background: url('../images/icon_quests.png') left center / 22px 22px no-repeat; }
.resource-strip { margin: 0 4px 14px; }
.resource-strip .resource-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Notices & News, Updates and Events always share the tallest board's height. */
.content-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.content-columns > .notice-board { display: flex; flex-direction: column; }
.content-columns > .notice-board > .notice-list { flex: 1 1 auto; }
.cash-module .section-head h2 { background: url('../images/icon_cashshop.png') left center / 22px 22px no-repeat; }
.section-head button { color: #a75b2e; }
.notice-list { min-height: 106px; }
.feed-source-status { margin: 5px 4px 9px; padding: 4px 6px; border: 1px solid #d4c7a5; background: #fff8e8; color: #776a4b; font: 10px/1.35 Arial, sans-serif; }
.feed-source-status[hidden] { display: none !important; }
.notice-row { grid-template-columns: 39px minmax(0, 1fr) auto; padding: 3px 0; border: 0; }
.notice-row a, .notice-row button { color: #b4542b; }
.resource-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 6px 0 9px; }
.resource-links button { border: 0; background: #f5efe0; color: #785a45; padding: 4px; text-align: left; font: 700 10px Arial, sans-serif; }
.resource-links button:hover { background: #f7dbad; }
.lower-grid { margin: 0 4px 15px; }
.portal-module { min-height: 278px; padding: 0; border: 0; box-shadow: none; background: #fff; }
.home-ranking { display: flex; gap: 8px; min-height: 140px; padding-top: 4px; }
.ranking-feature { width: 90px; min-height: 100px; text-align: center; color: #586ba0; font: 700 10px Arial, sans-serif; }
.ranking-feature img { display: block; max-width: 72px; max-height: 95px; margin: 0 auto 5px; object-fit: contain; image-rendering: pixelated; }
.ranking-rows { flex: 1; min-width: 0; }
.ranking-row { display: grid; grid-template-columns: 19px minmax(0, 1fr) 34px 65px; gap: 4px; align-items: center; min-height: 20px; font: 10px Arial, sans-serif; }
.ranking-row .place { background: #e8e6df; color: #b42e24; text-align: center; font-weight: 700; }
.ranking-row button { overflow: hidden; border: 0; background: none; color: #6874a2; text-align: left; text-overflow: ellipsis; white-space: nowrap; font: 700 10px Arial, sans-serif; }
.ranking-row span:last-child { overflow: hidden; color: #555; text-overflow: ellipsis; white-space: nowrap; }
.ranking-loading, .ranking-unavailable { margin: 7px 0; color: #777; font: 11px/1.4 Arial, sans-serif; }
.ranking-head { justify-content: space-between; }
.ranking-scope { display: flex; align-items: center; gap: 3px; margin-left: auto; white-space: nowrap; }
.ranking-scope button { border: 0; background: none; padding: 2px; color: #a45b2e; font: 700 9px Arial, sans-serif; }
.ranking-scope button:hover:not(:disabled), .ranking-scope button:focus-visible:not(:disabled) { color: #633b28; text-decoration: underline; }
.ranking-scope button:disabled { color: #989186; cursor: not-allowed; }
.ranking-scope small { font-size: 6px; font-weight: normal; }
.home-player-avatar { background: transparent !important; }
.ranking-unavailable { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ranking-unavailable p { flex: 1 1 100%; min-height: 0; margin: 0; }
.ranking-unavailable button { margin: 0; border: 1px solid #b7a981; background: #fff3d9; padding: 4px 7px; color: #8f6435; font: 700 9px Arial, sans-serif; }
.ranking-unavailable button[data-open-page] { border-color: transparent; background: transparent; color: #8f6435; text-decoration: underline; }
.shop-awning { height: 48px; margin: 0 0 9px; background: linear-gradient(#de744c 0 7px, transparent 7px), repeating-linear-gradient(105deg, #dc755a 0 17px, #fff 17px 34px); clip-path: polygon(2% 0, 98% 0, 100% 65%, 98% 100%, 2% 100%, 0 65%); box-shadow: inset 0 -8px 9px #b1584140; }
.cash-art-button { display: block; width: 100%; padding: 0; border: 1px solid #cfc5ad; background: #fff9e7; }
.cash-art-button img { display: block; width: 100%; height: auto; }
.cash-trends-link { display: block; margin: 7px 0 0 auto; padding: 3px; border: 0; background: none; color: #a45b2e; font: 700 10px Arial, sans-serif; }
.home-community-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(240px, .9fr); align-items: start; gap: 8px; margin: 0 4px 15px; }
.home-community-module { min-width: 0; padding: 0 0 7px; border-bottom: 1px solid #d8d1be; background: #fff; }
.world-chat-controls { display: flex; gap: 3px; margin-left: auto; }
.world-chat-controls button { min-height: 20px; padding: 2px 5px; border: 1px solid #c8bea5; background: #f8f3e5; color: #716347; font: 700 8px Arial, sans-serif; }
.world-chat-controls button[aria-pressed="true"] { border-color: #ab7941; background: #d9a753; color: #fff; }
.world-chat-controls button:disabled { opacity: .55; cursor: progress; }
.world-chat-controls button[data-world-chat-refresh] { width: 22px; padding: 0; font: 700 15px/1 Arial, sans-serif; }
.home-world-chat-feed { display: grid; gap: 3px; min-height: 118px; padding: 3px 2px 0; }
.home-chat-row { display: grid; grid-template-columns: 47px minmax(0, 1fr); gap: 1px 6px; min-width: 0; padding: 4px 5px; border-bottom: 1px dotted #d6d0bf; background: #fffdf6; }
.home-chat-row time { grid-row: 1 / span 2; color: #8d795b; font: 8px/1.35 Arial, sans-serif; }
.home-chat-row strong { overflow: hidden; color: #5d7683; font: 700 9px/1.25 Arial, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.home-chat-row p { display: -webkit-box; overflow: hidden; margin: 0; color: #4d504d; font: 9px/1.35 Arial, sans-serif; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.world-chat-state { margin: 10px 4px; color: #776e5b; font: 10px/1.4 Arial, sans-serif; }
.world-chat-meta { margin: 4px 3px 0; color: #8a8475; font: 8px Arial, sans-serif; text-align: right; }
.featured-video { min-width: 0; }
.featured-video-card { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 0; padding: 0; overflow: hidden; border: 1px solid #c9bea2; background: #283c48; color: #fff; cursor: pointer; }
.featured-video-card img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; opacity: .88; }
.featured-video-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 40px; height: 32px; border: 1px solid #fff; background: #b94635e8; color: #fff; font: 700 15px Arial, sans-serif; transform: translate(-50%, -50%); }
.featured-video-card:hover .featured-video-play, .featured-video-card:focus-visible .featured-video-play { background: #d57037; }
.featured-video-frame { display: block; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; border: 1px solid #c9bea2; background: #1e2529; }
.featured-video-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 4px 2px 0; color: #525652; font: 700 9px/1.4 Arial, sans-serif; }
.featured-video-copy a { flex: 0 0 auto; color: #a45b2e; font-size: 8px; text-decoration: none; }
.featured-video-copy a:hover, .featured-video-copy a:focus-visible { text-decoration: underline; }
.world-tools, .directory { border-top: 1px dotted #ccbfa4; padding-top: 10px; }
.studio-footer { margin: 0; background: #f8f6ef; }

@media (max-width: 760px) {
  body { background: #3c70a5; }
  .portal-shell { width: 100%; border: 0; }
  .brand { position: relative; width: 100%; height: 52px; min-height: 52px; }
  .brand-name { font-size: 25px; }
  .brand img { width: 36px; height: 36px; }
  .top-nav { height: auto; margin-left: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .top-nav button { min-height: 36px; padding: 7px 2px; font-size: 11px; border-bottom: 1px solid #64809a; }
  .hero { height: 150px; }
  .hero-copy { min-width: 150px; width: 50%; }
  .hero-copy strong { font-size: 18px; }
  .hero-ticker { font-size: 10px; }
  .body-grid { display: flex; flex-direction: column; }
  main { order: 1; width: 100%; padding: 9px 7px 16px; }
  .left-rail { order: 2; min-height: 0; padding: 7px 10px 16px; border-right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .member-box { grid-column: 1 / -1; height: 90px; margin: 0; background-color: #f8eed6; }
  .beginner-promo { grid-column: 1 / -1; justify-self: center; width: min(200px, 100%); margin: 0; }
  .rail-shortcuts, .server-status-box, .side-menu { grid-column: 1 / -1; margin: 0; }
  .rail-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .rail-link-card { min-height: 46px; font-size: 8px; }
  .support-card { grid-column: 1 / -1; }
  .server-play-link { min-height: 32px; font-size: 9px; }
  .server-status-box img { width: 45px; height: 45px; }
  .class-widget { height: 168px; margin: 0 0 12px; }
  .class-widget { background: #fff9ed; }
  .class-portrait { transform: scale(.72); transform-origin: left bottom; }
  .class-widget-copy { margin: 7px 8px 0 153px; }
  .class-widget-copy h1 { font-size: 19px; }
  .class-widget-copy p { font-size: 10px; line-height: 1.35; }
  .class-widget-copy button { top: auto; right: 0; bottom: 1px; font-size: 8px; }
  .class-tabs span { width: 19%; font-size: 9px; }
  .class-tabs button { font-size: 8px; }
  .content-columns, .lower-grid, .home-community-grid { grid-template-columns: 1fr; gap: 12px; }
  .content-columns, .lower-grid { margin-left: 2px; margin-right: 2px; }
  .home-community-grid { margin-left: 2px; margin-right: 2px; }
  .portal-module { min-height: 0; }
  .resource-board #event-list { display: none; }
  .shop-awning { height: 37px; }
  .cash-art-button { max-width: 430px; margin: auto; }
  .home-world-chat-feed { min-height: 0; }
  .featured-video-card { min-height: 0; }
  .featured-video-card img { height: 100%; min-height: 0; }
  .featured-video-frame { min-height: 0; }
}
