*{box-sizing:border-box}
:root{--account-red:#e8172f;--account-ink:#171719;--account-muted:#697386;--account-line:#e7e9ee;--account-soft:#f7f8fa}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--sdd-global-header-height) + 18px)}
body{margin:0;background:#f6f7f9;color:var(--account-ink);font:400 16px/1.65 "Noto Sans Thai","Poppins",system-ui,sans-serif}
button,a{font:inherit}.account-shell{width:min(980px,calc(100% - 40px));margin:0 auto;padding:30px 0 calc(72px + env(safe-area-inset-bottom))}
.account-card{background:#fff;border:1px solid var(--account-line);border-radius:20px;box-shadow:0 8px 28px rgba(15,23,42,.04)}
.account-center{max-width:520px;margin:8vh auto 0;padding:38px 30px;text-align:center}
.account-center h1{font-size:26px;line-height:1.35;margin:10px 0 6px}.account-center p{margin:0 auto 20px;color:var(--account-muted)}
.account-spinner{width:40px;height:40px;margin:auto;border:4px solid #f3cdd2;border-top-color:var(--account-red);border-radius:50%;animation:account-spin .8s linear infinite}
@keyframes account-spin{to{transform:rotate(360deg)}}.account-user-icon{font-size:42px}
.account-primary,.account-quiet{min-height:46px;border-radius:12px;padding:9px 16px;cursor:pointer}
.account-primary{border:0;background:#06c755;color:#fff;font-weight:700}.account-quiet{border:1px solid #d9dde5;background:#fff;color:#4b5563}
.account-link{display:block;margin-top:14px;color:#4b5563;text-underline-offset:4px}
.account-profile{display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:18px;align-items:center;padding:22px}
.account-avatar{width:76px;height:76px;border-radius:50%;overflow:hidden;background:#f1f2f5;display:grid;place-items:center;font-size:30px}
.account-avatar img{width:100%;height:100%;object-fit:cover;display:block}.account-profile-copy{min-width:0}
.eyebrow{margin:0 0 2px;color:#8a94a6;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.account-profile h1{margin:0;font-size:26px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-profile p:not(.eyebrow){margin:5px 0 0;color:var(--account-muted);font-size:14px}
.account-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.account-stats a{background:#fff;border:1px solid var(--account-line);border-radius:16px;padding:17px 20px;text-decoration:none;color:inherit;display:flex;align-items:baseline;gap:10px}
.account-stats strong{font-size:27px;color:var(--account-red)}.account-stats span{color:#4b5563;font-weight:600}
.account-section{padding:22px;margin-top:16px;scroll-margin-top:calc(var(--sdd-global-header-height) + 18px)}
.account-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #eef0f3}
.account-section-head h2{margin:0;font-size:22px}.account-section-head>a{color:#b42332;font-size:14px;font-weight:650}
.account-list{display:grid;gap:10px;padding-top:12px}.account-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px;border:1px solid #eceef2;border-radius:14px}
.account-row strong{display:block;font-size:15px}.account-row p{margin:3px 0 0;color:var(--account-muted);font-size:13px}.account-row-actions{display:flex;align-items:center;gap:8px}
.account-row-actions a,.account-row-actions button{min-height:44px;padding:8px 12px;border-radius:10px;font-size:13px;font-weight:650;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.account-row-actions a{background:#171719;color:#fff;border:1px solid #171719}.account-row-actions button{background:#fff;color:#6b7280;border:1px solid #d9dde5}
.account-muted{color:var(--account-muted);margin:12px 0}.account-status{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100vw - 32px);padding:9px 12px;border-radius:10px;background:#171719;color:#fff;font-size:13px;opacity:0;pointer-events:none;transition:opacity .16s}.account-status.show{opacity:1}
@media(max-width:640px){.account-shell{width:calc(100% - 24px);padding-top:18px}.account-profile{grid-template-columns:58px minmax(0,1fr);padding:16px;gap:12px}.account-avatar{width:58px;height:58px}.account-profile h1{font-size:21px}.account-profile>.account-quiet{grid-column:1/-1;width:100%}.account-stats{gap:8px}.account-stats a{padding:13px 14px;display:block}.account-stats strong{display:block;font-size:24px}.account-stats span{font-size:13px}.account-section{padding:15px}.account-section-head{align-items:flex-start}.account-row{grid-template-columns:1fr}.account-row-actions{justify-content:flex-start}.account-center{padding:28px 20px}}
@media(prefers-reduced-motion:reduce){.account-spinner{animation:none}}


/* =========================================================
   ACCOUNT UX MASTER V1.0 — 2026-09-23
   Visual hardening only: accessibility, tablet balance,
   long-name containment and mobile safe-area handling.
   ========================================================= */
.account-primary:focus-visible,
.account-quiet:focus-visible,
.account-link:focus-visible,
.account-stats a:focus-visible,
.account-section-head>a:focus-visible,
.account-row-actions a:focus-visible,
.account-row-actions button:focus-visible{
  outline:3px solid #1655bc;
  outline-offset:2px;
}
.account-primary,.account-quiet,.account-stats a,.account-section-head>a{
  -webkit-tap-highlight-color:transparent;
}
.account-section-head>a,
.account-link{
  min-height:44px;
  display:inline-flex;
  align-items:center;
}
.account-stats a{min-height:72px}
.account-row>div:first-child{min-width:0}
.account-row strong,.account-row p{
  overflow-wrap:anywhere;
}
@media(min-width:641px) and (max-width:1024px){
  .account-shell{width:calc(100% - 32px);padding-top:24px}
  .account-profile{grid-template-columns:68px minmax(0,1fr) auto;padding:20px;gap:16px}
  .account-avatar{width:68px;height:68px}
  .account-profile h1{font-size:24px}
  .account-section{padding:20px}
}
@media(max-width:640px){
  .account-section-head{flex-wrap:wrap;gap:8px 12px}
  .account-section-head>a{margin-left:auto}
  .account-row-actions{flex-wrap:wrap}
  .account-row-actions a,.account-row-actions button{flex:0 0 auto}
}


/* =========================================================
   ACCOUNT UX V1.1 — VISUAL MEMORY + SAVED TIMESTAMP
   Product imagery is the primary recognition aid; model code
   remains secondary. Geometry stays responsive and touch-safe.
   ========================================================= */
.account-row-product{
  grid-template-columns:88px minmax(0,1fr) auto;
  gap:14px;
}
.account-row-compare{
  grid-template-columns:118px minmax(0,1fr) auto;
  gap:14px;
}
.account-row-copy{min-width:0}
.account-product-media{
  width:88px;height:88px;border-radius:12px;overflow:hidden;
  background:#f7f8fa;border:1px solid #eceef2;
  display:grid;place-items:center;text-decoration:none;
}
.account-product-media img,
.account-compare-thumb img{
  width:100%;height:100%;object-fit:contain;display:block;background:#fff;
}
.account-media-placeholder{
  width:100%;height:100%;min-height:54px;
  display:grid;place-items:center;align-content:center;gap:2px;
  color:#9aa1ad;background:#f7f8fa;
}
.account-media-placeholder svg{
  width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
}
.account-media-placeholder small{font-size:9px;font-weight:600}
.account-saved-time{
  margin-top:5px!important;color:#8a94a6!important;font-size:11.5px!important;
  font-variant-numeric:tabular-nums;
}
.account-compare-thumbs{
  width:118px;min-height:76px;display:flex;align-items:center;
  padding-left:2px;
}
.account-compare-thumb{
  width:68px;height:68px;border-radius:12px;overflow:hidden;
  display:grid;place-items:center;background:#fff;border:2px solid #fff;
  box-shadow:0 0 0 1px #e5e7eb;
  margin-left:calc(var(--thumb-index,0) * -42px);
  z-index:calc(10 - var(--thumb-index,0));
}
.account-compare-thumb:first-child{margin-left:0}
.account-compare-more{
  margin-left:-18px;z-index:20;min-width:32px;height:32px;border-radius:999px;
  display:grid;place-items:center;background:#171719;color:#fff;
  font-size:11px;font-weight:700;border:2px solid #fff;
}
@media(min-width:641px) and (max-width:1024px){
  .account-row-product{grid-template-columns:82px minmax(0,1fr) auto}
  .account-product-media{width:82px;height:82px}
  .account-row-compare{grid-template-columns:110px minmax(0,1fr) auto}
  .account-compare-thumbs{width:110px}
}
@media(max-width:640px){
  .account-row-product{
    grid-template-columns:76px minmax(0,1fr);
    align-items:start;
  }
  .account-product-media{width:76px;height:76px}
  .account-row-product .account-row-actions{
    grid-column:1/-1;padding-top:2px;
  }
  .account-row-compare{
    grid-template-columns:104px minmax(0,1fr);
    align-items:start;
  }
  .account-row-compare .account-row-actions{
    grid-column:1/-1;padding-top:2px;
  }
  .account-compare-thumbs{width:104px;min-height:68px}
  .account-compare-thumb{width:60px;height:60px;margin-left:calc(var(--thumb-index,0) * -38px)}
}
