/* Four materials shared by the hall, collection cards, command sheets and enamel seals. */
:root {
 --hall-deep:#162a2e; --hall-face:#284043; --enamel:#a5c8b2; --parchment:#ecebda; --writing:#253d36;
 --paper-face:linear-gradient(126deg,#f3efdb,#d5dfce); --slate-face:linear-gradient(130deg,#334c4d,#203639 72%);
 --cut-line:#b8d4be50; --rim:0 2px 0 #091e21a8,1px 5px 9px #08171c51; --lift:0 3px 0 #10292caa,2px 8px 17px #09171c6b;
 --muted:#b4c8bf; --line:#b2c9ba42; --ink:#eff0df; --card:#203638f5; --red:#ffb6ad;
}
body[data-root] {--green:var(--enamel);--accent:var(--enamel)}
body[data-root=expeditions] {--enamel:#a3cbd0}
body[data-root=summon] {--enamel:#e1c99a}
body[data-page=forge] {--enamel:#dbba94}
body #app {background:var(--hall-deep) url('../art/ui/guild-hall-depth.webp') center 44%/cover no-repeat}
body #app::before,body:not([data-page=guild]):not([data-page=summon]) #app::before {background:linear-gradient(112deg,#182f32bb,#14292ce8)}
body[data-page=guild] #app::before {background:linear-gradient(135deg,#19332f80,#12282ca6 66%,#102327e6)}
.topbar,#navigation {background:linear-gradient(130deg,#233b3d,#182c30 68%);border-color:var(--cut-line);box-shadow:var(--rim)}
.topbar::after {background:linear-gradient(90deg,var(--enamel),transparent);opacity:.48}
.topbar #back-button,.modal-close {background:var(--parchment);color:var(--writing);border-radius:1px 7px 1px 1px;box-shadow:0 2px #101f22aa}
#navigation button {color:#b2c4bd}
#navigation button.active {color:#e8f2de;background:linear-gradient(156deg,#79988744,transparent 80%)}
#navigation button.active::before {background:var(--enamel);box-shadow:none}
#navigation button.active .nav-icon {color:#c5e6cc}
.page-heading,#main:has(>.loadout)>.page-heading {position:relative;justify-content:flex-start;gap:10px;padding:5px 10px 5px 12px;background:linear-gradient(105deg,#32504d,#203739 73%,#1b3034);border-left:2px solid var(--enamel);box-shadow:var(--rim)}
.page-heading>div:not(.aside-text) {min-width:0}
.page-heading .aside-text {margin-left:auto;text-align:right;color:#d1dbbf}
.page-heading h1 {color:#f2efdf;text-shadow:0 1px 1px #192a2c}
.page-heading p {margin-top:2px;color:#c2cfc3}
.page-emblem {position:relative;display:inline-grid;place-items:center;align-self:center;vertical-align:middle;isolation:isolate;width:27px;height:27px;flex:0 0 27px;color:#ecf0da}
.page-emblem::before {content:"";position:absolute;inset:3px;z-index:-1;transform:rotate(45deg);border:1px solid var(--enamel);background:linear-gradient(140deg,#345344 53%,#506d5d 53%);box-shadow:1px 2px #10252788}
.page-emblem .ui-icon {width:16px;height:16px}
#modal-title>.page-emblem {margin-right:9px}
@media(prefers-reduced-motion:no-preference){
 .emblem-arrives::before {animation:seal-fold .48s cubic-bezier(.17,.72,.29,1) both}
 @keyframes seal-fold {0%{transform:translateX(5px) rotate(-5deg) scale(1.65,.95)}70%{transform:rotate(50deg) scale(.91)}100%{transform:rotate(45deg)}}
 .loadout-unit .guild-member,.hero-summary>.guild-member,.hall-resident>.guild-member {transform-origin:50% 96%;animation:guild-idle 1.55s infinite}
 @keyframes guild-idle {
  0%,48%,100%{transform:none;animation-timing-function:ease-in}
  17%{transform:scale(1.024,.955) skewX(-.65deg);animation-timing-function:ease-out}
  31%{transform:scale(.991,1.015);animation-timing-function:ease-in-out}
  64%{transform:scale(1.016,.969) skewX(.45deg);animation-timing-function:ease-out}
  78%{transform:scale(.994,1.009);animation-timing-function:ease-in-out}
 }
 body[data-background] :is(.loadout-unit,.hero-summary,.hall-resident)>.guild-member,
 body:has(#modal[open],#tooltip:not([hidden])) :is(.loadout-unit,.hero-summary,.hall-resident)>.guild-member,
 .loadout-stage[data-opening] .guild-member {animation-play-state:paused}
}
.flow-tabs,#main:has(>.loadout)>.flow-tabs,.gear-tabs {background:#192d30;box-shadow:var(--rim);padding:3px;gap:3px}
.flow-tabs button,.summon-rail .flow-tabs button,.gear-tabs button {border-radius:0;border-color:transparent;color:#c2d2c7;background:#233b3d;min-width:0}
.flow-tabs button.active,.summon-rail .flow-tabs button.active,#main:has(>.loadout)>.flow-tabs button.active,.gear-tabs button[aria-pressed=true] {color:#234037;background:var(--grade,var(--enamel));border-color:transparent;clip-path:polygon(6px 0,100% 0,calc(100% - 6px) 100%,0 100%)}
.flow-tabs button.active::after {display:none}
:where(main,#modal,#tooltip,.blocking) button:is(.small,.primary,.danger):where(:not(.loadout-actions button)),.reader-controls button,.pagination button,.menu-grid button {
 border-radius:1px 7px 1px 1px;background:#314b49;border-color:#76968580;color:#edf0dc;box-shadow:0 2px 1px #0d24295c
}
:where(main,#modal,.blocking) button.primary:where(:not(.loadout-actions button)) {background:linear-gradient(137deg,#c9dfc4,#9cbaa7);color:#243e34;border:1px solid #d3e2cd;box-shadow:0 2px 0 #11272380}
:where(main,#modal) button.danger {background:#513836;color:#ffc3b7;border-color:#a67567}
@media(hover:hover) and (pointer:fine){
 :where(main,#modal) button.primary:where(:not(.loadout-actions button)):hover:not(:disabled) {background:#d9e7cc;color:#203d32}
 :where(main,#modal,#tooltip) button.small:where(:not(.loadout-actions button)):hover:not(:disabled),.menu-grid button:hover:not(:disabled) {background:#436254;color:#fff8e3}
}
input:not([type=checkbox]),select {border-color:#75948778;color:#e9edde;background:#192d31;border-radius:2px 7px 2px 2px}
select option {color:#edf0dd;background:#21373a}
input::placeholder {color:#a6b9ae}input[type=checkbox]{accent-color:#a2cdb0}
.panel,.detail-reader,.career-count,.check-row {background:var(--slate-face);border-color:var(--cut-line);border-radius:2px 12px 2px 2px;box-shadow:var(--rim)}
.panel .muted,.row-copy small,.skill p,.log p,label.field {color:var(--muted)}
.badge,.badge.running,.tag {color:#c8dfc6;background:#253e3d;border-color:#9fb69d70}
.badge.danger {color:#ffb6ad;background:#463337}
.term,.term sup,summary {color:inherit}
details,.detail-reader details {border-color:var(--cut-line);background:#1a3033;color:#cadbcc}
.empty,.panel .empty {background:linear-gradient(128deg,#233c3dca,#1c3134);border:1px dashed #99b5a356;color:#c9d7c9}
#main>.search-field,.hero-details>.search-field {flex:0 0 auto}
#modal .check-row>.guild-member {width:42px;height:42px;flex:0 0 42px}
#modal .check-row>span:not(.guild-member) {min-width:0;overflow-wrap:anywhere}
.local-scroll {scrollbar-color:#839f8f80 transparent}
.stack-list>.flow-row,.modal-list>.flow-row,.check-row,.panel>.flow-row {border-bottom:1px solid var(--cut-line);padding-inline:9px;background:linear-gradient(108deg,#2e4747,#223a3c);color:#f1efdf}
.section-heading,.list-count,.pagination,.career-count {color:#c3d3c5}
.career-count {padding-inline:8px}
.stat-chips>span,.report-totals>span {border:1px solid #e9edd7;border-bottom:2px solid #92a798;background:var(--paper-face);color:#4c6255;box-shadow:var(--rim)}
.stat-chips b,.report-totals b {color:#294439}
.local-scroll .attribute-table thead {background:#2b4647}
.attribute-table tbody,.reader-table-row {background:#20383a}
.stat-chips .term {color:#365347}.stat-chips .term sup {color:#596f57}
.panel:has(>.cost-row)>.cost-row,.hero-details>.panel>.button-row,.forge-execute,.prepare-plan,.summon-controls,.expedition-card-foot,.summon-result-footer {
 --ink:var(--writing);--muted:#51675b;--line:#9aad9e;--red:#874830;color:var(--writing);background:var(--paper-face);border:1px solid #e1e6d0;border-bottom:3px solid #8fa493;box-shadow:var(--lift);border-radius:1px 9px 1px 1px
}
.prepare-plan .muted,.prepare-plan label.field,.summon-controls label.field,.summon-controls .cost-row small,.summon-controls .condition,.forge-execute .condition {color:var(--muted)}
.prepare-plan .condition,.summon-controls .condition,.forge-execute .condition {color:#874830}
:is(.prepare-plan,.summon-controls,.forge-execute,.expedition-card-foot,.summon-result-footer,.cost-row) button.primary {color:#f1f2df;background:linear-gradient(139deg,#446555,#2b483f);border-color:#718a76}
.hero-details>.panel>.button-row,.panel:has(>.cost-row)>.cost-row,.summon-controls,.forge-execute,.summon-result-footer {padding:8px 10px}
.panel:has(>.cost-row)>.cost-row {margin-bottom:5px}
.hero-summary,.party-lineup,.summon-illustration {background:linear-gradient(0deg,#1f3739c9,#27413a88),url('../art/ui/guild-hall-depth.webp') center/cover}
.forge-bench {display:none}
@media(orientation:portrait) and (min-height:680px) {
 .forge-bench {flex:1;min-height:0;position:relative;display:grid;place-items:center;isolation:isolate;container-type:size;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--grade) 9%,transparent),transparent 68%)}
 .forge-bench::before {content:"";position:absolute;width:min(31cqw,60cqh,85px);aspect-ratio:1;transform:rotate(45deg);border:1px solid color-mix(in srgb,var(--grade) 56%,#3a504c);background:linear-gradient(135deg,#3e514e 55%,#4a605a 55%);box-shadow:var(--rim)}
 .forge-bench>.item-art {position:relative;width:min(29cqw,56cqh,80px);aspect-ratio:1;height:auto;filter:drop-shadow(1px 3px 1px #12272990)}
}
.hero-summary {border-left:3px solid var(--enamel)}
.prepare-member,.prepare-member:hover:not(:disabled) {background:var(--slate-face);border-color:var(--cut-line);color:#f1eedc}
.prepare-member small {color:#bbcec0}
.guild-home .guild-scene {position:relative;isolation:isolate;border:1px solid var(--cut-line);border-radius:2px 16px 2px 2px;background:linear-gradient(165deg,#203a3d94,#243e3f86 52%,#163033cc),url('../art/ui/guild-hall-depth.webp') center 45%/cover;box-shadow:var(--rim);overflow:hidden}
.guild-scene .page-heading {align-self:flex-start;margin:0;max-width:100%;background:linear-gradient(100deg,#203c3ee6,#1c3032b3);padding:8px 14px}
.guild-home .guild-scene {container-type:size}
.hall-resident {position:absolute;left:57%;top:55%;transform:translate(-50%,-50%);width:min(39cqw,53cqh,154px);aspect-ratio:1;pointer-events:none}
.hall-resident::before {content:"";position:absolute;bottom:2%;left:26%;width:48%;height:7%;border-radius:50%;background:#112a2bc4;box-shadow:0 2px 4px #0c20217d}
.hall-resident .guild-member {width:100%;height:100%;filter:drop-shadow(1px 3px 1px #15272965)}
.guild-seal {color:#cfe1b6;opacity:.19;right:8%;left:auto;bottom:16%}
.guild-scene .guild-register {align-self:flex-start;margin:auto 12px 12px;min-width:110px;padding:6px 14px 8px;border:1px solid #ebeddb;border-bottom:3px solid #91a794;background:var(--paper-face);box-shadow:var(--lift)}
.guild-register :is(span,small) {color:#53695c}.guild-register strong{color:var(--writing)}
.facility-grid .facility-card,.facility-grid .facility-card:hover:not(:disabled) {color:var(--writing);border-radius:1px 12px 1px 1px;background:linear-gradient(108deg,#36514d 0 31%,#c0ceba 31.3% 32.5%,#edeedb 32.8%,#d7e1cd);border:1px solid #cfdecc;border-bottom:3px solid #879e90;box-shadow:var(--lift);display:flex;align-items:center;justify-content:flex-end}
.facility-grid .facility-art {left:1%;right:auto;top:50%;transform:translateY(-50%);width:30%;height:94%;max-width:110px;filter:drop-shadow(1px 3px 1px #142e3259);opacity:1}
.facility-art>.atlas-sprite {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:auto;height:100%;aspect-ratio:1}
.facility-grid .facility-number {position:absolute;top:4px;right:8px;font:italic 12px/1 Georgia,serif;letter-spacing:0;color:#526a58}
.facility-grid .facility-label {background:transparent;width:64%;gap:6px;margin:0;justify-content:space-between;color:#2f493e}
.facility-grid .facility-label b {flex:1}
.facility-grid .facility-label>.ui-icon:last-child {display:block;width:15px}
.facility-grid .facility-card::after {left:36%;right:8px;bottom:6px;border-color:#6e857a66}
.unit-grid .unit-card,.inventory-grid .inventory-card,.expedition-card,.gear-label,.job-card.reward-result {
 border-radius:1px 12px 2px 2px;border-bottom-width:3px;box-shadow:var(--rim)
}
.unit-grid .unit-card,.unit-grid .unit-card:hover:not(:disabled),.inventory-grid .inventory-card:not([class*="rarity-"]) {background:var(--paper-face);color:var(--writing);border-color:#afc5b3}
.unit-card .unit-portrait,.inventory-art {position:relative;background:radial-gradient(ellipse at 50% 72%,#506c61,#233c40 76%);border:1px solid #47675f;border-radius:1px 9px 1px 1px}
.unit-card .unit-level {color:#526a57;font:italic 11px Georgia,serif;margin-bottom:3px}
.unit-card .unit-state,.unit-card>small {color:#52685b}
.inventory-card .inventory-art {align-self:stretch;color:var(--enamel)}
.inventory-card .inventory-count,.unit-card .unit-state {border-radius:1px 5px 1px 1px}
.inventory-grid .inventory-card[class*="rarity-"],.gear-label,button.cargo-row {background:linear-gradient(118deg,color-mix(in srgb,var(--grade) 27%,#213837),#1b3033 75%);border-color:color-mix(in srgb,var(--grade) 60%,#344b47)}
.inventory-card:not([class*="rarity-"])>small {color:#516857}
.expedition-card,.summon-flow.panel,.forge-work.panel {border-color:var(--cut-line);background:var(--slate-face);box-shadow:var(--lift)}
.expedition-card-head {background:#233c3e}
.expedition-card .card-index {color:var(--enamel)}
.expedition-card-foot {border-inline:0;color:var(--writing)}
.expedition-card-foot small {color:#50665c}
.summon-illustration {border-radius:2px 14px 2px 2px;box-shadow:inset 0 0 0 1px var(--cut-line)}
.summon-illustration .contract-card {background:linear-gradient(139deg,#2d4944 48%,#5a7361 49%,#29423b);border-color:#dfd3ae;box-shadow:2px 6px 0 #102c2e80,3px 10px 17px #091d1e6b}
.contract-card .ui-icon {color:#efdfad;filter:none}
.summon-controls h2 small {color:#506756}
#modal,#modal[data-summon],body[data-spectating] #modal[data-kind=watch-panel] {color:#eff0df;border-radius:2px 15px 2px 2px;border-color:#a5bdab;border-top:3px solid var(--grade,var(--enamel));background:linear-gradient(142deg,#304847,#1b3033 82%);box-shadow:0 -3px 2px #96ad9740,0 12px 40px #09181dcc}
#modal[data-summon=reveal] {background:radial-gradient(ellipse at center,#354946,#192d30 75%)}
#modal::backdrop {background:#09191cc2;backdrop-filter:none}
#modal-title {color:#f1efdf}
#modal .gear-reader,#modal .detail-reader:not(.gear-reader) {background:#192f32;border:1px solid var(--cut-line);box-shadow:inset 0 2px 3px #0b20243d}
#modal .report-banner {background:var(--slate-face);border-left-color:var(--enamel)}
.menu-grid button {position:relative;border-left:3px solid var(--enamel);background:var(--paper-face);color:var(--writing);box-shadow:var(--rim)}
.menu-grid button::after {content:'›';float:right}
#modal .modal-close {color:var(--writing);background:var(--paper-face)}
#modal .gear-tabs button[aria-pressed=true] {background:var(--grade,var(--enamel));color:#233431}
.summon-results .reward-result,.summon-results .reward-result:is([data-star="8"],[data-star="9"],[data-star="10"]) {background:linear-gradient(139deg,color-mix(in srgb,var(--reward-color) 15%,#f3efdc),#d7e1cf 76%);color:var(--writing);border-top-color:var(--reward-color)}
.summon-results .reward-portrait {background:radial-gradient(ellipse at 50% 65%,color-mix(in srgb,var(--reward-color) 26%,#2e4947),#263e3e);border-radius:1px 9px 1px 1px}
.summon-results .reward-portrait>.ui-icon {color:var(--reward-color)}
.summon-results :is(.reward-grade,.reward-stars,.reward-tags) {color:#4e6053}
.reveal-card {background:linear-gradient(140deg,color-mix(in srgb,var(--reward-color) 20%,#203936),#223839 53%,#374d45);box-shadow:var(--lift)}
#modal-content>button:not([class]),#modal .reward-result button.small {background:#344e48;color:#f2efdf;border-color:#7b9886}
#modal[data-kind=watch-panel] .map-cell:not(.current):not(.ping) {background:#314c4b;color:#d5e3d3;border-color:#8fae9c88}
.summon-result-footer .summon-repeat-cost,.summon-result-footer .summon-repeat-cost small,.summon-result-footer .summon-skip-setting {color:#425b4e}
#tooltip,#toast,.blocking>div {color:var(--writing);background:var(--paper-face);border:1px solid #e2e8ce;border-bottom:3px solid #91a797;box-shadow:var(--lift)}
.blocking {background:#182e30ef}
.watch-field {--glass:linear-gradient(132deg,#2b4646f2,#172d31e8)}
.watch-field :is(.hud-action,.hud-cargo,.hud-back,.hud-status,.supply-belt) {border-radius:2px 10px 2px 2px;border-color:#b0c7b66b;box-shadow:var(--rim)}
.watch-field .hud-action svg,.watch-field .hud-cargo>svg {color:#d5e6c9}
.hud-heading>div,.hud-unit {border-color:var(--enamel)}
.watch-field .field-slot {background:#253e40}
@media(orientation:portrait) {
 .guild-home {gap:10px}
 .guild-home .facility-grid {grid-template-columns:1fr;gap:7px}
 .facility-grid .facility-card {height:clamp(51px,8dvh,76px);min-height:0;padding:4px 12px}
 .facility-grid .facility-art {left:3%;max-width:100px}
 .facility-grid .facility-label b {font-size:15px}
 #modal:not([data-summon]),body[data-spectating] #modal[data-kind=watch-panel] {margin:auto auto max(8px,env(safe-area-inset-bottom));width:min(calc(100% - 16px),640px)}
}
@media(max-height:630px) {
 .page-heading,#main:has(>.loadout)>.page-heading {padding-block:2px;gap:7px}
 .hero-details>.panel>.button-row,.panel:has(>.cost-row)>.cost-row,.summon-controls,.forge-execute,.summon-result-footer {padding:5px 7px}
 .page-emblem {width:23px;height:23px;flex-basis:23px}
}

