.account-shell { width: min(58rem, calc(100% - 2 * var(--space-lg))); margin: var(--space-3xl) auto; }
.account-shell[aria-busy="true"] { min-block-size: calc(100svh - 4.25rem); }
.account-shell[aria-busy="true"] > .account-heading { visibility: hidden; }
.account-shell[aria-busy="true"] > .status-line { text-align: center; }
.account-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); }
.account-heading h1, .account-heading :is(h2, h3, h4), .account-panel h2, .account-section-heading h2 { margin: 0; }
.account-heading h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.15; }
#account-email { margin: var(--space-xs) 0 0; overflow-wrap: anywhere; }
#account-status:empty { display: none; }
.account-support img { display: block; width: 1.5rem; height: 1.5rem; mix-blend-mode: multiply; }
#account-support-form button { justify-self: start; }
.account-panel h2, .account-section-heading h2 { font-size: var(--text-xl); }
.account-panel :is(h3, h4) { font-size: 1rem; }
.account-content { display: grid; gap: var(--space-2xl); margin-top: var(--space-xl); }
.account-panel { display: grid; align-content: start; min-width: 0; gap: var(--space-md); padding: var(--space-xl); border: 1px solid var(--color-line); border-radius: var(--radius-lg); background: var(--color-white); }
.account-event { background: var(--color-field); }
.account-event, #balance { scroll-margin-top: var(--space-lg); }
.account-section-heading { display: grid; gap: var(--space-xs); }
.account-event-form, .account-editor { padding-top: var(--space-md); border-top: 1px solid var(--color-line); }
.event-form-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: var(--space-xl); }
.event-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.event-field-wide { grid-column: 1 / -1; }
.event-fields small { color: var(--color-muted); font-weight: normal; font-size: var(--text-xs); }
.event-fields input[type="file"] { font-size: var(--text-sm); }
.event-card-preview { display: grid; gap: var(--space-sm); min-width: 0; }
.account-panel .event-card-preview :is(h3, p), #account-events h3 { margin: 0; }
.event-card-preview .coupon-card h3 { font-size: var(--text-xl); }
.event-card-preview a:not([href]) { cursor: default; }
.account-event-form button { justify-self: start; }
.account-event-form .dialog-note { max-width: 55ch; }
#account-event-result { align-items: center; }
#account-events { display: grid; gap: var(--space-sm); }
#account-event-list .account-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
#account-event-list time { flex-shrink: 0; }
#account-event-status { color: var(--color-ink); }
.account-section-heading { margin-bottom: var(--space-md); }
.account-section-heading p { margin: 0; }
.account-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.account-columns:has(:is(#add-listing, #add-discount):not([hidden])) > .account-panel { grid-column: 1 / -1; }
.account-editor { display: grid; gap: var(--space-md); }
.account-shell:has(.account-login:not([hidden])) {
  width: 100%;
  margin-block: clamp(var(--space-md), 2svh, var(--space-2xl)) 0;
}
.account-shell:has(.account-login:not([hidden])) > :is(.account-heading, .status-line) {
  justify-content: center;
  padding-inline: var(--space-lg);
  text-align: center;
}
.account-login-scene {
  container-type: inline-size;
  width: min(100%, 29rem, max(22rem, 61svh));
  margin-inline: auto;
}
.account-login-scene:not(:has(.account-login:not([hidden]))) { display: none; }
.account-login {
  --mascot-natural-cap-height: calc(100cqw * 900 / 1098);
  --mascot-cap-height: var(--mascot-natural-cap-height);
  align-content: center;
  gap: var(--space-sm);
  min-block-size: calc(var(--mascot-cap-height) + 100cqw * 421 / 1098);
  padding: var(--space-sm) 23%;
  /* The middle 421 pixels of the image can grow with the form. */
  border-block: solid transparent;
  border-block-start-width: calc(var(--mascot-cap-height) * 490 / 900);
  border-block-end-width: calc(var(--mascot-cap-height) * 410 / 900);
  border-image: url('/assets/account-mascot.webp') 490 0 410 fill / 1 stretch;
}
.account-login .button { min-height: 2.75rem; }
.account-login input[type="email"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.account-consent { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); font-weight: 600; line-height: 1.35; }
.account-consent input { flex: none; margin: 0; }
.account-topup button { justify-self: start; }
.account-pay, .account-pay-methods, .account-pay-sbp { display: inline-flex; align-items: center; }
.account-pay-methods { gap: .55rem; margin-inline-start: .25rem; padding-inline-start: .65rem; border-inline-start: 1px solid currentColor; }
.account-pay-sbp { gap: .15rem; font-size: .75rem; line-height: 1; }
.account-balance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); margin: 0; }
.account-balance > div { display: grid; gap: var(--space-xs); padding: var(--space-md); border-radius: var(--radius-md); background: var(--color-field); }
.account-balance dt, .account-meta { color: var(--color-muted); font-size: var(--text-sm); }
.account-balance dd { margin: 0; font-size: var(--text-xl); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-topup { display: flex; flex-wrap: wrap; align-items: end; }
.account-topup label { flex: 1 1 10rem; max-width: 13rem; }
.account-list { display: grid; margin: 0; padding: 0; list-style: none; }
.account-list:empty { display: none; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding-block: var(--space-md); border-top: 1px solid var(--color-line); scroll-margin-top: var(--space-xl); }
.account-item-details { display: grid; gap: var(--space-xs); min-width: 0; overflow-wrap: anywhere; }
.account-panel .status-line, .account-panel .dialog-note { margin: 0; }
.account-panel .dialog-note:empty, .account-panel .status-line:empty, .account-dialog [role="status"]:empty { display: none; }
#add-listing { scroll-margin-top: var(--space-lg); }
#add-listing :is(#pick-pin, .save-listing) { justify-self: start; }
#add-listing .entry-form a { text-decoration: none; }
#add-listing .entry-form a:hover { color: var(--color-accent-hover); }
input[readonly] { color: var(--color-muted); }
.account-map-frame { position: relative; margin-block: var(--space-md); overflow: hidden; border-radius: var(--radius-md); }
#account-pin-map { height: clamp(12rem, 42dvh, 21rem); background: var(--color-map-land); }
.account-map-crosshair { position: absolute; z-index: 500; inset: 50% auto auto 50%; translate: -50% -50%; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border: 2px solid var(--color-accent); border-radius: 50%; color: var(--color-accent); background: var(--color-white); font-size: 1.25rem; line-height: 1; pointer-events: none; }
@media (max-width: 47rem) {
  .account-columns { grid-template-columns: minmax(0, 1fr); }
  .event-form-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .account-login { --mascot-cap-height: min(var(--mascot-natural-cap-height), max(8rem, 100svh - 24rem)); }
  .account-panel { padding: var(--space-md); }
  .account-row { display: grid; }
  .account-row .button { justify-self: start; }
  .account-event .button { min-height: 2.75rem; }
  .event-fields { grid-template-columns: minmax(0, 1fr); }
  #add-listing .form-row { grid-template-columns: minmax(0, 1fr); }
}

#add-discount { scroll-margin-top: var(--space-lg); min-width: 0; }
#add-discount small { font-weight: normal; color: var(--color-muted); }
#add-discount [type="submit"] { justify-self: start; }
.discount-preview { max-width: 23rem; margin-block: var(--space-md); }
