@font-face {
  font-family: "Ofan Mono";
  src: url("./assets/DejaVuSansMono.ttf") format("truetype");
  font-display: block;
}

@font-face {
  font-family: "Ofan Mono Hebrew";
  src: url("./assets/DejaVuSansMono-Bold.ttf") format("truetype");
  font-display: block;
}

html[data-ofan-runtime="2"] .ofan2-root {
  align-items: flex-end;
  gap: 10px;
}

html[data-ofan-runtime="2"] .ofan2-creature {
  width: 112px;
  height: auto;
  min-height: 144px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 13px 16px rgba(0, 0, 0, .38));
  cursor: grab;
}

html[data-ofan-runtime="2"] .ofan2-creature:hover {
  transform: none;
}

html[data-ofan-runtime="2"] .ofan2-creature > ofan-widget {
  --ofan2-width: 112px;
  display: block;
  width: 112px;
}

html[data-ofan-runtime="2"] .ofan2-panel {
  width: min(520px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 132px));
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@media (min-width: 701px) {
  html[data-ofan-runtime="2"] .ofan2-panel {
    position: relative;
  }
}

html[data-ofan-runtime="2"] .ofan2-panel > notification-center {
  display: block;
  width: 100%;
  max-height: inherit;
  --notification-font: "Ofan Mono", monospace;
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, .4));
}

html[data-ofan-runtime="2"] .ofan2-panel > notification-center[hidden] {
  display: none !important;
}

html[data-ofan-runtime="2"] .ofan2-panel > ofan-time-app {
  display: block;
  width: 100%;
  height: 100%;
  max-height: inherit;
}

html[data-ofan-runtime="2"] .ofan2-panel.ofan2-panel-time {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: 2;
}

html[data-ofan-runtime="2"] .ofan2-panel.ofan2-panel-time .ofan2-panel-close {
  display: none;
}

html[data-ofan-runtime="2"] .ofan2-panel > ofan-mood-app {
  display: block;
  width: 100%;
  max-height: inherit;
}

html[data-ofan-runtime="2"] .ofan2-panel > ofan-mood-app[hidden] {
  display: none !important;
}

html[data-ofan-runtime="2"] .ofan2-panel-close {
  position: absolute;
  z-index: 12;
  inset-block-start: -18px;
  inset-inline-end: -18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 3px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  background: linear-gradient(145deg, #ff92bd, #ec4e91);
  color: #fff;
  box-shadow: 0 10px 24px rgba(121, 24, 70, .36);
  cursor: pointer;
  touch-action: manipulation;
}

html[data-ofan-runtime="2"] .ofan2-panel-close svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
}

html[data-ofan-runtime="2"] .ofan2-panel-close:focus-visible {
  outline: 3px solid #6f3e85;
  outline-offset: 3px;
}

html[data-ofan-runtime="2"] .ofan-settings-app {
  width: 100%;
  min-height: min(560px, calc(100dvh - 160px));
  padding: 28px clamp(22px, 6vw, 42px) 34px;
  border: 4px solid #fff;
  border-radius: 38px;
  background: linear-gradient(160deg, #f2d4d5 0%, #f8e9d7 58%, #d8c3e4 100%);
  color: #52304e;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .4);
  font: 600 17px/1.45 "Ofan Mono", monospace;
}

html[lang^="he"][data-ofan-runtime="2"] .ofan-settings-app,
html[lang^="he"][data-ofan-runtime="2"] .ofan-settings-app * {
  font-family: "Ofan Mono Hebrew", "Ofan Mono", monospace;
  font-synthesis: none;
}

html[data-ofan-runtime="2"] .ofan-settings-app[hidden] {
  display: none !important;
}

html[data-ofan-runtime="2"] .ofan-settings-app h2 {
  margin: 58px 0 18px;
  color: #8d3e67;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.08;
}

html[data-ofan-runtime="2"] .ofan-settings-app p {
  max-width: 36ch;
  margin: 0 0 32px;
  color: #5e465d;
  font-size: clamp(16px, 3.6vw, 21px);
}

html[data-ofan-runtime="2"] .ofan-settings-back,
html[data-ofan-runtime="2"] .ofan-settings-toggle {
  min-height: 46px;
  border-radius: 15px;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

html[data-ofan-runtime="2"] .ofan-settings-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 0;
  background: rgba(255, 255, 255, .52);
  color: #674069;
}

html[data-ofan-runtime="2"] .ofan-settings-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-ofan-runtime="2"] .ofan-settings-app[dir="rtl"] .ofan-settings-back svg {
  transform: scaleX(-1);
}

html[data-ofan-runtime="2"] .ofan-settings-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px 11px 18px;
  border: 2px solid #b83875;
  background: #fff7fb;
  color: #a02963;
  font-weight: 800;
}

html[data-ofan-runtime="2"] .ofan-settings-toggle input {
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  margin: 0;
  appearance: none;
  border: 2px solid #9d7497;
  border-radius: 999px;
  background: #ddcbd9;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

html[data-ofan-runtime="2"] .ofan-settings-toggle input::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(60, 31, 55, .28);
  transition: transform .16s ease;
}

html[data-ofan-runtime="2"] .ofan-settings-toggle input:checked {
  border-color: #8d467d;
  background: #8d467d;
}

html[data-ofan-runtime="2"] .ofan-settings-toggle input:checked::before {
  transform: translateX(22px);
}

html[data-ofan-runtime="2"] .ofan-settings-back:focus-visible,
html[data-ofan-runtime="2"] .ofan-settings-toggle input:focus-visible {
  outline: 3px solid #6f3e85;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html[data-ofan-runtime="2"] .ofan-settings-toggle input,
  html[data-ofan-runtime="2"] .ofan-settings-toggle input::before {
    transition: none;
  }
}

.hlc-dm-ofan-setting span {
  min-width: 0;
}

.hlc-dm-ofan-setting strong,
.hlc-dm-ofan-setting small {
  display: block;
}

.hlc-dm-ofan-setting small {
  margin-top: 4px;
  color: var(--dim, #a99fbb);
  font-size: 12px;
  line-height: 1.35;
}

html[data-ofan-runtime="2"] .hlc-panel-pet-docked .ofan2-creature {
  width: 72px;
  min-height: 82px;
  cursor: default;
}

html[data-ofan-runtime="2"] .hlc-panel-pet-docked .ofan2-creature > ofan-widget {
  --ofan2-width: 72px;
  width: 72px;
}

html[data-ofan-runtime="2"] .hlc-panel-pet-hidden .ofan2-creature {
  visibility: hidden;
  pointer-events: none;
}

html[data-ofan-runtime="2"] .ofan2-panel > ofan-time-app[hidden] {
  display: none !important;
}

html[data-ofan-runtime="2"] .ofan2-restore,
html[data-ofan-runtime="2"] .ofan2-restore.hlc-paw-restore,
html[data-ofan-runtime="2"] .ofan2-restore.hlc-paw-restore[data-ofan-attention] {
  position: fixed;
  width: 88px;
  min-width: 88px;
  height: 74px;
  min-height: 74px;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
  transform: none;
  translate: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .38));
}

html[data-ofan-runtime="2"] .ofan2-restore > ofan-widget {
  --ofan2-paw-width: 88px;
  display: block;
  width: 88px;
  height: 74px;
}

html[data-ofan-runtime="2"] .ofan2-restore:focus,
html[data-ofan-runtime="2"] .ofan2-restore:focus-visible {
  outline: 0;
}

@media (max-width: 700px) {
  html[data-ofan-runtime="2"] .ofan2-creature {
    width: 96px;
    min-height: 124px;
  }

  html[data-ofan-runtime="2"] .ofan2-creature > ofan-widget {
    --ofan2-width: 96px;
    width: 96px;
  }

  html[data-ofan-runtime="2"] .ofan2-panel {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 154px - env(safe-area-inset-top, 0px));
  }

  html[data-ofan-runtime="2"] .ofan2-panel-close {
    inset-block-start: -12px;
    inset-inline-end: -5px;
  }

  html[data-ofan-runtime="2"] .ofan-settings-app {
    min-height: min(520px, calc(100dvh - 154px - env(safe-area-inset-top, 0px)));
    border-radius: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ofan-runtime="2"] .ofan2-root,
  html[data-ofan-runtime="2"] .ofan2-panel,
  html[data-ofan-runtime="2"] .ofan2-creature,
  html[data-ofan-runtime="2"] .ofan2-restore {
    animation: none !important;
    transition: none !important;
  }
}
