/* Maestro · Grain · ACCOUNTS, shared by every page (landing, /account, /link).
   Loaded after styles.css and sections.css. Adds only: the island's "Sign in" pill and signed-in chip,
   the glass recipe, avatars, the Google button, the sign-in modal / phone bottom sheet and the toast.
   Nothing here restyles an existing landing-page class except the island on phones (approved design). */

/* shared glass recipe (= the island puck / ghost button) */
.glass {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(90% 120% at 50% 0%, rgba(255, 244, 226, .13), rgba(255, 244, 226, .03) 70%, transparent), rgba(242, 240, 234, .035);
  box-shadow: inset 0 0 0 1px rgba(242, 240, 234, .13), inset 0 1px 0 rgba(255, 244, 226, .14);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background-image: var(--noise); background-size: 140px; opacity: .2; mix-blend-mode: screen;
}

/* =================================================================== header island: signed out / signed in */
.isl__signin {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; margin-left: 8px; border-radius: 999px;
  font: 500 13.5px/1 var(--sans); letter-spacing: -0.005em; color: var(--ink); white-space: nowrap;
  transition: height .7s var(--ease), padding .7s var(--ease), background .3s var(--ease);
}
.isl__signin:hover { background-color: rgba(242, 240, 234, .08); }
.isl__signin:focus-visible, .isl__me:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.isl__me {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 4px 0 14px; margin-left: 8px; border-radius: 999px;
  white-space: nowrap; transition: height .7s var(--ease);
}
.isl__me .cr { display: inline-flex; align-items: baseline; gap: 6px; font: 500 13px/1 var(--mono); letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.isl__me .cr i { align-self: center; width: 6px; height: 6px; border-radius: 50%; background: #e7cb8c; box-shadow: 0 0 8px 1px rgba(231, 203, 140, .55); margin-right: 2px; }
.isl__me .cr span { font: 400 12.5px/1 var(--sans); letter-spacing: 0; color: var(--ink-3); }
.isl__me .av { width: 32px; height: 32px; font-size: 12px; transition: width .7s var(--ease), height .7s var(--ease); }
.isl__signin[hidden], .isl__me[hidden] { display: none; }
.isl__nav--plain .isl__puck { display: none; }
.isl--min .isl__shell { padding-right: 6px; }
.isl.is-compact .isl__signin { height: 34px; padding: 0 14px; font-size: 13px; }
.isl.is-compact .isl__me { height: 34px; padding-left: 12px; }
.isl.is-compact .isl__me .av { width: 28px; height: 28px; font-size: 11px; }

/* avatar: the Google profile photo over initials on a gold tile (the fallback) */
.av {
  position: relative; overflow: hidden;
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font: 500 14px/1 var(--sans); letter-spacing: .02em; color: #1d1608;
  background: radial-gradient(120% 120% at 30% 20%, #fbefc8, #dcbc76 45%, #a9833f 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 0 0 2.5px rgba(242, 240, 234, .16);
}
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av--sky { background: radial-gradient(120% 120% at 30% 20%, #e9eef5, #9fb0c8 50%, #5d6d86 100%); color: #10151d; }

/* =================================================================== Google button (Google sign-in branding, light theme)
   white fill, #747775 1px stroke, #1F1F1F Roboto Medium, the standard four-colour G, unaltered; pill shape is allowed */
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 48px; padding: 0 16px;
  border-radius: 999px; background: #fff; border: 1px solid #747775; color: #1f1f1f;
  font: 500 15px/20px "Roboto", Arial, sans-serif; letter-spacing: .25px; cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), box-shadow .35s var(--ease);
}
.gbtn:hover { background: #f8f9fa; box-shadow: 0 0 26px -6px rgba(255, 244, 226, .35); }
.gbtn:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.gbtn[aria-busy="true"] { cursor: progress; background: #f1f3f4; }
.gbtn svg { width: 20px; height: 20px; flex: none; }

/* =================================================================== sign-in modal (bottom sheet on phones) */
.scrim {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, .58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .45s var(--ease);
}
.scrim[hidden] { display: none; }
.scrim.is-in { opacity: 1; }
.auth {
  position: relative; width: min(440px, 100%); padding: 46px 40px 28px; border-radius: 28px; text-align: center; isolation: isolate; overflow: hidden;
  background: rgba(10, 10, 11, .88); border: 1px solid rgba(242, 240, 234, .14);
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 226, .07), 0 50px 140px -30px rgba(0, 0, 0, .95);
  transform: translateY(14px) scale(.985); transition: transform .6s var(--ease);
}
.scrim.is-in .auth { transform: none; }
.auth::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background-image: var(--noise); background-size: 160px; opacity: .07; mix-blend-mode: screen; }
.auth::after { content: ""; position: absolute; left: 22%; right: 22%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 244, 226, .55), transparent); }
.auth__x {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center;
  color: var(--ink-2); cursor: pointer;
}
.auth__x:hover { color: var(--ink); }
.auth__x:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.auth__grab { display: none; }
.auth__icon { width: 58px; height: 58px; margin: 0 auto 24px; border-radius: 17px; display: grid; place-items: center; }
.auth__icon img { width: 30px; height: 30px; filter: invert(1); mix-blend-mode: screen; border-radius: 7px; }
.auth .kicker { justify-content: center; margin-bottom: 16px; }
.auth .kicker::after, .center-kicker::after { content: ""; width: 28px; height: 1px; background: var(--ink-3); }
.auth .h2 { font-size: 46px; max-width: none; margin-bottom: 16px; }
.auth .body { font-size: 15px; line-height: 1.55; max-width: 33ch; margin: 0 auto 30px; }
.auth__new { margin-top: 14px; font: 400 13px/1.5 var(--sans); color: var(--ink-3); }
.auth__legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hair); font: 400 12.5px/1.6 var(--sans); color: var(--ink-3); }
.auth__legal .u, .u { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
html.auth-open, html.auth-open body { overflow: hidden; }

/* =================================================================== toast + preview tag */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90; translate: -50% 0; max-width: min(520px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 999px;
  background: rgba(10, 10, 11, .9); border: 1px solid rgba(242, 240, 234, .16);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 226, .07), 0 30px 80px -20px rgba(0, 0, 0, .9);
  font: 400 14px/1.4 var(--sans); color: var(--ink);
  opacity: 0; transform: translateY(12px); transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #e7cb8c; box-shadow: 0 0 10px 1px rgba(231, 203, 140, .6); }
.toast--warn i { background: #f0a08c; box-shadow: 0 0 10px 1px rgba(240, 160, 140, .55); }
.preview-tag {
  position: fixed; left: 16px; bottom: 16px; z-index: 80; padding: 8px 12px; border-radius: 999px; pointer-events: none;
  font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  background: rgba(8, 8, 9, .7); box-shadow: inset 0 0 0 1px var(--hair);
}
html.auth-open .preview-tag { display: none; }

/* =================================================================== /auth/google (Google returns here) */
.cb .lcard__wait { min-height: 220px; }
.cb .body { margin-bottom: 30px; }
.cb__bar { position: relative; display: block; height: 1px; overflow: hidden; background: var(--hair); }
.cb__bar i { position: absolute; top: 0; bottom: 0; width: 36%; background: linear-gradient(90deg, transparent, var(--glow), transparent); animation: cb-run 1.6s var(--ease) infinite; }
@keyframes cb-run { from { left: -36%; } to { left: 100%; } }

/* =================================================================== phone */
@media (max-width: 760px) {
  /* island: brand · Sign in / credits chip · Download (icon) · menu */
  .isl__signin { margin-left: auto; height: 38px; padding: 0 14px; font-size: 13px; }
  .isl__me { margin-left: auto; height: 40px; gap: 8px; padding-left: 12px; }
  .isl__me .cr span { display: none; }
  .isl__cta { order: 1; width: 40px; padding: 0; justify-content: center; margin-left: auto; }
  .isl__signin:not([hidden]) ~ .isl__cta, .isl__me:not([hidden]) ~ .isl__cta { margin-left: 6px; }
  .isl.is-compact .isl__cta { width: 36px; padding: 0; }
  .isl__cta span { display: none; }
  .isl__menu { order: 2; margin-left: 2px; }
  .isl.is-compact .isl__signin { height: 36px; }
  .isl.is-compact .isl__me { height: 36px; }

  .scrim { place-items: end center; padding: 0; }
  .auth { width: 100%; border-radius: 28px 28px 0 0; padding: 30px 22px 30px; border-bottom: 0; transform: translateY(40px); }
  .auth__grab { display: block; width: 38px; height: 4px; border-radius: 9px; background: var(--hair-2); margin: 0 auto 22px; }
  .auth__x { top: 16px; right: 12px; }
  .auth__icon { width: 52px; height: 52px; margin-bottom: 18px; border-radius: 15px; }
  .auth .h2 { font-size: 38px; }
  .auth .body { margin-bottom: 24px; }
  .toast { bottom: 18px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .scrim, .auth, .toast { transition-duration: .01s; }
  .cb__bar i { animation: none; left: 32%; }
}
