/* Council and captain's study: real scenery with compact, readable timber panels. */
:root body#realm-ui[data-ui-theme]:is([data-view=alliance],[data-view=desk],[data-view=settings],[data-view=chat]) #workspace{background:#473020 url('/art/caribbean/captains-study.webp') center/cover fixed}
:root body#realm-ui[data-ui-theme][data-view=alliance] #workspace{background-image:url('/art/caribbean/council-pavilion.webp')}
:root body#realm-ui[data-ui-theme]:is([data-view=alliance],[data-view=desk],[data-view=settings]) .page-heading{display:none}
:root body#realm-ui[data-ui-theme]:is([data-view=alliance],[data-view=desk],[data-view=settings]) #content-page{padding-top:18px;min-height:calc(var(--game-height,100dvh) - 128px)}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board,.account-page){width:min(720px,62vw);margin:0 0 16px auto;min-width:0;color:#f6e9ce;background:linear-gradient(#181713f5,#161715f5),var(--cabin);border:18px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 21px / 2px stretch;box-shadow:0 5px 15px #0008;padding:10px 12px}
:root body#realm-ui[data-ui-theme][data-view=desk] #workspace .realm-section-tabs{width:min(720px,62vw);margin:0 0 10px auto}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-heading,.study-heading){display:flex;align-items:center;gap:12px;margin:-10px -12px 0;padding:12px;background:var(--cabin) center/cover;border-bottom:1px solid #b98d48}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-heading,.study-heading)>img{width:64px;height:64px;object-fit:contain;flex-shrink:0}
:root body#realm-ui[data-ui-theme] #workspace .study-heading>img{border:2px solid #b7954d;border-radius:50%}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-heading,.study-heading)>div{flex:1;min-width:0}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) h1{font-size:28px;line-height:1.15;font-weight:500;color:#ffe3a1;margin:3px 0;overflow-wrap:anywhere}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) h2{display:flex;justify-content:space-between;align-items:center;font-size:19px;font-weight:500;color:#ffe3a1;margin:0;padding:12px 0 8px;border-bottom:1px solid #a17c4055}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) h3{font-size:18px;color:#fff0d2;font-weight:500;margin:0;line-height:1.2}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) small{font-size:12px;color:#ddc6a2;line-height:1.4}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) button{font-size:14px;min-height:38px}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) .text-button{color:#f8d898;background:none;border:0;box-shadow:none;border-image:none}
:root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) .primary{border:8px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 10px / 0 stretch;background:linear-gradient(#176986,#10354c);color:#fff0cd;font-size:16px;min-height:44px;padding:6px 12px}
:root body#realm-ui[data-ui-theme] #workspace .council-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0 -12px;padding:12px 4px;border-bottom:1px solid #ab8749;background:#0c202ad9}
:root body#realm-ui[data-ui-theme] #workspace .council-stats span{text-align:center;color:#e2cda7;font-size:13px;border-right:1px solid #99743b66}
:root body#realm-ui[data-ui-theme] #workspace .council-stats b{display:block;font-weight:500;font-size:24px;color:#ffe7ac;margin-bottom:3px}
:root body#realm-ui[data-ui-theme] #workspace .council-stats span:last-child{border:0}
.council-roster ul{padding:0;margin:0;list-style:none}
.council-member{display:grid;grid-template-columns:38px minmax(0,1fr) auto 88px;align-items:center;gap:10px;min-height:58px;border-bottom:1px solid #9c7a3d44}
.council-member>img{width:36px;height:40px;object-fit:cover;border:1px solid #b59451}
.council-member>span>b{display:block;font-size:16px;color:#fff0d4;font-weight:500}
.council-member>strong{font-weight:500;font-size:16px;color:#ffe3a1}
.council-member-actions{display:flex;justify-content:flex-end;align-items:center;gap:4px}
:root body#realm-ui[data-ui-theme] #workspace .council-icon,.council-member-manage>summary{display:grid;place-items:center;width:40px;height:40px;border:1px solid #a5834c;background:#18232b;color:#f9dc95;padding:7px;box-shadow:inset 0 0 0 2px #1e1810;border-image:none;cursor:pointer;list-style:none}
.council-member-manage{position:relative}
.council-member-manage>summary::-webkit-details-marker{display:none}
.council-member-manage>div{position:absolute;z-index:5;right:0;top:43px;width:190px;background:#221b13;border:1px solid #c7a360;padding:6px;box-shadow:0 5px 12px #000a}
.council-member-manage>div button{display:block;width:100%;margin:4px 0}
.council-administration{border-bottom:1px solid #9c7a3d66}
.council-administration>summary{display:flex;align-items:center;gap:8px;padding:12px 0;cursor:pointer;color:#e4c38c;font-size:14px}
.council-administration>summary:after{content:'⌄';margin-left:auto}
.council-administration>div{padding:4px 0 12px}
.council-administration>div>button:last-child{display:block;margin-top:8px}
#invite-form{margin:12px 0 0}
#invite-form>label,.council-create>label{display:block;font-size:14px;color:#ead8b9;margin-bottom:6px}
#invite-form>div,.council-create>div{display:flex;gap:8px;align-items:center}
#invite-form select,.council-create input{min-width:0;flex:1}
.council-create{padding:20px 0}
.council-group{padding:12px 0;border-bottom:1px solid #9b7b414d}
.council-group>div:first-child{display:flex;align-items:center;gap:10px}
.council-group .community-atlas-icon{width:40px;height:40px;flex-basis:40px}
.council-group-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;padding-left:50px}
.council-status{font-size:13px;color:#d6e9b9}
.council-empty{font-size:14px;color:#dfc9a7;padding:10px 0}
.council-footer{display:flex;gap:10px;padding-top:16px}
.council-footer>button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px}
.council-board svg,.study-board svg{width:22px;height:22px;flex-shrink:0}
:root body#realm-ui[data-ui-theme] #workspace .desk-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:12px 0;margin:0;border-bottom:1px solid #a58244}
:root body#realm-ui[data-ui-theme] #workspace .desk-metrics button{display:grid;grid-template-columns:36px auto;gap:2px 7px;border:0;border-right:1px solid #9c7b3d66;background:none;box-shadow:none;border-image:none;padding:6px 10px;color:#ffedc5;text-align:left}
:root body#realm-ui[data-ui-theme] #workspace .desk-metrics .painted-icon{width:32px;height:32px;grid-row:1/3}
:root body#realm-ui[data-ui-theme] #workspace .desk-metrics strong{font-size:25px;line-height:1;font-weight:500}
:root body#realm-ui[data-ui-theme] #workspace .desk-metrics span:not(.painted-icon){font-size:12px;white-space:normal;grid-column:2;line-height:1.3}
:root body#realm-ui[data-ui-theme] #workspace :is(.desk-orders,.desk-post)>button{display:flex;align-items:center;gap:10px;width:100%;border:0;border-bottom:1px solid #9c7b3d44;border-image:none;background:none;box-shadow:none;padding:10px 0;text-align:left;color:#f8e7c7}
:root body#realm-ui[data-ui-theme] #workspace :is(.desk-orders,.desk-post)>button>span:nth-child(2){flex:1;min-width:0}
:root body#realm-ui[data-ui-theme] #workspace :is(.desk-orders,.desk-post)>button b{display:block;font-weight:500;font-size:16px}
:root body#realm-ui[data-ui-theme] #workspace :is(.desk-orders,.desk-post)>button small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body#realm-ui[data-ui-theme] #workspace :is(.desk-orders,.desk-post) .painted-icon{width:34px;height:34px;flex-basis:34px}
:root body#realm-ui[data-ui-theme] #workspace .desk-orders>button>strong{font-size:14px;font-weight:500;white-space:nowrap}
:root body#realm-ui[data-ui-theme] #workspace .desk-post time{font-size:12px;color:#d4bd92}
:root body#realm-ui[data-ui-theme] #workspace .desk-latest{padding:0;margin:0;border:0}
:root body#realm-ui[data-ui-theme] #workspace .desk-latest>button{font-size:14px;color:#f7e3bd;padding:10px 0;min-height:38px;border-bottom:1px solid #96743b44;background:none}
:root body#realm-ui[data-ui-theme] #workspace .desk-shortcuts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0 0}
:root body#realm-ui[data-ui-theme] #workspace .desk-shortcuts button{padding:8px 4px;gap:5px;justify-content:center;font-size:14px;min-height:44px}
:root body#realm-ui[data-ui-theme] #workspace .desk-shortcuts .painted-icon{width:24px;height:24px;flex-basis:24px}
/* Account: one concise fold-out per task, preserving all existing account actions. */
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile{background:var(--cabin);min-height:0;padding:12px;margin:-10px -12px 0;border:0;box-shadow:none;display:flex;gap:12px;align-items:center}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile-main{gap:12px;min-width:0;flex:1}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-seal{width:64px;height:64px;min-width:64px;padding:0}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-seal img{width:100%;height:100%}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile h2{font-size:28px;margin:3px 0;color:#ffe1a1;line-height:1.2}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile p{font-size:12px;line-height:1.5;margin:4px 0;color:#e4cba5}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-eyebrow{font-size:10px;letter-spacing:.05em;color:#d9bb85}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile-actions{margin:0;gap:6px;display:flex;flex-direction:column;flex:0 0 auto}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile-actions button{font-size:12px;min-height:34px;padding:5px 8px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-signed-in{display:none}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-stat-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin:12px 0;padding:0;background:none;border:0}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-stat-strip>div{min-height:0;padding:8px 6px;gap:5px;background:none;border:0;border-right:1px solid #aa85474d}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-stat-strip strong{font-size:18px;color:#ffe6b4}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-stat-strip small{font-size:11px;line-height:1.4;color:#e2caa4}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-stat-icon{width:24px;height:24px;border:0;background:none;color:#edca83}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-panel-grid{display:block;margin:0}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card{padding:0;min-height:0;margin:0;border:0;border-top:1px solid #a5804555;border-radius:0;background:none;color:#faebcc;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card>summary{display:flex;align-items:center;gap:10px;min-height:70px;padding:10px 4px;cursor:pointer;list-style:none}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card>summary:after{content:'⌄';margin-left:auto;font-size:22px;color:#eac37e}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card[open]>summary:after{transform:rotate(180deg)}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card>summary::-webkit-details-marker{display:none}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card h3{font-size:20px;font-weight:500;line-height:1.2;margin:0;color:#ffe5ab}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-icon{width:32px;height:32px;border:0;background:none;color:#efcd88;flex:0 0 32px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-summary-note{font-size:12px;color:#e1cba6;overflow-wrap:anywhere;display:block;margin-top:4px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-body{padding:16px;background:#eddbb8 url('/art/interface/ledger-paper.webp') center/cover;color:#302111;border:1px solid #b08a4b;margin-bottom:12px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-body :is(p,small,label,li,.account-current-tag){font-size:14px;line-height:1.5;color:#4c331b}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-email-layout{display:block}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-email-form{border-top:1px solid #ae894b;padding-top:12px;margin-top:14px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-form{gap:8px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-form input{font-size:16px;min-height:42px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-form label{margin:4px 0 0}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-body button{font-size:14px;min-height:40px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-email-privacy{margin:10px 0}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-contact-link{color:#493014;font-size:16px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-privacy-link{color:#4d3218;font-size:14px}
/* Research stays a visual tree, with a denser desktop ladder. */
@media(min-width:951px){
 :root body#realm-ui[data-ui-theme] #workspace .research-scene{min-height:calc(var(--game-height,100dvh) - 128px);padding-top:16px}
 :root body#realm-ui[data-ui-theme] #workspace .research-ladder{gap:6px;min-height:280px}
 :root body#realm-ui[data-ui-theme] #workspace .research-node{width:50px;min-width:50px;height:50px;min-height:50px}
 :root body#realm-ui[data-ui-theme] #workspace .research-hex>.painted-icon{width:33px;height:33px}
 :root body#realm-ui[data-ui-theme] #workspace .research-branch-title{min-height:76px}
}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme]:is([data-view=alliance],[data-view=desk],[data-view=settings]) #workspace{background-position:30% top;background-attachment:fixed}
 :root body#realm-ui[data-ui-theme]:is([data-view=alliance],[data-view=desk],[data-view=settings]) #content-page{padding-top:70px;min-height:0}
 :root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board,.account-page){width:100%;margin:0 0 12px;border-width:11px;border-image-width:14px;padding:10px 8px}
 :root body#realm-ui[data-ui-theme][data-view=desk] #workspace .realm-section-tabs{width:100%;margin:0 0 8px}
 :root body#realm-ui[data-ui-theme] #workspace :is(.council-heading,.study-heading){margin:-10px -8px 0;padding:10px 8px;gap:8px}
 :root body#realm-ui[data-ui-theme] #workspace :is(.council-heading,.study-heading)>img{width:48px;height:48px}
 :root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) h1{font-size:24px}
 :root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) small{font-size:13px}
 :root body#realm-ui[data-ui-theme] #workspace :is(.council-board,.study-board) button{min-height:44px;font-size:15px}
 .council-member{grid-template-columns:32px minmax(0,1fr) auto 44px;gap:7px;min-height:74px}
 .council-member>img{width:32px;height:38px}
 .council-member>strong{font-size:14px}
 .council-member-actions{flex-direction:column;gap:2px}
 :root body#realm-ui[data-ui-theme] #workspace .council-icon,.council-member-manage>summary{width:40px;height:34px;min-height:34px;padding:5px}
 .council-member-manage>div{top:38px}
 .council-group-actions{padding-left:0}
 .council-footer{flex-direction:column}
 #invite-form>div,.council-create>div{flex-direction:column;align-items:stretch}
 .council-administration>summary{min-height:48px;font-size:15px}
 :root body#realm-ui[data-ui-theme] #workspace .desk-metrics button{padding:4px;grid-template-columns:28px auto;gap:2px 3px}
 :root body#realm-ui[data-ui-theme] #workspace .desk-metrics .painted-icon{width:26px;height:26px}
 :root body#realm-ui[data-ui-theme] #workspace .desk-metrics span:not(.painted-icon){font-size:12px;grid-column:1/-1}
 :root body#realm-ui[data-ui-theme] #workspace .desk-shortcuts{gap:4px}
 :root body#realm-ui[data-ui-theme] #workspace .desk-shortcuts button{flex-direction:column;font-size:13px}
 :root body#realm-ui[data-ui-theme] #workspace .desk-orders>button>strong{font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile{flex-wrap:wrap;margin:-10px -8px 0;padding:10px 8px}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile-actions{flex-direction:row;width:100%}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile-actions button{flex:1;min-height:44px;font-size:15px}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-profile-main{flex-wrap:nowrap}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-stat-strip{grid-template-columns:repeat(2,1fr)}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-body{padding:12px}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-body :is(p,small,label,li){font-size:15px}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-card-body button{min-height:44px;font-size:15px}
 :root body#realm-ui[data-ui-theme] #workspace .account-page .account-card h3{font-size:19px}
}
:root body#realm-ui[data-ui-theme] #workspace .research-node[aria-pressed=true]{outline:2px solid #ffe3a0;outline-offset:3px;border-radius:8px}
:root body#realm-ui[data-ui-theme] #workspace .account-page .account-card summary:focus-visible,.council-administration>summary:focus-visible,.council-member-manage>summary:focus-visible{outline:3px solid #ffd277;outline-offset:2px}
:root body#realm-ui[data-ui-theme] #workspace .account-page #refresh-account{color:#f5d390;margin-left:auto}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace .research-scene{padding-top:48px}
 :root body#realm-ui[data-ui-theme] #workspace .research-board{display:flex;flex-direction:column}
 :root body#realm-ui[data-ui-theme] #workspace .research-scene-title{order:0}
 :root body#realm-ui[data-ui-theme] #workspace .research-policy{order:1}
 :root body#realm-ui[data-ui-theme] #workspace .research-project{order:2}
 :root body#realm-ui[data-ui-theme] #workspace .research-selection{order:3}
 :root body#realm-ui[data-ui-theme] #workspace .research-tree{order:4}
 :root body#realm-ui[data-ui-theme] #workspace .research-contribution{order:5}
}

@media(max-width:950px){:root body#realm-ui[data-ui-theme] #workspace .council-icon,:root body#realm-ui[data-ui-theme] #workspace .council-member-manage>summary{min-width:44px;min-height:44px}}

/* Keep the running project readable on its dark timber/sea panel. */
:root body#realm-ui[data-ui-theme] #workspace .research-board .research-project{display:grid;grid-template-columns:36px minmax(0,1fr) auto;color:#f6e7c5;gap:10px;align-items:center;padding:10px 14px}
:root body#realm-ui[data-ui-theme] #workspace .research-board .research-project h2{color:#ffe3a1;font-size:18px;line-height:1.2;margin:3px 0}
:root body#realm-ui[data-ui-theme] #workspace .research-board .research-project small{color:#d9c6a4;font-size:12px}
:root body#realm-ui[data-ui-theme] #workspace .research-board .research-project span{color:#f6e7c5;font-size:13px}
:root body#realm-ui[data-ui-theme] #workspace .research-board .research-project>strong{color:#ffe3a1;font-size:14px;white-space:nowrap;margin:0}
:root body#realm-ui[data-ui-theme] #workspace .research-board .research-project progress{appearance:none;-webkit-appearance:none;border:0;border-radius:3px;background:#03121b;height:8px}
:root body#realm-ui[data-ui-theme] #workspace .research-start>button{font-size:16px;line-height:1.15;padding:5px 8px}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace .research-board .research-project{grid-template-columns:32px minmax(0,1fr);padding:10px}
 :root body#realm-ui[data-ui-theme] #workspace .research-board .research-project>strong{grid-column:2;font-size:15px}
}

/* The logbook is part of the captain's study. Icons occupy their own layout cell. */
:root body#realm-ui[data-ui-theme][data-view=reports] #workspace{background:#473020 url('/art/caribbean/captains-study.webp') center/cover fixed}
:root body#realm-ui[data-ui-theme][data-view=reports] .page-heading{display:none}
:root body#realm-ui[data-ui-theme][data-view=reports] #content-page{padding-top:18px;min-height:calc(var(--game-height,100dvh) - 128px)}
:root body#realm-ui[data-ui-theme][data-view=reports] #workspace .realm-section-tabs{width:min(850px,70vw);margin:0 0 12px auto}
:root body#realm-ui #workspace .report-journal{width:min(850px,70vw);margin:0 0 20px auto;border:18px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 21px / 2px stretch;background:linear-gradient(#181713f5,#161715f5),var(--cabin);padding:6px 10px 10px;color:#fff0cf;min-width:0}
:root body#realm-ui #workspace .journal-heading{display:flex;align-items:center;gap:12px;padding:4px 0 12px;border-bottom:1px solid #a88644;margin-bottom:12px}
:root body#realm-ui #workspace .journal-heading>.painted-icon{width:40px;height:40px;flex:0 0 40px}
:root body#realm-ui #workspace .journal-heading>div{flex:1;min-width:0}
:root body#realm-ui #workspace .journal-heading h2{font:26px var(--font-display);color:#ffe4a1;margin:0 0 3px}
:root body#realm-ui #workspace .journal-heading small{font-size:13px;color:#e4ccaa}
:root body#realm-ui #workspace .journal-heading button{font-size:14px;min-height:42px;margin:0;padding:6px 12px}
:root body#realm-ui #workspace .report-journal .reports{gap:8px}
:root body#realm-ui #workspace .report-journal .report{border:1px solid #ad8a4b;margin:0;padding:0;background:#f2e3c4 url('/art/interface/parchment.webp') center/700px;color:#302219;box-shadow:none}
:root body#realm-ui #workspace .report-journal .report::before{content:none;display:none}
:root body#realm-ui #workspace .report-journal .report>summary{display:flex;align-items:center;gap:10px;padding:10px;min-height:66px}
:root body#realm-ui #workspace .report-journal .report>summary>.painted-icon{width:34px;height:34px;flex:0 0 34px}
:root body#realm-ui #workspace .report-journal .report-heading{flex:1;min-width:0}
:root body#realm-ui #workspace .report-journal .report>summary h3{font-size:16px;line-height:1.35;color:#302219;margin:0}
:root body#realm-ui #workspace .report-journal .report>summary small{display:block;max-width:none;margin-top:3px;font-size:12px;color:#604122;line-height:1.4}
:root body#realm-ui #workspace .report-journal .report>p{font-size:15px;line-height:1.6;padding:0 14px 14px;color:#302219}
:root body#realm-ui #workspace .report-journal .report.unread>summary h3{font-weight:700}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme][data-view=reports] #workspace .realm-section-tabs,:root body#realm-ui #workspace .report-journal{width:100%}
 :root body#realm-ui #workspace .report-journal{border-width:12px;padding:4px 6px 8px}
 :root body#realm-ui #workspace .journal-heading{gap:8px;flex-wrap:wrap}
 :root body#realm-ui #workspace .journal-heading h2{font-size:24px}
 :root body#realm-ui #workspace .journal-heading button{min-height:44px;font-size:14px;padding:6px 8px}
 :root body#realm-ui #workspace .journal-heading small{font-size:13px}
 :root body#realm-ui #workspace .report-journal .report>summary{gap:7px;padding:9px 7px}
 :root body#realm-ui #workspace .report-journal .report>summary>.painted-icon{width:28px;height:28px;flex-basis:28px}
 :root body#realm-ui #workspace .report-journal .report>summary small{font-size:13px}
 :root body#realm-ui #workspace .report-journal .report>p{font-size:16px;padding:0 10px 12px}
}

:root body#realm-ui #workspace .report-journal .report{background:linear-gradient(#f4e7cced,#f4e7cced),url('/art/interface/parchment.webp') center/700px}
:root body#realm-ui #workspace .report-journal .battle-archive{margin:0 10px 12px;padding:0}
:root body#realm-ui #workspace .report-journal .battle-archive>summary{font-size:15px;min-height:44px;display:flex;align-items:center;gap:6px;color:#593612;cursor:pointer}
:root body#realm-ui #workspace .archive-result{padding:12px;background:linear-gradient(100deg,#103953,#101f2b);color:#fff0cf;border:1px solid #a78242;margin:6px 0 12px}
:root body#realm-ui #workspace .archive-result.defeat{background:linear-gradient(100deg,#512e24,#201c19)}
:root body#realm-ui #workspace .archive-result h3{color:#ffe4a1;font-size:21px;margin:0 0 12px}
:root body#realm-ui #workspace .archive-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
:root body#realm-ui #workspace .archive-totals>span{display:grid;grid-template-columns:30px auto;align-items:center;gap:4px}
:root body#realm-ui #workspace .archive-totals .painted-icon{width:28px;height:28px;grid-row:1/3}
:root body#realm-ui #workspace .archive-totals b{font-size:22px;color:#fff0cf;font-weight:500}
:root body#realm-ui #workspace .archive-totals small{font-size:12px;color:#e8d3b1}
:root body#realm-ui #workspace .archive-loot{display:flex;gap:12px;align-items:center;margin-top:12px;flex-wrap:wrap;border-top:1px solid #af8d4755;padding-top:8px}
:root body#realm-ui #workspace .archive-loot>span{display:flex;align-items:center;gap:4px}
:root body#realm-ui #workspace .archive-loot .painted-icon{width:24px;height:24px}
:root body#realm-ui #workspace .archive-loot small{color:#e8d3b1}
:root body#realm-ui #workspace .report-journal .battle-roster{display:grid;grid-template-columns:1fr;gap:8px;margin:0;background:none;border:0;padding:0}
:root body#realm-ui #workspace .archive-force{background:#112932;color:#fff0cf;border:1px solid #a78242;margin:0;padding:0}
:root body#realm-ui #workspace .archive-force>summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:46px;padding:8px 10px;font-size:14px;cursor:pointer;list-style:none}
:root body#realm-ui #workspace .archive-force>summary::after{content:'⌄';margin-left:auto}
:root body#realm-ui #workspace .archive-force[open]>summary::after{content:'⌃'}
:root body#realm-ui #workspace .archive-force>summary b{color:#fff0cf;font-size:16px;font-weight:500}
:root body#realm-ui #workspace .archive-force>summary span{font-size:12px;color:#e0cba5}
:root body#realm-ui #workspace .archive-force table{width:100%;table-layout:fixed;background:none;color:#fff0cf;font-size:14px;border-collapse:collapse;margin:0;min-width:0}
:root body#realm-ui #workspace .archive-force :is(th,td){padding:6px;text-align:center;border:0;border-top:1px solid #a7824244;background:none;color:#fff0cf;font-weight:400}
:root body#realm-ui #workspace .archive-force th:first-child{width:55%;text-align:left}
:root body#realm-ui #workspace .archive-force thead th{font-size:12px;color:#e5cfaa;background:#081c24}
:root body#realm-ui #workspace .archive-force tbody th{vertical-align:middle}
:root body#realm-ui #workspace .archive-force th img{width:38px;height:32px;object-fit:contain;vertical-align:middle;margin-right:5px}
:root body#realm-ui #workspace .archive-force .loss{color:#ffc09c}
:root body#realm-ui #workspace .report-journal :is(.archive-replay,.battle-history){margin:10px 0 0;color:#51351e}
:root body#realm-ui #workspace .report-journal :is(.archive-replay,.battle-history)>summary{font-size:15px;min-height:44px;cursor:pointer;padding:8px 0}
:root body#realm-ui #workspace .report-journal .battle-playback>div{padding:8px;background:#102731;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
:root body#realm-ui #workspace .report-journal .battle-playback :is(label,small){color:#ffe5b9;font-size:13px}
:root body#realm-ui #workspace .report-journal .battle-playback select{appearance:none;-webkit-appearance:none;color:#fff0cf;background:#0a1d25;border:1px solid #a1844a;min-height:44px;font:14px var(--font-body);padding:6px}
:root body#realm-ui #workspace .report-journal .battle-playback button{min-height:44px;font-size:14px}
@media(max-width:950px){
 :root body#realm-ui #workspace .report-journal .battle-archive{margin:0 7px 10px}
 :root body#realm-ui #workspace .archive-totals>span{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px}
 :root body#realm-ui #workspace .archive-totals small{font-size:12px}
 :root body#realm-ui #workspace .archive-force th:first-child{width:52%}
 :root body#realm-ui #workspace .archive-force :is(th,td){padding:5px 3px;font-size:14px}
 :root body#realm-ui #workspace .archive-force tbody th{font-size:13px;gap:4px}
 :root body#realm-ui #workspace .archive-force th img{width:30px;height:30px}
 :root body#realm-ui #workspace .archive-force thead th{font-size:11px}
}
/* Correspondence belongs at the captain's desk; leave the Caribbean scene visible. */
:root body#realm-ui[data-ui-theme][data-view=chat] .page-heading{display:none}
:root body#realm-ui[data-ui-theme][data-view=chat] #content-page{padding-top:18px;min-height:calc(var(--game-height,100dvh) - 128px)}
:root body#realm-ui[data-ui-theme][data-view=chat] #workspace .realm-section-tabs{width:min(780px,68vw);margin:0 0 10px auto}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board{width:min(780px,68vw);margin:0 0 18px auto;min-width:0;padding:8px 10px;color:#fff0cf;background:linear-gradient(#181713f5,#161715f5),var(--cabin);border:18px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 21px / 2px stretch;box-shadow:0 5px 15px #0008}
:root body#realm-ui[data-ui-theme] #workspace .post-heading{display:flex;align-items:center;gap:12px;padding:0 0 12px;margin:0 0 12px;border-bottom:1px solid #a88644}
:root body#realm-ui[data-ui-theme] #workspace .post-heading>.community-atlas-icon{width:42px;height:42px}
:root body#realm-ui[data-ui-theme] #workspace .post-heading>div{flex:1;min-width:0}
:root body#realm-ui[data-ui-theme] #workspace .post-heading h1{font:26px/1.2 var(--font-display);color:#ffe4a1;margin:0 0 3px}
:root body#realm-ui[data-ui-theme] #workspace .post-heading small{font-size:13px;color:#e4ccaa}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-toolbar{display:flex;gap:10px;align-items:end;margin:0 0 12px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip button{min-height:44px;min-width:0;padding:5px;flex-direction:row;gap:6px;font-size:14px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip .community-atlas-icon{width:26px;height:26px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip button[aria-pressed=true]{color:#ffe4a1;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:2px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose button:disabled{opacity:.5;cursor:not-allowed}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-toolbar>label{flex:1;max-width:none;min-width:140px;font-size:13px;color:#fff0cf}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board #chat-recipient{appearance:none;-webkit-appearance:none;color:#302219;background:#f6e8cd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 6 5-6' fill='none' stroke='%23563820' stroke-width='2'/%3E%3C/svg%3E") right 10px center/18px no-repeat;border:1px solid #bd9957;min-height:44px;padding:8px 36px 8px 10px;margin:4px 0 0;font:15px var(--font-body);color-scheme:light}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-toolbar>.secondary{font-size:13px;min-height:44px;padding:7px 10px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-messages{height:clamp(180px,calc(var(--game-height,100dvh) - 520px),360px);min-height:0;max-height:none;padding:10px;background:#f2e3c4;border:1px solid #ad8a4b;box-shadow:inset 0 0 20px #8a63361a;overscroll-behavior:contain;scrollbar-gutter:stable}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-messages.is-empty{height:160px;display:grid;place-items:center}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-empty{margin:0;padding:8px;max-width:100%}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-empty-art{width:40px;height:40px;margin:0 auto 6px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-empty strong{font:20px/1.3 var(--font-display);color:#382617}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-empty small{font:13px/1.4 var(--font-body);color:#614628;margin-top:5px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message{padding:10px;gap:9px;margin:0 0 8px;max-width:95%;background:#fff5dc;border:1px solid #b79663;border-left:3px solid #9a6837;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message.own-message{background:#e5d5af;border-left:1px solid #b79663;border-right:3px solid #715123}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-captain-portrait{width:34px;height:38px;border-width:1px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message header{gap:4px 8px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message header b{font-size:14px;color:#302219}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message time{font-size:12px;color:#614628}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message p{font:15px/1.6 var(--font-body);color:#302219;margin:5px 0 0}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message .text-button{color:#563717;min-height:32px;min-width:32px;font-size:14px;background:none;border:0;border-image:none;box-shadow:none;padding:3px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board #chat-form{margin:12px 0 0}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board #chat-form>label{font-size:13px;color:#fff0cf;margin:0 0 5px;display:block}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:8px;padding:0;background:none}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose textarea{min-height:72px;max-height:180px;padding:9px;font:15px/1.5 var(--font-body);color:#302219;background:#f6e8cd;border:1px solid #bd9957}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose textarea::placeholder{color:#705438}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose button{min-width:0;min-height:44px;padding:8px;font-size:16px;background:linear-gradient(#176986,#10354c);color:#fff0cd;border:8px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 10px / 0 stretch}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose-foot{display:flex;justify-content:flex-end;margin-top:5px}
:root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose-foot small{font-size:12px;color:#e4ccaa}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme][data-view=chat] #workspace .realm-section-tabs,:root body#realm-ui[data-ui-theme] #workspace .correspondence-board{width:100%}
 :root body#realm-ui[data-ui-theme][data-view=chat] #content-page{padding-top:10px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board{border-width:12px;padding:5px 6px}
 :root body#realm-ui[data-ui-theme] #workspace .post-heading{gap:8px;padding-bottom:8px;margin-bottom:8px}
 :root body#realm-ui[data-ui-theme] #workspace .post-heading>.community-atlas-icon{width:32px;height:32px}
 :root body#realm-ui[data-ui-theme] #workspace .post-heading h1{font-size:23px}
 :root body#realm-ui[data-ui-theme] #workspace .post-heading small{font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-toolbar{gap:8px;margin-bottom:8px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip{gap:4px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip button{font-size:12px;gap:3px;padding:4px 2px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .tab-strip .community-atlas-icon{width:23px;height:23px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board #chat-recipient{font-size:16px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-messages{height:clamp(150px,calc(var(--game-height,100dvh) - 650px),240px);padding:6px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-messages.is-empty{height:115px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-empty-art{width:28px;height:28px;margin-bottom:4px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-empty strong{font-size:18px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message{max-width:100%;padding:8px;gap:7px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message p{font-size:16px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-message .text-button{min-width:44px;min-height:44px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose{grid-template-columns:minmax(0,1fr) 80px;gap:6px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose textarea{font-size:16px;min-height:76px}
 :root body#realm-ui[data-ui-theme] #workspace .correspondence-board .chat-compose button{font-size:15px}
}
