.account-hero { padding-block: clamp(25px, 3.7vw, 52px); }
.account-hero h1 { margin-block: 0 8px; font-size: clamp(2.25rem, 4vw, 3.4rem); }
.account-shell { max-width: 560px; padding-block: clamp(24px, 3.6vw, 50px); }
.account-card { padding: clamp(20px, 4vw, 34px); }
.account-card h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin-bottom: 18px; }
.account-form, .account-form-fields { display: grid; gap: 16px; }
.account-form-fields { min-inline-size: 0; padding: 0; margin: 0; border: 0; }
.account-form label { display: grid; gap: 6px; font-weight: 650; }
.account-name-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-form input, .account-form select {
  inline-size: 100%; min-inline-size: 0; min-block-size: 44px; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--white); color: var(--ink); font: inherit; font-weight: 450;
}
.account-form input[readonly] { background: var(--surface); }
.account-form :disabled { cursor: wait; opacity: .75; }
.account-form > .button { justify-self: start; }
.info-card .account-form > .button { margin-top: 0; }
.account-links { display: grid; gap: 7px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .94rem; }
.account-links p, .info-card p.account-hint { margin: 0; }
.account-hint { color: var(--muted); font-size: .88rem; }
.account-status { margin: 0 0 16px; border-radius: 7px; color: var(--ink); background: var(--surface); padding: 9px 13px; }
.account-status[data-error] { color: #772338; background: #fff1f4; }
.account-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-shell [hidden] { display: none !important; }

.account-center { max-width: 1240px; padding-block: clamp(26px, 4vw, 58px) clamp(52px, 7vw, 98px); }
main:has(.account-center) { background: #f7f8fb; }
.account-workspace { display: grid; grid-template-columns: minmax(184px, 224px) minmax(0, 1fr); align-items: start; gap: clamp(28px, 4vw, 58px); }
.account-rail { position: sticky; top: 104px; min-width: 0; }
.rail-member { display: flex; align-items: center; gap: 13px; padding: 5px 6px 25px; border-bottom: 1px solid var(--line); }
.rail-member > div { min-width: 0; }
.rail-member h1 { font: 500 .82rem/1.4 var(--body); color: var(--muted); letter-spacing: 0; }
.rail-member p { font-size: 1.08rem; line-height: 1.4; font-weight: 700; }
.member-avatar { flex: none; inline-size: 46px; block-size: 46px; display: grid; place-items: center; border-radius: 14px; background: #e5e1fb; color: var(--indigo-deep); font-size: 1.06rem; font-weight: 750; }
.account-menu { display: grid; gap: 5px; margin-block: 21px; }
.account-menu a { display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 9px 13px; border-radius: 8px; color: #48485d; text-decoration: none; font-size: .95rem; font-weight: 600; }
.account-menu a:hover { background: #eeeff5; }
.account-menu a[aria-current="page"] { background: #e9e5fb; color: var(--indigo-deep); }
.ui-icon { position: relative; display: inline-block; flex: none; inline-size: 20px; block-size: 20px; }
.i-bookmark::before { content: ''; position: absolute; inset: 2px 4px 1px; background: currentColor; clip-path: polygon(0 0,100% 0,100% 100%,50% 75%,0 100%,0 0,12% 9%,12% 83%,50% 63%,88% 83%,88% 9%,12% 9%); }
.i-sliders { background: linear-gradient(currentColor,currentColor) center 6px / 16px 1.5px no-repeat, linear-gradient(currentColor,currentColor) center 14px / 16px 1.5px no-repeat; }
.i-sliders::before,.i-sliders::after { content:''; position:absolute; width:4px; height:4px; background:var(--surface); border:1.5px solid currentColor; border-radius:50%; }
.i-sliders::before { top:3.5px; left:5px; } .i-sliders::after { top:11.5px; right:4px; }
.rail-sync { border-top: 1px solid var(--line); padding-block-start: 13px; }
.rail-sync summary { list-style: none; display:flex; align-items:center; gap:11px; width:100%; padding:10px 13px; cursor:pointer; font-size:.9rem; font-weight:650; color:var(--muted); }
.rail-sync summary::-webkit-details-marker { display:none; }
.rail-sync summary::after { content:''; width:7px; height:7px; margin-inline-start:auto; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:translateY(-2px) rotate(45deg); }
.rail-sync[open] summary::after { transform:translateY(2px) rotate(225deg); }
.sync-light { width:8px; height:8px; margin-inline:5px; background:#89909c; border-radius:50%; }
.rail-sync[data-connected="true"] .sync-light, .rail-sync:has([data-connection-status][data-connected]) .sync-light { background:#187650; }
.sync-content { display:grid; gap:9px; padding:4px 12px 12px; font-size:.83rem; line-height:1.5; color:var(--muted); }
.sync-content .button { justify-self:start; min-height:38px; padding:6px 10px; }
.account-content { min-width:0; }
.collection-heading { display:flex; align-items:center; gap:12px; margin:0 0 22px; }
.collection-heading h2, .settings-heading { margin:0; font-size:clamp(2rem, 3.4vw, 3rem); line-height:1.1; }
.collection-heading h2,.settings-heading { scroll-margin-top: calc(78px + 1rem); }
.collection-count { display:inline-grid; place-items:center; min-width:31px; height:30px; padding-inline:8px; border-radius:8px; background:#e8e7f4; color:#41366c; font-size:.98rem; font-weight:700; font-variant-numeric:tabular-nums; }
.collection-count:empty { display:none; }
.collection-tools { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:10px 15px; padding-block-end:20px; }
.collection-search, .collection-order { display:flex; align-items:center; border:1px solid #d2d2e0; border-radius:8px; background:white; min-height:43px; color:#545567; }
.collection-search { gap:9px; padding-inline-start:12px; width:min(100%,330px); }
.i-search { width:17px; height:17px; }
.i-search::before { content:''; position:absolute; inset:1px 4px 4px 1px; border:1.5px solid currentColor; border-radius:50%; }
.i-search::after { content:''; position:absolute; right:1px; bottom:2px; background:currentColor; width:6px; height:1.5px; transform:rotate(45deg); }
.collection-search input { border:0; padding:9px 10px 9px 0; font:inherit; font-size:.9rem; min-width:0; flex:1; color:var(--ink); background:transparent; }
.collection-search:focus-within, .collection-order:focus-within { outline:2px solid var(--indigo); outline-offset:1px; }
.collection-search input:focus, .collection-order select:focus { outline:0; }
.collection-order { gap:6px; padding-inline:12px 8px; font-size:.87rem; }
.collection-order select { border:0; background:transparent; color:var(--ink); font:inherit; font-weight:650; max-width:100%; min-height:40px; }
.favorites-list { display:grid; list-style:none; gap:15px; padding:0; margin:0; }
.favorite-item { display:grid; grid-template-columns:minmax(172px, 28%) minmax(0,1fr); padding:10px; background:white; border:1px solid #dddee6; border-radius:14px; box-shadow:0 2px 5px rgb(24 22 50 / 3%); }
.favorite-item:has(.favorite-screenshot[hidden]) { grid-template-columns:minmax(0,1fr); }
.favorite-screenshot { position:relative; display:block; width:100%; min-height:144px; padding:0; overflow:hidden; isolation:isolate; background:#f0f0f5; border:0; border-radius:8px; cursor:zoom-in; }
.favorite-screenshot img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 15%; transition:transform .18s ease-out; }
.favorite-screenshot:hover img { transform:scale(1.025); }
.favorite-screenshot span { position:absolute; z-index:1; inset-inline-start:8px; bottom:8px; padding:4px 8px; border-radius:5px; background:rgb(20 20 35 / 88%); color:white; font-size:.72rem; line-height:1.5; font-weight:650; }
.favorite-body { align-self:center; min-width:0; padding:8px clamp(12px,1.6vw,25px); }
.favorite-origin { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 8px; color:var(--muted); font-size:.77rem; line-height:1.45; }
.favorite-origin bdi { font-weight:750; letter-spacing:.04em; color:#46475a; }
.favorite-body h3 { margin:7px 0 6px; font-size:clamp(1.05rem,1.45vw,1.27rem); letter-spacing:-.02em; line-height:1.35; }
.favorite-body h3 a { color:var(--ink); text-decoration:none; }
.favorite-body h3 a:hover { text-decoration:underline; }
.favorite-specs { margin:0; display:flex; flex-wrap:wrap; gap:8px 24px; }
.favorite-specs > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 6px; font-size:.83rem; }
.favorite-specs dt { color:var(--muted); }
.favorite-specs dd { margin:0; font-weight:650; }
.favorite-specs .favorite-price { flex-basis:100%; line-height:1.12; font:700 clamp(1.28rem,2vw,1.57rem)/1.2 var(--heading); color:var(--indigo-deep); }
.favorite-specs [data-missing] { font-size:.85rem; color:var(--muted); font-family:var(--body); font-weight:400; }
.favorite-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; justify-content:space-between; margin-block-start:10px; }
.favorite-actions a { display:inline-flex; gap:7px; align-items:center; min-height:36px; font-size:.88rem; font-weight:700; text-decoration:none; }
.favorite-actions a:hover, .favorite-remove:hover, .action-text:hover { text-decoration:underline; }
.favorite-remove, .action-text { min-height:36px; background:none; color:var(--muted); border:0; padding:3px; font:inherit; font-size:.82rem; border-radius:3px; }
.favorite-remove:hover { color:#912742; }
.favorite-remove:disabled { opacity:.65; cursor:wait; }
.favorites-empty { padding:clamp(24px,4vw,46px); display:grid; justify-items:start; gap:7px; border-radius:12px; border:1px dashed #ceccdc; background:#fff; }
.favorites-empty p { color:var(--muted); max-width:55ch; }
.favorites-empty .action-text { font-weight:650; color:var(--indigo); }
.screenshot-dialog,.remove-dialog { box-sizing:border-box; margin:auto; max-width:94vw; max-height:92vh; max-height:92dvh; border:1px solid var(--line); border-radius:14px; color:var(--ink); box-shadow:0 20px 60px rgb(20 16 49 / 18%); }
.screenshot-dialog { width:fit-content; min-width:min(320px,92vw); padding:clamp(14px,2vw,24px); overflow:auto; }
.screenshot-dialog::backdrop,.remove-dialog::backdrop { background:rgb(22 21 38 / 68%); }
.screenshot-header { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-block-end:14px; }
.screenshot-header h3 { margin:0; overflow-wrap:anywhere; font-size:1.12rem; }
.screenshot-header .button { min-height:38px; padding:6px 12px; }
.screenshot-dialog img { width:auto; height:auto; max-width:100%; max-height:72vh; max-height:72dvh; margin-inline:auto; object-fit:contain; }
.remove-dialog { width:min(440px,94vw); padding:24px; }
.remove-dialog h3 { font-size:1.3rem; }
.remove-name { font-weight:650; margin-block:12px 4px; }
.remove-dialog #remove-warning { color:var(--muted); font-size:.94rem; }
.remove-dialog .button-row { margin-top:22px; }
.remove-confirm { background:#8c253c; color:white; }
.settings-heading { margin-block-end:24px; }
.account-center .account-panels { align-items:start; }
.account-center .account-card h2 { font-size:1.32rem; margin:0 0 18px; }
.account-center .account-card { padding:clamp(16px,2.5vw,28px); }
.account-center .account-form > .button-row { justify-content:space-between; }
html:not(.has-js) .account-shell .account-form, html:not(.has-js) .account-shell .account-status { display:none; }
@media (max-width:1050px) {
  .account-workspace { grid-template-columns:minmax(158px,182px) minmax(0,1fr); gap:26px; }
  .account-center { width:min(100% - 42px,1240px); }
  .account-center .account-name-fields { grid-template-columns:minmax(0,1fr); }
  .favorite-item { grid-template-columns:minmax(145px,27%) minmax(0,1fr); }
}
@media (max-width:800px) {
  .account-center { padding-block-start:18px; }
  .account-workspace { grid-template-columns:minmax(0,1fr); gap:24px; }
  .account-rail { position:static; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"who sync" "nav nav"; align-items:center; gap:12px; }
  .rail-member { grid-area:who; padding:0; border:0; gap:9px; }
  .member-avatar { inline-size:37px; block-size:37px; border-radius:10px; font-size:.88rem; }
  .rail-member h1 { font-size:.75rem; }
  .rail-member p { font-size:.96rem; }
  .account-menu { grid-area:nav; display:flex; gap:6px; margin:0; padding-block-end:8px; border-bottom:1px solid var(--line); }
  .account-menu a { min-height:42px; font-size:.9rem; padding:8px 11px; gap:7px; }
  .rail-sync { grid-area:sync; position:relative; border:0; padding:0; }
  .rail-sync summary { gap:5px; padding:7px 3px; font-size:.82rem; min-height:40px; }
  .rail-sync summary::after { margin-inline-start:3px; }
  .sync-content { position:absolute; z-index:3; inset-inline-end:0; top:100%; width:min(260px,86vw); border:1px solid var(--line); border-radius:9px; background:white; padding:15px; box-shadow:0 5px 20px rgb(22 21 38 / 12%); }
  .collection-heading { margin-bottom:15px; }
  .favorite-screenshot { min-height:150px; }
}
@media (max-width:570px) {
  .account-center { width:calc(100% - 28px); }
  .account-workspace { gap:18px; }
  .collection-heading h2,.settings-heading { font-size:1.9rem; }
  .collection-tools { display:grid; grid-template-columns:minmax(0,1fr) minmax(106px,auto); align-items:stretch; gap:6px; padding-bottom:12px; }
  .collection-search { width:auto; gap:6px; padding-inline-start:8px; }
  .collection-search input { font-size:.85rem; }
  .collection-order { min-width:0; max-width:155px; padding-inline:5px; }
  .collection-order span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .collection-order select { width:100%; font-size:.8rem; }
  .account-panels { grid-template-columns:minmax(0,1fr); }
  .favorite-item { display:block; padding:0; overflow:hidden; }
  .favorite-screenshot { width:100%; min-height:0; height:clamp(140px,44vw,209px); border-radius:0; }
  .favorite-screenshot img { object-position:50% 18%; }
  .favorite-body { padding:13px 15px 10px; }
  .favorite-body h3 { font-size:1.12rem; }
  .favorite-specs { gap:7px 15px; }
  .favorite-actions { margin-top:8px; }
  .favorite-actions a,.favorite-remove { min-height:43px; }
}
@media (prefers-reduced-motion:reduce) { .favorite-screenshot img { transition:none; } }
