/* My KOKO (homebotone.com/account). The sign-in page is rendered by
   src/worker/account.js; the signed-in app (sidebar, dashboard, settings) by
   src/worker/account-dashboard.js, further down.
   Colors follow the homepage's light theme, like chrome.css. */

.account-page {
  --acct-ink: #17332a;
  --acct-muted: #66746c;
  --acct-surface: #fbfaf5;
  --acct-page: #f2f0e8;
  --acct-green: #286a42;
  --acct-mint: #e2f2ce;
  --acct-line: rgb(23 51 42 / 0.12);
  background: var(--acct-page);
  color: var(--acct-ink);
  font-family: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.account {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
}

.account-card {
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--acct-line);
  border-radius: 24px;
  background: var(--acct-surface);
  box-shadow: 0 18px 50px rgb(22 49 39 / 0.06);
}

.account-card .eyebrow {
  color: var(--acct-green);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 500;
}

.account-card h1 {
  margin: 0 0 18px;
  font: 700 clamp(2.1rem, 6vw, 3rem) / 1.02 "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.035em;
}

.account-card h2 {
  margin: 0 0 10px;
  font: 700 1.3rem / 1.2 "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.account-card p {
  max-width: none;
  margin: 0 0 16px;
  color: #33453c;
  font-size: 1.02rem;
  line-height: 1.6;
}

.account-card a:not(.account-btn) {
  color: var(--acct-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-card .account-muted {
  color: var(--acct-muted);
  font-size: 0.94rem;
}

.account-notice {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--acct-mint);
}

.account-card .account-notice {
  color: var(--acct-ink);
  font-weight: 600;
}

.account-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--acct-line);
  color: var(--acct-muted);
  overflow-wrap: anywhere;
}

.account-who strong {
  color: var(--acct-ink);
}

.account-who form,
.account-section form {
  margin: 0;
}

.account-section {
  padding: 26px 0 4px;
}

.account-section + .account-section {
  border-top: 1px solid var(--acct-line);
}

.account-btn {
  display: inline-flex;
  min-height: 46px;
  padding: 12px 20px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--acct-ink);
  color: var(--acct-surface);
  font: 600 0.98rem "Figtree", ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.account-btn:hover {
  background: var(--acct-green);
}

.account-btn-quiet {
  border: 1px solid var(--acct-line);
  background: transparent;
  color: var(--acct-ink);
}

.account-btn-quiet:hover {
  background: var(--acct-page);
}

.account-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--acct-green);
  font: 600 0.95rem "Figtree", ui-sans-serif, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.account-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--acct-line);
}

.account-status {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--acct-mint);
  color: var(--acct-green);
  font-size: 0.86rem;
  font-weight: 600;
}

.account-btn:focus-visible,
.account-link:focus-visible {
  outline: 3px solid #95d95a;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .account-btn {
    transition: none;
  }
}

/* ---------- Signed-in app: sidebar, dashboard, settings ---------- */

.acct-app {
  --ink: #17332a;
  --text: #2c3f35;
  --muted: #6c776f;
  --card: #fffdf8;
  --line: rgb(23 51 42 / 0.09);
  --lime: #c8ec86;
  --lime-soft: #edf6dc;
  --green: #4b8a2c;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  display: grid;
  min-height: 100vh;
  margin: 0;
  grid-template-columns: 236px minmax(0, 1fr);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgb(255 236 200 / 0.75), transparent 60%),
    linear-gradient(180deg, #f8f2e7, #f4efe4);
  color: var(--text);
  font: 400 16px/1.5 "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.acct-app *,
.acct-app *::before,
.acct-app *::after {
  box-sizing: border-box;
}

.acct-app a {
  color: inherit;
}

.acct-skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff !important;
}

.acct-skip:focus {
  top: 12px;
}

.acct-icon {
  flex: none;
  width: 22px;
  height: 22px;
}

/* Sidebar */
.acct-side {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px 14px 18px;
  border-radius: 0 26px 26px 0;
  background: rgb(255 253 248 / 0.92);
  box-shadow: 8px 0 40px rgb(80 60 20 / 0.05);
}

.acct-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 36px;
  color: var(--ink) !important;
  font: 800 1.6rem/1 var(--display);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.acct-logo img {
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.acct-side ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.acct-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.04rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

a.acct-nav-item:hover {
  background: rgb(23 51 42 / 0.05);
}

.acct-nav-item[aria-current="page"] {
  background: var(--lime-soft);
  font-weight: 700;
}

.acct-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 16px 10px 4px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.acct-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 700 1.1rem var(--display);
}

.acct-user-text {
  display: grid;
  min-width: 0;
}

.acct-user-text strong {
  color: var(--ink);
  font-size: 1rem;
}

.acct-user-text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Main column */
.acct-main {
  width: min(1240px, 100%);
  padding: clamp(28px, 4vw, 52px) clamp(20px, 3.4vw, 48px) 56px;
}

.acct-hello {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}

.acct-sun {
  width: 72px;
  height: 46px;
  flex: none;
}

.acct-hello h1 {
  margin: 0;
  color: var(--ink);
  font: 800 clamp(2.1rem, 4.2vw, 3.4rem)/1.05 var(--display);
  letter-spacing: -0.035em;
}

.acct-hello p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.acct-hello p a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.acct-banner {
  margin: -8px 0 24px;
  padding: 14px 18px;
  border: 1px dashed rgb(75 138 44 / 0.45);
  border-radius: 14px;
  background: rgb(237 246 220 / 0.7);
  color: var(--ink);
}

.acct-banner a {
  margin-left: 6px;
  color: var(--green);
  font-weight: 700;
}

.acct-banner.is-done {
  border-style: solid;
  margin-top: 0;
  font-weight: 600;
}

.acct-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr) minmax(0, 0.85fr);
  gap: 20px;
}

.acct-card {
  min-width: 0;
  padding: 26px 24px;
  border: 1px solid rgb(255 255 255 / 0.8);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 40px rgb(90 70 30 / 0.07);
}

.acct-card h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font: 700 1.55rem/1.15 var(--display);
  letter-spacing: -0.02em;
}

.acct-card p {
  margin: 0 0 14px;
}

.acct-empty {
  color: var(--muted);
}

/* KOKO card: the photo fills it */
.acct-koko {
  position: relative;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 0;
  background: #d9c3a0;
}

.acct-koko img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 40%;
}

.acct-koko::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(40 28 10 / 0.42), transparent 34%, transparent 58%, rgb(25 18 6 / 0.55));
}

.acct-koko-text,
.acct-koko-foot {
  position: relative;
  z-index: 1;
  padding: 26px 28px;
}

.acct-koko h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  text-shadow: 0 2px 16px rgb(0 0 0 / 0.25);
}

.acct-koko-foot p {
  margin: 0 0 12px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.35);
}

.acct-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.acct-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b9bfb7;
}

.acct-pill.is-online {
  background: #eaf7d6;
  color: #2f6b1a;
}

.acct-pill.is-online::before {
  background: #4caf2a;
}

/* Today */
.acct-timeline {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  gap: 16px;
  list-style: none;
}

.acct-timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 9px;
  width: 2px;
  background: #cfe4b0;
}

.acct-timeline li {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
}

.acct-dot {
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 2.5px solid #a6cf74;
  border-radius: 50%;
  background: var(--card);
}

.is-done .acct-dot {
  border-color: #6fb33c;
  background: #8fcf4f;
}

.acct-timeline li > div {
  min-height: 70px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f6f3ea;
}

.acct-timeline small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.acct-timeline strong {
  color: var(--ink);
  font-size: 1.04rem;
}

.acct-done {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #6fb33c;
  color: #fff;
  transform: translateY(-50%);
}

.acct-done .acct-icon {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.acct-timeline.is-empty li > div {
  min-height: 54px;
  background: repeating-linear-gradient(135deg, #f6f3ea 0 10px, #f2eee3 10px 20px);
}

.acct-timeline.is-empty + .acct-empty {
  margin-top: 18px;
}

/* Quick actions */
.acct-actions ul,
.acct-family,
.acct-highlights,
.acct-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.acct-actions ul {
  display: grid;
  gap: 12px;
}

.acct-action {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #f4f6ea;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.acct-action .acct-icon {
  color: #3d6e22;
}

.acct-action .acct-chev {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--ink);
}

a.acct-action:hover {
  background: #e9eedb;
  transform: translateX(2px);
}

.acct-action.is-primary {
  background: var(--lime);
}

a.acct-action.is-primary:hover {
  background: #bce570;
}

.acct-action[aria-disabled="true"] {
  cursor: default;
}

/* Family circle */
.acct-family {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
}

.acct-family li {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.acct-face {
  display: grid;
  width: 104px;
  height: 104px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 50%;
  background: #eef3e4;
  color: var(--ink);
  font: 700 2.2rem var(--display);
}

.acct-face.is-1 { background: #dcefc6; }
.acct-face.is-2 { background: #fbe3c4; }
.acct-face.is-3 { background: #f8d9d0; }

.acct-family small {
  color: var(--muted);
}

.acct-family.is-empty .acct-face {
  width: 84px;
  height: 84px;
  border: 2px dashed #c9d6b8;
  background: transparent;
  color: #9fb08e;
}

.acct-family.is-empty + .acct-empty {
  margin-top: 18px;
}

/* Home highlights */
.acct-highlights li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.acct-highlights li + li {
  border-top: 1px solid var(--line);
}

.acct-chip {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--lime-soft);
  color: #3d6e22;
}

.acct-family-card {
  grid-column: 1;
}

.acct-highlights-card {
  grid-column: 2 / 4;
}

/* Settings */
.acct-hello.is-plain {
  margin-bottom: 22px;
}

.acct-stack {
  display: grid;
  max-width: 720px;
  gap: 20px;
}

.acct-stack form {
  margin: 0;
}

.acct-stack a:not(.acct-btn) {
  color: var(--green);
  font-weight: 600;
}

.acct-muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.acct-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.acct-list + .acct-muted {
  margin-top: 14px;
}

.acct-btn {
  display: inline-flex;
  min-height: 46px;
  padding: 12px 20px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fffdf8 !important;
  font: 600 0.98rem "Figtree", ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.acct-btn:hover {
  background: #286a42;
}

.acct-btn.is-quiet {
  border: 1px solid rgb(23 51 42 / 0.16);
  background: transparent;
  color: var(--ink) !important;
}

.acct-btn.is-quiet:hover {
  background: #f4efe4;
}

.acct-app a:focus-visible,
.acct-app button:focus-visible {
  outline: 3px solid #95d95a;
  outline-offset: 3px;
}

/* ---------- KOKO, Family, Routines, Memories, Settings ---------- */

.acct-page-head {
  margin-bottom: 26px;
}

.acct-head-icon {
  display: grid;
  width: 60px;
  height: 60px;
  flex: none;
  place-items: center;
  border: 2.5px solid #4b8a2c;
  border-radius: 18px;
  color: #4b8a2c;
}

.acct-head-icon .acct-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.acct-sample-link {
  margin-left: 6px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.acct-card h3 {
  margin: 22px 0 10px;
  color: var(--ink);
  font: 700 1.1rem/1.2 var(--display);
}

.acct-grid-2 {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.acct-grid-family {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.acct-grid-family .acct-span-2:first-child {
  grid-column: auto;
}

.acct-grid-routines {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.acct-routine-today {
  grid-row: span 2;
}

.acct-grid-memories {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
}

.acct-recent {
  grid-row: span 2;
}

.acct-span-all {
  grid-column: 1 / -1;
}

.acct-grid-family > .acct-span-2:last-child {
  grid-column: 2;
}

.acct-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 8px;
  background: #f1efe6;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.acct-tag .acct-icon {
  width: 14px;
  height: 14px;
}

.acct-pill.is-place::before {
  display: none;
}

.acct-pill .acct-icon {
  width: 16px;
  height: 16px;
}

.acct-koko-text .acct-pill + .acct-pill {
  margin-top: 8px;
}

.acct-koko-text .acct-pill {
  margin-right: 6px;
}

/* Rows of icon, label, value or control */
.acct-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.acct-rows li {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  color: var(--ink);
}

.acct-rows li + li {
  border-top: 1px solid var(--line);
}

.acct-rows li > span:nth-child(2),
.acct-rows li > a {
  flex: 1;
  min-width: 0;
}

.acct-rows li > span:nth-child(2) small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.acct-rows li > strong {
  margin-left: auto;
}

.acct-rows.is-links a {
  color: var(--ink) !important;
  font-weight: 500;
  text-decoration: none;
}

.acct-rows .acct-chev {
  width: 18px;
  height: 18px;
}

.acct-timeline.is-compact {
  gap: 10px;
  margin-bottom: 18px;
}

.acct-timeline.is-compact li > div {
  min-height: 0;
  padding: 9px 14px;
}

.acct-timeline.is-compact strong {
  font-weight: 500;
}

.acct-timeline.is-compact::before {
  top: 14px;
  bottom: 14px;
}

.acct-wide {
  width: 100%;
}

.acct-centered {
  justify-content: center;
}

.acct-search.is-off,
.acct-action.is-off,
ul.is-off {
  opacity: 0.55;
}

/* Family */
.acct-members {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
}

.acct-members li {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}

.acct-members strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.acct-members small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-members .acct-face {
  margin: 0;
}

.acct-members li.is-open {
  align-content: center;
  border-style: dashed;
}

.acct-members li.is-open .acct-face {
  width: 72px;
  height: 72px;
  border: 2px dashed #c9d6b8;
  background: transparent;
  color: #9fb08e;
}

.acct-invite-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.acct-center {
  margin: 14px 0 !important;
  text-align: center;
}

/* Switch (role="switch"): a real form button, or an inert sample */
.acct-switch-form {
  margin: 0;
}

.acct-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d4d8cf;
  cursor: pointer;
  transition: background 0.15s ease;
}

.acct-switch > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  transition: transform 0.15s ease;
}

.acct-switch[aria-checked="true"] {
  background: #5ea52f;
}

.acct-switch[aria-checked="true"] > span {
  transform: translateX(20px);
}

.acct-switch[aria-disabled="true"] {
  cursor: default;
  opacity: 0.75;
}

/* Routines */
.acct-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.acct-days {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 30px rgb(90 70 30 / 0.06);
}

.acct-days span {
  flex: 1;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 11px;
  color: var(--text);
  font-weight: 500;
  text-align: center;
}

.acct-days .is-today {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.acct-add {
  min-height: 52px;
}

.acct-state {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ece9df;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  transform: translateY(-50%);
}

.acct-state .acct-icon {
  width: 16px;
  height: 16px;
}

.acct-state.is-done {
  background: #e3f3cc;
  color: #2f6b1a;
}

.acct-ring-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.acct-ring {
  width: 150px;
  height: 150px;
  transform: rotate(-90deg);
}

.acct-ring circle {
  fill: none;
  stroke-width: 12;
}

.acct-ring-track {
  stroke: #e8f2d6;
}

.acct-ring-fill {
  stroke: #8fcf4f;
  stroke-linecap: round;
}

.acct-ring-wrap p {
  position: absolute;
  display: grid;
  margin: 0 !important;
  text-align: center;
}

.acct-ring-wrap strong {
  color: var(--ink);
  font: 700 1.5rem/1.1 var(--display);
}

.acct-ring-wrap small {
  color: var(--muted);
}

.acct-suggest {
  display: grid;
  align-items: center;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
}

.acct-suggest img {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
}

.acct-suggest strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font: 700 1.15rem/1.2 var(--display);
}

.acct-suggest p {
  margin-bottom: 10px !important;
  color: var(--muted);
  font-size: 0.92rem;
}

.acct-suggest .acct-action {
  display: inline-flex;
  min-height: 44px;
}

/* Memories */
.acct-memories {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}

.acct-memories li {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.acct-memories img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 13 / 8;
  object-fit: cover;
}

.acct-memories li > div {
  display: grid;
  padding: 10px 14px 12px;
}

.acct-memories strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.acct-memories small {
  color: var(--muted);
}

.acct-memories .acct-tag {
  position: absolute;
  right: 12px;
  bottom: 16px;
}

.acct-memories.is-empty li {
  aspect-ratio: 13 / 10;
  border-style: dashed;
  background: repeating-linear-gradient(135deg, #f6f3ea 0 10px, #f2eee3 10px 20px);
}

.acct-memories.is-empty + .acct-empty {
  margin-top: 18px;
}

.acct-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #f4f6ea;
  color: var(--text);
}

.acct-found {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.acct-found .acct-rows {
  flex: 1;
  min-width: 260px;
}

/* Settings */
.acct-settings {
  display: grid;
  align-items: start;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
}

.acct-subnav {
  position: sticky;
  top: 24px;
  padding: 12px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 40px rgb(90 70 30 / 0.07);
}

.acct-subnav ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 2px;
  list-style: none;
}

.acct-subnav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 13px;
  color: var(--ink) !important;
  font-weight: 500;
  text-decoration: none;
}

.acct-subnav a:hover {
  background: #f4f6ea;
}

.acct-subnav a[aria-current] {
  background: var(--lime-soft);
  font-weight: 700;
}

.acct-subnav .acct-chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
}

.acct-settings .acct-stack {
  max-width: none;
}

.acct-settings .acct-card {
  scroll-margin-top: 20px;
}

.acct-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin-bottom: 16px;
}

.acct-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.acct-field span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.acct-field strong {
  overflow: hidden;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4f6ea;
  color: var(--text);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-select {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 0.92rem;
}

.acct-select .acct-chev {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
}

.acct-save {
  min-height: 56px;
  font-size: 1.1rem;
}

/* ---------- KOKO World: the person's life in KOKO City ---------- */

.acct-grid-world {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

.acct-world-hero {
  position: relative;
  display: flex;
  min-height: 460px;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: #f3c98f;
}

.acct-world-hero img,
.acct-resident-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}

.acct-world-hero::after,
.acct-resident-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(20 40 60 / 0.5), transparent 42%);
}

.acct-world-hero h2,
.acct-resident-photo h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  text-shadow: 0 2px 16px rgb(0 0 0 / 0.3);
}

.acct-koko-text p {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.35);
}

.acct-dk {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acct-dk-id {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: var(--lime-soft);
}

.acct-dk-avatar {
  width: 96px;
  height: 96px;
  flex: none;
}

.acct-dk-id strong {
  display: block;
  color: var(--ink);
  font: 700 1.45rem/1.15 var(--display);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.acct-dk-id small {
  color: var(--text);
  font-size: 1rem;
}

.acct-steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.acct-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f4f6ea;
  color: var(--ink);
}

.acct-step-n {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #dcefc0;
  color: var(--ink);
  font-weight: 700;
}

.acct-steps .is-done .acct-step-n {
  background: #6fb33c;
  color: #fff;
}

.acct-step-n .acct-icon {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

.acct-step-label {
  display: grid;
  flex: 1;
  font-weight: 600;
  font-size: 1.04rem;
}

.acct-step-label small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.acct-claim {
  min-height: 60px;
  justify-content: center;
  border: 0;
  font: 700 1.25rem var(--display);
  cursor: pointer;
}

.acct-claim .acct-chev {
  margin-left: 12px;
}

.acct-how-link {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  color: var(--ink) !important;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.acct-how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
  scroll-margin-top: 20px;
}

.acct-how-card {
  display: flex;
  align-items: center;
  gap: 18px;
}

.acct-how-card h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.acct-how-card p {
  margin: 0;
  color: var(--text);
}

.acct-how-art {
  display: grid;
  width: 104px;
  height: 104px;
  flex: none;
  place-items: center;
  border-radius: 50%;
}

.acct-how-art.is-icon {
  background: #e6f3d2;
  color: #3d6e22;
}

.acct-how-art.is-icon .acct-icon {
  width: 48px;
  height: 48px;
  stroke-width: 1.6;
}

/* A resident: photo and stats in one card, then Enter KOKO City */
.acct-grid-resident {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
}

.acct-resident {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}

.acct-resident-photo {
  position: relative;
  min-height: 440px;
  background: #f3c98f;
}

.acct-resident-photo img {
  object-position: 80% 30%;
}

/* The title sits low here, clear of KOKO's head */
.acct-resident-photo::after {
  background: linear-gradient(0deg, rgb(20 30 40 / 0.6), transparent 45%);
}

.acct-resident-photo .acct-koko-text {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.acct-resident-stats {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px 22px;
}

.acct-resident-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acct-resident-name h2 {
  margin: 0;
  font-size: 1.7rem;
  overflow-wrap: anywhere;
}

.acct-resident-name small {
  color: var(--muted);
  font-size: 0.95rem;
}

.acct-dk-mini {
  width: 56px;
  height: 56px;
  flex: none;
}

.acct-stat-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.acct-stat-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f3ea;
}

.acct-stat-list li > span:last-child {
  display: grid;
  min-width: 0;
}

.acct-stat-list small {
  color: var(--muted);
  font-size: 0.84rem;
}

.acct-stat-list strong {
  color: var(--ink);
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.acct-enter {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acct-city-map {
  display: block;
  width: 100%;
  height: auto;
  flex: 1;
  border-radius: 18px;
  object-fit: cover;
}

.acct-grid-world-2 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr);
  margin-top: 20px;
}

.acct-worlds {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.acct-worlds-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.acct-worlds-pair figure {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
}

.acct-worlds-pair img,
.acct-worlds-avatar,
.acct-worlds-empty {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
}

.acct-worlds-empty {
  display: grid;
  place-items: center;
  border: 2px dashed #c9d6b8;
  color: #9fb08e;
}

.acct-worlds-empty .acct-icon {
  width: 44px;
  height: 44px;
}

.acct-worlds-pair figcaption {
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.acct-worlds-link {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  margin-bottom: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime-soft);
  color: #3d6e22;
}

.acct-worlds .acct-rows li {
  min-height: 48px;
  justify-content: space-between;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #f4f6ea;
  font-weight: 500;
}

.acct-worlds .acct-rows li > span:first-child {
  flex: 1;
}

.acct-worlds .acct-rows li > .acct-switch {
  flex: none;
}

.acct-worlds .acct-rows li + li {
  margin-top: 8px;
}

.acct-privacy-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.acct-privacy-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.acct-privacy p {
  color: var(--text);
  font-size: 1.05rem;
}

.acct-disclaimer {
  margin: 18px 4px 0;
  font-size: 0.86rem;
}

/* ---------- Reserve KOKO (deposit.js) ---------- */

.acct-grid-reserve {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.acct-reserve {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.acct-reserve form {
  margin: 0;
}

.acct-terms {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.acct-terms li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.acct-terms li > span:last-child {
  display: grid;
  gap: 2px;
}

.acct-terms strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.acct-terms small {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.acct-reserved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
}

.acct-fine {
  margin-top: 20px;
}

.acct-fine ul {
  display: grid;
  margin: 0;
  padding-left: 20px;
  gap: 8px;
  color: var(--text);
}

.acct-fine a {
  color: var(--green);
  font-weight: 600;
}

.acct-settings .acct-muted a {
  color: var(--green);
  font-weight: 600;
}

@media (max-width: 1180px) {
  .acct-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acct-koko {
    grid-row: span 2;
  }

  .acct-family-card,
  .acct-highlights-card {
    grid-column: auto;
  }

  .acct-grid-memories {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .acct-recent {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .acct-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .acct-subnav {
    position: static;
  }

  .acct-subnav ul {
    display: flex;
    flex-wrap: wrap;
  }

  .acct-subnav .acct-chev {
    display: none;
  }

  .acct-grid-world,
  .acct-grid-resident,
  .acct-grid-reserve,
  .acct-how {
    grid-template-columns: minmax(0, 1fr);
  }

  .acct-grid-world-2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .acct-worlds-card {
    grid-column: 1 / -1;
  }
}

/* Phones and small tablets: the sidebar becomes a top bar with scrolling tabs */
@media (max-width: 820px) {
  .acct-app {
    display: block;
  }

  .acct-side {
    position: sticky;
    z-index: 5;
    height: auto;
    padding: 12px 12px 10px;
    border-radius: 0 0 20px 20px;
  }

  .acct-logo {
    margin: 0 4px 10px;
    font-size: 1.3rem;
  }

  .acct-logo img {
    width: 30px;
    height: 30px;
  }

  .acct-side nav {
    margin: 0 -12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .acct-side ul {
    display: flex;
    width: max-content;
    padding: 0 12px;
    gap: 4px;
  }

  .acct-nav-item {
    padding: 8px 12px;
    gap: 8px;
    font-size: 0.95rem;
  }

  .acct-nav-item .acct-icon {
    width: 18px;
    height: 18px;
  }

  .acct-user {
    position: absolute;
    top: 10px;
    right: 12px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .acct-user-text {
    display: none;
  }

  .acct-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .acct-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .acct-koko {
    grid-row: auto;
    min-height: 380px;
  }

  .acct-hello {
    gap: 12px;
  }

  .acct-sun {
    width: 52px;
    height: 34px;
  }

  .acct-face {
    width: 84px;
    height: 84px;
  }

  .acct-grid-2,
  .acct-grid-family,
  .acct-grid-routines,
  .acct-grid-memories {
    grid-template-columns: minmax(0, 1fr);
  }

  .acct-grid-family > .acct-span-2:last-child,
  .acct-routine-today {
    grid-column: auto;
    grid-row: auto;
  }

  .acct-members {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .acct-members .acct-face,
  .acct-members li.is-open .acct-face {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .acct-members li {
    padding: 14px 4px;
  }

  .acct-members .acct-tag,
  .acct-members .acct-pill {
    max-width: 100%;
    padding: 3px 7px;
    font-size: 0.72rem;
  }

  .acct-members .acct-pill::before {
    width: 7px;
    height: 7px;
  }

  .acct-memories,
  .acct-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .acct-head-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .acct-head-icon .acct-icon {
    width: 24px;
    height: 24px;
  }

  .acct-select {
    min-width: 0;
  }

  .acct-rows li {
    flex-wrap: wrap;
  }

  .acct-world-hero {
    min-height: 320px;
  }

  .acct-resident,
  .acct-worlds,
  .acct-grid-world-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .acct-resident-photo {
    min-height: 300px;
  }

  .acct-worlds-pair img,
  .acct-worlds-avatar,
  .acct-worlds-empty {
    width: 96px;
    height: 96px;
  }

  .acct-how-art {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acct-action,
  .acct-nav-item {
    transition: none;
  }

  a.acct-action:hover {
    transform: none;
  }
}
