/* Explorer handset fit. Keep the existing 980px canvas, navigation, and theme. */
@layer ar-explorer-phone-type {
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace .reading-tool-header > .reading-tool-intro {
    flex: 1 1 auto !important;
    min-inline-size: 0 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] body.ar-cyber #workspace .reading-tool-header:has(> .reading-tool-intro) > svg.reading-tool-art {
    flex: 0 0 clamp(88px, 16%, 156px) !important;
    inline-size: clamp(88px, 16%, 156px) !important;
    max-inline-size: 17% !important;
    block-size: auto !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace .reading-tool-intro :is(.eyebrow,h2,h3,p) {
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) :is(.ar-timeline-controls,.ar-timeline-browser,.ar-timeline-index,.ar-timeline-track,.ar-timeline-pager,.ar-detail-panel) {
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    box-sizing: border-box;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, .52fr) !important;
    align-items: end;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-clear,#church-history-clear) {
    grid-column: -2 / -1;
    justify-self: stretch;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-browser {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-track {
    display: grid !important;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    overflow: hidden auto !important;
    max-block-size: calc(152px * var(--ar-drawer-fit, 2.5)) !important;
    align-content: start;
    padding: 4px 5px 12px !important;
    gap: 12px !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-track > button {
    min-width: 0 !important;
    min-block-size: calc(48px * var(--ar-drawer-fit, 2.5));
    white-space: normal !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-track > button :is(strong,b,span,small,em) {
    font-size: max(26px, calc(12px * var(--ar-drawer-fit, 2.5))) !important;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) :is(.ar-timeline-controls button,.ar-timeline-pager button,.ar-timeline-controls input,.ar-timeline-controls select,.ar-detail-panel button) {
    min-block-size: calc(40px * var(--ar-drawer-fit,2.5));
    min-inline-size: 0;
    inline-size: 100%;
    overflow-wrap: normal;
    word-break: normal;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-pager {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 9px;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel:not([hidden]) {
    --ar-setting-text: calc(15px * var(--ar-drawer-fit, 2.5));
    --ar-setting-caption: calc(12px * var(--ar-drawer-fit, 2.5));
    --ar-setting-target: calc(44px * var(--ar-drawer-fit, 2.5));
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel :is(legend,.ar-color-label,label,#ar-color-reset,[data-cyber-layer],[data-cyber-art=none]) {
    font-size: var(--ar-setting-text) !important;
    line-height: 1.27 !important;
    overflow-wrap: normal !important;
    max-inline-size: 100%;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel :is(small,.ar-color-note,#ar-cyber-art-note,#ar-cyber-layer-note,#ar-cyber-art-brightness-value) {
    font-size: var(--ar-setting-caption) !important;
    line-height: 1.38 !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel :is(#ar-cyber-palette,.ar-color-options,#ar-cyber-art-options) {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 10px !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel :is(#ar-cyber-palette,.ar-color-options,#ar-cyber-art-options):not([hidden]) {
    display: grid !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel :is([data-cyber-art],[data-ar-color-choice], [data-cyber-color]) {
    width: 100% !important;
    min-inline-size: 0 !important;
    min-block-size: var(--ar-setting-target) !important;
    aspect-ratio: auto !important;
    box-sizing: border-box;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel [data-cyber-art=none] {
    grid-column: auto !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel [data-cyber-art] svg {
    inline-size: calc(23px * var(--ar-drawer-fit, 2.5)) !important;
    block-size: calc(23px * var(--ar-drawer-fit, 2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-art-brightness-row:not([hidden]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    inline-size: 100% !important;
    max-inline-size: none !important;
    align-items: center !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-art-brightness {
    grid-column: 1 / -1;
    inline-size: 100% !important;
    min-block-size: calc(26px * var(--ar-drawer-fit,2.5));
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel :is(#ar-color-reset,[data-cyber-layer]) {
    min-block-size: var(--ar-setting-target) !important;
  }
}

@layer ar-explorer-phone-type {
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #random-lab .m-random-pane .tool-actions {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 12px !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #random-lab .m-random-pane .tool-actions > button {
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    min-block-size: calc(44px * var(--ar-drawer-fit, 2.5)) !important;
    overflow-wrap: break-word !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-track > .ar-empty-state {
    grid-column: 1/-1;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel #ar-cyber-layer-settings {
    display: flex;
    flex-wrap: wrap;
    gap: calc(6px * var(--ar-drawer-fit,2.5));
    align-items: center;
    justify-content: center;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel #ar-cyber-layer-settings[hidden] {
    display: none !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel #ar-cyber-layer-settings > span:not([hidden]) {
    flex: 1 1 100%;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel [data-cyber-art=none] svg {
    inline-size: calc(15px * var(--ar-drawer-fit,2.5)) !important;
    block-size: calc(15px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel [data-cyber-art=none] span {
    font-size: var(--ar-setting-caption) !important;
    white-space: nowrap;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 {
    font-size: calc(14px * var(--ar-drawer-fit,2.5)) !important;
    padding: calc(14px * var(--ar-drawer-fit,2.5)) !important;
    max-block-size: 86dvh;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 h2 {
    font-size: calc(19px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 :is(p,strong,legend,label,button) {
    font-size: calc(14px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 .ar-theme-cards59 {
    grid-template-columns: minmax(0,1fr) !important;
    margin-block: calc(12px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 .ar-theme-card59 {
    display: grid !important;
    grid-template-columns: minmax(0,27%) minmax(0,1fr);
    gap: 8px 16px;
    text-align: start;
    padding: 0 15px 10px 0;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 .ar-theme-card59 .ar-theme-preview59 {
    grid-row: 1/3;
    min-block-size: 100%;
    align-self: stretch;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 .ar-theme-card59 small {
    font-size: calc(12px * var(--ar-drawer-fit,2.5)) !important;
    line-height: 1.32 !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #ar-first-theme59 [data-later] {
    min-block-size: calc(44px * var(--ar-drawer-fit,2.5));
  }
}
@layer ar-explorer-phone-type {
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) :is(.ar-timeline-controls button,.ar-timeline-controls input,.ar-timeline-controls select,.ar-timeline-pager button,.ar-detail-panel button) {
    min-height: calc(36px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-timeline-pager button {
    min-height: calc(42px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) > summary {
    min-height: calc(44px * var(--ar-drawer-fit,2.5)) !important;
    align-items: center !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) > summary b {
    font-size: calc(15px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) :is(summary small,.ar-detail-meta span) {
    font-size: calc(11px * var(--ar-drawer-fit,2.5)) !important;
    line-height: 1.28 !important;
    overflow-wrap: break-word !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-detail-meta {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace :is(#timeline-tool,#church-history-tool) .ar-detail-panel .ar-verse-actions {
    margin-top: 14px;
  }
}
@layer ar-explorer-phone-type {
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel #ar-cyber-layer-settings:not([hidden]) {
    gap: calc(6px * var(--ar-drawer-fit,2.5)) !important;
  }
  html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel .ar-device-preferences {
    column-gap: calc(12px * var(--ar-drawer-fit,2.5)) !important;
    row-gap: calc(4px * var(--ar-drawer-fit,2.5)) !important;
    flex-wrap: wrap !important;
  }
}
@layer ar-explorer-phone-type {
  @media (max-device-width: 360px) {
    html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel [data-cyber-art=none] {
      padding-inline: 0 !important;
    }
    html[data-ar-explorer-handheld][data-ar-explorer-wide-fit] #workspace #ar-cyber-customize-panel [data-cyber-art=none] svg {
      display: none !important;
    }
  }
}
