/* Shared field treatment, including dialogs in the browser's top layer. */
body .store-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea),
body .admin-dialog :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  box-sizing:border-box;width:100%;min-width:0;min-height:48px;
  padding:12px 14px;border:1px solid var(--control-border);border-radius:0;
  background:var(--control-surface);color:var(--ink);caret-color:var(--ink);
  font-family:inherit;font-size:1rem;font-weight:400;line-height:1.5;
  box-shadow:none;color-scheme:inherit;
  transition:border-color .15s ease,outline-color .15s ease;
}
body .store-shell textarea,body .admin-dialog textarea {min-height:160px;resize:vertical;}
body .store-shell :is(input,textarea)::placeholder,body .admin-dialog :is(input,textarea)::placeholder {color:var(--muted);opacity:1;font-weight:400;}
body .store-shell :is(input,select,textarea):focus-visible,body .admin-dialog :is(input,select,textarea):focus-visible {outline:3px solid var(--terracotta);outline-offset:3px;border-color:var(--terracotta);}
body .store-shell :is(input,select,textarea):disabled {opacity:.65;cursor:not-allowed;}
body .store-shell :is(input,textarea)[readonly] {background:var(--paper);color:var(--muted);}
body .store-shell select,body .admin-dialog select {padding-right:34px;}
body .store-shell option,body .admin-dialog option {background:var(--control-surface);color:var(--ink);font-weight:400;}
body .store-shell label,body .admin-dialog label {font-weight:400;}
body .admin-dialog :is(input:not([type=checkbox]),select,textarea) {margin-top:8px;margin-bottom:22px;}
body .admin-dialog input[type=checkbox] {width:18px;height:18px;vertical-align:middle;margin-right:8px;}
body .store-shell input::file-selector-button {background:var(--paper);color:var(--ink);border:1px solid var(--control-border);border-radius:0;padding:6px 10px;font:inherit;margin-right:12px;}
body .admin-bulk select {width:auto;}
@media(prefers-reduced-motion:reduce){body .store-shell :is(input,select,textarea){transition:none;}}
.studio-request {padding:24px 0;border-bottom:1px solid var(--line);}
.request-submit {margin-top:28px;padding-top:24px;border-top:1px solid var(--line);}
.request-trap {position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;}
#studio-inbox :is(p,li),#studio-status {overflow-wrap:anywhere;}
#studio-settings label,#account-forms label,#account-reset-panel label {display:block;margin-block:16px;}
/* Native macOS selects otherwise keep rounded corners despite border-radius. */
body .store-shell select,body .admin-dialog select {
  appearance:none;-webkit-appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink) 50%),linear-gradient(135deg,var(--ink) 50%,transparent 50%);
  background-position:calc(100% - 20px) 52%,calc(100% - 15px) 52%;
  background-size:5px 5px;background-repeat:no-repeat;
}

body .store-shell label.check-line {display:flex;align-items:flex-start;gap:10px;}
body .store-shell label.check-line input {flex:0 0 auto;margin-top:3px;}
#stripe-checkout {max-width:760px;}
#stripe-choice,#stripe-pay,#stripe-lines {margin-block:24px;}
#studio-orders,#studio-outbox {overflow-wrap:anywhere;}

#stripe-pay button {transition:none;}

.conversation {scroll-margin-top:100px;overflow-wrap:anywhere;}
.conversation-reply {margin-block:18px;padding:12px 18px;border-left:2px solid var(--line);}
.conversation form,[data-thread-reply] {margin-block:20px;}
.purchase-download label {display:block;margin-block:14px;}
/* Long artwork titles must not expand Safari's native select overflow area. */
#stripe-choice select,.purchase-download select {min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;}

.storage-counts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem 1.5rem; max-width: 44rem; }
.storage-counts dt, .storage-counts dd { margin: 0; font-weight: 400; }
#download-health details { margin: 1.25rem 0; }
#download-health summary { cursor: pointer; padding: .5rem 0; }

/* Account controls stay separated at every viewport, including signed-in states. */
.account-page {max-width:960px;}
.account-page > p {max-width:720px;}
#account-status {margin-block:22px;overflow-wrap:anywhere;}
#account-status .button {display:flex;width:fit-content;margin-top:16px;}
#account-forms {display:grid;gap:24px;}
.account-page .panel {border-radius:0;}
.account-page :is(h2,h3) {font-weight:400;}
.account-page .panel h2 {margin:0 0 18px;}
#account-forms form,#account-reset {gap:18px;}
#account-forms label,#account-reset-panel label {margin:0;}
#account-forms form > p {margin:0;}
#account-forms form > .button,#account-reset > .button {justify-self:start;}
#account-profile {display:grid;gap:28px;}
#account-profile .account-profile-heading h2 {margin:0 0 10px;}
#account-person {margin:0;overflow-wrap:anywhere;}
.account-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.account-page .button {gap:10px;border-radius:0;font-weight:400;letter-spacing:0;line-height:1.45;white-space:normal;text-align:left;}
.account-actions .button {justify-content:flex-start;min-width:0;}
.account-action-icon {display:block;flex:0 0 20px;width:20px;height:20px;}
.account-section {border-top:1px solid var(--line);padding-top:26px;}
.account-section h3 {margin:0 0 16px;}
.account-section > p {max-width:700px;margin:0 0 16px;}
#account-preferences {gap:16px;}
#account-preferences .check-line {margin:0;font-size:.95rem;line-height:1.5;}
#account-preferences-note {max-width:700px;margin:0;font-size:.86rem;color:var(--muted);}
.account-inline-actions {display:flex;flex-wrap:wrap;align-items:center;gap:12px;}
.account-profile-footer {border-top:1px solid var(--line);padding-top:24px;}
@media(max-width:600px) {
 .account-actions {grid-template-columns:minmax(0,1fr);}
 #account-profile {gap:24px;}
 .account-page .panel {padding:20px;}
 .account-inline-actions > .button {max-width:100%;}
}

/* Customer action rows and loaded collections need their own spacing. */
.customer-action-row {display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin-block:24px;}
.customer-action-row > a:not(.button) {padding-block:12px;}
.customer-action-row .button {gap:10px;}
#messages-list,#downloads-list {display:grid;gap:24px;margin-block:24px;}
#messages-list > .panel,#downloads-list > .panel {min-width:0;border-radius:0;overflow-wrap:anywhere;}
#messages-list form > .button {justify-self:start;}
#downloads-list > .panel > ul {display:grid;gap:20px;}
#downloads-list .admin-toolbar {display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-block:24px;}
.customer-action-row .button,#messages-list .button,#downloads-list .button,#downloads-refresh {max-width:100%;border-radius:0;font-weight:400;white-space:normal;line-height:1.45;}
#cart-content {margin-bottom:24px;}
