/* Scholar theme: decorative artwork under live responsive controls. */
:root{--muted:#b4b8bb;--line:#4e5b64;--purple:#78ddea;--owl-text-size:12px;--owl-heading-size:16px;--scholar-ink:#10151b;--scholar-ivory:#e8e3d7;--scholar-brass:#c3a366}
html{background:var(--scholar-ink)}body{color:var(--scholar-ivory);background:linear-gradient(#10151b85,#10151bad),url('/assets/scholar-background-v1.webp') center/cover no-repeat}
body :is(h1,h2,h3,h4){font-family:Georgia,'Times New Roman',serif !important;color:var(--scholar-ivory);letter-spacing:.3px !important}body h1{font-size:22px !important}body h2{font-size:18px !important}body h3{font-size:16px !important}
header.owl-header{background:#10151bdb;padding:4px 16px;border-bottom:1px solid #665d4c;min-height:0}.owl-header-banner{width:min(340px,80vw);height:88px;overflow:visible}.owl-header-banner img{position:static;transform:none;width:100%;height:100%;object-fit:contain}
body>main{padding:18px 20px;background:transparent}body :is(.eyebrow,.step,.status,.back,.open){color:var(--scholar-brass)}
body :is(.card,.notice,.owl-player-panel){border:22px solid transparent !important;border-image:url('/assets/scholar-panel-v1.webp') 145 stretch !important;border-radius:0 !important;background:linear-gradient(135deg,#182029ed,#10151bf5) !important;padding:12px !important;box-shadow:0 5px 18px #0004}
body :is(dialog,.owl-player-modal){border:22px solid transparent !important;border-image:url('/assets/scholar-panel-v1.webp') 145 stretch !important;border-radius:0 !important;background:#182029 !important;padding:12px !important;color:var(--scholar-ivory)}dialog::backdrop,.owl-player-modal::backdrop{background:#050b11df}
body :is(button,.primary,.secondary):not(.owl-conversation-link):not(#owl-player-chat):not(.owl-profile-icon-button):not(.owl-avatar-choice){min-height:44px;border:1px solid #756d59 !important;border-radius:8px !important;background:#192d36 url('/assets/scholar-button-v1.webp') center/100% 100% no-repeat !important;color:#f3ecd9 !important;padding:12px 18px !important;text-shadow:0 1px 2px #000;box-shadow:0 2px 7px #0004}
body button:disabled{opacity:.48;cursor:not-allowed}body button:active:not(:disabled){filter:brightness(1.12)}body :is(button,a,input,select,textarea):focus-visible{outline:2px solid #78ddea;outline-offset:3px}
body :is(input,select,textarea){background:#101820 !important;border-color:#53616d !important;color:#e8e3d7 !important;min-height:44px}body label{color:#b4b8bb}
nav.owl-bottom-nav{background:#101820f5;border-top:1px solid #887452;gap:6px;padding-top:8px;box-shadow:0 -4px 16px #0005}
body .owl-bottom-nav a,body .owl-bottom-nav #owl-player-chat,body .owl-bottom-nav a[aria-current=page],body .owl-bottom-nav #owl-player-chat[aria-current=page]{height:auto;width:100%;min-height:0;background:#182029 url('/assets/scholar-navigation-v1.webp') center/100% 100% no-repeat !important;border:1px solid transparent;border-radius:9px;padding:8px 3px !important;color:#c7c2b6;box-shadow:none;gap:5px;text-shadow:none}
body .owl-bottom-nav a[aria-current=page],body .owl-bottom-nav #owl-player-chat[aria-current=page]{border-color:#d2b775;box-shadow:inset 0 0 12px #a080322f,0 0 9px #9cdde52a;color:#f9e5b6}
body .owl-bottom-nav img{width:52px;height:52px;border-radius:0}body .owl-bottom-nav span{font-size:10px !important;line-height:1.2 !important;min-height:24px}
body .owl-profile-top,body .owl-profile-top span{color:#cfb681 !important;font-size:18px !important}.owl-profile-identity{margin:10px 0 14px}.owl-profile-avatar{width:84px;height:84px;border-radius:0}.owl-player-panel .owl-profile-name{font-family:Georgia,serif !important;font-size:23px !important;margin:8px 0 12px}.owl-player-panel h3{color:#dbc59a}
body .owl-chat-log{background:#0e171fee;border:1px solid #485967}body .owl-chat-message{border-bottom-color:#43515c}body #owl-friends-page .owl-conversation-link{background:transparent !important;border:0 !important;color:#e8e3d7 !important;padding:8px 0 !important;box-shadow:none;text-shadow:none}body #owl-friends-page .owl-conversation-link:disabled{opacity:1}body .owl-unread-count,body .owl-unread-dot,body .owl-notification-badge{background:#78ddea;color:#101820}.owl-player-row{border-bottom-color:#445461}
body .stat-row{background:#1a2530}body .stat-row:nth-child(even){background:#202d38}body .hero-card,body .chat-message{background:#17232deb;border-color:#4e5b64}body #owl-status{background:#101820f0;color:#d2b775}body .room{background:#182029 !important;color:#e8e3d7 !important}body .room[aria-pressed=true]{border-color:#78ddea !important;box-shadow:inset 0 0 9px #78ddea22}
#content>.cards:not(.tools){gap:12px}#content>.cards:not(.tools) .card{border-width:16px !important;padding:12px 8px !important}#content>.cards:not(.tools) .icon{width:64px;height:64px;background:transparent;border-radius:0}#content>.cards:not(.tools) .icon img{width:100%;height:100%;object-fit:contain}#content>.cards:not(.tools) .open{margin-top:12px}
.owl-notice{background:#182029;border-color:#a89163}.owl-notice button{background:#192d36;color:#f3ecd9}.owl-notice-stack{bottom:calc(var(--owl-nav-height,112px) + 12px)}#owl-friends-page #owl-add-user{bottom:calc(var(--owl-nav-height,112px) + 12px);right:max(16px,env(safe-area-inset-right));z-index:3}.owl-messages-page main{padding-bottom:90px}
@media(max-width:650px){header.owl-header{padding:3px 12px}.owl-header-banner{width:min(300px,84vw);height:76px}body>main{padding:14px 12px}body :is(.card,.notice,.owl-player-panel,dialog,.owl-player-modal){border-width:18px !important;padding:10px !important}nav.owl-bottom-nav{gap:3px;padding-left:8px;padding-right:8px}body .owl-bottom-nav img{width:42px;height:42px}body .owl-bottom-nav span{font-size:9px !important}body .owl-bottom-nav a,body .owl-bottom-nav #owl-player-chat{padding:6px 2px !important}#content>.cards:not(.tools){grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}#content>.cards:not(.tools) .card{border-width:10px !important;padding:8px 2px !important}#content>.cards:not(.tools) .icon{width:48px;height:48px;margin:auto}#content>.cards:not(.tools) h2{font-size:13px !important;text-align:center}#content>.cards:not(.tools) :is(p,.count,.open){display:none}.owl-player-panel .owl-profile-name{font-size:21px !important}.owl-conversation-actions button{padding:8px !important;font-size:11px !important}}
@media(prefers-reduced-motion:reduce){body *,body *::before,body *::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}}

/* Player-selected portraits and generated troop emblems. */
body button.owl-profile-icon-button{display:block;width:88px;height:88px;padding:2px !important;margin:0 auto;background:transparent !important;border:1px solid transparent !important;box-shadow:none;border-radius:50% !important}body button.owl-profile-icon-button:hover{border-color:#c3a366 !important}body .owl-profile-icon-button img{display:block;object-fit:contain;margin:0;width:100%;height:100%}.owl-avatar-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0}body button.owl-avatar-choice{color:#e8e3d7 !important;display:flex;flex-direction:column;align-items:center;gap:6px;background:#101820 !important;padding:8px 3px !important;border:1px solid #53616d !important;min-width:0}body button.owl-avatar-choice[aria-pressed=true]{border-color:#78ddea !important;box-shadow:0 0 8px #78ddea55}body .owl-avatar-choice img{width:64px;height:64px;object-fit:contain}.owl-avatar-choice span{text-align:center;font-size:10px !important}.owl-message-own-icon{float:right;margin-top:-45px !important;width:44px !important;height:44px !important}.owl-troop-icon{display:block;object-fit:contain;width:56px;height:56px;margin:0 auto 6px}.metric{text-align:center}.metric img+span{display:block}@media(max-width:550px){.owl-avatar-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.owl-avatar-choice img{width:60px;height:60px}.owl-troop-icon{width:44px;height:44px}}

body .owl-assistance-toggle{display:flex !important;align-items:center;gap:10px;color:#e8e3d7}body input#owl-assistance{width:22px;min-height:22px;height:22px;flex:none;margin:0;accent-color:#78ddea}

/* Public sign-in and approval screens share the workspace artwork. */
body.owl-auth-page{min-height:100vh;min-height:100svh;box-sizing:border-box;padding:24px 12px;background-attachment:fixed}
body.owl-auth-page>main.card{box-sizing:border-box;width:min(100%,480px);max-width:480px;margin:0;padding:22px !important}
.owl-auth-page .brand{text-align:center;margin:0 0 20px;letter-spacing:normal}
.owl-auth-page .owl-auth-banner{display:block;width:min(100%,340px);height:auto;margin:auto;object-fit:contain}
body.owl-auth-page h1{font-size:24px !important;text-align:center;margin:12px 0 16px}
body.owl-auth-page p{font-size:14px !important;line-height:1.65;color:#c4c8c9}
body.owl-auth-page :is(a.primary,button){box-sizing:border-box;width:100%;font-size:14px !important;text-align:center}
body.owl-auth-page #message:empty{display:none}
@media(max-width:480px){body.owl-auth-page>main.card{padding:16px !important}.owl-auth-page .brand{margin-bottom:12px}body.owl-auth-page h1{font-size:22px !important}}

/* Keep panel fills inside the illustrated frame, with calm readable surfaces. */
body :is(.card,.notice,.owl-player-panel,dialog,.owl-player-modal){background-clip:padding-box !important;box-sizing:border-box;box-shadow:none}
body :is(.card,.notice,.owl-player-panel){background-color:#151d25 !important;background-image:none !important}
body :is(dialog,.owl-player-modal){background-color:#151d25 !important}
body :is(p,.owl-player-note,.owl-conversation-copy small){color:#d0d5da}
body :is(input,select,textarea){background-color:#0e161e !important;color:#f0eee7 !important}
body :is(button,.primary,.secondary):not(.owl-conversation-link):not(#owl-player-chat):not(.owl-profile-icon-button):not(.owl-avatar-choice){background-color:transparent !important;border-color:transparent !important;box-shadow:none}
/* Navigation artwork stands alone without a second ornamental frame. */
body .owl-bottom-nav a,body .owl-bottom-nav #owl-player-chat,body .owl-bottom-nav a[aria-current=page],body .owl-bottom-nav #owl-player-chat[aria-current=page]{background:transparent !important;border:0 !important;border-radius:0;box-shadow:none;color:#d0d5da;position:relative}
body .owl-bottom-nav a[aria-current=page],body .owl-bottom-nav #owl-player-chat[aria-current=page]{color:#fff3ce;background:#ffffff08 !important}
body .owl-bottom-nav [aria-current=page]::after{content:'';position:absolute;bottom:0;left:25%;right:25%;height:2px;background:#78ddea;border-radius:2px}
body .owl-bottom-nav span{font-family:Arial,Helvetica,sans-serif;font-size:11px !important;font-weight:500}
body .owl-bottom-nav img{width:48px;height:48px}
/* Profile: portrait and identity together, labeled metadata beneath the name. */
body #owl-player-panel{padding:18px !important}
.owl-profile-heading{display:flex;align-items:center;gap:18px;margin-bottom:18px}
body .owl-profile-heading .owl-profile-icon-button{margin:0;flex:0 0 84px;width:84px;height:84px}
.owl-profile-details{flex:1;min-width:0}
body .owl-player-panel .owl-profile-name{text-align:left;font-size:22px !important;line-height:1.35;margin:0 0 12px;font-family:Georgia,serif !important;overflow-wrap:anywhere}
.owl-profile-meta{display:flex;flex-wrap:wrap;gap:12px 24px;margin:0;font-family:Georgia,serif}
.owl-profile-meta div{display:grid;gap:4px}.owl-profile-meta dt{font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#c0c9d1}.owl-profile-meta dd{margin:0;font-size:16px;color:#f0e7d3;overflow-wrap:anywhere}
body #owl-player-panel #owl-profile-open{background:#202e38 !important;border:1px solid #73818b !important;font-family:Arial,Helvetica,sans-serif;font-size:13px !important;padding:8px 16px !important;min-height:40px;width:auto;max-width:100%;text-shadow:none}
.owl-profile-connections{margin-top:22px;padding-top:4px;border-top:1px solid #53606b}
body .owl-profile-connections h3{color:#ece7dc;font-size:16px !important}
body .owl-player-panel .owl-player-note{color:#d0d5da;font-size:12px !important;line-height:1.65}
@media(max-width:650px){body .owl-bottom-nav img{width:38px;height:38px}body .owl-bottom-nav span{font-size:10px !important}body #owl-player-panel{padding:12px !important}.owl-profile-heading{gap:12px}body .owl-profile-heading .owl-profile-icon-button{flex-basis:68px;width:68px;height:68px}body .owl-player-panel .owl-profile-name{font-size:19px !important}.owl-profile-meta{gap:8px 18px}.owl-profile-meta dd{font-size:15px}}

/* Dim artwork beneath reading areas, while retaining it around the page. */
body:not(.owl-auth-page)>main{background:#10151bd9}
body :is(.owl-player-status,#owl-status){color:#e9e1c8}

/* Unified typography and inset surfaces follow the ornamental frame. */
body :is(.card,.notice,.owl-player-panel,dialog,.owl-player-modal){border-image-outset:0 !important;background-clip:padding-box !important;border-radius:18px !important}
body *,body :is(input,select,textarea,button,nav a){font-family:Georgia,'Times New Roman',serif !important}
body :is(p,label,small,.note,.owl-player-note){color:#d9dce0}
/* State and alliance read as badges of identity. */
.owl-profile-heading{padding:10px 0 18px;border-bottom:1px solid #ad94634f}
body .owl-profile-heading .owl-profile-icon-button{width:96px;height:96px;flex-basis:96px;filter:drop-shadow(0 0 9px #c7a86a38)}
body .owl-player-panel .owl-profile-name{color:#fff0c5;font-size:23px !important}
.owl-profile-meta div{background:linear-gradient(130deg,#302a1c,#182934);border:1px solid #9c865b;border-radius:7px;padding:7px 12px;min-width:80px}
.owl-profile-meta dt{color:#d8c49b;font-size:10px !important;letter-spacing:.7px;text-transform:uppercase}.owl-profile-meta dd{color:#fff1cf;font-size:19px !important;font-weight:bold}
/* Restrained brass and blue illumination, without ornamental navigation boxes. */
nav.owl-bottom-nav{background:linear-gradient(180deg,#1c2933,#0c141c);border-top:1px solid #ab9265;box-shadow:0 -4px 20px #0008}
body .owl-bottom-nav a,body .owl-bottom-nav #owl-player-chat{border-radius:12px;background:radial-gradient(ellipse at 50% 25%,#87cddd10,transparent 70%) !important}
body .owl-bottom-nav a[aria-current=page],body .owl-bottom-nav #owl-player-chat[aria-current=page]{background:radial-gradient(ellipse at 50% 25%,#78ddea30,transparent 75%) !important;color:#fff1cd}
body .owl-bottom-nav img{filter:drop-shadow(0 2px 5px #0008);width:52px;height:52px}body .owl-bottom-nav [aria-current=page] img{filter:drop-shadow(0 0 6px #78ddea66)}
/* Battle stats: consistent editable values, no old dark input rectangles. */
body .comparison-head,body .stat-row{grid-template-columns:minmax(0,1fr) minmax(100px,1.6fr) minmax(0,1fr);gap:6px;padding:12px 8px}
body .comparison-head{color:#e4d2ab;border-bottom:1px solid #827453}
body .stat-row{background:#17232d;border-bottom:1px solid #52616c44}body .stat-row:nth-child(even){background:#1c2b36}
body .stat-name{color:#f0e8d9;font-size:12px !important}
body .stat-value{gap:3px;min-width:0;color:#e3e7ec;font-variant-numeric:tabular-nums}
body .stat-value input{background:transparent !important;color:inherit !important;min-height:36px;padding:3px 0 !important;max-width:calc(100% - 12px);border:0 !important;border-bottom:1px solid #8393a04f !important;font-size:14px !important;box-shadow:none}
body .stat-value.winner{color:#a7e3bd}body .stat-value.loser{color:#ffb2a7}
/* Conversations replace navigation with a dedicated chat workspace. */
body.owl-in-conversation{grid-template-rows:auto minmax(0,1fr);grid-template-areas:'header' 'workspace'}
body.owl-in-conversation .owl-bottom-nav,body.owl-in-conversation #content>h1,body.owl-in-conversation>a[href='/admin/access']{display:none !important}
.owl-header{position:relative}body button#owl-conversation-back{position:absolute;left:10px;top:50%;transform:translateY(-50%);z-index:4;width:40px;min-height:40px;padding:0 !important;background:#172934 !important;border:1px solid #bba16b !important;border-radius:50% !important;color:#fff0ca;font-size:30px !important;line-height:1;box-shadow:0 0 10px #0008}
body.owl-in-conversation>main{padding:8px 12px;background:#101923f2}
body.owl-in-conversation #content,body.owl-in-conversation #owl-friends-page{height:100%;min-height:0}
body.owl-in-conversation #owl-friends-page{display:flex;flex-direction:column}
body .owl-conversation-title{text-align:center;color:#eddfbd;font-size:17px !important;margin:4px 0 10px}
body.owl-in-conversation .owl-chat-log{flex:1;min-height:100px;height:auto;border:0;background:transparent;border-radius:0;padding:8px 0;white-space:normal;display:flex;flex-direction:column;gap:16px}
body .owl-chat-message{flex:none;border:1px solid #667e8d66;border-radius:12px;padding:12px;background:#20303c;max-width:88%;width:fit-content;overflow-wrap:anywhere;white-space:pre-wrap;box-shadow:0 3px 8px #0003}
body .owl-message-other{align-self:flex-start;margin-right:auto;border-left:2px solid #b5a078}
body .owl-message-own{align-self:flex-end;margin-left:auto;background:#263c46;border-right:2px solid #82c9d5}
body .owl-chat-message strong{color:#fff1d3}body .owl-chat-message p{margin:6px 0 0;color:#eef0ee;font-size:13px !important}
body .owl-chat-composer{display:flex;align-items:flex-end;gap:8px;flex:none;margin:10px 0 0 !important;max-width:none !important;width:100%}
body .owl-chat-composer label{flex:1;min-width:0;margin:0 !important}body .owl-chat-composer textarea{box-sizing:border-box;width:100%;resize:none;min-height:52px;max-height:140px;margin:0;border-radius:10px;font-size:16px !important;padding:10px}
body .owl-chat-composer button{flex:none;width:64px;min-height:52px;background:#253d47 !important;border:1px solid #b49b69 !important;padding:8px !important;border-radius:10px !important;font-size:13px !important}
.owl-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body dialog.owl-chat-dialog{position:fixed;inset:88px 0 0;margin:0 auto;width:min(100%,900px);max-width:100%;height:calc(100% - 88px);max-height:none;border:0 !important;border-image:none !important;padding:12px !important;background:#101923 !important;overflow:hidden}
body dialog.owl-chat-dialog[open]{display:flex;flex-direction:column}body .owl-chat-dialog::backdrop{background:transparent}body .owl-chat-dialog #owl-chat-close{display:none}
body .owl-chat-dialog .owl-chat-log{display:flex;flex-direction:column;gap:14px;flex:1;min-height:80px;height:auto;background:transparent;border:0}
body .owl-chat-dialog .owl-assistance-toggle{font-size:12px !important}body .owl-chat-dialog #owl-assistance-note{margin:4px 0 10px}
@media(max-width:650px){body .owl-bottom-nav img{width:44px;height:44px}body dialog.owl-chat-dialog{top:76px;height:calc(100% - 76px)}body .owl-profile-heading .owl-profile-icon-button{width:76px;height:76px;flex-basis:76px}body .owl-player-panel .owl-profile-name{font-size:20px !important}.owl-profile-meta div{padding:6px 9px;min-width:66px}.owl-profile-meta dd{font-size:17px !important}body .owl-chat-message{max-width:92%}}

/* Beat legacy button selectors for compact conversation controls. */
body.owl-in-conversation #owl-conversation-back#owl-conversation-back{background:#172934 !important;border:1px solid #bba16b !important;border-radius:50% !important;box-shadow:0 0 10px #0008;padding:0 !important}
body #owl-ai-form.owl-chat-composer button,body .owl-chat-dialog .owl-chat-composer button{background:#253d47 !important;border:1px solid #b49b69 !important;border-radius:10px !important;min-height:52px;padding:8px !important;box-shadow:none}
body #form .stat-value input{font-size:12px !important;background:transparent !important;max-width:calc(100% - 10px)}
body #owl-player-panel #owl-profile-open{background:#202e38 !important}
@media(max-width:480px){.owl-profile-heading{flex-direction:column;gap:12px}.owl-profile-details{width:100%}body .owl-player-panel .owl-profile-name{text-align:center}.owl-profile-meta{justify-content:center}.owl-profile-meta div{min-width:100px;text-align:center}body #owl-player-panel #owl-profile-open{display:block;margin:0 auto}}
