:root{--ink:#18334d;--muted:#485f76;--sky:#dceeff;--accent:#215f9d;--action:#245f9a;--on-action:#fff;--line:#c3d7e9;--mark-ink:#fff;font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:#f1f7fd;font-size:16px}
*{box-sizing:border-box}body{margin:0}button,input,summary{font:inherit}button,summary{cursor:pointer}button{background:#fff;border:1px solid var(--line);border-radius:7px;color:var(--ink);padding:.6rem .9rem;font-weight:650}button:hover,summary:hover{background:#e3f0fc}:focus-visible{outline:3px solid #2878bd;outline-offset:3px}.entry{display:grid;grid-template-columns:minmax(270px, .88fr) minmax(330px,1.12fr);width:min(1110px,calc(100% - 64px));margin:clamp(32px,10vh,104px) auto;border:1px solid var(--line);border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 14px 60px #24466b12}.atlas{position:relative;isolation:isolate;overflow:hidden;min-height:600px;padding:40px;display:flex;flex-direction:column;justify-content:space-between;background:var(--sky);color:var(--ink);--mark-ink:#fff}.brand{display:flex;gap:12px;align-items:center;font-size:18px;font-weight:720}.atlas .brand svg{color:var(--accent)}.intro{margin:60px 0 125px}.kicker,.eyebrow,.folio{font:650 11px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.13em}.kicker{color:var(--accent)}i{display:inline-block;width:7px;height:7px;margin-right:6px;background:currentColor;border-radius:50%}.intro h2{font-size:clamp(40px,4.3vw,66px);line-height:1.17;letter-spacing:-.055em;margin:17px 0}.intro h2 span{color:var(--accent)}.intro>p:last-child{color:#324f6d;line-height:1.8}.map{position:absolute;width:110%;height:auto;bottom:55px;left:-5%;color:#75a4d0;z-index:-1}.folio{display:flex;justify-content:space-between;color:#3f607d;margin:0}.paper{padding:clamp(32px,6vw,90px);display:grid;align-items:center}.formbox{max-width:390px;width:100%;margin:auto}.eyebrow{margin:0;color:var(--accent)}.eyebrow span{color:#476c90;padding:0 5px}h1{font-size:clamp(30px,3vw,44px);line-height:1.2;margin:12px 0;letter-spacing:-.035em}.sub,.help,small{color:var(--muted);line-height:1.55}.sub{margin:0 0 28px}.help{border-top:1px solid var(--line);padding-top:20px;margin:24px 0 0;font-size:14px}label{display:block;font-weight:650;font-size:14px;margin:16px 0 7px}input:not([type=hidden]){width:100%;background:#f8fbff;border:1px solid #788da3;border-radius:7px;padding:12px 13px;min-height:46px;color:var(--ink)}input::placeholder{color:#4f6478}.pw{position:relative}.pw:has(button:not([hidden])) input{padding-right:92px}.pw button{position:absolute;right:5px;top:5px;font-size:13px;border:0;background:transparent}.pw button[aria-pressed=true]{background:#deedfc}.primary,.solid{background:var(--action);color:var(--on-action);border:0}.primary:hover,.solid:hover{background:#194977}.primary{width:100%;margin-top:24px;min-height:48px;display:flex;justify-content:space-between;align-items:center;padding:0 17px} .primary span{color:var(--on-action);font-size:22px}.error,.notice{font-size:14px;line-height:1.5;border-left:4px solid;padding:12px 14px}.error,.danger{color:#882c27;background:#fff2ec}.notice{background:#e7f3ff;color:var(--ink)}.top{background:var(--sky);color:var(--ink);--mark-ink:#fff}.top>div{display:flex;align-items:center;justify-content:space-between;max-width:1080px;padding:18px 28px;margin:auto}.desk{max-width:1080px;margin:48px auto;padding:0 28px}.panel{background:white;border:1px solid var(--line);border-radius:14px;padding:24px;margin:18px 0}.panel h2{font-size:21px;margin:0 0 14px}.create{display:grid;grid-template-columns:1fr 1fr auto;gap:16px;align-items:start}.create label{margin-top:0}.create button{margin-top:27px;min-height:46px}small{font-size:13px}.accounts{list-style:none;padding:0;margin:0}.accounts li{border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;padding:13px 0;align-items:center;overflow-wrap:anywhere}.actions{display:flex;gap:12px;align-items:center}.actions summary{padding:9px;color:#832c25}.actions details button{margin-top:8px}a{color:var(--accent)}@media(max-width:760px){.entry{grid-template-columns:1fr;width:min(510px,calc(100% - 24px));margin:20px auto}.atlas{min-height:0;padding:22px 26px}.intro,.folio{display:none}.map{width:55%;left:auto;right:0;bottom:-22px}.paper{padding:38px 26px}.create{grid-template-columns:1fr}.create button{margin:0}.desk{padding:0 15px;margin:32px auto}.panel{padding:18px}.accounts li{flex-wrap:wrap}}@media(max-height:700px) and (min-width:761px){.entry{margin:24px auto}.atlas{min-height:540px}}

.workspace{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100vh}
.rail{background:var(--sky);border-right:1px solid var(--line);padding:32px 20px;display:flex;flex-direction:column;gap:38px}
.rail .brand{color:var(--accent)}.rail nav{display:grid;gap:5px}.rail nav p{margin:16px 12px 4px}
.rail nav a{padding:11px 14px;border-radius:8px;text-decoration:none;color:var(--ink);font-weight:600}
.rail nav a:hover{background:#edf6ff}.rail nav a[aria-current=page]{background:#fff;color:var(--accent);box-shadow:inset 3px 0 var(--action)}
.identity{margin-top:auto;border-top:1px solid var(--line);padding-top:20px;display:grid;gap:6px;overflow-wrap:anywhere}.identity form{margin-top:8px}
.workspace-main{padding:32px clamp(20px,2.5vw,48px);width:100%;min-width:0;max-width:none}.metric{max-width:480px}.metric p{color:var(--muted);margin:12px 0 18px}.metric strong{font-size:52px;color:var(--accent);font-variant-numeric:tabular-nums}
.guild-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:12px}.guild-fields button{min-height:46px}.guild-form small{display:block;margin-top:8px}.guild-form button{white-space:nowrap}.skip{position:absolute;left:1rem;top:-5rem;background:white;padding:10px;z-index:2}.skip:focus{top:1rem}
@media(max-width:760px){.workspace{grid-template-columns:1fr;align-content:start}.rail{padding:16px;gap:14px;border-right:none;border-bottom:1px solid var(--line)}.rail nav{display:flex;flex-wrap:wrap}.rail nav p{display:none}.rail nav a{padding:8px 12px}.identity{margin:0;padding:10px 0 0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.identity form{margin:0 0 0 auto}.workspace-main{padding:24px 16px}.guild-fields{grid-template-columns:1fr}}

.guild-heading,.batch-bar,.dialog-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.guild-heading{justify-content:space-between}.guild-heading h2{margin:0}.dialog-actions{justify-content:flex-end;margin-top:16px}
#guild-dialog{box-sizing:border-box;width:min(520px,calc(100% - 32px));color:var(--ink);background:white;border:1px solid var(--line);border-radius:16px;padding:24px}
#guild-dialog[open]:not(:modal){position:static;margin:18px auto}
#guild-dialog::backdrop{background:rgb(18 48 76 / 38%)}
#guild-dialog textarea{width:100%;font:inherit;resize:vertical;padding:12px;border:1px solid #788da3;border-radius:8px;background:#f8fbff;color:var(--ink)}
#guild-dialog .sub{margin:0 0 12px;font-size:14px}
.batch-bar{margin-top:20px}.batch-bar label,.guild-choice{margin:0}.batch-bar output,.batch-note{color:var(--muted);font-size:14px}.batch-bar button{margin-left:auto}
.guild-choice{display:flex;align-items:center;gap:10px;min-width:0;overflow-wrap:anywhere}
.batch-bar input[type=checkbox],.guild-choice input[type=checkbox]{width:18px;height:18px;min-height:0;flex:none;accent-color:var(--accent);vertical-align:middle}
.guild-state{margin-left:auto;color:var(--muted);font-size:14px}.guild-state span{display:inline-block;background:#edf5fd;color:var(--ink);padding:3px 9px;border-radius:6px}.guild-state small{display:block;margin-top:4px}
button:disabled{opacity:.55;cursor:not-allowed}

.detail-link{display:inline-block;white-space:nowrap;padding:9px 13px;border:1px solid var(--line);border-radius:7px;background:#f4f9ff;text-decoration:none;font-weight:600}
.detail-link:hover{background:#e3f0fc}
#guild-details-dialog{width:min(1280px,calc(100% - 64px));max-width:1280px;height:auto;max-height:84dvh;margin:auto;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:0;color:var(--ink);background:#f8fbff;box-shadow:0 24px 90px #18334d38}
#guild-details-dialog::backdrop{background:rgb(18 48 76 / 38%)}
.detail-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 24px;position:sticky;top:0;background:#e6f2ff;border-bottom:1px solid var(--line);z-index:1}
.detail-dialog-head h2{font-size:20px;margin:0}#guild-details-content{padding:20px 24px}
.directory-detail{overflow-wrap:anywhere}.directory-detail h3{margin-top:0;font-size:22px}.detail-meta{color:var(--muted);font-size:14px;line-height:1.6}
.faction-card{border:1px solid var(--line);border-radius:12px;padding:18px;background:white;margin-top:18px}.faction-card h4{margin:0;font-size:18px}
.detail-badge{display:inline-block;font-size:12px;color:var(--accent);background:#e7f3ff;border-radius:5px;padding:3px 8px}
.subaccount-card{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}.subaccount-card summary{font-weight:650;line-height:1.6}
.detail-fields{margin:12px 0 0}.detail-fields>div{display:grid;grid-template-columns:minmax(130px,1fr) minmax(0,3fr);gap:12px;padding:9px 0;border-bottom:1px solid #edf2f7}
.detail-fields dt{font-size:14px;font-weight:600;color:var(--muted)}.detail-fields dd{margin:0;min-width:0}.detail-fields pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font:14px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}
.detail-empty{padding:18px;color:var(--muted);background:#edf6ff;border-radius:8px;line-height:1.6}
@media(max-width:600px){.detail-fields>div{grid-template-columns:1fr;gap:4px}.detail-dialog-head{padding:14px 16px}#guild-details-content{padding:16px}.faction-card{padding:14px}}

/* Full-width guild workspace: stable desktop columns, stacked narrow-screen cards. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.workspace-main>h1{font-size:30px;margin:10px 0 12px;letter-spacing:-.03em}
.workspace-main>.sub{font-size:15px;margin-bottom:26px}
.rail{position:sticky;top:0;height:100dvh;overflow:auto}
.workspace .eyebrow{font-size:12px}
.guild-panel{padding:0;margin:0;box-shadow:0 4px 20px #18334d05;border-color:#d4e2ef;overflow:hidden}
.guild-heading{padding:24px 24px 20px;border-bottom:1px solid #e2ebf3;gap:20px}
.guild-heading h2{display:flex;align-items:center;gap:12px;font-size:20px;flex-wrap:wrap;margin:0}
.guild-heading p{margin:8px 0 0;font-size:14px;color:var(--muted);line-height:1.6}
.page-count{font-size:13px;font-weight:500;color:#476787;background:#eff6fd;border-radius:6px;padding:3px 9px}
.guild-heading-actions{display:flex;align-items:center;gap:20px}
.privacy-label{font-size:14px;color:#476787;white-space:nowrap}
.guild-heading-actions button{min-height:42px;white-space:nowrap}
.guild-panel .batch-bar{margin:0;padding:18px 24px 10px;gap:20px}
.guild-panel .batch-bar label{display:flex;align-items:center;gap:9px;font-size:14px}
.guild-panel .batch-bar label[hidden]{display:none}
.guild-panel .batch-bar button{margin-left:0}
.guild-panel .batch-bar output{margin-right:auto;font-variant-numeric:tabular-nums}
.guild-panel .batch-note{margin:0;padding:0 24px 18px;font-size:13px;line-height:1.65}
.guild-table-scroll{width:100%;overflow:auto;max-height:calc(100dvh - 360px);min-height:250px;scrollbar-gutter:stable}
.guild-table{width:100%;min-width:1080px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.6}
.guild-table .col-select{width:48px}.guild-table .col-account{width:25%}.guild-table .col-login{width:16%}.guild-table .col-sync{width:144px}.guild-table .col-time{width:158px}.guild-table .col-actions{width:300px}
.guild-table th{position:sticky;top:0;z-index:1;text-align:left;font-size:13px;font-weight:600;color:#48627b;background:#f2f7fc;border-top:1px solid #e2ebf3;border-bottom:1px solid #dce7f1;padding:13px 16px;white-space:nowrap}
.guild-table td{padding:20px 16px;border-bottom:1px solid #e7eef5;vertical-align:top;overflow-wrap:anywhere}
.guild-table tbody tr:last-child td{border-bottom:0}
.guild-table tbody tr:hover{background:#f8fbff}.guild-table tbody tr:has(input:checked){background:#edf6ff}
.guild-table .guild-select{padding:22px 12px 20px 18px}
.guild-choice input[type=checkbox],.batch-bar input[type=checkbox]{padding:0}
.guild-account strong{font-size:15px;font-weight:650;color:#173958;line-height:1.7}
.guild-table .guild-state{margin:0;color:var(--muted)}
.guild-table .status-pill{font-size:13px;font-weight:600;border-radius:6px;padding:3px 9px;line-height:1.6;display:inline-block;background:#edf1f5;color:#4b6073}
.guild-table .status-ready{background:#e7f2ff;color:#215e98}
.guild-table .status-partial{background:#fff1d9;color:#805311}
.guild-table .status-issue{background:#fff0ef;color:#a13e35}
.guild-table .guild-state small{font-size:13px;margin-top:8px;line-height:1.7}
.status-explanation{margin-top:8px;font-size:13px}.status-explanation summary{color:#476787;line-height:1.7}.status-explanation p{margin:8px 0 0;padding:10px;border-radius:6px;background:#f3f7fb;line-height:1.75;overflow-wrap:anywhere}
.guild-request time{font-size:14px;line-height:1.7;font-variant-numeric:tabular-nums;color:#52697e;display:block}
.muted{color:var(--muted)}
.row-actions{display:flex;align-items:flex-start;gap:8px;flex-wrap:nowrap}
.row-actions button,.row-actions .detail-link{padding:7px 10px;font-size:13px;line-height:1.6;white-space:nowrap;font-weight:600;border-radius:6px;min-height:36px}
.row-actions .detail-link{background:#eaf4ff;border-color:#c7ddf1;color:#215e98}
.remove-action{flex-basis:100%;font-size:13px;color:#65768a}
.remove-action summary{display:list-item;width:fit-content;padding:0;line-height:1.8}
.remove-action[open]{padding:10px;border:1px solid #edcdc8;background:#fff8f6;border-radius:8px;color:#963c32}
.remove-action p{font-size:13px;margin:8px 0;line-height:1.6}
.row-actions .danger{white-space:normal}
.guild-table .guild-empty{text-align:center;padding:64px 24px;color:var(--muted)}.guild-empty strong{font-size:18px;color:var(--ink)}.guild-empty p{margin:10px 0 0}
.guild-table-footer{padding:16px 24px;border-top:1px solid #e2ebf3;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;color:var(--muted)}
#guild-details-content{padding:28px clamp(20px,4vw,64px)}
.detail-dialog-head{padding:18px clamp(20px,4vw,64px);background:#fff;box-shadow:0 3px 12px #19334e06}
.detail-dialog-head h2{font-size:20px}
.faction-card{padding:22px;border-color:#d4e2ef;margin-top:24px}
.subaccount-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:14px;align-items:start;margin-top:18px}
.subaccount-card{padding:14px 16px;margin:0;border:1px solid #dce7f1;border-radius:8px;min-width:0;background:#fbfdff}
.subaccount-card[open]{background:#fff;box-shadow:0 3px 12px #19334e06}
.subaccount-card summary{font-size:14px;overflow-wrap:anywhere}
.detail-fields>div{grid-template-columns:minmax(90px,1fr) minmax(0,2fr)}
@media(min-width:1800px){.guild-table .col-actions{width:320px}.guild-table td{padding-top:24px;padding-bottom:24px}}
@media(max-width:1100px) and (min-width:761px){.workspace{grid-template-columns:196px minmax(0,1fr)}.rail{padding:26px 16px}.workspace-main{padding:28px 20px}}
@media(max-width:760px){
 .rail{position:static;height:auto;overflow:visible}.workspace-main{padding:24px 14px}
 .guild-heading{padding:20px 16px;align-items:flex-start}.guild-heading-actions{width:100%;justify-content:space-between}.guild-heading p{font-size:14px}
 .guild-panel .batch-bar{padding:16px;gap:12px}.guild-panel .batch-note{padding:0 16px 16px}.guild-panel .batch-bar button{margin-left:auto}
 .guild-table-scroll{max-height:none;min-height:0;overflow:visible;scrollbar-gutter:auto}
 .guild-table{display:block;min-width:0;width:100%}.guild-table colgroup,.guild-table thead{display:none}
 .guild-table tbody{display:block}.guild-table tr{display:grid;grid-template-columns:40px minmax(0,1fr);padding:18px 16px;border-top:1px solid #dce7f1;gap:14px 0}
 .guild-table td{display:block;padding:0;border:0;min-width:0}
 .guild-table .guild-select{grid-column:1;grid-row:1;padding:3px 0 0}.guild-table .guild-account{grid-column:2;grid-row:1}
 .guild-table td[data-label]:not(.guild-account){grid-column:1 / -1;display:grid;grid-template-columns:80px minmax(0,1fr);column-gap:12px;align-items:start}
 .guild-table td[data-label]:not(.guild-account)::before{content:attr(data-label);grid-column:1;grid-row:1 / span 4;font-size:13px;color:#657c91;line-height:1.9}
 .guild-table td[data-label]>:not(:first-child){grid-column:2}.guild-table .status-pill{justify-self:start}.guild-table .guild-state small{margin-top:4px}
 .guild-table .guild-empty{grid-column:1 / -1;padding:28px 0}
 .guild-table-footer{padding:16px;font-size:13px}.guild-table-footer span{line-height:1.6}
 .detail-dialog-head{padding:16px}.detail-dialog-head h2{font-size:18px}#guild-details-content{padding:20px 14px}
 .faction-card{padding:16px}.subaccount-grid{grid-template-columns:minmax(0,1fr)}.detail-fields>div{grid-template-columns:1fr}
}

/* Bounded detail dialog; one table row per subaccount at every screen size. */
#guild-details-content{padding:22px 24px}.detail-dialog-head{padding:18px 24px;z-index:3}
.directory-detail h3{font-size:20px;margin-bottom:12px}
.faction-overview{font-size:14px;margin:16px 0;color:var(--muted)}
.faction-overview summary{font-weight:600;color:var(--accent)}.faction-overview ul{padding:0 0 0 20px}.faction-overview li{margin:12px 0;line-height:1.7}
.directory-search{padding:14px 16px;background:#edf5fd;border:1px solid #d9e6f2;border-radius:10px;margin:20px 0 16px}
.directory-search[hidden]{display:none}
.directory-search-row{display:flex;align-items:center;gap:12px}
.directory-search-row input{flex:1;min-width:0;min-height:44px;background:white;font-size:16px;padding:11px 13px}
.directory-search-row button{flex:none;min-height:44px;font-size:14px;padding:9px 16px}
.search-results-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-top:10px;font-size:14px;color:var(--muted)}
.subaccount-table-scroll{overflow:auto;max-height:48dvh;border:1px solid #d4e2ef;border-radius:10px;background:white}
.subaccount-table{width:100%;min-width:1120px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:14px;line-height:1.65}
.detail-col-id{width:17%}.detail-col-nickname{width:16%}.detail-col-country{width:8%}.detail-col-faction{width:15%}.detail-col-more{width:10%}
.subaccount-table th{position:sticky;top:0;z-index:1;background:#edf5fd;text-align:left;font-size:14px;color:#476787;font-weight:600;padding:13px 16px;border-bottom:1px solid #d4e2ef;white-space:nowrap}
.subaccount-table td{padding:15px 16px;border-bottom:1px solid #e4edf5;vertical-align:top;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.subaccount-table tr:last-child td{border-bottom:0}.subaccount-table tbody tr:hover{background:#f7fbff}
.subaccount-table tr[hidden],[data-search-empty][hidden]{display:none}
.historical-label{display:block;margin-top:7px;color:#805311;font-size:13px}
.account-more summary{font-size:14px;color:var(--accent);white-space:nowrap}
.account-more .detail-fields>div{display:block}.account-more .detail-fields dd{margin-top:4px}.account-more .detail-fields pre{font-size:13px}
@media(max-width:600px){#guild-details-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 48px);border-radius:12px}.detail-dialog-head{padding:14px 16px}#guild-details-content{padding:16px}.directory-search{padding:14px}.directory-search-row{gap:8px}.directory-search-row button{padding:9px 12px}.subaccount-table-scroll{max-height:42dvh}}
@media(prefers-reduced-motion:no-preference){.subaccount-table tbody tr{transition:background-color .12s ease}}

/* Compact guild statuses and same-row actions. */
.batch-buttons{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.row-actions .remove-button{color:#9a3e35;border:1px solid #e5c7c2;background:#fff8f6}
.row-actions .remove-button:hover{background:#ffede9}
.row-actions [hidden]{display:none}
.remove-action{flex-basis:auto}.remove-action summary{padding:7px 10px;border:1px solid #e5c7c2;border-radius:6px;background:#fff8f6;white-space:nowrap;font-size:13px;color:#9a3e35;list-style:none}
.remove-action summary::-webkit-details-marker{display:none}.remove-action[open]{min-width:180px}
#guild-remove-dialog{width:min(460px,calc(100% - 32px));max-height:85dvh;overflow:auto;margin:auto;padding:24px;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:#fff}
#guild-remove-dialog::backdrop{background:rgb(18 48 76 / 38%)}
#guild-remove-dialog h2{font-size:21px;margin:0 0 14px}#guild-remove-dialog p{line-height:1.75;overflow-wrap:anywhere;font-size:15px}
.batch-report{padding:16px 20px;background:#eef6ff;border:1px solid var(--line);border-radius:10px;margin-bottom:18px;font-size:14px}
.batch-report summary{font-weight:650}.batch-report ul{max-height:230px;overflow:auto;padding:0;list-style:none}.batch-report li{display:flex;justify-content:space-between;gap:16px;border-top:1px solid var(--line);padding:10px 0;overflow-wrap:anywhere}.batch-report strong{min-width:0}
@media(max-width:760px){.guild-panel .batch-bar .batch-buttons{margin-left:auto}.guild-panel .batch-bar .batch-buttons button{margin-left:0}.guild-table .guild-operations .row-actions{grid-column:1 / -1;grid-row:2}.guild-table td.guild-operations::before{grid-row:1}.batch-report li{display:block}.batch-report li span{display:block;margin-top:5px}}

/* Aggregated child accounts: full-width workspace, bounded table, one search. */
.subaccounts-panel{padding:0;overflow:hidden;min-width:0}
.subaccounts-panel .directory-search{margin:0 24px 20px}
.subaccounts-panel .directory-search label{margin-top:0}
.subaccounts-panel .directory-search-row a{flex:none;font-size:14px;white-space:nowrap}
.subaccounts-panel .subaccount-table-scroll{margin:0 24px;max-height:65dvh}
.all-subaccounts{min-width:1500px}
.all-subaccounts th:nth-child(1){width:190px}.all-subaccounts th:nth-child(6){width:90px}.all-subaccounts th:nth-child(8){width:190px}
.subaccount-meta{display:block;margin-top:6px;font-size:14px;color:var(--muted)}
.subaccounts-empty{text-align:center;padding:40px!important;color:var(--muted)}
.subaccounts-panel .guild-table-footer a{display:inline-block;margin-left:16px}
@media(max-width:760px){.subaccounts-panel .directory-search{margin:0 16px 16px}.subaccounts-panel .subaccount-table-scroll{margin:0 16px;max-height:60dvh}.subaccounts-panel .directory-search-row{flex-wrap:wrap}.subaccounts-panel .directory-search-row input{flex-basis:100%}}

/* Home counts use the full workspace and remain readable on small screens. */
.home-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0}
.home-metrics .metric{max-width:none;margin:0;min-width:0}
.home-metrics .metric h2{font-size:18px}.home-metric-note{font-size:14px;color:var(--muted)}
.home-factions{padding:0;overflow:hidden}.home-factions .guild-heading p{max-width:760px}
.home-history{margin:0;padding:0 24px 18px;color:#805311;font-size:14px;line-height:1.7}
.home-faction-scroll{overflow:auto;max-height:60dvh}
.home-faction-table{width:100%;min-width:560px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:16px;line-height:1.6}
.home-faction-table th,.home-faction-table td{padding:16px 24px;text-align:left;border-bottom:1px solid var(--line);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.home-faction-table thead th{position:sticky;top:0;background:#edf5fd;color:#476787;font-size:14px;z-index:1}
.home-faction-table th:first-child{width:34%}.home-faction-table tbody tr:hover{background:#f7fbff}
.home-faction-table tfoot th,.home-faction-table tfoot td{background:#f3f8ff;font-weight:650;border-bottom:0}
.home-faction-table .home-faction-empty{text-align:center;padding:32px;color:var(--muted)}
@media(max-width:1050px){.home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.home-metrics{grid-template-columns:minmax(0,1fr);gap:12px}.home-metrics .metric strong{font-size:42px}.home-faction-table th,.home-faction-table td{padding:14px 16px}.home-history{padding:0 16px 16px}}

.task-panel{padding:0;overflow:hidden}.task-panel [hidden],#task-dialog [hidden]{display:none}
.task-panel #task-feedback{margin:20px 24px;overflow-wrap:anywhere}
.task-empty{padding:48px 24px;text-align:center;color:var(--muted);line-height:1.8}.task-empty strong{font-size:18px;color:var(--ink)}.task-empty p{font-size:16px}
#task-dialog{box-sizing:border-box;width:min(540px,calc(100% - 32px));max-height:85dvh;overflow:auto;margin:auto;padding:26px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--ink)}
#task-dialog[open]:not(:modal){position:static;margin:18px auto}
#task-dialog::backdrop{background:rgb(18 48 76 / 38%)}
#task-dialog h2{font-size:23px;margin:0 0 12px}#task-dialog .sub{font-size:15px;margin-bottom:20px}
#task-dialog select{display:block;width:100%;min-height:46px;padding:12px;border:1px solid #788da3;border-radius:7px;background:#f8fbff;color:var(--ink);font:inherit}
#task-dialog small{display:block;margin-top:7px;font-size:14px;line-height:1.6}
#task-dialog .error{overflow-wrap:anywhere}.task-panel .guild-heading button{min-height:44px;font-size:15px}
@media(max-width:600px){#task-dialog{padding:20px;width:calc(100% - 24px);max-height:calc(100dvh - 40px)}.task-empty{padding:32px 18px}.task-panel #task-feedback{margin:16px}}

/* Persistent own-task list. */
.task-list-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 24px;color:var(--muted);font-size:14px}
.task-table-scroll{overflow:auto;max-height:65dvh}.task-table{width:100%;min-width:1600px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:15px;line-height:1.7}
.task-table th,.task-table td{padding:16px 24px;text-align:left;border-bottom:1px solid var(--line);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.task-table th{position:sticky;top:0;z-index:1;background:#edf5fd;font-size:14px;color:#476787}
.task-table th:first-child{width:19%}.task-table th:nth-child(2){width:6%}.task-table th:nth-child(3){width:5%}.task-table th:nth-child(4){width:8%}.task-table th:nth-child(5){width:13%}.task-table th:nth-child(6){width:12%}.task-table th:nth-child(7){width:18%}.task-table th:nth-child(8),.task-table th:nth-child(9){width:5%}.task-table th:nth-child(10){width:9%}.task-table time,.task-table .status-pill{white-space:nowrap}.task-table small{display:block;font-size:14px}.task-table tbody tr:hover{background:#f7fbff}
.task-table .task-empty{text-align:center;padding:36px}.task-panel .guild-table-footer a{margin-left:16px;white-space:nowrap}
@media(max-width:760px){.task-list-meta{padding:16px}.task-table th,.task-table td{padding:14px 16px}}

.task-action{display:flex;align-items:center;gap:.6rem;margin-top:1rem}.task-action input[type="checkbox"]{width:1.1rem;height:1.1rem;margin:0;flex:0 0 auto;accent-color:#2563eb}

.task-table th,.task-table td{padding:16px}.task-progress{display:block;width:100%;height:10px;margin:4px 0 8px;accent-color:#2563eb}.task-progress-label{font-size:14px}.task-success{color:#166534;font-weight:700}.task-failed{color:#b42318;font-weight:700}

.task-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.task-stop-fallback{margin:0 24px 20px}.task-stop-fallback summary{color:#882c27}.task-delete:disabled{opacity:.5;cursor:not-allowed}.task-actions form{margin:0}#task-stop-dialog{width:min(540px,calc(100% - 32px));max-height:80dvh;overflow:auto}#task-stop-dialog .error{line-height:1.8}.task-toolbar [hidden],.task-stop-fallback[hidden],#task-stop-dialog[hidden]{display:none}

/* Follow relations: local horizontal scrolling, not compressed columns. */
.follows-table{min-width:900px}
.follows-table th:nth-child(1){width:24%}.follows-table th:nth-child(2){width:22%}
.follows-table th:nth-child(3){width:22%}.follows-table th:nth-child(4){width:12%}.follows-table th:nth-child(5){width:20%}
.follows-table time{white-space:nowrap}

.task-outcomes{padding:0 24px}.task-outcomes:empty{display:none}
.task-outcome{border:1px solid #e5c6aa;border-left:4px solid #b76b26;background:#fff8f0;border-radius:8px;padding:14px 16px;margin:0 0 16px;overflow-wrap:anywhere}
.task-outcome[hidden]{display:none}.task-outcome strong{color:#7e461d}.task-outcome p{margin:8px 0;line-height:1.7}.task-outcome small{color:#725a47;line-height:1.6}
@media(max-width:760px){.task-outcomes{padding:0 16px}}

/* Explicit relationship selection for unfollow; keep columns readable. */
.unfollow-table{min-width:1100px}.unfollow-table th:first-child{width:64px}
.unfollow-table th:nth-child(2),.unfollow-table th:nth-child(3){width:23%}
.unfollow-table th:nth-child(4){width:20%}.unfollow-table th:nth-child(5){width:12%}
.unfollow-table time{white-space:nowrap}.unfollow-table input[type="checkbox"]{width:18px;height:18px;accent-color:#2563eb}
.unfollow-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 24px;background:#f3f9ff}
.unfollow-submit-panel{padding:20px 24px;display:grid;gap:12px}.unfollow-submit-panel>input{max-width:140px}
.unfollow-submit-panel small{color:#536b80;line-height:1.7}.unfollow-submit-panel>button{justify-self:start}
#unfollow-form [hidden]{display:none}

#unfollow-target-dialog{width:min(580px,calc(100% - 32px));max-height:82dvh;overflow:auto}
#unfollow-target-dialog small{display:block;line-height:1.65;color:#536b80;margin:8px 0 14px}
#unfollow-target-dialog .task-action{align-items:flex-start;line-height:1.6}
#unfollow-target-dialog [hidden]{display:none}

/* Alliance accounts: light-blue, bounded dialog and readable full-width table. */
.alliance-table{width:100%;min-width:780px;table-layout:fixed}.alliance-table th,.alliance-table td{padding:16px 20px;text-align:left;border-bottom:1px solid #e3edf7;overflow-wrap:anywhere}.alliance-table th{background:#f0f7ff;color:#345875}.alliance-table th:nth-child(1){width:24%}.alliance-table th:nth-child(2){width:12%}.alliance-table th:nth-child(5){width:24%}.alliance-table time{font-size:13px}
#alliance-dialog{width:min(580px,calc(100% - 32px));max-height:82dvh;overflow:auto}#alliance-dialog fieldset{border:0;padding:0;margin:16px 0}#alliance-dialog legend{font-weight:600;margin-bottom:8px}#alliance-dialog [hidden]{display:none}
.alliance-switch{display:flex;gap:8px}.alliance-switch label{flex:1;position:relative;cursor:pointer}.alliance-switch input{position:absolute;opacity:0;width:1px;height:1px}.alliance-switch span{display:block;padding:12px;text-align:center;border:1px solid #c8dcee;border-radius:8px;background:#f4f9ff;color:#365b78}.alliance-switch input:checked+span{background:#dceeff;border-color:#478dca;color:#174f83}.alliance-switch input:focus-visible+span{outline:3px solid #78b8ed;outline-offset:2px}.alliance-switch input:disabled+span{opacity:.55}

.alliance-table{min-width:1160px}.alliance-table th:nth-child(1){width:16%}.alliance-table th:nth-child(2){width:8%}.alliance-table th:nth-child(3){width:22%}.alliance-table th:nth-child(4){width:14%}.alliance-table th:nth-child(5){width:9%}.alliance-table th:nth-child(6){width:17%}.alliance-table th:nth-child(7){width:14%}.alliance-actions{display:flex;gap:8px;white-space:nowrap}.alliance-actions button{padding:8px 12px}
#alliance-delete-dialog{width:min(500px,calc(100% - 32px));max-height:80dvh;overflow:auto}#alliance-delete-dialog [hidden]{display:none}#alliance-delete-label{overflow-wrap:anywhere}

/* Alliance task UI: same light-blue theme, bounded modal, scrollable table. */

#alliance-task-dialog{box-sizing:border-box;width:min(580px,calc(100% - 32px));max-height:82dvh;overflow:auto;color:var(--ink);background:white;border:1px solid var(--line);border-radius:16px;padding:24px}#alliance-task-dialog::backdrop{background:rgb(18 48 76 / 38%)}#alliance-task-dialog [hidden]{display:none}#alliance-task-dialog select{width:100%;min-width:0;padding:12px;border:1px solid #788da3;border-radius:8px;background:#f8fbff;color:var(--ink);font:inherit}#alliance-task-dialog small{display:block;color:var(--muted);line-height:1.6;margin-top:8px}.alliance-task-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}#alliance-task-preview{overflow-wrap:anywhere}
@media(max-width:520px){.alliance-task-fields{grid-template-columns:1fr}}

/* Saved alliance tasks: fixed single-line rows; scroll rather than squeeze. */
.alliance-task-table{width:100%;min-width:1220px;table-layout:fixed;border-collapse:collapse}
.alliance-task-table th,.alliance-task-table td{box-sizing:border-box;padding:10px 12px;text-align:left;border-bottom:1px solid #e3edf7;white-space:nowrap;overflow-wrap:normal;vertical-align:middle;line-height:1.4}
.alliance-task-table th{background:#f0f7ff;color:#345875}
.alliance-task-table th:nth-child(1){width:140px}
.alliance-task-table th:nth-child(2){width:160px}
.alliance-task-table th:nth-child(3){width:72px}
.alliance-task-table th:nth-child(4){width:116px}
.alliance-task-table th:nth-child(5),.alliance-task-table th:nth-child(6){width:174px}
.alliance-task-table th:nth-child(7),.alliance-task-table th:nth-child(8){width:88px}
.alliance-task-table th:nth-child(9){width:208px}
.alliance-task-table td:nth-child(3),.alliance-task-table td:nth-child(4),.alliance-task-table td:nth-child(7),.alliance-task-table td:nth-child(8){font-variant-numeric:tabular-nums}
.alliance-task-id,.alliance-task-account{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.alliance-task-success{color:#17633c;font-weight:700}.alliance-task-failure{color:#a63232;font-weight:700}
.alliance-task-actions{display:flex;flex-wrap:nowrap;gap:6px;align-items:center;white-space:nowrap}
.alliance-task-actions form{display:inline-flex;margin:0}
.alliance-task-actions button{margin:0;min-width:54px;padding:7px 10px;line-height:1.4}

#task-dialog textarea{box-sizing:border-box;display:block;width:100%;min-height:140px;resize:vertical;padding:12px;border:1px solid #788da3;border-radius:7px;background:#f8fbff;color:var(--ink);font:inherit;line-height:1.5}
