/* Approved exterior only. Game SVG, hitboxes, scene and control sizing remain untouched. */
body.internal-game-shell{background:#08090b;color:#eee9df}
body.internal-game-shell:before,body.internal-game-shell:after{display:none!important}
body.internal-game-shell>.grain{opacity:.02}
body.internal-game-shell>footer{display:none!important}
body.internal-game-shell>.topbar{position:relative;inset:auto;width:100%;max-width:none;min-height:76px;padding:14px max(24px,4vw);display:flex;align-items:center;gap:28px;background:#08090be6;border-bottom:0;z-index:20}
body.internal-game-shell .brand{width:auto;white-space:nowrap;flex-shrink:0;margin:0;color:#ddc092;font:22px/1.1 var(--serif,Georgia,serif);letter-spacing:0}
body.internal-game-shell .brand>img,body.internal-game-shell .brand>span{display:none}
body.internal-game-shell .brand:after{content:'По ту сторону страницы  ✶'}
body.internal-game-shell #navigation{position:static;inset:auto;display:flex;align-items:center;justify-content:center;gap:12px;flex:1;padding:0;border:0;background:none;box-shadow:none;transform:none;width:auto}
body.internal-game-shell #navigation:before,body.internal-game-shell #navigation:after{content:'';height:1px;min-width:24px;flex:1;background:linear-gradient(90deg,transparent,#b0925c)}
body.internal-game-shell #navigation:after{transform:rotate(180deg)}
body.internal-game-shell #navigation a{position:relative;padding:8px 12px;min-height:44px;font:21px/1.2 var(--serif,Georgia,serif);letter-spacing:0;color:#ddd8cf;border:1px solid transparent}
body.internal-game-shell #navigation a[aria-current]{border-color:#b99a63;color:#e6c896;background:#cba46409}
body.internal-game-shell #navigation a[aria-current]:after{content:'✦';position:absolute;left:50%;bottom:0;transform:translate(-50%,50%);width:18px;height:18px;line-height:18px;text-align:center;background:#08090b;font-size:13px;color:#d6b579}
body.internal-game-shell #navigation .nav-icon{display:none}
body.internal-game-shell #progress-toggle,body.internal-game-shell #effects-toggle,body.internal-game-shell .music-settings-button{display:none}
body.internal-game-shell #sound-toggle{margin:0;font-size:0!important;width:44px;height:44px;padding:0;min-width:44px;border:0;background:transparent;color:#dcc295}
body.internal-game-shell #sound-toggle:after{content:'♫';font:26px/1 Georgia,serif}
body.internal-game-shell>.topbar{min-height:82px;background:#08090b;border-bottom:1px solid #a78d5933}
body.internal-game-shell #observer-margin{display:block;max-width:620px;width:calc(100% - 40px);margin:24px auto 44px;padding:0;border:0;text-align:center}
body.internal-game-shell #observer-margin>div{max-width:none;margin:0;border:0;padding:20px 66px 24px;background:url('assets/game-shell/note-parchment.webp') center/100% 100% no-repeat;color:#57422d;min-height:170px;display:flex;flex-direction:column;justify-content:center;align-items:center}
body.internal-game-shell #observer-margin .eyebrow{color:#695238;font-size:10px;letter-spacing:1px}
body.internal-game-shell #observer-line{font:italic 24px/1.35 var(--serif,Georgia,serif);color:#57422d;margin:14px 0 18px}
body.internal-game-shell #observer-dismiss{font:22px/1.2 var(--serif,Georgia,serif);color:#57422d;background:none;border:0;border-bottom:1px solid #80613b;padding:2px 0;min-height:36px}
body.coffee-redesign .cafe-workspace{border-color:#c7ac73;outline:1px solid #a78d59;outline-offset:4px;box-shadow:0 0 0 2px #08090b,0 0 0 6px #b49a651a,0 12px 28px #0005}
body.coffee-redesign .cafe-workspace:after{content:'';position:absolute;inset:3px;border:1px solid #d8b97e80;border-radius:12px;z-index:6;pointer-events:none}
body.coffee-redesign .cafe-title{position:relative}
body.coffee-redesign .cafe-title:after{content:'✶';position:absolute;left:34%;right:36%;bottom:0;text-align:center;color:#b49a65;font:19px/20px Georgia,serif;background:linear-gradient(#ab8f5d,#ab8f5d) left center/calc(50% - 13px) 1px no-repeat,linear-gradient(#ab8f5d,#ab8f5d) right center/calc(50% - 13px) 1px no-repeat;pointer-events:none}
body.coffee-redesign .cafe-immersive{background:#08090b}
body.coffee-redesign .cafe-immersive .cafe-title:after{display:none}
@media(max-width:950px) and (min-width:701px){body.internal-game-shell .brand{font-size:17px}body.internal-game-shell>.topbar{gap:14px;padding-inline:24px}body.internal-game-shell #navigation{gap:2px}body.internal-game-shell #navigation a{font-size:18px;padding-inline:8px}}
@media(max-width:700px){
 body.internal-game-shell>.topbar{min-height:70px;height:70px;padding:0 18px;justify-content:flex-end}
 body.internal-game-shell .brand{margin-right:auto;font-size:17px;max-width:220px}
 body.internal-game-shell #navigation{position:fixed;left:0;right:0;top:auto;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding:7px 12px calc(8px + env(safe-area-inset-bottom));background:#08090bf5;border-top:1px solid #b99a63;z-index:100;backdrop-filter:blur(12px)}
 body.internal-game-shell #navigation:before,body.internal-game-shell #navigation:after{display:none}
 body.internal-game-shell #navigation a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px 2px;min-height:54px;font-size:16px;border:0!important;background:none!important}
 body.internal-game-shell #navigation a[aria-current]:after{display:none}
 body.internal-game-shell #navigation .nav-icon{display:block;font:27px/1 var(--serif,Georgia,serif)}
 body.internal-game-shell #observer-margin{width:calc(100% - 24px);margin:20px auto 100px}
 body.internal-game-shell #observer-margin>div{padding:22px 38px;min-height:190px}
 body.internal-game-shell #observer-line{font-size:21px}
 body.internal-game-shell #observer-dismiss{font-size:19px}
 body.coffee-redesign .cafe-title:after{display:none}
}
/* Override the legacy 420px note column; parchment margins keep all text on paper. */
body.internal-game-shell #observer-margin>div{width:100%;padding:38px 70px 48px;min-height:230px;background-color:#08090b;background-blend-mode:lighten}
@media(max-width:700px){body.internal-game-shell #observer-margin>div{padding:38px 42px 48px;min-height:260px}}
/* Nine-slice parchment grows with every real observer line, not a fixed ratio. */
body.internal-game-shell #observer-margin{max-width:760px}
body.internal-game-shell #observer-margin>div{position:relative;isolation:isolate;min-height:260px;padding:66px 100px 76px;background:none;border:0}
body.internal-game-shell #observer-margin>div:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border:solid transparent;border-width:64px 90px 78px;border-image:url('assets/game-shell/note-parchment.webp') 180 270 220 270 fill / 64px 90px 78px / 0 stretch;mix-blend-mode:lighten}
body.internal-game-shell #observer-line{width:100%;overflow-wrap:anywhere}
body.internal-game-shell #observer-dismiss{max-width:100%;height:auto;white-space:normal}
body.coffee-redesign .cafe-workspace{border-color:transparent;outline:0;box-shadow:none;border-image:url('assets/game-shell/coffee-frame.svg') 40 / 28px / 10px stretch}
body.coffee-redesign .cafe-workspace:after{border:0}
body.coffee-redesign .cafe-feedback{position:relative}
body.coffee-redesign .cafe-feedback:before{content:'✶';position:absolute;left:34%;right:34%;top:-18px;text-align:center;color:#bca168;font:16px/18px Georgia,serif;background:linear-gradient(#a68c59,#a68c59) left center/calc(50% - 12px) 1px no-repeat,linear-gradient(#a68c59,#a68c59) right center/calc(50% - 12px) 1px no-repeat;pointer-events:none}
@media(max-width:700px){body.internal-game-shell #observer-margin>div{padding:58px 46px 66px;min-height:280px}body.internal-game-shell #observer-margin>div:before{border-width:54px 42px 62px;border-image-width:54px 42px 62px}body.coffee-redesign .cafe-workspace{border-image-width:22px;border-image-outset:6px}}
/* One continuous nine-slice paper fill; no separate texture behind the text. */
body.internal-game-shell #observer-margin>div{background:#08090b}
body.coffee-redesign .cafe-feedback:before{top:5px}
/* Match the utility controls to the established 44px place-selection buttons. */
body.coffee-redesign .cafe-views button,body.coffee-redesign .cafe-utilities button{height:44px;min-height:44px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;line-height:1.2;padding-top:0;padding-bottom:0}
/* User-marked desktop alignment: utility centers sit on the title ornament line. */
@media(min-width:721px){body.coffee-redesign .cafe-play:not(.cafe-immersive) .cafe-utilities{align-self:flex-end;transform:translateY(12px)}}
