:root{color-scheme:light;--ink:#142720;--muted:#52625b;--paper:#f7f4ee;--red:#b51f2b;--line:#c7cec8}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.65 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}a{color:inherit;text-underline-offset:4px}header{max-width:1120px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-weight:750}.brand img{width:40px;height:40px;object-fit:contain}main{width:min(100% - 40px,460px);margin:60px auto 40px}h1{font-size:32px;line-height:1.3;margin:0 0 16px;letter-spacing:-.02em}.intro{color:var(--muted);margin:0 0 32px}label{display:block;font-weight:650;margin:22px 0 8px}input,button{font:inherit}input{width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;background:#fff;padding:12px;color:var(--ink);caret-color:var(--red)}input::placeholder{color:#66736c}.phone-field{display:flex;align-items:center;gap:12px}.phone-field span{padding:10px 0}.code-field{display:flex;gap:10px}.code-field input{flex:1}.code-field button{white-space:nowrap}button{border:1px solid var(--line);border-radius:6px;padding:12px 16px;min-height:48px;background:transparent;color:var(--ink);cursor:pointer}button:hover{background:#e7e9e2}button:disabled{cursor:not-allowed;opacity:.65}.primary{width:100%;background:var(--red);color:#fff;border-color:var(--red)}.primary:hover{background:#951a24}.notice,.help{font-size:13px;color:var(--muted);margin:20px 0}.help{margin-top:36px;padding-top:20px;border-top:1px solid var(--line)}#account-message{min-height:26px;color:var(--ink)}#account-message.error{color:#a01723}dl{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:24px 0;border-block:1px solid var(--line)}dt{color:var(--muted)}dd{margin:0;text-align:right}.tools{display:flex;flex-direction:column;gap:14px;margin:28px 0}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #0b7868;outline-offset:3px}::selection{background:#e9bdbe;color:var(--ink)}[hidden]{display:none!important}@media(max-width:480px){main{margin-top:32px}header{padding:20px}h1{font-size:28px}.code-field button{padding-inline:10px}}

.workspace,main.member-workspace{width:min(100% - 40px,1040px)}
.workspace section,#member-view section{margin-top:40px;padding-top:24px;border-top:1px solid var(--line)}
h2{font-size:23px;line-height:1.4;margin:0 0 16px}h3{font-size:18px;margin:0 0 10px}.muted,small,.data-row p{color:var(--muted)}
.section-nav{display:flex;gap:24px;flex-wrap:wrap;padding:16px 0;border-block:1px solid var(--line)}
.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px}.editor-grid label{margin:0}.editor-grid input,.editor-grid select,.editor-grid textarea{display:block;margin-top:8px}.full{grid-column:1/-1}
select,textarea{font:inherit;width:100%;padding:12px;border:1px solid var(--line);border-radius:6px;background:white;color:var(--ink)}textarea{resize:vertical}.editor-grid .primary{width:auto;justify-self:start}
.data-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.data-row>div{min-width:0}.data-row p{margin:4px 0}.data-row button,.data-row>a{flex-shrink:0}.empty{color:var(--muted);padding:18px 0}.store-section{margin-block:28px}.error{color:#a01723}#admin-message{min-height:26px}
dialog{width:min(100% - 32px,540px);border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);padding:28px}dialog::backdrop{background:rgb(20 39 32 / .4)}.actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}.actions .primary{width:auto}
select:focus-visible,textarea:focus-visible{outline:3px solid #0b7868;outline-offset:3px}
@media(max-width:600px){.editor-grid{grid-template-columns:1fr}.data-row{align-items:flex-start;flex-wrap:wrap;gap:12px}.section-nav{gap:16px}main.workspace,main.member-workspace{margin-top:28px}.editor-grid .primary{width:100%}}

/* Account-specific access controls, matching the existing workspace. */
.row-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.form-action{display:flex;align-items:flex-end}.form-action button{margin-bottom:0}.feature-summary{font-size:14px}.data-row>div:first-child{min-width:0}.feature-summary{overflow-wrap:anywhere}
#feature-options{border:0;padding:0;margin:20px 0}#feature-options legend{font-weight:700;margin-bottom:12px}.feature-option{display:flex;align-items:flex-start;gap:12px;padding:12px 0;cursor:pointer}.feature-option input{width:20px;height:20px;min-height:20px;margin:2px 0 0;flex:0 0 20px;accent-color:#b51f2b}.feature-option span{display:grid;gap:4px}.feature-option small{font-weight:400;line-height:1.6;color:#53625a}dialog{max-height:calc(100dvh - 40px);overflow:auto}
@media(max-width:640px){.row-actions{justify-content:flex-start}.data-row{align-items:flex-start;flex-wrap:wrap}.row-actions button{min-height:44px}.form-action button{width:100%}}

/* Member navigation: two equal columns, with a full-width administrative entry. */
.account-tools{--tool-surface:#fffdfa;--tool-border:#dedfd7;--tool-hover:#eef1eb;--tool-button:#e8ede6;margin:32px 0 0}
.account-tools-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:16px}
.account-tools-heading h2{font-size:20px;margin:0}
.account-tools-heading p{margin:0;color:var(--muted);font-size:14px}
.account-tool-grid{display:flex;flex-wrap:wrap;gap:12px}
.account-tool{flex:1 1 calc(50% - 6px);min-width:0;display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:14px;min-height:108px;padding:22px;border:1px solid var(--tool-border);border-radius:8px;background:var(--tool-surface);text-decoration:none;transition:background-color .16s,border-color .16s}
.tool-icon{display:block;width:20px;height:20px;fill:none;stroke:var(--muted);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tool-copy{display:grid;gap:5px;min-width:0}
.tool-copy strong{font-size:17px;line-height:1.4;font-weight:650}
.tool-copy>span{font-size:13px;line-height:1.6;color:var(--muted)}
.tool-action{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:10px 13px;border-radius:6px;background:var(--tool-button);color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap;transition:background-color .16s,color .16s}
.tool-action>span{font-size:18px;line-height:1;transition:transform .16s}
.account-tool:hover{border-color:#87998b;background:var(--tool-hover)}
.account-tool:hover .tool-action,.account-tool:focus-visible .tool-action{background:var(--ink);color:#fff}
.account-tool:hover .tool-action>span{transform:translateX(2px)}
.account-tool:active .tool-action{background:#2b493c;color:#fff}
.account-tool-admin{flex-basis:100%;min-height:88px;padding-block:16px;background:transparent}
.account-tool-admin .tool-copy{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap}
.account-tool-admin .tool-copy strong{font-size:16px}
#member-view .data-row>a{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:9px 14px;border:1px solid var(--line);border-radius:6px;text-decoration:none;font-size:14px;font-weight:600;transition:background-color .16s,border-color .16s}
#member-view .data-row>a::after{content:'→';font-size:18px;line-height:1}
#member-view .data-row>a:hover{background:#e8ede6;border-color:#87998b}
@media(min-width:641px) and (max-width:1000px){.account-tool{grid-template-columns:20px minmax(0,1fr);padding:20px}.tool-action{grid-column:2;justify-self:start}.account-tool-admin{grid-template-columns:20px minmax(0,1fr) auto}.account-tool-admin .tool-action{grid-column:auto}.account-tool-admin .tool-copy{display:grid;gap:5px}}
@media(max-width:640px){.account-tools{margin-top:28px}.account-tools-heading{display:block;margin-bottom:14px}.account-tools-heading p{margin-top:5px}.account-tool-grid{gap:10px}.account-tool{flex-basis:100%;gap:12px;min-height:104px;padding:18px 16px;grid-template-columns:20px minmax(0,1fr)}.tool-copy strong{font-size:16px}.tool-action{grid-column:2;justify-self:start;padding:8px 12px}.account-tool-admin .tool-copy{display:grid;gap:5px}.account-tool-admin{min-height:0}.tool-copy>span{font-size:13px}}
@media(prefers-reduced-motion:reduce){.account-tool,.tool-action,.tool-action>span,#member-view .data-row>a{transition:none}.account-tool:hover .tool-action>span{transform:none}}

/* Account summary and personal collections share the navigation's surfaces. */
main.member-workspace{margin-top:36px}
#member-view{--account-surface:#fffdfa;--account-border:#dedfd7;--account-rule:#eceee7;--account-action:#e8ede6;--account-positive:#285b41}
.account-overview{padding:24px;border:1px solid var(--account-border);border-radius:8px;background:var(--account-surface)}
.account-title-row{display:flex;align-items:center;justify-content:space-between;gap:20px}
.account-title-row h1{font-size:28px;margin:0;line-height:1.35}
.account-phone{margin:8px 0 0;color:var(--muted);font-size:14px;font-variant-numeric:tabular-nums}
.account-sign-out{min-height:44px;padding:9px 14px;font-size:14px;flex-shrink:0}
dl.account-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:22px 0 0;padding:20px 0 0;border:0;border-top:1px solid var(--account-rule)}
.account-summary>div{padding:0 24px;border-left:1px solid var(--account-rule)}
.account-summary>div:first-child{padding-left:0;border-left:0}
.account-summary>div:last-child{padding-right:0}
.account-summary dt{font-size:13px}
.account-summary dd{text-align:left;margin:8px 0 0}
.identity-value,.access-value{font-size:18px;font-weight:650;line-height:1.5}
.access-value{display:inline-flex;align-items:center;gap:8px}
.access-value::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--muted)}
.access-value[data-state="enabled"]{color:var(--account-positive)}
.access-value[data-state="enabled"]::before{background:var(--account-positive)}
.access-value[data-state="inactive"]{color:var(--muted)}
.account-summary small{display:block;margin-top:6px;font-size:12px;color:var(--muted)}
#member-view .account-section{margin-top:32px;padding-top:0;border-top:0;scroll-margin-top:24px}
.account-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.account-section-heading h2{margin:0;font-size:20px}
.account-section-heading p{margin:5px 0 0;font-size:14px;color:var(--muted)}
.account-count{flex:none;white-space:nowrap;color:var(--muted);font-size:14px;font-variant-numeric:tabular-nums}
.account-list{border:1px solid var(--account-border);border-radius:8px;background:var(--account-surface)}
#member-view .account-item,.account-empty{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:18px;padding:22px;border-bottom:1px solid var(--account-rule)}
#member-view .account-item:last-child,.account-empty{border-bottom:0}
.account-item-icon{align-self:start;margin-top:3px}
.account-item-copy{min-width:0;overflow-wrap:anywhere}
.account-item-copy strong{display:block;font-size:16px;font-weight:650;line-height:1.6}
.account-item-copy p{margin:5px 0 0;font-size:14px;line-height:1.65;color:var(--muted)}
.account-item-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px;font-variant-numeric:tabular-nums}
.account-kind{display:inline-block;flex:none;padding:1px 7px;border-radius:4px;background:#f0f2ed;color:var(--muted);font-size:12px;white-space:nowrap}
#member-view .account-row-action{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:9px 14px;border:1px solid transparent;border-radius:6px;background:var(--account-action);color:var(--ink);text-decoration:none;font-size:14px;font-weight:600;line-height:1.65;white-space:nowrap;transition:background-color .16s,color .16s}
#member-view a.account-row-action::after{content:'→';font-size:18px;line-height:1}
#member-view .account-row-action:hover{background:var(--ink);border-color:var(--ink);color:white}
.account-unavailable{justify-self:end;font-size:13px;color:var(--muted)}
.account-empty{min-height:112px}
.account-empty .account-item-copy strong{font-size:15px;font-weight:600}
.account-loading{min-height:110px;display:flex;align-items:center;margin:0;padding:22px;font-size:14px;color:var(--muted)}
.account-load-error{grid-template-columns:minmax(0,1fr) auto}
.account-load-error strong{color:#a01723}
.member-workspace #account-message:empty{display:none}
.member-workspace .help{margin-top:28px;padding-top:20px;border-color:var(--account-border,var(--line))}
@media(max-width:640px){
  main.member-workspace{width:calc(100% - 32px);margin-top:24px}
  .account-overview{padding:20px}
  .account-title-row{gap:12px;align-items:flex-start}
  .account-title-row h1{font-size:24px}
  .account-sign-out{padding-inline:12px;font-size:13px}
  dl.account-summary{grid-template-columns:1fr;margin-top:20px;padding-top:4px}
  .account-summary>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;padding:14px 0;border-left:0;border-top:1px solid var(--account-rule)}
  .account-summary>div:first-child{border-top:0}
  .account-summary>div:last-child{padding-bottom:0}
  .account-summary dt{padding-top:2px;font-size:13px}
  .account-summary dd{margin:0;text-align:right}
  .identity-value,.access-value{font-size:16px}
  .account-summary small{margin-top:3px;font-size:12px}
  #member-view .account-section{margin-top:28px}
  .account-section-heading{gap:12px;align-items:baseline}
  .account-section-heading h2{font-size:19px}
  .account-section-heading p{font-size:13px}
  .account-count{font-size:13px}
  #member-view .account-item,.account-empty{grid-template-columns:20px minmax(0,1fr);gap:12px;padding:18px 16px}
  .account-item-copy strong{font-size:15px}
  .account-item-copy p{font-size:13px}
  #member-view .account-row-action,.account-unavailable{grid-column:2;justify-self:start}
  .account-load-error{grid-template-columns:minmax(0,1fr)}
  .account-load-error .account-row-action{grid-column:1!important}
  .account-loading{padding:18px 16px;min-height:100px}
}
@media(prefers-reduced-motion:reduce){#member-view .account-row-action{transition:none}}

/* Editable account identity follows the existing warm, flat account panel. */
.account-profile{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);gap:24px;margin-top:24px;padding-top:22px;border-top:1px solid var(--account-rule)}
.account-profile-copy label{margin:0;font-size:15px;font-weight:650}
.account-profile-copy p{margin:6px 0 0;font-size:13px;color:var(--muted);line-height:1.7}
.account-profile-edit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:start}
.account-profile-edit input{margin:0;min-width:0;font-size:16px}
.account-profile-edit button{min-height:48px;background:var(--account-action);white-space:nowrap}
.account-profile-edit small,.account-profile-edit p{grid-column:1/-1;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:1.65;color:var(--muted)}
.account-profile-edit .profile-preview{color:var(--ink)}
#profile-message:empty{display:none}#profile-message.error{color:#a01723}
@media(max-width:640px){.account-profile{grid-template-columns:1fr;gap:14px;margin-top:20px;padding-top:18px}.account-profile-edit{gap:8px}.account-profile-edit button{padding-inline:12px}}
