.ll-dialog {
  --sheet-ink: #192c2d;
  --sheet-muted: #546760;
  --sheet-line: #dce4dd;
  --sheet-tint: #f4f7f2;
  width: min(450px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  background: #fff;
  color: var(--sheet-ink);
  box-shadow: 0 20px 80px #10252324;
  font: 15px/1.45 "Inter", "Segoe UI", system-ui, sans-serif;
  text-align: start;
  overscroll-behavior: contain;
}
.ll-dialog::backdrop { background: #17282462; backdrop-filter: blur(3px); }
.ll-dialog, .ll-dialog *, .ll-dialog *::before, .ll-dialog *::after { box-sizing: border-box; }
.ll-dialog :is(h2,h3,p) { margin: 0; }
.ll-dialog :is(h2,h3) { font-family: inherit; text-transform: none; color: var(--sheet-ink); }
.ll-dialog h2 { font-size: 27px; font-weight: 720; line-height: 1.14; letter-spacing: -.055em; overflow-wrap: anywhere; }
.ll-dialog h3 { font-size: 15px; font-weight: 670; line-height: 1.3; letter-spacing: -.02em; }
.ll-dialog h2:focus { outline: none; }
.ll-dialog :is(button,select,input) { font-family: inherit; }
.ll-dialog button { cursor: pointer; }
.ll-dialog :is(button,select,input):focus-visible, .ll-units input:focus-visible + span { outline: 3px solid #448363; outline-offset: 2px; }
.ll-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 19px; }
.ll-close { display: grid; flex: none; place-items: center; width: 44px; height: 44px; background: #f2f5f0; border: 0; border-radius: 50%; color: var(--sheet-muted); }
.ll-close svg { width: 18px; height: 18px; }
.ll-body form { display: grid; gap: 18px; margin: 0; }
.ll-picker, .ll-result-exercise { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ll-picker { position: relative; }
.ll-art { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 13px; background: #edf2eb; overflow: hidden; }
.ll-art svg { display: block; width: 48px; height: 42px; }
.ll-picker .ll-art { position: absolute; inset-inline-start: 0; pointer-events: none; }
.ll-picker select {
  width: 100%; min-width: 0; min-height: 56px; padding: 6px 30px 6px 64px;
  appearance: none; background: transparent; border: 0; border-radius: 9px;
  color: var(--sheet-ink);
  font-family: inherit; font-size: 19px; font-weight: 680; line-height: 1.3; letter-spacing: -.04em;
  text-overflow: ellipsis; cursor: pointer;
}
.ll-dialog select option { font: 400 16px "Segoe UI", system-ui, sans-serif; }
.ll-chevron { position: absolute; inset-inline-end: 5px; width: 20px; height: 20px; color: var(--sheet-muted); pointer-events: none; }
.ll-panel { margin-block-start: 14px; border-radius: 14px; padding: 12px 14px; background: var(--sheet-tint); }
.ll-dialog .ll-state { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sheet-ink); }
.ll-state .avatar { display: block; width: 28px; height: 28px; flex: none; border-radius: 50%; object-fit: cover; }
.ll-panel-owned { background: var(--player-tint); }
.ll-panel-owned .ll-state { font-weight: 480; }
.ll-panel-owned .ll-state strong { font-weight: 700; }
.ll-panel-contested { background: white; border: 1px solid var(--sheet-line); }
.ll-panel-unclaimed .ll-state { color: var(--sheet-muted); }
.ll-records:not(:empty) { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 7px; margin-top: 7px; }
.ll-panel-contested .ll-records { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) auto; row-gap: 4px; }
.ll-record { min-width: 0; display: grid; grid-column: 1/-1; grid-template-columns: subgrid; align-items: center; padding-block: 5px; font-size: 13px; line-height: 1.4; }
.ll-record + .ll-record { border-top: 1px solid var(--sheet-line); }
.ll-panel-contested .ll-record { padding-inline: 7px; background: var(--player-tint); border: 0; border-radius: 7px; }
.ll-metric { color: var(--sheet-muted); }
.ll-holder { display: flex; align-items: center; gap: 6px; font-weight: 650; min-width: 0; }
.ll-holder .avatar { display: block; width: 28px; height: 28px; object-fit: cover; flex: none; border-radius: 50%; }
.ll-record strong { text-align: end; font-weight: 670; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ll-record small { font-size: .94em; font-weight: 480; }
.ll-entry-heading, .ll-pref { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ll-entry-heading h3 { display: flex; align-items: center; gap: 7px; }
.ll-entry-heading .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ll-units { display: inline-flex; flex: none; gap: 2px; padding: 2px; margin: 0; border: 0; border-radius: 10px; background: #edf1eb; }
.ll-units label { display: flex; align-items: center; position: relative; cursor: pointer; }
.ll-units span { display: grid; place-items: center; min-width: 40px; min-height: 35px; padding: 5px 8px; border-radius: 8px; color: var(--sheet-muted); font-weight: 620; font-size: 13px; }
.ll-units input:checked + span { background: white; color: var(--sheet-ink); box-shadow: 0 1px 4px #20302418; }
.ll-visually-hidden, .ll-units input { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.ll-inputs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 10px; margin-top: -8px; }
.ll-field { display: grid; min-width: 0; gap: 6px; }
.ll-field label { color: var(--sheet-muted); font-size: 13px; font-weight: 590; }
.ll-field :is(select,input) { width: 100%; min-width: 0; min-height: 48px; background: #fff; color: var(--sheet-ink); padding: 9px 13px; border: 1px solid #aebeb3; border-radius: 10px; font-size: 16px; }
.ll-inputs .ll-field { border: 1px solid var(--sheet-line); border-radius: 12px; background: var(--sheet-tint); padding: 9px 12px 5px; gap: 0; }
.ll-inputs .ll-field:focus-within { border-color: #648772; }
.ll-inputs input { min-height: 39px; border: 0; border-radius: 4px; padding: 0; background: none; font-size: 26px; line-height: 1.25; font-weight: 640; font-variant-numeric: tabular-nums; }
.ll-inputs input::placeholder { color: #86928b; }
.ll-dialog .ll-primary, .ll-dialog .ll-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 10px 16px; border: 1px solid transparent; border-radius: 12px;
  font-size: 15px; font-weight: 650; line-height: 1.35; text-align: center;
}
.ll-dialog .ll-primary { width: 100%; background: #1b3034; color: #fff; }
.ll-dialog .ll-primary:hover { background: #304b4f; }
.ll-dialog .ll-secondary { color: var(--sheet-ink); background: #fff; border-color: var(--sheet-line); }
.ll-dialog .ll-secondary:hover, .ll-dialog .ll-close:hover { background: #e9efe8; }
.ll-result-exercise h3 { font-size: 19px; letter-spacing: -.04em; }
.ll-dialog .ll-receipt, .ll-dialog .ll-message, .ll-dialog .ll-notice, .ll-reset p { color: var(--sheet-muted); line-height: 1.5; font-size: 14px; }
.ll-dialog .ll-outcome { margin: 14px 0 18px; }
.ll-dialog .ll-reset { border-top: 1px solid var(--sheet-line); padding-block-start: 16px; }
.ll-dialog .ll-reset p { margin-block-start: 5px; }
.ll-reset .ll-secondary { margin-block-start: 12px; font-size: 14px; }
.ll-reset-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ll-dialog .ll-notice { color: #365342; }
.ll-dialog .ll-error:not([hidden]) { color: #893e31; background: #fff2ed; border-radius: 10px; margin-top: 12px; padding: 10px 12px; font-size: 14px; }
@media (max-width: 560px) {
  .ll-dialog { width: 100%; margin: auto 0 0; max-height: calc(100dvh - 12px); border: 0; border-radius: 25px 25px 0 0; padding: 18px max(20px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
  .ll-head { margin-block-end: 14px; }
}
@media (max-width: 350px) {
  .ll-dialog { padding-inline: 15px; }
  .ll-panel { padding-inline: 11px; }
  .ll-record { gap: 5px; font-size: 12px; }
  .ll-holder { gap: 4px; }
}
@media (forced-colors: active) {
  .ll-units input:checked + span { outline: 2px solid Highlight; outline-offset: -2px; }
}
