/* Shared across every page shell; no remote fonts, images, or tracking. */
body.has-layout-help {
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

body.has-layout-help #toast {
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  max-width: calc(100vw - 40px);
}

.layout-help {
  position: fixed;
  left: max(20px, env(safe-area-inset-left, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  direction: rtl;
  border: 1px solid #252525;
  border-radius: 4px 14px 4px 14px;
  background: #ffda38;
  color: #252525;
  font-family: LayOutCairo, Tahoma, Arial, sans-serif;
  text-decoration: none;
  box-shadow: 4px 4px 0 #252525, 0 8px 24px #00000018;
  -webkit-tap-highlight-color: transparent;
}

.layout-help__icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.layout-help svg {
  display: block;
  width: 27px;
  height: 27px;
}

.layout-help__text {
  display: grid;
  gap: 1px;
  text-align: right;
  line-height: 1.55;
}

.layout-help strong { font-size: 15px; font-weight: 700; }
.layout-help small { font-size: 10px; }
.layout-help:hover { background: #ffe66d; color: #252525; }
.layout-help:focus-visible { outline: 3px solid #252525; outline-offset: 7px; }

@media (prefers-reduced-motion: no-preference) {
  .layout-help { transition: background-color .15s, box-shadow .15s; }
  .layout-help:hover { box-shadow: 2px 2px 0 #252525, 0 8px 24px #00000018; }
}

@media (max-width: 600px) {
  .layout-help {
    left: max(14px, env(safe-area-inset-left, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 9px;
    min-height: 54px;
    padding: 8px 12px;
  }
  .layout-help strong { font-size: 14px; }
  .layout-help small { font-size: 9px; }
}

@media print {
  .layout-help { display: none !important; }
  body.has-layout-help { padding-bottom: 0; }
}
