#pipAdventure, #pipDialog { font-family: 'Fredoka One', sans-serif; color: #29263f; }
#pipAdventure[hidden] { display: none; }
#pipAdventure .pip-panel-close { position:absolute;top:4px;right:4px;width:44px;min-height:44px;padding:0;border-radius:6px;background:transparent;font:26px/1 system-ui,sans-serif; }
#pipAdventure>.pip-eyebrow { min-height:36px;padding-right:28px;box-sizing:border-box; }
#pipAdventure { position: fixed; top: 76px; right: 18px; z-index: 60; width: 280px; box-sizing: border-box; padding: 22px; border: 2px solid #e8c46c; border-radius: 22px; background: #fff9e9; box-shadow: 0 12px 36px #30233130; }
.pip-eyebrow { font: 800 11px/1.5 system-ui, sans-serif; letter-spacing: .1em; color: #7a581d; }
#pipAdventure h2 { font-size: 23px; margin: 8px 0 10px; }
#pipAdventure p, #pipDialog p { font: 600 15px/1.55 system-ui, sans-serif; }
.pip-progress { display: flex; gap: 6px; margin: 16px 0; }
.pip-progress span { flex: 1; border-radius: 8px; padding: 7px 2px; text-align: center; font: 700 11px system-ui, sans-serif; color: #625e56; background: #e9e3d5; }
.pip-progress span.awake { color: #27532c; background: #dbeacb; }
#pipAdventure button, #pipDialog button { min-height: 48px; border: 0; border-radius: 14px; padding: 12px 18px; background: #f5c84e; color: #29263f; font: 700 15px/1.3 system-ui, sans-serif; cursor: pointer; }
#pipAdventure button { width: 100%; }
#pipAdventure button:hover, #pipDialog button:hover { filter: brightness(.96); }
#pipAdventure button:focus-visible, #pipDialog button:focus-visible { outline: 3px solid #4a4594; outline-offset: 3px; }
#pipAdventure .pip-save, #pipDialog .pip-save { font-size: 12px; color: #6a6256; margin: 12px 0 0; }
#pipDialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; margin: auto; padding: 0; border: 2px solid #e8c46c; border-radius: 26px; background: #fff9e9; overflow: auto; }
#pipDialog::backdrop { background: #191b3a99; }
html:has(#pipDialog[open]), body:has(#pipDialog[open]), #pipDialog { touch-action: pan-y; }
.pip-dialog-body { padding: 28px; position: relative; }
#pipDialog h2 { font-size: 27px; line-height: 1.2; margin: 20px 35px 12px 0; }
#pipDialog .pip-close { position: absolute; right: 8px; top: 8px; padding: 8px; width: 44px; min-height: 44px; background: transparent; font-size: 26px; }
#pipPuzzle { text-align: center; }
#pipPuzzle img { display: block; max-width: 100%; object-fit: contain; margin: 0 auto; }
#pipFeedback:empty, #pipPuzzle:empty { display: none; }
#pipFeedback { border-radius: 12px; padding: 10px 14px; background: #e7efd8; color: #2f4b29; }
#pipButtons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
#pipButtons button { flex: 1 1 100px; }
#pipButtons .pip-secondary { flex-basis: 100%; background: #eee6d6; }
body.pip-adventure-active #bwTaskPanel { display: none; }
body.pip-adventure-active #beeActionRail .beeRailCard--progress { display: none; }
@media (max-width: 600px) {
  #pipAdventure { top: 155px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: min(330px, calc(100vw - 32px)); padding: 14px 18px; }
  #pipAdventure h2 { font-size: 20px; margin: 4px 0; }
  #pipAdventure p { margin: 6px 0; font-size: 13px; }
  .pip-progress { margin: 8px 0; }
  #pipAdventure .pip-save { display: none; }
  .pip-dialog-body { padding: 22px; }
  #pipDialog h2 { font-size: 24px; }
  #pipPuzzle img { height: 150px; }
  body.pip-adventure-active #beeCompass { display: none; }
  body.pip-adventure-active #beeActionRail { z-index: 70; }
  body.pip-adventure-active #beeCollectionsBody { max-height: calc(100dvh - 230px); overflow-y: auto; }
  body.pip-adventure-active #beeUI { left: auto; right: 12px; transform: none; }
  body.pip-adventure-active #beeTitle { font-size: 18px; }
  body.pip-adventure-active #beeHint { display: none; }
}
@media (max-height: 500px) {
  #pipAdventure { top: 76px; bottom: auto; left: auto; right: 12px; transform: none; width: 240px; max-height: calc(100dvh - 90px); padding: 12px; overflow-y: auto; }
  #pipAdventure .pip-progress, #pipAdventure .pip-save { display: none; }
}
