* { box-sizing: border-box; }
:root { color-scheme: light; --paper:#f6f4f0; --ink:#2b2b29; --muted:#5f6059; --line:#d9d4c9; --wash:#eeebe4; --accent:#c4410d; }
body { margin:0; background:var(--paper); color:var(--ink); font:15px/1.75 "Segoe UI","Microsoft YaHei",sans-serif; }
button,input,select,textarea { font:inherit; color:inherit; }
button { cursor:pointer; background:white; border:1px solid var(--line); border-radius:9px; padding:7px 14px; line-height:1.55; }
button:hover:not(:disabled) { background:var(--wash); }
button:disabled { cursor:wait; opacity:.5; }
button.primary { background:var(--accent); color:white; border-color:var(--accent); }
button.primary:hover:not(:disabled) { background:#ad390c; }
button.text { background:transparent; border-color:transparent; padding-inline:0; color:var(--accent); }
a { color:var(--accent); }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid var(--accent); outline-offset:2px;
}
.shell>header { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:68px; padding:14px clamp(20px,4.5vw,70px); border-bottom:1px solid var(--line); }
.shell>header img { display:block; width:158px; max-width:42vw; height:auto; }
#identity { display:flex; align-items:center; gap:14px; font-size:13px; color:var(--muted); }
main { width:min(900px,100%); margin:auto; padding:36px clamp(18px,5vw,42px) 50px; }
h1,h2,p { margin:0; }
h1 { font-size:24px; font-weight:600; }
h2 { font-size:17px; font-weight:400; }
h1+p, h2+p { margin-top:8px; }
p.muted, small,.meta { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.actions,.line { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.line { justify-content:space-between; }
.account { width:min(420px,100%); margin:clamp(14px,8vh,80px) auto 0; }
.account .line { justify-content:flex-start; }
.account .code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; }
.account .code-row button { min-height:39px; white-space:nowrap; }
form { display:grid; gap:14px; margin:12px 0 0; }
form label { display:grid; gap:5px; }
input:not([type=checkbox]),select,textarea { width:100%; display:block; border:1px solid var(--line); border-radius:8px; background:white; padding:8px 10px; min-height:39px; }
::placeholder { color:#696963; }
fieldset { border:0; padding:0; margin:0; }
.roles { display:flex; gap:7px 14px; flex-wrap:wrap; }
.roles label,.check { display:flex !important; flex-direction:row; gap:6px; align-items:center; }
.block { border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.75); padding:17px 19px; margin-top:16px; }
.block .line + .line, .block > p + .line { margin-top:9px; }
.spread { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.sections { margin-top:25px; }
dt,dd { margin:0; }
dl { display:grid; grid-template-columns:max-content auto; gap:5px 16px; }
.list { list-style:none; padding:0;margin:12px 0 0; }
.list>li { padding:11px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.list>li:last-child { border-bottom:0; }
.list .summary { display:grid; }
.feedback { border:1px solid var(--line); border-radius:9px; background:white; padding:8px 12px; margin-bottom:12px; overflow-wrap:anywhere; }
.feedback.error { border-color:#dbb2a4; color:#96351a; }
[hidden] { display:none !important; }
details { margin-top:12px; }
summary { cursor:pointer; }
@media(max-width:560px) { .spread {grid-template-columns:1fr;} .line { align-items:flex-start; } #identity { gap:4px; } }


/* Long account addresses must leave the logout control readable. */
#identity{min-width:0;flex-wrap:wrap;justify-content:flex-end}
#identity>span{min-width:0;overflow-wrap:anywhere}
#identity>button{flex:none;white-space:nowrap}

.labor-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:12px; }
.labor-list > li { padding-block:12px; overflow-wrap:anywhere; }
.labor-list > li > small { display:block; margin-top:4px; }

#handoff-codex-dialog { color:var(--ink); background:var(--paper); width:min(440px,calc(100% - 32px));
  max-height:calc(100% - 32px); border:1px solid var(--line); border-radius:12px; padding:18px; }
#handoff-codex-dialog::backdrop { background:rgba(39,35,28,.32); }
#handoff-codex-dialog header { margin-bottom:14px; }
#handoff-codex-dialog header form { margin:0; }
#handoff-codex-dialog select { width:100%; }
.qc-player { display:block; width:min(100%,560px); max-height:50vh; background:#2b2b29; border-radius:8px; }
.review-master-digest { overflow-wrap:anywhere; }
