/* Murr Mall: shared foundations and controls */

  * { margin:0; padding:0; box-sizing:border-box; }
  html, body { height:100%; }
  /* Controls take the page's font instead of the browser's own. */
  button, input, select, textarea { font-family:inherit; }
  body {
    font-family:var(--ui-font);
    background:#2b241c; overflow:hidden;
    -webkit-user-select:none; user-select:none;
  }
  #home, #app, #fx {
    opacity:1; transition:opacity .22s ease;
  }
  #app-loader {
    position:fixed; inset:0; z-index:1000; display:grid; place-items:center;
    background:
      radial-gradient(620px 360px at 50% 42%, var(--ui-accent-soft), transparent 72%),
      var(--ui-bg);
    color:var(--ui-text-secondary); opacity:0; visibility:hidden; pointer-events:none;
    transition:opacity .22s ease, visibility 0s linear .22s;
  }
  .app-loader-content {
    display:flex; flex-direction:column; align-items:center; gap:12px;
    font-size:14px; font-weight:650; letter-spacing:.025em;
  }
  .app-loader-mark {
    font-size:28px; animation:app-loader-pulse 1.1s ease-in-out infinite alternate;
  }
  .app-loader-en { display:none; }
  html[lang="en"] .app-loader-ru { display:none; }
  html[lang="en"] .app-loader-en { display:inline; }
  .app-loader-help, .app-loader-slow, .app-loader-failed { display:none; }
  .app-loader-help {
    max-width:320px; padding:0 20px; flex-direction:column; align-items:center; gap:14px;
    text-align:center; font-weight:500; line-height:1.45; letter-spacing:0;
  }
  .app-loader-help p { margin:0; }
  html.app-booting.app-boot-slow .app-loader-help,
  html.app-booting.app-boot-failed .app-loader-help { display:flex; }
  html.app-booting.app-boot-slow:not(.app-boot-failed) .app-loader-slow,
  html.app-booting.app-boot-failed .app-loader-failed { display:block; }
  html.app-booting.app-boot-failed .app-loader-status { display:none; }
  html.app-booting.app-boot-failed .app-loader-mark { animation:none; }
  html.app-booting #app-loader,
  body.app-navigating #app-loader {
    opacity:1; visibility:visible; pointer-events:auto; transition:opacity .16s ease;
  }
  html.app-booting #home,
  html.app-booting #app,
  html.app-booting #fx {
    opacity:0; visibility:hidden;
  }
  body.app-navigating #home,
  body.app-navigating #app,
  body.app-navigating #fx {
    opacity:0; pointer-events:none;
  }
  @keyframes app-loader-pulse {
    from { transform:translateY(0) scale(.96); opacity:.72; }
    to { transform:translateY(-3px) scale(1.04); opacity:1; }
  }
  @media (prefers-reduced-motion: reduce) {
    #home, #app, #fx, #app-loader { transition:none; }
    .app-loader-mark { animation:none; }
  }
  .primary-btn, .quiet-btn, .danger-btn {
    border:none; border-radius:11px; padding:11px 17px; font-size:13px; font-weight:700; cursor:pointer;
  }
  .primary-btn { background:#745538; color:#fffaf0; }
  .primary-btn:hover { background:#5f432b; }
  .primary-btn:disabled { opacity:.55; cursor:wait; }
  .quiet-btn { background:rgba(116,85,56,.1); color:#745538; }
  .quiet-btn:hover { background:rgba(116,85,56,.17); }
  .danger-btn { background:rgba(183,64,45,.1); color:#ad432f; }
  .danger-btn:hover { background:rgba(183,64,45,.18); }
  /* ============ ДИАЛОГ ============ */
  dialog {
    border:none; border-radius:16px; padding:22px; width:min(430px, 92vw);
    background:#fdf9f1; box-shadow:0 20px 60px rgba(40,25,10,.4);
    margin:auto;
  }
  dialog::backdrop { background:rgba(40,28,14,.55); }
  dialog[open] {
    transform-origin:center;
    animation:dialog-enter .18s cubic-bezier(.2,.8,.2,1) both;
  }
  dialog[open]::backdrop {
    animation:dialog-backdrop-enter .18s ease-out both;
  }
  dialog[open].dialog-closing {
    pointer-events:none;
    animation:dialog-exit .15s ease-in both;
  }
  dialog[open].dialog-closing::backdrop {
    animation:dialog-backdrop-exit .15s ease-in both;
  }
  @keyframes dialog-enter {
    from { opacity:0; transform:translate3d(0, 8px, 0) scale(.985); }
    to { opacity:1; transform:translate3d(0, 0, 0) scale(1); }
  }
  @keyframes dialog-exit {
    from { opacity:1; transform:translate3d(0, 0, 0) scale(1); }
    to { opacity:0; transform:translate3d(0, 5px, 0) scale(.99); }
  }
  @keyframes dialog-backdrop-enter {
    from { opacity:0; }
    to { opacity:1; }
  }
  @keyframes dialog-backdrop-exit {
    from { opacity:1; }
    to { opacity:0; }
  }
  @media (prefers-reduced-motion: reduce) {
    dialog[open],
    dialog[open]::backdrop,
    dialog[open].dialog-closing,
    dialog[open].dialog-closing::backdrop { animation:none; }
  }
  dialog h2 { font-size:16px; color:#46392a; margin-bottom:14px; }
  dialog label { display:block; font-size:12px; color:#7d6a4f; margin-bottom:10px; font-weight:600; }
  dialog input, dialog textarea, dialog .field-select {
    display:block; width:100%; margin-top:4px; padding:9px 10px; font-size:13.5px;
    border:1px solid #d9c9ac; border-radius:8px; background:#fff; color:#3c3226;
  }
  dialog textarea { min-height:92px; resize:vertical; line-height:1.45; font-family:inherit; }
  dialog input:focus, dialog textarea:focus, dialog .field-select:focus {
    outline:2px solid rgba(217,165,78,.5); border-color:#d9a54e;
  }
  #fetch-status { font-size:11.5px; color:#a08a68; min-height:15px; margin-top:-2px; }
  .price-row { display:flex; gap:8px; margin-top:4px; }
  .price-row input { width:auto; flex:1; min-width:0; margin-top:0; }
  .price-row select {
    flex-shrink:0; width:104px; padding:9px 6px; font-size:13.5px;
    border:1px solid #d9c9ac; border-radius:8px; background:#fff; color:#3c3226; margin-top:0;
  }
  .price-row select:focus { outline:2px solid rgba(217,165,78,.5); border-color:#d9a54e; }
  .dlg-btns { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }
  .dlg-btns button {
    padding:9px 18px; border-radius:9px; border:none; font-size:13.5px; cursor:pointer; font-weight:600;
  }
  .dlg-btns .primary { background:#7a5c3e; color:#fdf9f1; }
  .dlg-btns .primary:hover { background:#63482e; }
  #dlg-cancel, #list-dlg-cancel { background:rgba(120,90,50,.12); color:#5c4a32; }
  html[data-theme="dark"] body { background:#0c111a; }
  html[data-theme="dark"] body.ods-active { background:#091321; }
  html[data-theme="dark"] #auth-form input,
  html[data-theme="dark"] #list-form input,
  html[data-theme="dark"] .profile-field input,
  html[data-theme="dark"] .profile-field textarea {
    background:#111926; border-color:#3c495d; color:#f1e9dc;
  }
  html[data-theme="dark"] #auth-form input::placeholder,
  html[data-theme="dark"] #list-form input::placeholder,
  html[data-theme="dark"] .profile-field input::placeholder,
  html[data-theme="dark"] .profile-field textarea::placeholder,
  html[data-theme="dark"] dialog input::placeholder,
  html[data-theme="dark"] dialog textarea::placeholder { color:#7f8998; }
  html[data-theme="dark"] .primary-btn { background:#b27f47; color:#111722; }
  html[data-theme="dark"] .primary-btn:hover { background:#c28f56; }
  html[data-theme="dark"] .quiet-btn { background:rgba(224,203,169,.1); color:#e2cba4; }
  html[data-theme="dark"] .quiet-btn:hover { background:rgba(224,203,169,.17); }
  html[data-theme="dark"] .danger-btn { background:rgba(224,104,87,.13); color:#f0a092; }
  html[data-theme="dark"] .danger-btn:hover { background:rgba(224,104,87,.21); }
  html[data-theme="dark"] dialog {
    background:#19222e; color:#eee7dc; box-shadow:0 20px 65px rgba(0,0,0,.58);
  }
  html[data-theme="dark"] dialog::backdrop { background:rgba(3,8,15,.72); }
  html[data-theme="dark"] dialog h2 { color:#f2eadc; }
  html[data-theme="dark"] dialog label { color:#cbbda8; }
  html[data-theme="dark"] dialog input,
  html[data-theme="dark"] dialog textarea,
  html[data-theme="dark"] dialog .field-select,
  html[data-theme="dark"] .price-row select {
    background:#111925; border-color:#3d4a5d; color:#f0e8dc;
  }
  html[data-theme="dark"] #fetch-status { color:#a99d8d; }
  html[data-theme="dark"] .dlg-btns .primary { background:#a8753f; color:#fff8ec; }
  html[data-theme="dark"] .dlg-btns .primary:hover { background:#bb8750; }
  html[data-theme="dark"] #dlg-cancel,
  html[data-theme="dark"] #list-dlg-cancel { background:rgba(224,203,169,.1); color:#e2cba4; }
@media (max-width: 880px) {
    dialog input, dialog textarea, dialog select { font-size:16px; }
}
  body { background:var(--ui-bg); color:var(--ui-text); }
  #auth-form input,
  #list-form input,
  .profile-field input,
  .profile-field textarea,
  dialog input,
  dialog textarea,
  dialog .field-select,
  .price-row select,
  html[data-theme="dark"] #auth-form input,
  html[data-theme="dark"] #list-form input,
  html[data-theme="dark"] .profile-field input,
  html[data-theme="dark"] .profile-field textarea,
  html[data-theme="dark"] dialog input,
  html[data-theme="dark"] dialog textarea,
  html[data-theme="dark"] dialog .field-select,
  html[data-theme="dark"] .price-row select {
    border:1px solid var(--ui-border); border-radius:11px; background:var(--ui-surface);
    color:var(--ui-text); box-shadow:0 1px 2px rgba(18,24,40,.025);
    transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }
  #auth-form input, #list-form input,
  .profile-field input, .profile-field textarea { padding:12px 14px; font-size:16px; }
  #auth-form input { min-height:46px; }
  #auth-form input::placeholder,
  #list-form input::placeholder,
  .profile-field input::placeholder,
  .profile-field textarea::placeholder,
  dialog input::placeholder,
  dialog textarea::placeholder,
  html[data-theme="dark"] #auth-form input::placeholder,
  html[data-theme="dark"] #list-form input::placeholder,
  html[data-theme="dark"] .profile-field input::placeholder,
  html[data-theme="dark"] .profile-field textarea::placeholder,
  html[data-theme="dark"] dialog input::placeholder,
  html[data-theme="dark"] dialog textarea::placeholder { color:color-mix(in srgb, var(--ui-text-secondary) 76%, transparent); }
  #auth-form input:focus,
  #list-form input:focus,
  .profile-field input:focus,
  .profile-field textarea:focus,
  dialog input:focus,
  dialog textarea:focus,
  dialog .field-select:focus,
  .price-row select:focus {
    outline:none; border-color:var(--ui-accent); box-shadow:0 0 0 3px var(--ui-focus);
  }
  .profile-field input[readonly],
  html[data-theme="dark"] .profile-field input[readonly] {
    background:var(--ui-surface-subtle); color:var(--ui-text-secondary); box-shadow:none;
  }
  .profile-field textarea { min-height:124px; }

  .primary-btn, .quiet-btn, .danger-btn,
  .dlg-btns button {
    min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:7px;
    border:1px solid transparent; border-radius:11px; padding:10px 17px;
    font-size:14px; line-height:1.2; font-weight:700; cursor:pointer;
    transition:background .16s ease, border-color .16s ease, color .16s ease,
      box-shadow .16s ease, transform .16s ease;
  }
  .primary-btn,
  .dlg-btns .primary,
  html[data-theme="dark"] .primary-btn,
  html[data-theme="dark"] .dlg-btns .primary {
    background:var(--ui-accent); color:#fff; border-color:var(--ui-accent);
    box-shadow:0 5px 14px color-mix(in srgb, var(--ui-accent) 20%, transparent);
  }
  .primary-btn:hover,
  .dlg-btns .primary:hover,
  html[data-theme="dark"] .primary-btn:hover,
  html[data-theme="dark"] .dlg-btns .primary:hover {
    background:var(--ui-accent-hover); border-color:var(--ui-accent-hover); color:#fff;
  }
  .quiet-btn,
  #dlg-cancel,
  #list-dlg-cancel,
  html[data-theme="dark"] .quiet-btn,
  html[data-theme="dark"] #dlg-cancel,
  html[data-theme="dark"] #list-dlg-cancel {
    background:var(--ui-surface); border-color:var(--ui-border); color:var(--ui-text);
  }
  .quiet-btn:hover,
  #dlg-cancel:hover,
  #list-dlg-cancel:hover,
  html[data-theme="dark"] .quiet-btn:hover {
    background:var(--ui-surface-subtle); border-color:color-mix(in srgb, var(--ui-text-secondary) 34%, var(--ui-border));
  }
  .danger-btn,
  html[data-theme="dark"] .danger-btn {
    background:var(--ui-danger-soft); border-color:color-mix(in srgb, var(--ui-danger) 16%, transparent);
    color:var(--ui-danger);
  }
  .danger-btn:hover,
  html[data-theme="dark"] .danger-btn:hover {
    background:color-mix(in srgb, var(--ui-danger) 18%, var(--ui-surface));
    border-color:color-mix(in srgb, var(--ui-danger) 26%, transparent);
  }
  .primary-btn:hover, .quiet-btn:hover, .danger-btn:hover, .dlg-btns button:hover { transform:translateY(-1px); }
  button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
  [role="button"]:focus-visible {
    outline:3px solid var(--ui-focus); outline-offset:2px;
  }
  button:disabled, .primary-btn:disabled {
    opacity:.5; cursor:not-allowed; transform:none; box-shadow:none;
  }

  #auth-status,
  :is(#dashboard-status, #archive-status),
  html[data-theme="dark"] #auth-status,
  html[data-theme="dark"] :is(#dashboard-status, #archive-status) { color:var(--ui-text-secondary); }
  #auth-status.error, #profile-status.error, #list-dlg-error { color:var(--ui-danger); }
  #file-warning,
  html[data-theme="dark"] #file-warning {
    border:1px solid color-mix(in srgb, var(--ui-warning) 22%, transparent);
    background:var(--ui-warning-soft); color:var(--ui-warning);
  }
  #demo-link,
  html[data-theme="dark"] #demo-link {
    color:var(--ui-accent); text-decoration-color:color-mix(in srgb, var(--ui-accent) 35%, transparent);
    text-underline-offset:3px;
  }
  #demo-link:hover { color:var(--ui-accent-hover); }
  /* Формы и диалоги */
  dialog,
  html[data-theme="dark"] dialog {
    width:min(500px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:28px;
    border:1px solid var(--ui-border); border-radius:20px; background:var(--ui-surface);
    color:var(--ui-text); box-shadow:var(--ui-shadow-lg);
  }
  dialog::backdrop,
  html[data-theme="dark"] dialog::backdrop {
    background:rgba(25,31,40,.48); backdrop-filter:blur(4px);
  }
  dialog h2,
  html[data-theme="dark"] dialog h2 {
    margin-bottom:20px; color:var(--ui-text); font-family:var(--ui-subheading-font);
    font-size:25px; line-height:1.16; font-weight:var(--ui-subheading-weight); letter-spacing:-.3px;
  }
  dialog label,
  html[data-theme="dark"] dialog label {
    margin-bottom:14px; color:var(--ui-text); font-size:13px; line-height:1.3; font-weight:700;
  }
  dialog input, dialog textarea, dialog .field-select {
    min-height:42px; margin-top:7px; padding:10px 12px; font-size:15px; font-weight:400;
  }
  dialog textarea { min-height:100px; }
  #fetch-status,
  html[data-theme="dark"] #fetch-status {
    min-height:18px; margin:-5px 0 10px; color:var(--ui-text-secondary); font-size:12.5px; line-height:1.35;
  }
  #fetch-status:empty { display:none; }
  .price-row { gap:9px; margin-top:7px; }
  .price-row input { margin-top:0; }
  .price-row select { width:112px; min-height:42px; padding:9px 8px; }
  .dlg-btns { gap:9px; margin-top:22px; padding-top:18px; border-top:1px solid var(--ui-border); }
  .dlg-btns button { min-width:104px; }
  /* A short question, so it stays a card on phones too. */
  #confirm-dlg { width:min(440px, calc(100vw - 32px)); }
  #confirm-dlg h2 { margin-bottom:10px; }
  #confirm-dlg .dlg-btns .quiet-btn { border-color:var(--ui-border); }
  #confirm-dlg-text { color:var(--ui-text-secondary); font-size:14.5px; line-height:1.5; overflow-wrap:anywhere; }
  /* Framing a profile photo: also a card on phones. */
  #crop-dlg { width:min(440px, calc(100vw - 32px)); }
  #crop-dlg h2 { margin-bottom:6px; }
  #crop-dlg .dlg-btns .quiet-btn { border-color:var(--ui-border); }
  #crop-dlg-hint { margin-bottom:16px; color:var(--ui-text-secondary); font-size:14.5px; line-height:1.5; }
  #crop-stage {
    position:relative; width:min(100%, 340px); aspect-ratio:1; margin:0 auto;
    overflow:hidden; border-radius:14px; background:var(--ui-surface-subtle);
    cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
  }
  #crop-stage:active { cursor:grabbing; }
  #crop-stage:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
  /* The circle is what the avatar will show; the corners only help to place it. */
  #crop-stage::after {
    content:""; position:absolute; inset:0; border-radius:50%; pointer-events:none;
    box-shadow:0 0 0 999px rgba(16,20,28,.52), inset 0 0 0 2px rgba(255,255,255,.9);
  }
  #crop-image {
    position:absolute; top:0; left:0; display:block; max-width:none; pointer-events:none;
    -webkit-user-drag:none;
  }
  .crop-zoom {
    display:flex; align-items:center; gap:12px; width:min(100%, 340px); margin:16px auto 0;
    color:var(--ui-text-secondary); font-size:12px;
  }
  .crop-zoom-large { font-size:18px; }
  #crop-zoom,
  html[data-theme="dark"] #crop-zoom {
    flex:1; min-width:0; width:auto; min-height:28px; margin:0; padding:0;
    border:none; border-radius:0; background:none; box-shadow:none; accent-color:var(--ui-accent);
  }
  #crop-zoom:focus { box-shadow:none; }
  #crop-zoom:focus-visible { outline:2px solid var(--ui-accent); outline-offset:3px; }
  /* A phone on its side has no height for a column: the photo goes beside the controls. */
  @media (max-height: 560px) and (orientation: landscape) {
    #crop-dlg[open] {
      width:min(720px, calc(100vw - 32px)); padding:20px; overflow:hidden;
      display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto 1fr auto; column-gap:22px;
    }
    #crop-stage { grid-column:1; grid-row:1 / -1; width:calc(100dvh - 74px); margin:0; }
    #crop-dlg h2, #crop-dlg-hint, .crop-zoom, #crop-dlg .dlg-btns { grid-column:2; }
    #crop-dlg .dlg-btns { grid-row:4; }
    .crop-zoom { margin:0; }
    #crop-dlg-hint { margin-bottom:10px; }
  }

@media (max-width: 560px) {
    dialog,
    html[data-theme="dark"] dialog {
      width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:22px 18px;
      border-radius:18px;
    }
    dialog h2, html[data-theme="dark"] dialog h2 { font-size:23px; }
    .dlg-btns { align-items:stretch; }
    .dlg-btns button { flex:1; min-width:0; }
}

/* ============ ДИАЛОГИ: фон и телефон ============ */
  /* The page under an open dialog does not scroll. */
  html.dialog-open, html.dialog-open body { overflow:hidden; }
  dialog { overscroll-behavior:contain; }

/* On phones every dialog is a full screen sheet: a header that stays on top,
   content that scrolls, and buttons that stay at the bottom, above the keyboard
   (dialogs.js keeps --vv-height and --vv-top at the visible part of the screen). */
@media (max-width: 640px) {
    :root:root dialog:is(#dlg, #list-dlg, #item-detail-dlg, #import-dlg, #share-dlg, #stamp-dlg, #reservations-dlg) {
      inset:var(--vv-top, 0px) 0 auto 0; width:100vw; max-width:100vw;
      height:var(--vv-height, 100dvh); max-height:var(--vv-height, 100dvh); margin:0;
      padding:calc(16px + env(safe-area-inset-top)) 18px 0; border:none; border-radius:0;
      overflow-y:auto; box-shadow:none;
    }
    :root:root dialog:is(#dlg, #list-dlg, #item-detail-dlg, #import-dlg, #share-dlg, #stamp-dlg, #reservations-dlg)[open] {
      animation:dialog-sheet-enter .24s cubic-bezier(.2,.8,.2,1) both;
    }
    :root:root dialog:is(#dlg, #list-dlg, #item-detail-dlg, #import-dlg, #share-dlg, #stamp-dlg, #reservations-dlg)[open].dialog-closing {
      animation:dialog-sheet-exit .18s ease-in both;
    }
    @keyframes dialog-sheet-enter {
      from { opacity:.4; transform:translate3d(0, 28px, 0); }
      to { opacity:1; transform:translate3d(0, 0, 0); }
    }
    @keyframes dialog-sheet-exit {
      from { opacity:1; transform:translate3d(0, 0, 0); }
      to { opacity:0; transform:translate3d(0, 24px, 0); }
    }
    /* Sticky offsets count from inside the dialog's padding, hence the negative top. */
    dialog form > h2:first-child, dialog .share-head {
      position:sticky; top:calc(-16px - env(safe-area-inset-top)); z-index:3;
      margin:calc(-16px - env(safe-area-inset-top)) -18px 16px;
      padding:calc(16px + env(safe-area-inset-top)) 18px 12px;
      background:var(--ui-surface); border-bottom:1px solid var(--ui-border);
    }
    dialog .share-head h2 { margin:0; }
    /* A short form still keeps its buttons at the bottom of the screen. */
    :root:root dialog:is(#dlg, #list-dlg) > form { min-height:100%; display:flex; flex-direction:column; }
    dialog .dlg-btns {
      position:sticky; bottom:0; z-index:3;
      margin:auto -18px 0; padding:12px 18px calc(12px + env(safe-area-inset-bottom));
      background:var(--ui-surface); border-top:1px solid var(--ui-border);
    }
    :root:root #share-dlg { padding-bottom:calc(18px + env(safe-area-inset-bottom)); }
    :root:root #confirm-dlg .dlg-btns,
    :root:root #crop-dlg .dlg-btns { position:static; margin:22px 0 0; padding:18px 0 0; }
}
@media (max-width: 900px) and (max-height: 560px) and (orientation: landscape) {
    :root:root #crop-dlg .dlg-btns { margin-top:12px; padding-top:12px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
    :root:root dialog[open], :root:root dialog[open].dialog-closing { animation:none; }
}

/* The product window on phones: the photo runs edge to edge under a close button
   that stays in reach, and the actions stay at the bottom. */
@media (max-width: 640px) {
    :root:root dialog#item-detail-dlg { padding:0; }
    :root:root #item-detail-close {
      position:sticky; top:calc(12px + env(safe-area-inset-top)); z-index:4;
      display:grid; place-items:center; margin:calc(12px + env(safe-area-inset-top)) 12px -48px auto;
    }
    :root:root #item-detail-content { min-height:100%; display:flex; flex-direction:column; }
    :root:root .item-detail-layout { display:flex; flex-direction:column; flex:1; }
    :root:root .item-detail-media { height:min(300px, 42vh); min-height:0; border-right:none; border-bottom:1px solid var(--ui-border); }
    :root:root .item-detail-media img { max-height:none; }
    :root:root .item-detail-body { flex:1; padding:22px 18px 0; }
    :root:root .item-detail-description { max-height:none; overflow:visible; }
    :root:root #item-detail-dlg .item-detail-actions {
      position:sticky; bottom:0; z-index:3; margin:auto -18px 0; padding:12px 18px calc(12px + env(safe-area-inset-bottom));
      background:var(--ui-surface); border-top:1px solid var(--ui-border);
    }
    :root:root #item-detail-dlg .item-detail-actions { flex-wrap:nowrap; }
    :root:root #item-detail-dlg .item-detail-actions > :not(.detail-icon) { flex:1 1 0; min-width:0; }
    /* The bar has room for one text button, so a release gets a row of its own. */
    :root:root #item-detail-dlg .item-detail-actions:has(> .detail-release) { flex-wrap:wrap; }
    :root:root #item-detail-dlg .item-detail-actions > .detail-release { order:-1; flex:1 0 100%; }
    :root:root #item-detail-dlg .item-detail-actions:has(> .detail-secret) { flex-wrap:wrap; row-gap:8px; }
    :root:root #item-detail-dlg .item-detail-actions > .detail-secret { order:1; flex:1 0 100%; justify-content:center; }
    /* Beside a text button and icon buttons the shop link shrinks to its icon too. */
    :root:root #item-detail-dlg .item-detail-actions:has(.detail-icon):has(> button:not(.detail-icon)) .item-detail-link {
      flex:0 0 42px; width:42px; min-width:42px; padding:0;
    }
    :root:root #item-detail-dlg .item-detail-actions:has(.detail-icon):has(> button:not(.detail-icon)) .item-detail-link .detail-text {
      position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
    }
}
