/* Final presentation layer. Keep data layouts and boss identities intact. */
:root {
  --bg:#f5f2fa;
  --panel:#fff;
  --panel2:#f8f5fc;
  --line:#e2d8ed;
  --ink:#382d49;
  --muted:#776984;
  --soft:#91809e;
  --accent:#7651ad;
  --accent-dim:#eee5f8;
  --shadow:0 8px 26px #4930680b;
}
html,body {color:var(--ink);background-color:var(--bg)}
body {background-image:radial-gradient(ellipse at 95% 0%,#eaeefe 0,transparent 40%),radial-gradient(ellipse at 0% 25%,#f1e8fa 0,transparent 42%)}
button,a,input,select,textarea {-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,summary:focus-visible {outline:3px solid #ae8bd5;outline-offset:3px}
button:disabled {cursor:default}
input,select,textarea {color:#4b3b5c;border-color:#dacee5}
input::placeholder,textarea::placeholder {color:#93859e}
input:focus,select:focus,textarea:focus {border-color:#9872bf;box-shadow:0 0 0 3px #eee4f8}

/* Eight desktop destinations use the whole navigation row without hiding symbols. */
.sidebar {grid-template-columns:repeat(8,minmax(0,1fr));border-bottom-color:#e0d4ec;box-shadow:0 4px 18px #60447d06}
.sidebar .nav {color:#786888;transition:background .16s,border-color .16s,color .16s}
.sidebar .nav .symbol {color:#9c80ba}
.sidebar .nav:hover {color:#68458c;background:#f4edf9;border-color:#e5d5f1}
.sidebar .nav.active {color:#694398;background:linear-gradient(135deg,#f1e7fd,#e9ddf7);border-color:#d0b8e5;box-shadow:inset 0 -2px #b995d8,0 2px 5px #7350970a}
.sidebar .nav.active .symbol {color:#9161ba}
.topbar .top-actions .month {color:#665076;border-color:#d9cce5;box-shadow:0 2px 5px #583b7405}
.status[data-state=saved] {color:#527466;background:#f0f7f3;border-color:#dbe9e0}
.status[data-state=saving] {color:#77648d;background:#f4eff9;border-color:#e3d7ed}
.status[data-state=error],.status[data-state=conflict] {color:#a9485c;background:#fff0f3;border-color:#edc7d0}
.admin-menu>summary {color:#715186;border-color:#ddcfe8;box-shadow:0 2px 4px #5b3d7606}
.admin-menu[open]>summary {background:#eee4f7;border-color:#cdb4df}
.admin-menu>div {gap:6px;border-color:#dccde8;box-shadow:0 14px 40px #4f326b1c}
.portrait-maker-link {display:inline-flex}

.hero {margin-bottom:22px}
.hero>div:first-child {position:relative;padding-left:15px}
.hero>div:first-child:before {content:'';position:absolute;left:0;top:9px;bottom:8px;width:4px;min-height:23px;border-radius:4px;background:linear-gradient(#ac86d4,#7953a8)}
.hero h1 {color:#40314f;font-size:27px;font-weight:850;letter-spacing:-.9px}
.btn {color:#765b8d;border-color:#d8c8e6;background:#fff;border-radius:9px;box-shadow:0 2px 4px #5b3a7706;transition:background .15s,border-color .15s,box-shadow .15s}
.btn:hover {color:#674283;border-color:#b79aca;background:#f9f5fd;box-shadow:0 3px 9px #60407b0c}
.btn.primary {color:white;border-color:#8260b2;background:linear-gradient(135deg,#9774c7,#7954ad);box-shadow:0 3px 8px #7954ad1f}
.btn.primary:hover {color:white;background:linear-gradient(135deg,#906bc3,#6e479f);border-color:#7650a7}
.btn.danger {color:#ae5369;border-color:#e7c4ce;background:#fff8fa}
.textbutton {color:#8057a2;text-decoration:none}
.textbutton:hover {color:#643b87;text-decoration:underline;text-underline-offset:3px}
.panel {border-color:#e2d7ec;border-radius:13px;box-shadow:0 3px 12px #5b3b7607}
.panel-head {padding-bottom:13px;margin-bottom:16px;border-bottom:1px solid #eee6f4}
.panel-head h2,.panel h3 {color:#5b426e;font-weight:800}
.panel-head h2 {font-size:15px}
.panel .sub,.small.muted {color:#85738f}
.note {color:#7e6b8c;background:#f9f5fc;border-color:#e6d9ef}
.empty {color:#85738f;line-height:1.85;background:radial-gradient(ellipse at center,#faf7fd,transparent 72%);border-radius:10px}
.foot {color:#95849f;font-size:10px}
.toast {color:#694985;background:#fefbff;border-color:#d8c1e8;box-shadow:0 10px 35px #53316f1c}

/* Boss colours remain the original sheet's five colours. */
.raid-section-label>span {color:#9573ac;font-size:9px;letter-spacing:1.8px}
.boss-card {border-radius:14px;box-shadow:0 4px 12px #553a6e09;background:linear-gradient(135deg,#fff 35%,color-mix(in srgb,var(--boss-bg) 65%,#fff))!important}
.boss-card .boss-art {border-color:color-mix(in srgb,var(--boss-accent) 72%,#fff);box-shadow:0 0 0 3px #fff,0 0 0 4px color-mix(in srgb,var(--boss-accent) 35%,#fff)}
.boss-card .boss-name {color:#5a436a;font-weight:800}
.boss-card .boss-num {font-weight:850;letter-spacing:1.1px}
.boss-card .boss-phase {color:#8b759a}
.boss-card .boss-phase strong {color:var(--boss-ink);background:#ffffffa8;border-color:color-mix(in srgb,var(--boss-accent) 50%,#fff)}
.boss-card .boss-hp>span {color:#957b9e;letter-spacing:.3px}
.boss-card .boss-hp>strong {font-size:clamp(18px,1.8vw,25px);font-weight:850;letter-spacing:-.7px}
.boss-card .boss-hp-value {display:inline}
.boss-card .boss-track {height:8px;border:0;background:#ffffffb8;box-shadow:inset 0 1px 3px #59416d12}
.boss-card .boss-track .bar {background:linear-gradient(90deg,var(--boss-accent),color-mix(in srgb,var(--boss-accent) 62%,var(--boss-ink)))!important}
.boss-card .boss-track .bar.orange {background:linear-gradient(90deg,#e7a18e,#cb6b79)!important}
.boss-card .boss-info {color:#8d789b;font-size:10px}
.boss-card .boss-info>span:last-child {color:var(--boss-ink);font-weight:750}
.boss-tactic-link {background:#ffffff82;transition:background .15s;font-size:11px}
.boss-tactic-link:hover {background:#fff}
.boss-tactic-link span {color:var(--boss-ink);opacity:.7}
.raid-stats {margin:22px 0;background:#ffffffc9;border-color:#e2d6ed;border-radius:12px;box-shadow:0 2px 9px #5a397306}
.raid-stats .metric {border-right-color:#e9e0f0;padding-top:7px;padding-bottom:7px}
.raid-stats .metric .k {color:#8b729d;font-size:10px;font-weight:750}
.raid-stats .metric .v {color:#65477e;font-size:24px;line-height:1.4;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
.raid-stats .metric .d {color:#9a87a6;font-size:9px}
.metric {border-color:#e2d5ed}
.metric .k {color:#887095}
.metric .v {color:#66467f}
.metric .d {color:#9581a1}

/* Clearer table hierarchy without making compact tables wider. */
.datatable th {color:#7c648e;background:#f2edf8;border-bottom-color:#ddd0e8;font-weight:800}
.datatable td {color:#675273;border-bottom-color:#eee6f4}
.datatable tbody tr:nth-child(even)>td {background:#fcfaff}
.datatable tbody tr:hover>td {background:#f5effb}
.datatable .h-num,.h-num {color:#855aa3}
.datatable td.number {font-variant-numeric:tabular-nums}
.table-scroll,.battle-sheet-scroll,.tw-grid-scroll {scrollbar-color:#cdbbdf transparent;scrollbar-width:thin}
.tabset {background:#f0e9f7;border-color:#e0d4eb}
.tabset button {color:#8c729f}
.tabset button.active:not([data-boss-color]) {color:#755194;background:#fff;box-shadow:0 2px 5px #62417e10}
.db-tabs button {font-weight:800}
.guild-roster tbody th:first-child {color:#6f4f85}
.guild-roster .uid {color:#8b7699}
.guild-hall .medal-count {color:#99702a;background:#fcf4de;border:1px solid #f2e4bc}
.member-state.active {color:#62806a}
.dashboard-controls {border-bottom:1px solid #e9dff0;background:linear-gradient(110deg,#fff,#faf6ff)}
.dashboard-table>thead th {background:#eee5f7;color:#7a598e}
.dashboard-table .attack-slot {background:#faf7fd;border-color:#e5d8ef}
.dashboard-table .empty-slot {color:#b9a7c7;font-size:14px}
.dashboard-count {color:#7b5b92}
.pending-carry {color:#a17a30!important}
.rank-all-scores .sorted {background:#f1e8f9;color:#795097}
.sort-head {color:#83668f}
.sort-head.active {color:#775098}
.pill {color:#8c6da0;background:#f0e9f7}
.pill.positive {color:#5c876f;background:#edf6ef}
.pill.blue {color:#6487ad;background:#edf3fb}
.pill.warning {color:#a17d36;background:#fcf3df}
.pill.gray {color:#8d7a98;background:#f1edf5}
.rank-head {color:#725682}
.rank-data {color:#8b63a7;font-weight:850}
.rank-num {display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:7px;background:#f4eef9;color:#a18ab3;font-size:10px}
.rank-list>div:nth-child(1) .rank-num {background:#fcf1cf;color:#a27b26}
.rank-list>div:nth-child(2) .rank-num {background:#edf0f7;color:#7a859c}
.rank-list>div:nth-child(3) .rank-num {background:#f8e9df;color:#b08262}
.rank-list .track {height:6px;background:#f1eaf8}
.rank-list .bar {background:linear-gradient(90deg,#c5acdF,#a17ac4)}

/* Tactic text stays dominant beside the compact portrait checks. */
.tw-library {background:#fffdfb;border-color:#e3d8e9}
.tw-library input {color:#745c84;border-color:#e2d5ea;background:#fff}
.tw-card-title {color:#715481;font-weight:800}
.tw-card small {color:#9b83ab}
.tw-card[data-boss-color] {background:color-mix(in srgb,var(--boss-bg) 28%,white)}
.tw-card.active[data-boss-color] {background:color-mix(in srgb,var(--boss-bg) 75%,white)}
.tw-work {border-color:#ddcde9}
.tw-boss-banner {box-shadow:inset 0 1px #ffffffa8}
.tw-boss-banner>div>span {color:#8f759f}
.tw-editor-head h2 {color:#6c4e80;font-weight:800}
.tw-characters {background:#faf6fe;border-color:#e6d9f0}
.tw-config-fieldset:disabled input,.tw-config-fieldset:disabled select {color:#6b4c80}
.tw-character-slot select {color:#ac8848}
.tw-more summary,.tw-bottom>span,.tw-carry-state,.tw-key-help {color:#947ba5}
.tw-group-tabs {background:#f0e8f8;border-color:#ddcce9}
.tw-group-tabs [role=tab] {color:#9a7daf}
.tw-group-tabs [role=tab][aria-selected=true] {color:#856631;background:#fffaf0;border-color:#e9d8b8}
.tw-group-tabs .tw-carry-controls .field label {color:#88649e}
.tw-group-tabs .tw-carry-controls input {color:#7c5496;border-color:#d9c3e7;background:#fff}
.tw-preview-note {color:#7d5b99;background:#f0e7fa;border-color:#d9c5ec}
.tw-grid th {color:#8a6a9f;background:#f3ebfa;border-color:#e3d4ed}
.tw-grid .tw-text-cell>[data-tw-text] {color:#44334f;line-height:1.85}
.tw-grid .tw-check-cell {border-right-color:#f0e7f6}
.tw-grid .tw-auto-heading {color:#b3677d;background:#fff0f4}
.tw-grid .tw-auto-cell {background:#fff9fb}
.tw-grid input[type=checkbox] {border-color:#c6b7d2;border-radius:4px}
.tw-grid input[type=checkbox]:checked {background:#9770b4;border-color:#9770b4}
.tw-grid .tw-auto-cell input:checked {background:#bf758b;border-color:#bf758b}
.tw-grid .tw-blank .tw-text-cell {background:#faf6fe}
.tw-estimator summary,.mathvalue {color:#8960a4}
.community-links .btn,.tw-links .btn {font-weight:750}
.tw-links .linked {color:#5b8568;background:#f0f7ef;border-color:#d2e3cd}
.missing-link {color:#a18eac;background:#f4eff8}

.battle-boss-strip>button {box-shadow:0 2px 5px #51316b05}
.battle-boss-strip>button[aria-pressed=true] {outline:1px solid #c7a8df;outline-offset:1px}
.mini-boss-data>span,.mini-boss-data small {color:#967da5}
.mini-boss-data strong {color:#8964a2}
.quick-panel {background:linear-gradient(110deg,#fff,#faf5ff);border-top-color:#bc96d6}
.quick-panel>summary {color:#7e5896;font-weight:800}
.quick-panel:not([open]) {padding:15px 18px}
.battle-sheet th {background:#f1eaf8}
.battle-sheet td.calculated {color:#937aA5;background:#fbf7fe}
.battle-sheet .hp-exact strong {color:#855ba0}
.battle-sheet .hp-exact small {color:#a18bb0}
.sheet-footer {color:#9a82aa}
.profile-donut {background:linear-gradient(160deg,#fff,#fbf7ff);border-color:#e5d7ef;box-shadow:0 2px 7px #5c3a7904}
.profile-donut figcaption {color:#745288;font-size:13px}
.profile-donut li {color:#8b739d}
.profile-donut li strong,.donut strong {color:#80589b}
.donut small {color:#a08aac}
.rate-summary>div {color:#9375a7;background:#f5eefc;border:1px solid #e9dcf2}
.rate-summary strong {color:#7b4e96}
.combo-card {box-shadow:0 3px 12px #5b3b7607;background:linear-gradient(135deg,#fff 55%,color-mix(in srgb,var(--boss-bg) 60%,#fff))}
.combo-card .panel-head {border-bottom-color:color-mix(in srgb,var(--boss-accent) 40%,#fff)}
.combo-party strong {color:#6d4c7f;line-height:1.45}
.combo-meta {color:#93749f}
.combo-party img,.portrait-missing {box-shadow:0 0 0 2px #fff,0 0 0 3px #efe5f5}
.guild-dialog {border-color:#d7bee8;box-shadow:0 24px 90px #49286235}
.guild-dialog .panel-head h2 {color:#79508f}
.guild-dialog label {color:#8b669e}
.guild-dialog input {border-color:#dfcde9}

@media(min-width:801px) and (max-width:1150px) {
  .sidebar .nav {font-size:11px;padding:8px 4px;gap:4px;letter-spacing:-.3px}
  .sidebar .nav .symbol {display:inline-flex;flex:0 0 16px;width:16px;justify-content:center;font-size:15px}
  .boss-card .boss-hp>strong {font-size:clamp(14px,1.8vw,21px)}
}
@media(max-width:800px) {
  .sidebar {box-shadow:none}
  .topbar {border-bottom-color:#e0d3ec;background:#fffefc!important}
  .hero {align-items:stretch;gap:11px;margin-bottom:17px}
  .hero>div:first-child {padding-left:12px}
  .hero>div:first-child:before {width:3px;top:7px;bottom:7px;min-height:22px}
  .hero h1 {font-size:24px;letter-spacing:-.8px}
  .hero .btnbar {width:100%;gap:7px}
  .hero .btn {min-height:34px}
  .panel-head {gap:8px;padding-bottom:11px;margin-bottom:13px}
  .panel-head h2 {font-size:14px}
  .boss-grid {gap:9px}
  .boss-card {grid-template-columns:minmax(0,42%) minmax(0,1fr);grid-template-rows:minmax(36px,auto) 8px 12px auto;column-gap:10px;row-gap:4px;padding:10px 12px 0;border-radius:14px}
  .boss-card .boss-top {min-height:64px;gap:8px}
  .boss-card .boss-art {width:52px;height:52px;border-radius:12px}
  .boss-card .boss-art img {border-radius:11px}
  .boss-card .boss-num {font-size:8px;letter-spacing:.7px}
  .boss-card .boss-name {font-size:clamp(11px,3.1vw,14px);line-height:1.2;margin:4px 0 5px;letter-spacing:-.3px}
  .boss-card .boss-phase {font-size:9px;gap:4px}
  .boss-card .boss-phase strong {font-size:9px;padding:2px 4px}
  .boss-card .boss-hp {align-self:end;margin:0;text-align:right;letter-spacing:-.6px}
  .boss-card .boss-hp>strong {display:flex;flex-direction:column;align-items:flex-end;gap:2px;line-height:1.15;font-size:clamp(16px,4.65vw,22px)}
  .boss-card .boss-hp-value {display:block;max-width:100%;font-size:1em;letter-spacing:-.6px}
  .boss-card .boss-hp-ratio {display:block;color:#9c859f;font-size:10px;line-height:1.2;font-weight:650;letter-spacing:-.2px}
  .boss-card .boss-track {height:8px;margin:0}
  .boss-card .boss-info {margin:0;font-size:10px;line-height:1.2}
  .boss-card .boss-tactic-link {margin-top:2px;padding:7px 12px;min-height:29px;font-size:10px;gap:17px}
  .raid-stats {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px 0;padding:12px 0;margin:18px 0}
  .raid-stats .metric {padding:2px 14px}
  .raid-stats .metric:nth-child(2) {border-right:0}
  .raid-stats .metric .k {font-size:10px}
  .raid-stats .metric .v {font-size:22px;margin-top:3px}
  .raid-stats .metric .d {font-size:9px}
  .tw-work {padding:12px}
  .tw-library {max-height:none;overflow:visible}
  .tw-library #tw-library-list {max-height:160px;overflow-y:auto;overflow-x:hidden}
  .tw-boss-tabs {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;width:100%;overflow:visible}
  .tw-boss-tabs button {min-width:0;padding:8px 2px;font-size:10px;white-space:nowrap}
  .tw-grid .tw-text-cell>[data-tw-text] {padding:9px 8px;font-size:14px!important}
  .tw-config-fieldset:disabled .tw-characters {gap:5px}
  .tw-character-slot input:not([type=file]) {font-size:10px}
  .tw-card-title {line-height:1.7}
  .tw-card {padding:11px 10px}
  .tw-carry-state {font-size:10px;line-height:1.65}
  .quick-panel:not([open]) {padding:14px}
  .profile-controls>select {max-width:100%;min-width:0}
  .profile-controls .tabset {display:flex}
  .profile-controls .tabset button {flex:1;min-width:0;padding-left:7px;padding-right:7px}
  .profile-donuts {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .profile-donut {min-width:0;padding:11px 7px}
  .profile-donut .donut {width:min(130px,100%);height:auto;aspect-ratio:1}
  .profile-donut .donut>div {width:66%;height:auto;aspect-ratio:1;gap:3px}
  .profile-donut .donut strong {font-size:clamp(12px,3.8vw,16px)}
  .profile-donut .donut small {font-size:9px}
  .profile-donut ul {margin-top:14px;gap:6px}
  .profile-donut li {gap:5px;font-size:10px}
  .profile-donut li i {width:9px;height:9px;flex:none}
  .combo-party {gap:6px}
  .combo-party img,.portrait-missing {width:clamp(38px,12vw,52px);height:clamp(38px,12vw,52px)}
  .combo-party strong {font-size:11px}
  .guild-dialog input {font-size:16px}
  .mobile-nav {height:auto;min-height:65px;padding:5px 4px max(6px,env(safe-area-inset-bottom));background:#fffefcf5;border-top-color:#e3d3ee;box-shadow:0 -4px 20px #60417f0b}
  .mobile-nav button {min-width:0;gap:2px;color:#ab90bb;padding:6px 1px;line-height:1.35}
  .mobile-nav button.active {color:#8a5aa4}
  .mobile-nav button span {width:28px;height:25px;border-radius:8px;display:grid;place-items:center;font-size:17px}
  .mobile-nav button.active span {background:#f0e4f9;box-shadow:inset 0 0 0 1px #e4cfee}
  .content {padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
}
@media(max-width:360px) {
  .boss-card {column-gap:8px;padding-left:10px;padding-right:10px}
  .boss-card .boss-top {gap:7px}
  .boss-card .boss-art {width:46px;height:46px}
  .boss-card .boss-hp>strong {font-size:16px}
  .boss-card .boss-hp-ratio {font-size:9px}
  .boss-card .boss-tactic-link {width:calc(100% + 20px);margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px}
  .hero .btn {font-size:10px;padding-left:9px;padding-right:9px}
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {transition:none!important;scroll-behavior:auto!important}
}
@media print {
  html,body {background:#fff!important}
  .panel,.boss-card,.profile-donut {box-shadow:none}
  .hero>div:first-child {padding-left:0}
  .hero>div:first-child:before {display:none}
}

/* Compact records, source links and editable source-sheet guidance. */
.source-link-box{display:inline-flex;align-items:center;justify-content:center;width:28px;height:22px;flex:none;border:1px solid #d7c5e3;border-radius:5px;background:#fbf7fe;color:#9062ab;vertical-align:middle;text-decoration:none;box-shadow:0 1px 2px #5e3e7508}
.source-link-box svg{display:block;width:21px;height:17px;pointer-events:none}
.source-link-box.is-video{background:#fcf0f4;border-color:#e2c5d1;color:#b56c89}
.source-link-box.is-site{background:#f3eefb;color:#8566aa}
.source-link-box.is-empty{background:transparent;border-color:#e2d6eb;box-shadow:none}
.source-link-box:hover{border-color:#b393c8;filter:brightness(.98)}
.source-link-box.is-empty:hover{filter:none;border-color:#e2d6eb}
.source-link-group{display:inline-flex;align-items:center;gap:4px;vertical-align:middle}
.tw-source-summary{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;vertical-align:baseline;margin-left:3px;line-height:1.4}
.tw-source-summary small{font-size:10px;font-weight:650;color:#a18aad}
.tw-source-summary>strong{font-size:17px;font-variant-numeric:tabular-nums;color:#856099}
.tw-work .tw-editor-head h2{line-height:1.75}
.tw-editor-head .btnbar:empty{display:none}
.tw-links{padding-top:0;padding-bottom:12px}
.is-booster,.combo-party strong.is-booster,.tw-config-fieldset:disabled input.is-booster{color:#2d77bb!important}
.combo-summary{display:grid;grid-template-columns:auto auto auto auto auto minmax(0,1fr) 28px;align-items:center;gap:8px;font-size:11px;color:#977ca8;border-bottom:1px solid color-mix(in srgb,var(--boss-accent) 40%,#fff);padding-bottom:12px;min-width:0}
.combo-summary>span,.combo-summary>.combo-boss{white-space:nowrap;min-width:0}
.combo-summary>.combo-stage{color:var(--boss-ink);font-weight:750}
.combo-summary>.combo-boss{font-size:12px;color:var(--boss-ink)}
.combo-summary .combo-source{color:#9675a8;font-weight:800}
.combo-summary .combo-damage{display:inline-flex;align-items:baseline;justify-content:flex-end;gap:5px;color:var(--boss-ink);font-variant-numeric:tabular-nums}
.combo-summary .combo-damage small{font-size:9px;color:#a38aaf}
.combo-summary .combo-damage strong{font-size:20px;line-height:1.2;letter-spacing:-.5px}
.combo-summary .source-link-box{justify-self:end}
.combo-admin-actions{display:flex;gap:5px;justify-content:flex-end;margin-top:10px}
.combo-card .combo-party{margin-top:15px;margin-bottom:3px}
.combo-card .combo-meta{margin-top:13px;margin-bottom:0;line-height:1.7}
.combo-notice{margin:0 0 17px;padding:14px 17px;min-width:0;border-color:#e8d4ce;background:linear-gradient(115deg,#fff9f1,#fff9fc)}
.combo-notice-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.combo-notice-head>strong{font-size:13px;color:#a0786a}
.combo-notice-head .textbutton{font-size:11px;white-space:nowrap}
.combo-notice-text{white-space:pre-line;overflow-wrap:anywhere;font-size:12px;line-height:1.85;color:#9a726e}
.combo-notice-collapsed{margin-bottom:15px}
.combo-other-notes{background:#fcf9ff;border-color:#e6d8f0}
.combo-other-notes>summary{font-size:13px;font-weight:750;color:#9773aa;cursor:pointer}
.combo-other-notes .combo-notice-text{margin-top:12px;color:#97809e}
.combo-other-notes>.btn{margin-top:12px}
.guild-roster tr.guild-member-active>th,.guild-roster tr.guild-member-active>td{background:#f1e8f9!important;border-bottom-color:#e2d3ee}
.guild-roster tr.guild-member-active>th .textbutton{color:#80519c;font-weight:850}
.guild-roster tr.guild-member-left>th,.guild-roster tr.guild-member-left>td{background:#fdfcfe;color:#a18aaf}
.guild-roster tr.guild-member-left>th .textbutton{color:#a087ae;font-weight:650}
.battle-view-options{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:#a08bae}
.battle-view-options .switch{font-size:11px;gap:5px;white-space:nowrap}
.battle-view-options input{width:14px;height:14px;margin:0;accent-color:#9773b5}
.battle-sheet.compact-battle-sheet{min-width:720px;table-layout:fixed;width:100%}
.battle-sheet.compact-battle-sheet.with-details{min-width:1100px}
.compact-battle-sheet th,.compact-battle-sheet td{height:34px;padding:5px 7px;line-height:1.35;font-size:11px}
.compact-battle-sheet thead th{height:30px;padding-top:6px;padding-bottom:6px;font-size:10px}
.compact-battle-sheet .member-cell{min-width:0}
.compact-battle-sheet .member-cell strong{white-space:normal;overflow-wrap:anywhere;font-weight:700}
.compact-battle-sheet .boss-cell{white-space:normal;overflow-wrap:anywhere}
.compact-battle-sheet td small{font-size:9px;margin-top:2px}
.compact-battle-sheet .edit-cell{min-width:0}
.compact-battle-sheet .view-cell{cursor:default}
.compact-battle-sheet .carry-cell{text-align:center}
.compact-battle-sheet .carry-kind{font-size:10px;color:#9377a6;white-space:normal}
.compact-battle-sheet td .inline-kill{display:inline;margin:0 0 0 4px;font-size:8px;color:#8c7898}
.compact-battle-sheet .hp-exact strong{font-size:11px;color:#8d69a3}
.compact-battle-sheet .day-divider th{padding:6px 8px!important;height:28px;font-size:11px}
.compact-battle-sheet .row-tools button{height:22px;width:22px;margin-right:2px;font-size:12px;padding:0}
.compact-battle-sheet .row-warning>.member-cell{background:#fff7e7;color:#a27a3c}
.recent-battle-table th,.recent-battle-table td{padding:7px 6px;font-size:10px}
.profile-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.guild-dialog textarea{width:100%;font:inherit;font-size:14px;border:1px solid #dfcde9;border-radius:8px;padding:10px;line-height:1.7;min-height:160px;color:#80658f;background:white}
#setting-boosters{min-height:150px;font-size:13px;line-height:1.8;resize:vertical}
@media(max-width:800px){
 .combo-card{padding:13px 11px}
 .combo-summary{gap:5px;font-size:10px;grid-template-columns:auto auto auto auto auto minmax(0,1fr) 26px;padding-bottom:10px}
 .combo-summary>.combo-boss{font-size:11px}
 .combo-summary .combo-damage{gap:3px}
 .combo-summary .combo-damage small{font-size:8px}
 .combo-summary .combo-damage strong{font-size:17px}
 .combo-summary .source-link-box{width:26px;height:21px}
 .combo-notice{padding:13px 12px}
 .combo-notice-text{font-size:11px;line-height:1.85}
 .combo-notice-head{align-items:flex-start;gap:8px}
 .combo-notice-head .btnbar{gap:10px}
 .combo-notice-head>strong{font-size:12px}
 .combo-summary .combo-source{font-size:10px}
 .tw-source-summary>strong{font-size:16px}
 .tw-source-summary small{font-size:9px}
 .tw-source-summary .source-link-box{width:27px;height:21px}
 .battle-view-options{gap:11px;width:100%;justify-content:flex-end}
 .sheet-panel .panel-head{gap:9px}
 .compact-battle-sheet th,.compact-battle-sheet td{padding-left:6px;padding-right:6px}
 .guild-dialog textarea{font-size:16px}
}
@media(max-width:360px){
 .combo-summary{gap:4px;font-size:9px}
 .combo-summary>.combo-boss,.combo-summary .combo-source{font-size:10px}
 .combo-summary .combo-damage strong{font-size:16px}
 .combo-summary .combo-damage small{font-size:7px}
}

/* Wide-screen density: constrain the canvas and pair complementary data cards. */
.content{width:100%;max-width:1360px;margin-inline:auto}
.db-rates-layout,.profile-activity-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.db-rates-layout>.panel,.profile-activity-grid>.panel{min-width:0;margin:0}
.db-rate-factors .table-scroll,.db-rate-records .table-scroll{max-width:100%;overflow-x:auto}
.db-rate-factors .datatable,.db-rate-records .datatable{width:100%;table-layout:fixed}
.db-rate-factors .datatable th,.db-rate-factors .datatable td{padding:10px 6px;text-align:center;font-variant-numeric:tabular-nums}
.db-rate-factors .datatable th:first-child{width:17%}
.db-rate-factors .datatable th .boss-chip{white-space:nowrap}
.db-rate-records .datatable th:nth-child(1){width:13%}
.db-rate-records .datatable th:nth-child(2){width:32%}
.db-rate-records .datatable th:nth-child(3){width:35%}
.db-rate-records .datatable th:nth-child(4){width:20%}
.db-rate-records .datatable th,.db-rate-records .datatable td{padding:10px 6px}
.db-rate-records .datatable td:nth-child(3){font-variant-numeric:tabular-nums}
.db-rate-records .panel-head{align-items:center}
.db-rate-records .panel-head .tabset{flex-wrap:nowrap;min-width:0}
.db-rate-records .panel-head .tabset button{padding:6px 10px}
.db-rate-records .rate-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:17px}
.db-rate-records .rate-summary>div{padding:11px 10px;min-width:0;font-size:11px;line-height:1.5}
.db-rate-records .rate-summary strong{font-size:17px;margin-top:5px;overflow-wrap:anywhere}
.db-rate-records .rate-summary>.btn{grid-column:1/-1;justify-self:end}
.profile-activity-grid{margin-top:18px}
.profile-activity-grid .daily-profile-bars>div{grid-template-columns:44px minmax(0,1fr) auto auto;gap:8px}
.profile-activity-grid .daily-profile-bars>div>span{font-size:11px;white-space:nowrap}
@media(min-width:1160px){
 .profile-activity-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
}
@media(min-width:1560px){
 .sidebar{grid-template-columns:repeat(8,minmax(0,148px));justify-content:center}
 .topbar{right:max(24px,calc((100vw - 1360px)/2 + 24px))}
}
@media(max-width:800px){
 .db-rates-layout,.profile-activity-grid{gap:12px}
 .db-rate-records .rate-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .db-rate-records .rate-summary>div:nth-child(3){grid-column:1/-1}
 .db-rate-records .panel-head .tabset button{padding:5px 8px}
 .db-rate-factors .datatable th,.db-rate-factors .datatable td{padding:9px 4px}
 .profile-activity-grid .daily-profile-bars>div{grid-template-columns:48px minmax(0,1fr);gap:5px 8px}
 .profile-activity-grid .daily-profile-bars>div>span{white-space:normal}
}
@media print{
 .content{max-width:none}
 .db-rates-layout,.profile-activity-grid{grid-template-columns:1fr}
}

/* Historical monthly rankings in Clan DB. */
.db-tabs{display:inline-grid;grid-template-columns:repeat(5,auto);width:max-content;max-width:100%}
.archive-record-selector{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:15px 18px;margin-bottom:15px}
.archive-record-selector .field{margin:0;min-width:170px;max-width:100%}
.archive-record-selector label{font-size:11px}
.archive-record-selector select{min-height:40px}
.archive-record-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.archive-record-metrics .metric{min-width:0;padding:17px 18px}
.archive-record-metrics .metric .k{font-size:11px}
.archive-record-metrics .metric .v{font-size:clamp(17px,2.1vw,25px);font-variant-numeric:tabular-nums;letter-spacing:-.5px;overflow-wrap:anywhere}
.archive-record-ranking h2{font-size:16px}
.archive-ranking-table{min-width:650px;width:100%;table-layout:fixed}
.archive-ranking-table th:first-child{width:7%}
.archive-ranking-table th:nth-child(2){width:15%}
.archive-ranking-table td.number{text-align:right}
.archive-ranking-table th,.archive-ranking-table td{padding:10px 9px;font-variant-numeric:tabular-nums}
.archive-ranking-table th:nth-child(n+3){text-align:right}
.archive-ranking-table .sort-head{white-space:nowrap}
.combo-summary-stage3{grid-template-columns:auto auto auto auto minmax(0,1fr);gap:13px}
.combo-summary-stage3 .combo-time,.combo-summary-stage3 .combo-operation{display:inline-flex;align-items:baseline;gap:5px}
.combo-summary-stage3 small{font-size:10px;color:#a18bad;font-weight:500}
.combo-summary-stage3 .combo-time strong{font-size:14px;color:var(--boss-ink);font-variant-numeric:tabular-nums}
.combo-summary-stage3 .combo-operation{justify-content:flex-end;white-space:normal}
.combo-summary-stage3 .combo-operation strong{font-size:12px;color:#89659d;overflow-wrap:anywhere}
@media(min-width:1160px){.archive-record-metrics{grid-template-columns:1.35fr 1.35fr .8fr .8fr}}
@media(max-width:800px){
 .archive-record-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
 .archive-record-metrics .metric{padding:13px 12px}
 .archive-record-metrics .metric .v{font-size:clamp(15px,4.4vw,20px)}
 .archive-record-selector{padding:13px 12px;flex-wrap:wrap}
 .archive-record-selector .field{flex:1}
 .archive-record-selector .btn{font-size:10px}
 .archive-record-ranking h2{font-size:14px}
 .db-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;gap:3px}
 .db-tabs button{font-size:10px;padding:8px 3px;white-space:nowrap}
 .combo-summary-stage3{grid-template-columns:auto auto auto auto minmax(0,1fr);gap:9px}
 .combo-summary-stage3 .combo-time,.combo-summary-stage3 .combo-operation{gap:3px}
 .combo-summary-stage3 small{font-size:9px}
 .combo-summary-stage3 .combo-time strong{font-size:12px}
 .combo-summary-stage3 .combo-operation strong{font-size:11px}
}
@media(max-width:360px){
 .db-tabs button{font-size:9px;padding:8px 2px}
 .combo-summary-stage3{gap:6px}
 .combo-summary-stage3 small{font-size:8px}
 .combo-summary-stage3 .combo-time strong,.combo-summary-stage3 .combo-operation strong{font-size:10px}
}

/* Readable desktop canvas: bounded at 1360px, never artificially squeezed to 1100px. */
.content{max-width:1360px}
@media(min-width:801px){
 .content{padding-inline:24px!important}
 .sidebar{padding-inline:max(24px,calc((100vw - 1360px)/2 + 24px));grid-template-columns:repeat(8,minmax(0,1fr))}
 .topbar{right:max(24px,calc((100vw - 1360px)/2 + 24px))}
 .panel{padding:18px}
 .dashboard-panel{padding:0}
 .sheet-panel,.tw-work{padding:16px}
 .db-rate-factors,.db-rate-records{padding:14px}
 .db-rate-factors .datatable th,.db-rate-factors .datatable td,.db-rate-records .datatable th,.db-rate-records .datatable td{padding:8px 4px;font-size:11px}
 .db-rate-factors .boss-chip{padding:3px 5px;font-size:11px}
 .db-rate-records .datatable th:nth-child(1){width:10%}
 .db-rate-records .datatable th:nth-child(2){width:25%}
 .db-rate-records .datatable th:nth-child(3){width:43%}
 .db-rate-records .datatable th:nth-child(4){width:22%}
 .db-rate-records .panel-head{gap:8px}
 .db-rate-records .panel-head h2{font-size:14px}
 .db-rate-records .panel-head .tabset button{padding:5px 7px;font-size:11px}
 .db-rate-records .rate-summary{gap:6px}
 .db-rate-records .rate-summary>div{padding:9px 7px;font-size:10px}
 .db-rate-records .rate-summary strong{font-size:15px}
 .db-rate-factors .table-scroll,.db-rate-records .table-scroll{overflow-x:visible}
 .db-rate-factors .datatable,.db-rate-records .datatable{min-width:0}
 .raid-stats+.grid-2{grid-template-columns:minmax(0,1fr) 250px;gap:16px}
 .recent-battle-table{table-layout:fixed;min-width:0;width:100%}
 .recent-battle-table th,.recent-battle-table td{white-space:normal;overflow-wrap:anywhere;padding-inline:4px}
}
@media(min-width:801px) and (max-width:999px){.raid-stats+.grid-2{grid-template-columns:minmax(0,1fr)}}
@media print{.content{max-width:none}}

.db-rates-layout{grid-template-columns:minmax(0,1fr);max-width:820px;margin-inline:auto}
@media(min-width:801px){
 .battle-sheet.compact-battle-sheet.with-details{min-width:0}
 .compact-battle-sheet.with-details th,.compact-battle-sheet.with-details td{white-space:normal;overflow-wrap:anywhere}
 .compact-battle-sheet.with-details .row-tools{white-space:normal}
}

/* Five-boss 4th-stage records, aligned with all boss contribution columns. */
.db-rate-records .db-top-record-table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse}
.db-rate-records .db-top-record-table thead th:first-child{width:20%}
.db-rate-records .db-top-record-table thead th:not(:first-child){width:16%}
.db-rate-records .db-top-record-table th,
.db-rate-records .db-top-record-table td{min-width:0;box-sizing:border-box;padding:8px 3px;text-align:center;white-space:nowrap;font-size:11px;font-variant-numeric:tabular-nums}
.db-rate-records .db-top-record-table tbody th{text-align:center;font-weight:750;vertical-align:middle;white-space:normal;word-break:keep-all}
.db-rate-factors .datatable thead .boss-chip,
.db-rate-records .db-top-record-table thead .boss-chip{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:24px;padding:3px 5px;border-radius:7px;font-size:11px;font-weight:750;line-height:1.15;white-space:nowrap}
.db-rate-records .db-top-average th,.db-rate-records .db-top-average td{border-top:2px solid #d4c4e3;background:#faf7fd;font-weight:750}
.db-rate-records .db-top-corrected th,.db-rate-records .db-top-corrected td{background:#f1eaf9;color:#6b4786;font-weight:850}
.db-rate-records .db-top-record-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:13px;color:#8b759b;font-size:11px}
.db-rate-records .db-top-record-footer>.btn{flex:none}
.db-rate-records .table-scroll{overflow-x:hidden}
@media(min-width:1180px){
  .db-rates-layout{max-width:none;grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr)}
}
@media(max-width:800px){
  .db-rate-records .db-top-record-table th,
  .db-rate-records .db-top-record-table td{padding:7px 1px;font-size:10px;letter-spacing:-.35px}
  .db-rate-records .db-top-record-footer{font-size:10px}
}
@media(max-width:360px){
  .db-rate-records .db-top-record-table th,
  .db-rate-records .db-top-record-table td{font-size:9px;letter-spacing:-.45px}
  .db-rate-factors .datatable thead .boss-chip,
  .db-rate-records .db-top-record-table thead .boss-chip{min-height:22px;padding:2px 3px;font-size:10px}
}

/* Stage factors and top-ten records share the same centered table headers. */
.db-rate-factors .datatable thead th,
.db-rate-records .db-top-record-table thead th,
.db-rate-records .db-top-record-table tbody th,
.db-rate-records .db-top-record-table tbody td{text-align:center;vertical-align:middle}


/* Japanese-to-Korean +13-month clan boss preview: read-only until manually applied. */
.future-boss-panel .panel-head { align-items: center; gap: 12px; }
.future-boss-panel .panel-head p { margin: 5px 0 0; }
.future-months { display: grid; gap: 10px; margin: 14px 0; }
.future-month { border: 1px solid #e4e3eb; border-radius: 11px; overflow: hidden; background: #fff; }
.future-month summary { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 12px 14px; cursor: pointer; }
.future-month summary::marker { color: #786bab; }
.future-boss-list { padding: 10px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; border-top: 1px solid #ecebf3; }
.future-boss-item { text-align: center; min-width: 0; padding: 10px 5px; border-radius: 9px; background: #faf9fd; display: grid; justify-items: center; gap: 5px; }
.future-boss-item strong { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.future-boss-item span.warning { color: #b45b16; }
.future-boss-art { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 11px; background: #e7e4f0; color: #524675; font-weight: 700; }
.future-boss-art img { width: 100%; height: 100%; object-fit: contain; }
@media(max-width:740px){.future-boss-list{grid-template-columns:repeat(2,minmax(0,1fr))}.future-month summary{flex-wrap:wrap}.future-boss-panel .panel-head{flex-wrap:wrap}}

/* Monthly rules: booster roster stays collapsed until opened explicitly. */
.booster-settings { border: 1px solid #e4e3eb; border-radius: 11px; background: #fff; overflow: hidden; }
.booster-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; }
.booster-settings > summary::marker { color: #786bab; }
.booster-settings > summary strong { font-size: 14px; }
.booster-settings[open] > summary { border-bottom: 1px solid #e4e3eb; }
.booster-settings-body { padding: 14px; }
.booster-settings-body > p { margin: 0 0 12px; }
.booster-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill,minmax(175px,1fr)); gap: 8px; }
.booster-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 9px; border-radius: 9px; background: #f7f6fa; font-size: 13px; overflow-wrap: anywhere; }
.booster-list li .btn { flex-shrink: 0; }
.booster-add-row { display: flex; align-items: flex-end; gap: 8px; margin: 10px 0; }
.booster-add-row .field { flex: 1; min-width: 0; margin: 0; }
.booster-add-row input { width: 100%; }
@media(max-width:520px) { .booster-add-row { align-items: stretch; flex-wrap: wrap; } .booster-add-row .field { flex-basis: 100%; } .booster-list { grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); } }

/* Historical rankings: provisional until an editor confirms the final day. */
.guild-history .history-state { font-size: 11px; font-weight: 700; margin-top: 5px; line-height: 1.3; }
.guild-history .history-pending { color: #887000; }
.guild-history .history-closed { color: #3a7954; }
.guild-history .history-dirty { color: #ad5e1e; }
.guild-history .history-actions { display: flex; align-items: center; justify-content: flex-start; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.guild-history .history-actions:empty { display: none; }
.guild-history td.history-note { min-width: 175px; }
.guild-history .history-actions .btn.sm { white-space: nowrap; }
@media(max-width:740px){.guild-history td.history-note{min-width:160px}.guild-history .history-actions{gap:5px}}
