/* My Little Journey v1.0 · 03-interactions.css · Reihenfolge beim Laden beibehalten. */
/* Functional social and shoutbox HUD: no level, coins or overlapping ticket */
.journal-top .level{display:none!important}
.ticket{display:none!important}
.topbar .status.new-hud{position:relative!important;top:auto!important;right:auto!important;margin-left:auto;display:flex!important;align-items:center;gap:9px;z-index:35!important}
.new-hud .hud-pill{border:1px solid #fff9!important;background:linear-gradient(120deg,#fdf8ffed,#e2efffed)!important;color:#58739b!important;box-shadow:0 4px 0 #507aa26b!important;border-radius:22px!important;padding:10px 17px!important;font-size:12px!important;font-weight:900;white-space:nowrap}
.new-hud .hud-pill:hover{background:#fff!important;transform:translateY(-2px)}
.new-hud #sound{flex-shrink:0}
.social-wrap{position:relative}
.social-menu{position:absolute;right:0;top:calc(100% + 11px);width:230px;background:#fffafefa;border:2px solid #b9d0e7;border-radius:17px;padding:12px;box-shadow:0 12px 30px #234e7c55;z-index:50;display:grid;gap:7px;color:#526b91}
.social-menu[hidden],.shout-overlay[hidden]{display:none!important}
.social-menu strong{font-size:13px;padding:4px 7px}
.social-menu a{display:flex;justify-content:space-between;text-decoration:none;color:#526b91;background:#edf4fc;border-radius:10px;padding:10px;font-weight:800;font-size:12px}
.social-menu a:hover{background:#fce7f2}
.social-hint{font-size:10px;line-height:1.5;color:#8e96aa;padding:5px}
.shout-overlay{position:fixed;inset:0;background:#1b365a8c;z-index:100;display:grid;place-items:center;padding:15px;backdrop-filter:blur(5px)}
.shout-dialog{width:min(100%,465px);max-height:min(90dvh,760px);overflow:auto;background:#fffdfb;border:5px solid #a4c5e4;border-radius:24px;box-shadow:0 18px 60px #1937578c;padding:20px;color:#526b91}
.shout-header{display:flex;justify-content:space-between;align-items:start;gap:12px;border-bottom:2px dashed #eadbe8;padding-bottom:12px}
.shout-header h2{margin:3px 0;color:#ab7a9e}.shout-header p{margin:0;font-size:12px}
.shout-kicker{font-size:9px;font-weight:900;letter-spacing:2px;color:#b69db9}
.shout-close{border:0;border-radius:50%;background:#f7e3ee;color:#986e8e;font-size:26px;width:38px;height:38px}
.shout-messages{display:grid;gap:10px;margin:15px 0;max-height:180px;overflow-y:auto}
.shout-messages article{background:#eff5fb;border:1px solid #dce7f4;border-radius:12px;padding:10px 13px;font-size:12px}
.shout-messages article:nth-child(even){background:#fdf0f6}.shout-messages p{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.shout-form{display:grid;gap:7px}.shout-form label{font-weight:900;font-size:12px}
.shout-form input,.shout-form textarea{font:inherit;font-size:13px;padding:10px 12px;border:1px solid #c7d7e9;border-radius:11px;background:#fff;width:100%;color:#526b91}
.shout-form button{background:#e5aac7;color:#fff;border:0;border-radius:14px;padding:12px;font-weight:900;margin-top:5px}
.shout-form small{font-size:10px;color:#8b91a1;line-height:1.5}
@media(max-width:760px){.topbar .status.new-hud{margin-left:auto!important;gap:5px}.new-hud .hud-pill{padding:8px 10px!important;font-size:11px!important}.topbar .status.new-hud #sound{padding:5px 9px!important}.social-menu{right:-60px;width:215px}}
@media(max-width:420px){.new-hud .hud-pill{padding:8px!important;font-size:10px!important}.brand small{display:none}.topbar{gap:3px}.new-hud #sound{display:none}}

/* Free template demo content */
.demo-lead{font-size:clamp(13px,1.1vw,16px);line-height:1.8;margin-bottom:20px}
.demo-gallery{margin-top:12px}
.demo-project{cursor:default!important}
.demo-project img{object-fit:cover;aspect-ratio:1.7;width:100%}
.demo-intro{display:flex;gap:18px;align-items:center;margin:15px 0 22px;background:#fff7fbdd;border:1px solid #f1dce8;border-radius:18px;padding:12px}
.demo-intro img{width:125px;max-width:35%;aspect-ratio:1;object-fit:cover;border:5px solid white;box-shadow:0 3px 12px #536d9140;border-radius:13px}
.demo-intro p{line-height:1.75}
@media(max-width:540px){.demo-intro{flex-direction:column;align-items:stretch}.demo-intro img{max-width:100%;width:100px}}

/* VIEWPORT LAYOUT: desktop does not scroll vertically; only long notebook pages do. */
@media (min-width: 761px) {
  html,body { height:100%; overflow:hidden!important; }
  .world {
    height:100vh!important;height:100dvh!important;
    min-height:0!important;max-height:100dvh!important;
    overflow:hidden!important;
    grid-template-rows:clamp(72px,11vh,105px) minmax(0,1fr)!important;
    padding-bottom:12px!important;
  }
  .topbar { grid-row:1!important; }
  .sidebar {
    grid-row:2!important;position:sticky!important;
    top:0!important;align-self:start!important;
    max-height:calc(100dvh - 100px)!important;
    overflow-y:auto!important;scrollbar-width:thin;
    overscroll-behavior:contain;
    margin-top:0!important;
  }
  .sidebar nav { gap:clamp(3px,.65vh,8px)!important; }
  .sidebar nav button,.sidebar nav button:hover,.sidebar nav button.active {
    min-height:clamp(36px,5.8vh,51px)!important;
    height:clamp(36px,5.8vh,51px)!important;
  }
  .sidebar nav button>img {width:clamp(25px,4.2vh,36px)!important;height:clamp(25px,4.2vh,36px)!important;flex-basis:clamp(25px,4.2vh,36px)!important}
  .sidefoot {margin-top:9px!important;padding:7px 10px!important}
  .journal {
    align-self:stretch!important;
    min-height:0!important;
    height:calc(100% - 54px)!important;
    margin-top:49px!important;
    margin-bottom:0!important;
    display:flex!important;
    flex-direction:column!important;
  }
  .journal-top {flex:0 0 0!important}
  .notebook {
    min-height:0!important;height:100%!important;
    display:flex!important;flex-direction:column!important;
    overflow:visible!important;
    padding-top:clamp(24px,3.2vh,43px)!important;
    padding-bottom:10px!important;
  }
  .notebook .page {
    min-height:0!important;
    flex:1 1 auto!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    scrollbar-width:thin;
    scrollbar-color:#a5c1dc transparent;
    padding-right:5px;
  }
  .notebook .page-bottom {flex:0 0 auto!important;margin-top:7px}
  .character-stage {max-height:calc(100dvh - 145px)!important;min-height:0!important;top:0!important;height:calc(100dvh - 145px)!important;margin-top:0!important}
  .character-art {max-height:100%!important}
  .character-note {display:none!important}
  .station-board {pointer-events:none}
}
/* The welcome page is designed to fit without scrolling at normal desktop sizes. */
@media (min-width:761px) and (max-height:850px){
  .page[data-home="true"] .demo-lead {margin-bottom:9px;font-size:12px;line-height:1.5}
  .page[data-home="true"] .two-col {gap:8px}
  .page[data-home="true"] .info-card {padding:9px}
  .page[data-home="true"] .divider {margin:9px 0}
  .page[data-home="true"] .section-title {margin-bottom:5px;font-size:13px}
  .page[data-home="true"] .demo-gallery {margin-top:5px}
  .page[data-home="true"] .demo-project img {aspect-ratio:2.8}
  .page[data-home="true"] .paper-note {padding:6px 9px;font-size:10px}
  .page[data-home="true"] p {line-height:1.4}
}
@media (max-width:760px){
  html,body {height:auto;overflow-x:hidden;overflow-y:auto}
  .world{overflow:clip!important}
  .sidebar {
    position:sticky!important;top:0!important;left:0!important;
    z-index:40!important;
    background:linear-gradient(90deg,#5277a9ed,#7ea4c9e6)!important;
    backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
    border-bottom:1px solid #fff8;
    padding:5px 10px!important;
    margin:0!important;
  }
  .sidebar nav{padding:2px 0 5px!important}
  .sidebar nav button,.sidebar nav button:hover,.sidebar nav button.active {min-height:43px!important;height:43px!important}
  .journal{scroll-margin-top:76px}
  .notebook .page {overflow:visible}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.page{animation:none!important}}

/* Anime scrapbook gallery lightbox */
.demo-gallery .demo-project{cursor:zoom-in!important;position:relative}
.demo-gallery .demo-project:after{content:"⌕";position:absolute;right:9px;top:7px;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;background:#fffdf8d9;color:#6588b3;font-size:21px;box-shadow:0 2px 6px #33577b3d;pointer-events:none}
.demo-gallery .demo-project:hover{transform:translateY(-4px)}
.demo-gallery .demo-project:focus-visible{outline:3px solid #e8a9c9;outline-offset:3px}
.image-lightbox[hidden]{display:none!important}
.image-lightbox{position:fixed;inset:0;z-index:300;background:#1d3554e8;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);display:grid;place-items:center;padding:clamp(8px,3vw,25px)}
.lightbox-shell{width:min(100%,1050px);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;gap:9px;border:3px solid #d6e5f6;border-radius:22px;background:linear-gradient(150deg,#fff8fbea,#eef6ffeb);box-shadow:0 18px 75px #071a3388;padding:clamp(10px,2vw,20px);color:#627da0}
.lightbox-toolbar{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:900}
.lightbox-icon,.lightbox-arrow{cursor:pointer;display:grid;place-items:center;background:#ffffffeb;border:1px solid #bcd2e9;color:#5778a4;box-shadow:0 3px 9px #3157832b}
.lightbox-icon{width:39px;height:39px;border-radius:50%;font-size:17px}
.lightbox-stage{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:9px;align-items:center;min-height:0;flex:1}
.lightbox-stage img{width:100%;height:auto;max-height:min(69dvh,740px);min-height:0;object-fit:contain;border-radius:12px;filter:drop-shadow(0 6px 12px #38557633)}
.lightbox-arrow{width:44px;height:54px;border-radius:14px;font-size:37px;line-height:1}
.lightbox-icon:hover,.lightbox-arrow:hover{background:#fbe9f4;color:#b07b9e}
.lightbox-icon:focus-visible,.lightbox-arrow:focus-visible{outline:3px solid #dba0c6;outline-offset:2px}
.lightbox-bottom{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:11px}
.lightbox-bottom #lightboxCaption{font-weight:900;font-size:14px}
@media(max-width:600px){.lightbox-stage{grid-template-columns:34px minmax(0,1fr) 34px;gap:4px}.lightbox-arrow{width:34px;height:44px;font-size:29px}.lightbox-stage img{max-height:65dvh}.lightbox-bottom span:last-child{font-size:9px}}

/* NAVIGATION FIX: keep playful hover movement without horizontal scrollbar */
@media (min-width:761px){
  .sidebar{box-sizing:border-box!important;min-width:0!important;overflow-x:hidden!important;overflow-y:auto!important;scrollbar-width:none!important;padding-right:7px!important;overscroll-behavior-x:none!important;}
  .sidebar::-webkit-scrollbar{display:none!important;}
  .sidebar nav{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:clip!important;padding:1px 0 5px 1px!important;}
  .sidebar nav button,.sidebar nav button.active,.sidebar nav button:hover{box-sizing:border-box!important;width:calc(100% - 6px)!important;max-width:calc(100% - 6px)!important;min-width:0!important;flex-shrink:0!important;}
  .sidebar nav button:hover{transform:translateX(3px)!important;}
  .sidebar nav button .nav-caption{min-width:0!important;overflow:hidden;text-overflow:ellipsis;}
  .sidefoot{max-width:calc(100% - 6px)!important;box-sizing:border-box!important;}
}
/* Narrow desktop: compact labels and icons instead of oversized empty button width */
@media (min-width:761px) and (max-width:1200px){
  .sidebar{padding-right:5px!important;}
  .sidebar nav button,.sidebar nav button.active,.sidebar nav button:hover{width:calc(100% - 5px)!important;max-width:calc(100% - 5px)!important;}
  .sidebar nav button>img{width:30px!important;height:30px!important;flex-basis:30px!important;}
  .sidebar nav button .nav-caption{font-size:12px!important;}
}

