.sheet-mobile-subtitle, .sheet-mobile-stat-icon, .sheet-mobile-condition-count,
.sheet-mobile-tools-toggle, .sheet-mobile-menu-status,
.sheet-mobile-collapse, .sheet-mobile-shape-toggle, .sheet-mobile-shape-panel,
.sheet-mobile-section-picker { display: none; }

@media (max-width: 699px) {
  .sheet-open > header { display: none; }
  .sheet-open main { padding: 0 0 32px; }
  .sheet-open #sheet-root { position: relative; }
  .sheet-open #sheet-root [hidden] { display: none !important; }
  .sheet-open #sheet-root :is(button, input, select, textarea, a):focus-visible { outline: 2px solid #bb89f5; outline-offset: 2px; }
  .sheet-mobile-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 16px 0;
    margin: 0;
    border: 0;
    background: #282e49;
  }
  .sheet-mobile-header .sheet-identity { display: block; position: relative; min-height: 44px; width: 100%; padding: 0 48px; text-align: center; }
  .sheet-mobile-header .sheet-identity-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; }
  .sheet-mobile-header .sheet-name { font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
  .sheet-mobile-header .sheet-portrait { position: absolute; right: 0; top: 0; width: 44px; height: 44px; font-size: 22px; border-radius: 6px; }
  .sheet-mobile-header .sheet-subtitle, .sheet-mobile-header .sheet-level { display: none; }
  .sheet-mobile-subtitle { display: block; color: #e8e9ef; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
  .sheet-mobile-tools-toggle { position: absolute; top: 6px; left: 10px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; padding: 8px; background: transparent; color: #e8e9ef; cursor: pointer; }
  .sheet-mobile-tools-toggle svg { width: 25px; height: 29px; }
  .sheet-mobile-tools-toggle::after { content: ''; position: absolute; right: 4px; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #83c9c1; }
  .sheet-mobile-tools-toggle[data-save-state="dirty"]::after, .sheet-mobile-tools-toggle[data-save-state="saving"]::after { background: #d0bcec; }
  .sheet-mobile-tools-toggle[data-save-state="error"]::after { background: #ff7b7b; }
  .sheet-mobile-tools-toggle:hover { background: #ffffff0c; border-radius: 5px; }
  .sheet-mobile-save { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sheet-topbar[popover]:not(:popover-open) { display: none !important; }
  .sheet-topbar[popover] { display: flex; flex-direction: column; align-items: stretch; position: fixed; inset: 58px 12px auto; width: auto; max-height: calc(100dvh - 80px); overflow: auto; margin: 0; padding: 16px; border: 1px solid #606782; border-radius: 8px; background: #282d3e; color: #e8e9ef; gap: 12px; box-shadow: 0 6px 30px #0007; }
  .sheet-topbar[popover] .sheet-tools { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .sheet-topbar[popover] :is(.sheet-back, .sheet-button) { font-size: 14px; min-height: 44px; display: flex; align-items: center; padding: 8px; }
  .sheet-topbar[popover] [hidden] { display: none !important; }
  .sheet-mobile-menu-status { display: block; font-size: 13px; color: #a2a9bc; }
  .sheet-mobile-header .sheet-header-stats { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 50px; margin-bottom: 10px; }
  .sheet-mobile-header .sheet-stat { padding: 0; min-width: 44px; }
  .sheet-mobile-header .sheet-stat .metric-value { font-size: 22px; overflow-wrap: anywhere; }
  .sheet-mobile-header .stat-label { color: #e8e9ef; font-size: 10px; }
  .sheet-mobile-header .shield-stat { position: relative; width: 44px; height: 46px; border: 0; border-radius: 0; color: #f1f4ff; }
  .sheet-mobile-header .shield-stat .stat-label { display: none; }
  .sheet-mobile-stat-icon { display: block; }
  .shield-stat .sheet-mobile-stat-icon { position: absolute; inset: 0; width: 44px; height: 46px; color: #719de4; }
  .sheet-mobile-header .shield-stat .metric-value { position: relative; z-index: 1; font-size: 21px; padding-bottom: 3px; }
  .sheet-mobile-shape-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #f1f1f7; cursor: pointer; flex: none; }
  .sheet-mobile-shape-toggle svg { width: 34px; height: 40px; }
  .sheet-mobile-shape-toggle:hover { background: #ffffff0b; border-radius: 5px; }
  .sheet-mobile-header .hp-stat { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 98px; max-width: 132px; min-height: 42px; padding: 4px 7px; border: 2px solid #729b9c; color: #83b9b8; border-radius: 5px; }
  .sheet-mobile-header .hp-stat .metric-value { font-size: 18px; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  .hp-stat .sheet-mobile-stat-icon { width: 22px; height: 26px; flex: none; }
  .sheet-mobile-header .hp-stat .stat-label { display: none; }
  .sheet-mobile-header .sheet-mobile-long-hp .metric-value { font-size: 12px; }
  .sheet-mobile-shape-panel { display: block; padding-bottom: 12px; }
  .sheet-mobile-shape-panel .sheet-wild-shape { margin: 0; padding: 12px; border: 1px solid #4d5572; border-radius: 6px; }
  .sheet-mobile-shape-panel .wild-shape-actions { gap: 6px; }
  .sheet-mobile-shape-panel .sheet-button { min-height: 44px; }
  .sheet-mobile-header .sheet-combat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0; }
  .sheet-mobile-header .combat-stat { display: flex; flex-direction: column; align-items: stretch; justify-content: start; gap: 5px; padding: 0; border: 0; border-radius: 0; min-height: 58px; min-width: 0; }
  .sheet-mobile-header .combat-stat .stat-label { font-size: 9px; font-weight: 750; }
  .sheet-mobile-header .combat-stat .metric-value, .sheet-mobile-header .inspiration-icon, .sheet-mobile-condition-count { display: grid; place-items: center; width: 100%; min-height: 40px; border: 1px solid #74798c; border-radius: 5px; font-size: 22px; line-height: 1.2; font-weight: 700; }
  .sheet-mobile-header .inspiration { background: transparent; }
  .sheet-mobile-header .inspiration[aria-pressed="true"] .inspiration-icon { background: #51462b; border-color: #d9b270; }
  .sheet-mobile-header .condition-stat { grid-column: auto; }
  .sheet-mobile-header .condition-stat .metric-value { display: none; }
  .sheet-mobile-header .sheet-combat > .sheet-field { display: flex; flex-direction: column-reverse; align-items: stretch; justify-content: start; gap: 5px; padding: 0; border: 0; margin: 0; }
  .sheet-mobile-header .sheet-combat .sheet-input { width: 100%; min-height: 40px; padding: 0; border: 1px solid #74798c; border-radius: 5px; background: transparent; font-size: 22px; font-weight: 700; text-align: center; }
  .sheet-mobile-header .sheet-combat .field-label { font-size: 9px; font-weight: 750; text-align: center; color: #e8e9ef; }
  .sheet-mobile-collapse { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 26px; margin: 6px 0 0; padding: 0; border: 0; background: transparent; color: #cbd0df; font: 750 9px/1.2 system-ui, sans-serif; text-transform: uppercase; cursor: pointer; }
  .sheet-mobile-collapse::before, .sheet-mobile-collapse::after { content: ''; height: 1px; background: #4d5369; flex: 1; }
  .sheet-mobile-header[data-collapsed="true"] :is(.sheet-header-stats, .sheet-combat, .sheet-mobile-shape-panel) { display: none !important; }
  .sheet-mobile-section-picker { position: relative; display: block; margin: 18px 18px 0; }
  .sheet-mobile-section-select { appearance: none; display: block; width: 100%; min-height: 44px; padding: 8px 42px 8px 10px; border: 1px solid #9a62e5; border-radius: 4px; box-shadow: -1px 0 #497eab; background: #20232d; color: #e8e9ef; font: 750 16px/1.3 system-ui, sans-serif; }
  .sheet-mobile-section-picker > svg { position: absolute; right: 8px; top: 9px; width: 25px; height: 25px; color: #a062e4; pointer-events: none; }
  .sheet-open .sheet-columns { display: block; padding: 18px 20px 24px; }
  .sheet-open .sheet-left { display: block; }
  #sheet-root[data-mobile-section="abilities"] .sheet-right { display: none; }
  #sheet-root:not([data-mobile-section="abilities"]) .sheet-left { display: none; }
  .sheet-open .sheet-tabs { display: none; }
  .sheet-open .sheet-tab-content { min-height: 0; }
  .sheet-open .ability-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
  .sheet-open .ability-block { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 9px 9px; }
  .sheet-open .ability-score { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; margin: 0; border: 0; }
  .sheet-open .ability-score .field-label { order: 0; font-size: 28px; line-height: 1.2; font-weight: 800; color: #e8e9ef; overflow-wrap: anywhere; }
  .sheet-open .ability-score::after { content: ''; order: 1; height: 1px; flex: 1; min-width: 6px; background: #4b4e58; }
  .sheet-open .ability-score .sheet-input { order: 2; width: 38px; min-height: 38px; padding: 0; text-align: right; font-size: 28px; line-height: 1.2; font-weight: 750; }
  .sheet-open .ability-score .sheet-input::-webkit-inner-spin-button { appearance: none; margin: 0; }
  .sheet-open .ability-roll { min-height: 38px; padding-left: 6px; margin: 0; gap: 2px; border: 1px solid #74798c; border-radius: 6px; font-size: 11px; font-weight: 750; color: #e8e9ef; }
  .sheet-open .ability-roll > .roll-value { min-width: 46px; margin: -2px -1px -2px 0; border-color: #74798c; border-radius: 5px; }
  .sheet-open .ability-roll > .roll-value .metric-value { min-width: 46px; line-height: 38px; font-size: 21px; }
  .sheet-open .ability-roll .sheet-check { min-height: 38px; font-size: 11px; gap: 3px; white-space: nowrap; }
  .sheet-open .ability-roll .sheet-check input { appearance: none; width: 14px; height: 14px; border: 1px solid #7c8297; border-radius: 50%; flex: none; }
  .sheet-open .ability-roll .sheet-check input:checked { background: #7391c5; box-shadow: inset 0 0 0 3px #20232d; }
  .sheet-open .skill-row { grid-column: 1 / -1; grid-template-columns: 27px minmax(0, 1fr) 46px; min-height: 40px; gap: 4px; margin: 0; border-radius: 25px 4px 4px 25px; }
  .sheet-open .skill-row.is-proficient { background: #2d3d65; }
  .sheet-open .skill-rank { height: 40px; }
  .sheet-open .skill-row::before { top: 7px; left: 5px; font-size: 19px; color: #7a8cb5; }
  .sheet-open .skill-name { font-size: 14px; font-weight: 800; }
  .sheet-open .skill-row > .roll-value { border-color: #74798c; border-radius: 5px; }
  .sheet-open .skill-row > .roll-value .metric-value { font-size: 21px; line-height: 38px; }
  .sheet-open .sheet-passive { margin: 26px 0 18px; }
  .sheet-open .passive-row { font-size: 13px; }
  .sheet-open .passive-row .metric-value { font-size: 16px; }
  .sheet-open .sheet-choices { margin: 20px 0; }
  .sheet-open .sheet-choices legend { font-size: 12px; }
  .sheet-open .sheet-left > .sheet-stat { display: inline-flex; gap: 10px; padding: 0; margin: 8px 0; }
  .sheet-open .sheet-left > .sheet-stat .metric-value { font-size: 22px; }
  .sheet-open .sheet-textarea { font-size: 14px; }
  .sheet-open .sheet-error { margin: 8px 12px; }
  .sheet-open .sheet-warning:not([hidden]) { margin: 8px 16px; }
}
@media (max-width: 359px) {
  .sheet-mobile-header { padding-inline: 12px; }
  .sheet-mobile-header .sheet-combat .stat-label, .sheet-mobile-header .sheet-combat .field-label { font-size: 8px; }
  .sheet-open .sheet-columns { padding-inline: 16px; }
  .sheet-open .ability-score .field-label { font-size: 22px; }
  .sheet-open .ability-score .sheet-input { font-size: 26px; }
  .sheet-open .ability-roll, .sheet-open .ability-roll .sheet-check { font-size: 10px; }
  .sheet-open .ability-roll > .metric-value { min-width: 40px; font-size: 19px; }
  .sheet-open .skill-name { font-size: 13px; }
  #sheet-root:has(.initiative-result:not([hidden])) .sheet-mobile-dice { bottom: 156px; }
}
