/* Stable account control across all pages and both Firebase auth states. */
.lmk-auth-trigger{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  box-sizing:border-box;width:104px;min-width:104px;max-width:104px;flex:0 0 104px;height:38px;min-height:38px;max-height:38px;padding:5px 9px 5px 6px;
  border:1px solid var(--line,var(--ln,rgba(128,136,151,.35)));
  border-radius:999px;
  background:color-mix(in srgb,var(--surface,var(--bg,#fff)) 88%,var(--text,var(--tx,#101827)) 12%);
  color:var(--text,var(--tx,#111214));
  font-family:"Bricolage Grotesque",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:12px;font-weight:650;line-height:1;white-space:nowrap;
  cursor:pointer;position:relative;isolation:isolate;
  transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.lmk-auth-trigger:hover{filter:none;transform:translateY(-1px);
  border-color:color-mix(in srgb,currentColor 38%,transparent);
  box-shadow:0 5px 15px rgba(0,0,0,.09)}
.lmk-auth-trigger:active{transform:translateY(0)}
.lmk-auth-trigger:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.lmk-auth-avatar{display:grid;place-items:center;flex:none;width:26px;height:26px;
  border-radius:50%;background:color-mix(in srgb,currentColor 8%,transparent)}
.lmk-auth-avatar svg{width:16px;height:16px;fill:none;stroke:currentColor;
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.lmk-auth-label{display:block;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.005em}
/* All states use the same geometry; never collapse the label while Firebase checks. */
.lmk-auth-trigger[data-auth-state="checking"]{justify-content:center}
.lmk-auth-trigger[data-auth-state="checking"] .lmk-auth-label{display:block}

.lmk-auth-indicator{position:absolute;left:24px;top:4px;width:9px;height:9px;
  border-radius:50%;border:2px solid var(--surface,var(--bg,#fff));background:#39b883;
  opacity:0;transform:scale(.5);transition:opacity .2s ease,transform .2s ease}
.lmk-auth-trigger[data-auth-state="signed-in"] .lmk-auth-indicator{opacity:1;transform:scale(1)}
.controls:has(>.lmk-auth-trigger)>.theme-btn,
.nav-actions:has(>.lmk-auth-trigger)>.theme-btn{margin-left:0!important;box-shadow:none!important}

/* Header account is the same fixed pill on Studio, Games and interior pages.
   Override older mobile circular and stretchy header rules without changing dialogs. */
.lmk-site-header .lmk-header-actions>.lmk-auth-trigger{
  box-sizing:border-box!important;display:inline-flex!important;
  width:104px!important;min-width:104px!important;max-width:104px!important;
  flex:0 0 104px!important;
  height:38px!important;min-height:38px!important;max-height:38px!important;
  padding:5px 9px 5px 6px!important;gap:8px!important;
  justify-content:flex-start!important;align-items:center!important;
  border-radius:999px!important;white-space:nowrap!important;
  font:650 12px/1 "Bricolage Grotesque",Inter,system-ui,sans-serif!important;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-avatar{
  display:grid!important;place-items:center!important;
  flex:0 0 26px!important;width:26px!important;height:26px!important;
}
.lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-avatar svg{
  display:block!important;width:16px!important;height:16px!important;
}
.lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-label{
  display:block!important;min-width:0!important;flex:1 1 auto!important;
  font:inherit!important;overflow:hidden!important;text-overflow:ellipsis!important;
  white-space:nowrap!important;text-align:left!important;
}
.lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-indicator{
  position:absolute!important;left:24px!important;top:4px!important;
  width:9px!important;height:9px!important;pointer-events:none!important;
}
/* Mobile account button remains a circle in every Firebase state and on every page. */
@media(max-width:700px){
  .lmk-site-header .lmk-header-actions>.lmk-auth-trigger{
    box-sizing:border-box!important;display:inline-flex!important;
    width:39px!important;min-width:39px!important;max-width:39px!important;
    flex:0 0 39px!important;height:39px!important;min-height:39px!important;max-height:39px!important;
    padding:5px!important;gap:0!important;align-items:center!important;justify-content:center!important;
    border-radius:50%!important;aspect-ratio:1!important;
  }
  .lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-avatar{
    display:grid!important;place-items:center!important;
    flex:0 0 27px!important;width:27px!important;height:27px!important;
  }
  .lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-label{display:none!important}
  .lmk-site-header .lmk-header-actions>.lmk-auth-trigger .lmk-auth-indicator{
    left:auto!important;right:3px!important;top:3px!important;
    width:9px!important;height:9px!important;
  }
  .lmk-site-header .lmk-header-actions>.lmk-auth-trigger:hover{transform:none!important}
}

.lmk-account-nav{display:flex;align-items:center;justify-content:end;padding-right:10px}
.lmk-account-nav .lmk-auth-trigger{background:#fff;color:#111214;border-color:#111214}
@media(prefers-reduced-motion:reduce){.lmk-auth-trigger,.lmk-auth-indicator{transition:none!important}}
.lmk-auth-dialog{width:min(430px,calc(100vw - 28px));max-height:min(92dvh,740px);
  border:1px solid var(--line,#dcdeda);border-radius:24px;
  padding:0;margin:auto;box-shadow:0 25px 90px rgba(0,0,0,.25);
  background:var(--surface,#fff);color:var(--text,#111214);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif}
.lmk-auth-dialog::backdrop{background:rgba(5,7,13,.62);backdrop-filter:blur(6px)}
.lmk-auth-window{position:relative;overflow:auto;max-height:min(92dvh,740px);padding:31px}
.lmk-auth-close{position:absolute;right:16px;top:14px;width:34px;height:34px;border:0;
  border-radius:50%;background:var(--soft,#efefeb);color:inherit;font-size:26px;cursor:pointer}
.lmk-auth-mark{display:flex;align-items:center;gap:9px;font-size:15px;font-weight:650;margin:4px 0 27px}
.lmk-auth-mark img{width:30px;height:30px;object-fit:contain}
.lmk-auth-title{font-size:27px;font-weight:750;line-height:1.16;letter-spacing:-.04em;margin:0 0 10px}
.lmk-auth-description{margin:0 0 22px;color:var(--muted,#686d75);font-size:13px;line-height:1.55}
.lmk-auth-choice{display:grid;gap:11px}
.lmk-auth-choice button{width:100%;display:flex;gap:12px;align-items:center;justify-content:center;
  border:1px solid var(--line,#dcdeda);border-radius:13px;padding:13px 16px;
  background:var(--surface,#fff);color:inherit;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.lmk-auth-choice button:hover{background:var(--soft,#efefeb)}
.lmk-google-g{font-weight:850;font-size:21px;color:#4285f4}
.lmk-auth-form{display:grid;gap:16px}
.lmk-auth-form[hidden],.lmk-auth-choice[hidden],.lmk-auth-email-links[hidden],.lmk-auth-profile[hidden],
.lmk-password-field[hidden],.lmk-auth-verify[hidden]{display:none!important}
.lmk-auth-form label{display:grid;gap:7px;font-size:13px;font-weight:600}
.lmk-auth-form input{width:100%;box-sizing:border-box;border:1px solid var(--line,#dcdeda);
  border-radius:11px;padding:13px;background:var(--surface,#fff);color:var(--text,#111214);
  font:inherit;font-size:15px}
.lmk-auth-form input:focus{outline:2px solid #829ef7;outline-offset:1px}
.lmk-auth-submit,.lmk-auth-signout,.lmk-auth-verify{border:0;border-radius:11px;
  width:100%;padding:13px 16px;font:inherit;font-size:14px;font-weight:650;cursor:pointer}
.lmk-auth-submit{background:#111214;color:#fff}
html[data-theme="dark"] .lmk-auth-submit{background:#f1f2f4;color:#111214}
.lmk-auth-email-links{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-top:13px}
.lmk-auth-email-links button{border:0;background:transparent;color:var(--text,#111214);font-size:12px;cursor:pointer;text-decoration:underline}
.lmk-auth-email-links .lmk-auth-back{width:100%;text-align:center;margin-top:10px;color:var(--muted,#686d75)}
.lmk-auth-profile{display:grid;gap:9px}
.lmk-auth-profile-name{font-size:19px;font-weight:700;overflow-wrap:anywhere}
.lmk-auth-profile-email{font-size:13px;color:var(--muted,#686d75);overflow-wrap:anywhere}
.lmk-auth-profile-state{font-size:12px;color:var(--muted,#686d75)}
.lmk-auth-account-info,.lmk-auth-account-delete{font-size:12px;line-height:1.5;color:var(--muted,#686d75)}
.lmk-auth-signout{border:1px solid var(--line,#dcdeda);background:var(--soft,#efefeb);color:var(--text,#111214)}
.lmk-auth-verify{background:#111214;color:white}
.lmk-auth-message{min-height:0;margin:13px 0 0;color:#16804c;font-size:12px;line-height:1.5}
.lmk-auth-message:empty{display:none}
.lmk-auth-error{color:#c03a35}
.lmk-auth-legal{font-size:11px;color:var(--muted,#686d75);margin:20px 0 0;line-height:1.5}
.lmk-auth-legal a{color:var(--text,#111214);text-decoration:underline}
.lmk-auth-dialog button:disabled{opacity:.55;cursor:wait}
@media(max-width:700px){.lmk-auth-label{display:none}.lmk-auth-trigger{width:39px;min-height:39px;min-width:39px;padding:5px}
 .lmk-auth-avatar{width:27px;height:27px}.lmk-auth-indicator{left:26px;top:3px}.lmk-auth-window{padding:25px 22px}
 .lmk-account-nav{padding-right:5px}}

/* Only phones use the appearance control within the account dialog. */
.lmk-auth-appearance{display:none}
.lmk-auth-appearance[hidden]{display:none!important}
@media(max-width:700px){
  .controls>.theme-btn,.nav-actions>.theme-btn,.tester-controls>.tester-theme{display:none!important}
  .lmk-auth-appearance:not([hidden]){display:flex;align-items:center;justify-content:space-between;
    gap:12px;border-top:1px solid var(--line,#dcdeda);padding:16px 0 0;margin-top:19px}
  .lmk-auth-appearance-title{font-size:13px;font-weight:600;color:var(--text,#111214)}
  .lmk-auth-theme-switch{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line,#dcdeda);
    border-radius:999px;padding:8px 13px;background:var(--soft,#efefeb);color:var(--text,#111214);
    font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
  .lmk-auth-theme-switch:hover{filter:brightness(.96)}
}
