/* Sign-in, credits and buying: the header corner and two dialogs. */
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; }
.account .credits { border: 0; cursor: pointer; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; }
.account .credits:hover { background: #ebebe9; }
button.credits { background: var(--soft); }
button.small { padding: 6px 14px; font-size: 14px; }
button.link { background: none; color: var(--muted); padding: 4px 2px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.acct-who { color: var(--muted); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-face { width: 26px; height: 26px; border-radius: 50%; }

.acct-dialog { border: 0; border-radius: 14px; padding: 22px 24px 18px; width: min(400px, 94vw); color: var(--ink); }
.acct-dialog.wide { width: min(560px, 94vw); }
.acct-dialog::backdrop { background: rgba(10, 10, 10, .5); }
.acct-dialog h2 { margin: 0 32px 10px 0; }
.acct-dialog h3 { margin: 20px 0 6px; }
.acct-close { position: absolute; top: 10px; right: 10px; margin: 0; }
.acct-muted { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.acct-why { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--soft); box-shadow: inset 3px 0 0 var(--ink); color: var(--ink); font-weight: 600; font-size: 14px; }
.acct-google { min-height: 44px; display: flex; justify-content: center; margin: 6px 0 12px; }
.acct-google:empty { display: none; }
#signin-dev { width: 100%; }

.acct-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.acct-pack { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 14px 16px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.acct-pack:hover:not(:disabled) { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.acct-pack strong { font-size: 17px; }
.acct-pack span { font-size: 15px; }
.acct-pack small { color: var(--muted); font-weight: 400; }
.acct-pack.busy { opacity: 1; box-shadow: inset 0 0 0 2px var(--ink); }

.acct-costs { width: 100%; border-collapse: collapse; font-size: 14px; }
.acct-costs td { padding: 6px 0; border-top: 1px solid var(--line); }
.acct-costs td:last-child { text-align: right; white-space: nowrap; font-weight: 600; padding-left: 12px; }

.acct-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 30px rgba(20, 22, 35, .25); z-index: 10; }

@media (max-width: 560px) {
  .acct-who { display: none; }
}

/* A button styled with a display rule beats the browser's own [hidden] rule,
   so the test sign-in showed on the live site even with dev login off. */
[hidden] { display: none !important; }

/* "My fonts": the panel of kept fonts, and the buttons that open it. */
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.link-button:hover { text-decoration: underline; }
.library { width: min(560px, 92vw); border: 0; border-radius: 14px; padding: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22); }
.library::backdrop { background: rgba(0, 0, 0, 0.4); }
.library h2 { margin: 0 0 6px; }
.library-count { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.library-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.library-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.library-what h3 { margin: 0 0 2px; font-size: 16px; }
.library-details { margin: 0; color: var(--muted); font-size: 13px; }
.library-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.library-actions .link-button { color: var(--muted); font-size: 14px; }
.library-empty { color: var(--muted); margin: 0; padding: 18px 0; }
.library-more { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.library-more p { margin: 0; }

/* The account menu: everything personal, one click from the corner. */
.acct-wrap { position: relative; }
.acct-button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 999px; background: none; font: inherit; color: inherit; cursor: pointer; }
.acct-button:hover { background: var(--soft); }
.acct-caret { color: var(--muted); font-size: 12px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 208px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18); display: grid; gap: 2px; }
.acct-item.acct-credits { display: flex; justify-content: space-between; gap: 12px; background: var(--soft); margin-bottom: 4px; }
.acct-credits span { color: var(--muted); font-weight: 500; }
.acct-email { margin: 4px 10px 8px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.acct-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.acct-item:hover { background: var(--soft); text-decoration: none; }
.acct-signout { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 12px; }

/* The account pages. */
.account-page { padding: 32px 0 64px; }
.account-page h1 { margin: 0 0 18px; }
.account-tabs { display: flex; gap: 6px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.account-tab { padding: 10px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.account-tab:hover { color: var(--ink); text-decoration: none; }
.account-tab.current { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.account-big { font-size: 44px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.02em; }
.account-big-label { font-size: 18px; font-weight: 500; color: var(--muted); }
.account-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0 0 34px; }
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; }
.button.small { padding: 8px 14px; font-size: 14px; }

/* Her own view of every font kept: the drawing each one was traced from, big
   enough to judge the letters by. */
.gallery { display: grid; gap: 22px; margin-top: 18px; }
.gallery-item { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.gallery-item h3 { margin: 0 0 4px; }
.gallery-item > p { margin: 14px 0 0; }
.gallery-sheets { display: grid; gap: 10px; margin-top: 14px; }
.gallery-sheet { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* Hers alone: handing someone credits. */
.give { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--k-line, var(--line)); }
.give h2 { margin: 0 0 6px; }
.give-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.give-field { padding: 10px 12px; border: 1px solid var(--k-line, var(--line)); border-radius: 8px; font: inherit; min-width: 220px; background: transparent; color: inherit; }
.give-field::placeholder { color: var(--k-mute, #8a8a88); }
.give-amount { min-width: 110px; flex: none; }

/* My QR codes */
.qr-plan { display: grid; gap: 12px; padding: 22px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); margin: 0 0 24px; }
.qr-plan h2 { margin: 0; }
.qr-plan.on { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; }
.qr-plan-line { margin: 0; font-weight: 600; }
.qr-plan-buy { display: flex; gap: 10px; flex-wrap: wrap; }
.qr-list { display: grid; gap: 14px; }
.qr-item { display: grid; gap: 14px; padding: 18px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.qr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.qr-head h3 { margin: 0 0 2px; font-size: 17px; }
.qr-head .library-actions { flex-wrap: wrap; }
.qr-edit { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.qr-target { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; min-width: 0; }
.qr-target:disabled { opacity: .6; }
.qr-label { margin: 0; font: 500 11px/1.2 "DM Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.qr-stats { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.qr-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qr-kpi { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.qr-kpi span { font: 500 11px/1.2 "DM Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.qr-kpi strong { font: italic 400 30px/1 "Bodoni Moda", Georgia, serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qr-chart { display: grid; gap: 8px; }
.qr-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end; height: 80px; }
.qr-bars i { display: block; background: currentColor; border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.qr-bars i:hover { opacity: 1; }
.qr-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qr-split > div { display: grid; gap: 8px; align-content: start; }
.qr-share { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qr-share li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.qr-share i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.qr-share b { display: block; height: 100%; background: currentColor; }
@media (max-width: 640px) {
  .qr-edit { grid-template-columns: minmax(0, 1fr) auto; }
  .qr-edit .qr-label { grid-column: 1 / -1; }
  .qr-kpis { grid-template-columns: 1fr 1fr 1fr; }
  .qr-kpi strong { font-size: 22px; }
  .qr-split { grid-template-columns: 1fr; }
}
.qr-bars i.none { opacity: .25; }
.qr-utm { display: grid; gap: 10px; }
.qr-utm .toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.qr-utm-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qr-utm-fields label { display: grid; gap: 6px; min-width: 0; }
.qr-utm-fields .qr-target:disabled { opacity: .45; }
.qr-opens { overflow-wrap: anywhere; font-family: "DM Mono", ui-monospace, monospace; font-size: 12px; }
@media (max-width: 640px) { .qr-utm-fields { grid-template-columns: 1fr; } }
