:root{--app-height:100dvh;--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px)}
html,body{overscroll-behavior:none}
#unity-canvas{height:var(--app-height)!important}
body.touch-game #unity-container{height:var(--app-height)!important}
body.touch-game #unity-canvas{touch-action:none;height:var(--app-height)!important}
body.touch-game #unity-fullscreen-button{display:none}
#touch-ui{display:none;position:fixed;inset:0;height:var(--app-height);z-index:25;pointer-events:none;font:15px/1.4 system-ui,-apple-system,sans-serif;color:#f7f5e8;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body.touch-game #touch-ui{display:block}
#touch-ui *{box-sizing:border-box}
#touch-ui [hidden]{display:none!important}
#touch-ui button,#touch-ui a,#touch-ui input,#touch-ui textarea,#touch-ui .touch-scroll{pointer-events:auto}
#touch-ui button,#touch-ui .touch-link{border:1px solid #8ab8aa55;border-radius:12px;background:#244e51;color:#fff9e8;padding:10px 13px;min-height:44px;font:600 14px/1.2 system-ui;cursor:pointer;touch-action:manipulation;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}
#touch-ui button:disabled{opacity:.45;cursor:default}
#touch-ui button:focus-visible,#touch-ui a:focus-visible,#touch-ui input:focus-visible{outline:3px solid #ffcd83;outline-offset:2px}
#touch-ui button.primary,#touch-ui .touch-link.primary{background:#bde4b2;color:#173f40;border-color:#d8ecc7}
#touch-ui .touch-top{position:absolute;top:calc(var(--safe-top) + 8px);left:calc(env(safe-area-inset-left,0px) + 10px);right:calc(env(safe-area-inset-right,0px) + 10px);display:flex;gap:8px;align-items:center}
#touch-ui .touch-identity{padding:7px 12px;background:#173a40eb;border:1px solid #b0d8c438;border-radius:14px;min-width:0;max-width:calc(100% - 108px);box-shadow:0 3px 18px #071d2440}
#touch-ui .touch-identity strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#touch-ui .touch-identity small{display:block;color:#c3dacd;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#touch-ui .touch-zoom{margin-left:auto;display:flex;gap:4px}
#touch-ui .touch-zoom button{width:44px;background:#173a40de;font-size:20px;padding:6px}
#touch-ui .touch-status{position:absolute;top:calc(var(--safe-top) + 72px);left:12px;right:12px;margin:0 auto;max-width:460px;padding:7px 12px;background:#173a40e6;border-radius:10px;text-align:center;font-size:12px}
#touch-ui .touch-bottom{position:absolute;bottom:0;left:0;right:0;padding:5px max(8px,env(safe-area-inset-right)) calc(5px + var(--safe-bottom)) max(8px,env(safe-area-inset-left));background:linear-gradient(transparent,#102f36ee 15%);display:grid;gap:5px}
#touch-ui .touch-chat{display:flex;gap:5px;align-items:center}
#touch-ui input[type=text],#touch-ui textarea{font:16px/1.3 system-ui;border-radius:12px;border:1px solid #a3c5b980;min-width:0;background:#f5f3e6;color:#1d3d40;padding:11px;min-height:44px}
#touch-ui #touch-chat-input{flex:1;width:1px}
#touch-ui #touch-chat-send{padding:10px}
#touch-ui .touch-nav{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;pointer-events:auto}
#touch-ui .touch-nav button{flex:1;white-space:nowrap;padding:10px;font-size:12px;background:#143b40}
#touch-ui .touch-nav button[aria-pressed=true]{background:#c6deb7;color:#123c3d}
#touch-ui .touch-stick{pointer-events:auto;touch-action:none;position:absolute;left:calc(env(safe-area-inset-left,0px) + 19px);bottom:calc(130px + var(--safe-bottom));width:112px;height:112px;border-radius:50%;border:2px solid #dcf1cd75;background:#17383e60;box-shadow:inset 0 0 0 18px #d3e7cf12;display:flex;align-items:center;justify-content:center}
#touch-ui .touch-stick span{width:48px;height:48px;border-radius:50%;background:#d6e6c8b0;border:2px solid #edffe2;pointer-events:none;box-shadow:0 4px 12px #0d283960}
#touch-ui .touch-stick-label{position:absolute;bottom:-23px;font-size:11px;font-weight:600;text-shadow:0 1px 5px #000;white-space:nowrap}
#touch-ui .touch-actions{position:absolute;right:calc(env(safe-area-inset-right,0px) + 14px);bottom:calc(132px + var(--safe-bottom));max-width:180px;display:grid;gap:7px;text-align:center}
#touch-ui .touch-actions button{background:#e9ddb6;color:#1e4242;border:1px solid #fff1cd;box-shadow:0 3px 10px #122f3d44}
#touch-ui .touch-actions small{padding:5px;background:#163b40dd;border-radius:9px}
#touch-ui .touch-drawer{position:absolute;right:calc(env(safe-area-inset-right,0px) + 8px);top:calc(var(--safe-top) + 70px);bottom:calc(113px + var(--safe-bottom));width:min(400px,calc(100% - 16px));background:#f5f1e1;color:#213f41;border:1px solid #adc3ac;border-radius:18px;overflow:hidden;box-shadow:0 12px 40px #07212860;pointer-events:auto;display:flex;flex-direction:column}
#touch-ui .touch-drawer>header{display:flex;gap:8px;align-items:center;padding:9px 12px;border-bottom:1px solid #c4d4c3;flex-shrink:0}
#touch-ui h2{font-size:19px;margin:0;flex:1}
#touch-ui h3{font-size:16px;margin:13px 0 7px}
#touch-ui p{margin:8px 0}
#touch-ui .touch-scroll{overflow:auto;overscroll-behavior:contain;padding:8px 14px 18px;min-height:0;flex:1;scrollbar-width:thin;touch-action:pan-y}
#touch-ui .touch-scroll button{margin:3px 4px 3px 0}
#touch-ui .touch-scroll .wide{width:100%;margin-right:0}
#touch-ui .touch-row{border-bottom:1px solid #cad6c4;padding:9px 0}
#touch-ui .touch-row strong{display:block}
#touch-ui .touch-row small,#touch-ui .touch-note{color:#506a62;font-size:13px}
#touch-ui .touch-scroll input[type=range]{width:100%;min-height:44px;accent-color:#38705b;touch-action:pan-x}
#touch-ui .touch-scroll label{display:block;font-weight:600;margin-top:12px}
#touch-ui .touch-history{position:absolute;left:8px;right:8px;bottom:calc(113px + var(--safe-bottom));max-width:440px;height:min(240px,40%);background:#163b40f2;border:1px solid #aed5bd55;border-radius:14px;pointer-events:auto;display:flex;flex-direction:column}
#touch-ui .touch-history header{padding:5px 9px;display:flex;align-items:center;gap:8px}
#touch-ui .touch-history strong{flex:1}
#touch-ui .touch-history .touch-scroll{font-size:14px;padding:2px 12px 12px;overflow-wrap:anywhere}
#touch-ui .touch-history p{margin:6px 0}
#touch-ui .touch-shade{position:absolute;inset:0;background:#082a375e;pointer-events:auto;display:flex;align-items:center;justify-content:center;padding:calc(var(--safe-top) + 12px) 12px calc(var(--safe-bottom) + 12px)}
#touch-ui .touch-card{background:#f5f1e1;color:#203e40;border-radius:20px;padding:18px;width:min(430px,100%);max-height:100%;overflow:auto;box-shadow:0 15px 60px #08263388;pointer-events:auto}
#touch-ui .touch-card header{display:flex;align-items:center;gap:6px}
#touch-ui .touch-card .wide{width:100%;margin-top:8px}
#touch-ui .touch-card small{display:block;color:#506a62}
#touch-ui .touch-memory{display:flex;gap:8px;margin:20px 0}
#touch-ui .touch-memory span{flex:1;height:45px;border-radius:12px;background:#bacbbe;display:grid;place-items:center;font-weight:700}
#touch-ui .touch-colours{display:flex;gap:5px}
#touch-ui .touch-colours button{flex:1;padding:10px 5px;color:#153a3c}
#touch-ui .touch-timing{height:32px;background:#c0cebf;margin:24px 4px;position:relative;border-radius:8px}
#touch-ui .touch-timing .zone{position:absolute;top:0;bottom:0;background:#65b87d}
#touch-ui .touch-timing .needle{position:absolute;top:-7px;bottom:-7px;width:5px;border-radius:3px;background:#1d3d40}
#touch-ui .touch-fish{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(130px + var(--safe-bottom));width:210px;background:#163b40ef;text-align:center;border-radius:15px;padding:10px;pointer-events:auto}
#touch-ui .touch-fish button{margin-top:5px}
#touch-ui .touch-map{position:absolute;right:12px;top:calc(var(--safe-top) + 70px);width:112px;height:96px;border-radius:10px;border:1px solid #ddedc877;background:#194952bb}
#touch-ui .touch-preview{position:absolute;top:calc(var(--safe-top) + 75px);right:10px;max-width:240px;padding:8px;border-radius:12px;background:#173a40e8;pointer-events:auto;font-size:13px}
#touch-ui.keyboard-open .touch-nav,#touch-ui.keyboard-open .touch-stick,#touch-ui.keyboard-open .touch-actions,#touch-ui.keyboard-open .touch-map{display:none}
@media(max-height:500px){
 #touch-ui .touch-identity{padding:5px 10px}
 #touch-ui .touch-top{top:calc(var(--safe-top) + 5px)}
 #touch-ui .touch-bottom{left:145px;right:150px;padding-bottom:calc(4px + var(--safe-bottom))}
 #touch-ui .touch-nav button{font-size:11px;padding:9px 7px}
 #touch-ui .touch-stick{width:96px;height:96px;left:18px;bottom:calc(23px + var(--safe-bottom))}
 #touch-ui .touch-stick-label{bottom:-18px}
 #touch-ui .touch-actions{right:10px;bottom:calc(15px + var(--safe-bottom));max-width:140px}
 #touch-ui .touch-actions button{padding:8px;font-size:13px}
 #touch-ui .touch-drawer{top:calc(var(--safe-top) + 58px);bottom:calc(8px + var(--safe-bottom));width:360px}
 #touch-ui .touch-history{left:145px;right:150px;bottom:calc(108px + var(--safe-bottom));height:calc(var(--app-height) - 174px);width:auto}
 #touch-ui .touch-map{top:calc(var(--safe-top) + 60px);width:96px;height:82px}
 #touch-ui .touch-status{top:8px;max-width:290px;left:260px;right:115px;font-size:11px}
 #touch-ui .touch-fish{bottom:calc(110px + var(--safe-bottom));width:260px;padding:7px}
 #touch-ui .touch-memory{margin:9px 0}
 #touch-ui .touch-memory span{height:32px}
 #touch-ui .touch-card{padding:12px 18px}
 #touch-ui.keyboard-open .touch-bottom{left:8px;right:8px}
}
@media(max-width:600px) and (max-height:500px){#touch-ui .touch-bottom{left:4px;right:4px}#touch-ui .touch-stick,#touch-ui .touch-actions{bottom:112px}#touch-ui .touch-history{left:8px;right:8px}}

/* Shared browser shell: one navigation drawer, with the room always visible. */
#touch-ui .touch-hamburger{border-radius:50%;width:46px;height:46px;flex:0 0 46px;padding:0;font-size:23px;background:#173a40ed;border:1px solid #c5e2c476;z-index:41}
#touch-ui .touch-identity{max-width:calc(100% - 56px)}
#touch-ui .touch-nav{position:absolute;top:0;bottom:0;left:0;width:min(285px,86%);display:flex;flex-direction:column;padding:calc(var(--safe-top) + 74px) 18px calc(20px + var(--safe-bottom));gap:6px;background:#163a40fa;border-right:1px solid #acd2bc55;overflow-y:auto;transform:translateX(-105%);transition:transform .28s cubic-bezier(.22,.8,.24,1);z-index:40;pointer-events:auto;visibility:hidden}
#touch-ui .touch-nav.open{transform:translateX(0);visibility:visible}
#touch-ui .touch-nav:not(.open){transition:transform .28s cubic-bezier(.22,.8,.24,1),visibility 0s .28s}
#touch-ui .touch-nav button{flex:none;min-height:44px;text-align:left;justify-content:flex-start;font-size:14px;padding:11px 14px}
#touch-ui .touch-nav h2{flex:0;margin:4px 0 18px;font-size:23px;font-weight:650;line-height:1.15}
#touch-ui .menu-eyebrow{font-size:10px;letter-spacing:.17em;color:#adceb9}
#touch-ui .menu-shade{position:absolute;inset:0;background:#06232c66;border:0;border-radius:0;z-index:39;pointer-events:auto}
#touch-ui .menu-notice{font-size:12px;color:#f3d69f}
#touch-ui .touch-bottom{left:0;right:0;margin:auto;max-width:760px}
#touch-ui .touch-stick{bottom:calc(91px + var(--safe-bottom))}
#touch-ui .touch-actions{bottom:calc(84px + var(--safe-bottom))}
#touch-ui .touch-history{bottom:calc(65px + var(--safe-bottom))}
#touch-ui .touch-drawer{bottom:calc(65px + var(--safe-bottom))}
#touch-ui .touch-fish{bottom:calc(85px + var(--safe-bottom))}
#touch-ui .wardrobe-summary{display:flex;gap:14px;align-items:center;margin-bottom:12px}
#touch-ui .wardrobe-summary img{width:115px;height:138px;object-fit:cover;border-radius:16px;background:#24424a}
#touch-ui .wardrobe-summary h3{font-size:20px;margin:0}
#touch-ui .wardrobe-summary p,#touch-ui .wardrobe-summary small{font-size:12px;line-height:1.4;color:#536b63}
#touch-ui .fur-palette{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;padding-bottom:12px}
#touch-ui .fur-palette button{width:100%;height:35px;min-height:35px;margin:0;padding:0;border:2px solid transparent;border-radius:10px}
#touch-ui .fur-palette button[aria-pressed=true]{outline:2px solid #24584b;outline-offset:1px;border-color:white}
#touch-ui .wardrobe-tabs{display:flex;gap:3px;margin-bottom:8px;overflow:auto}
#touch-ui .wardrobe-tabs button{padding:9px 10px;white-space:nowrap;min-height:38px;font-size:12px;margin:0;background:#dfE4d4;color:#294c46}
#touch-ui .wardrobe-tabs button[aria-pressed=true]{background:#315f54;color:white}
#touch-ui .wardrobe-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
#touch-ui .accessory-card{display:flex;flex-direction:column;background:#e4e5d8;color:#244540;min-width:0;min-height:110px;padding:5px;margin:0;border:2px solid transparent;gap:2px}
#touch-ui .accessory-card img{width:100%;height:73px;object-fit:contain}
#touch-ui .accessory-card span{font-size:11px;line-height:1.15;font-weight:600;text-align:center}
#touch-ui .accessory-card small{font-size:10px;color:#506b60}
#touch-ui .accessory-card[aria-pressed=true]{border-color:#2f735b;background:#c7dfbc}
#touch-ui .accessory-card.locked{filter:grayscale(1);opacity:.57}
#touch-ui .accessory-detail{position:sticky;bottom:0;margin-top:12px;border:1px solid #9bb99f;box-shadow:0 -3px 15px #173a4017;background:#edf0df;padding:10px;border-radius:12px}
#touch-ui .accessory-detail p{font-size:12px}
#touch-ui.profile-open .touch-drawer{width:min(560px,calc(100% - 16px))}
#touch-ui .mine-game{position:absolute;bottom:calc(85px + var(--safe-bottom));left:50%;transform:translateX(-50%);width:min(380px,calc(100% - 24px));padding:12px 16px;background:#f3efdfee;color:#234743;border:1px solid #aac7ac;border-radius:17px;pointer-events:auto;text-align:center;box-shadow:0 8px 35px #061e2970}
#touch-ui .mine-game small{display:block;font-size:12px;margin-top:5px}
#touch-ui .mine-game .touch-timing{margin:15px 4px;height:19px}
#touch-ui .mine-game button{margin:3px}
@media(min-width:900px){#touch-ui.profile-open .touch-drawer{width:550px}#touch-ui .wardrobe-grid{grid-template-columns:repeat(4,minmax(0,1fr))}#touch-ui .wardrobe-summary img{width:150px;height:180px}#touch-ui .fur-palette{grid-template-columns:repeat(16,1fr)}#touch-ui .fur-palette button{height:28px;min-height:28px}}
@media(max-height:500px){#touch-ui .touch-bottom{left:125px;right:125px}#touch-ui .touch-stick{bottom:calc(22px + var(--safe-bottom))}#touch-ui .touch-actions{bottom:calc(15px + var(--safe-bottom))}#touch-ui .touch-drawer{bottom:8px}#touch-ui .touch-nav{padding-top:62px}#touch-ui .touch-nav h2{margin-bottom:8px}#touch-ui .touch-nav button{min-height:39px;padding:8px 12px}#touch-ui .touch-history{bottom:60px;height:calc(var(--app-height) - 135px)}#touch-ui .mine-game{bottom:70px;width:330px;padding:8px 12px}#touch-ui .wardrobe-summary img{width:85px;height:102px}}
@media(max-width:600px) and (max-height:500px){#touch-ui .touch-bottom{left:4px;right:4px}#touch-ui .touch-stick,#touch-ui .touch-actions{bottom:80px}}
@media(prefers-reduced-motion:reduce){#touch-ui .touch-nav{transition:none!important}}

/* Social discovery and unobtrusive request notifications. */
.friend-filters{display:flex;gap:6px;margin:4px 0 12px;flex-wrap:wrap}
.friend-filters button{flex:1;white-space:nowrap}.friend-filters [aria-pressed=true]{background:#b9dea7;color:#173c40}
#friend-search{width:100%;box-sizing:border-box;padding:12px;border-radius:12px;border:1px solid #80a49a;font:inherit;background:#fffdf2;color:#173c40}
.friend-online>small{color:#2e694c}.friend-more{margin-top:8px}.friend-more summary{cursor:pointer;font-size:.85em;opacity:.75;padding:6px}
.touch-hamburger{position:relative}.friend-badge{position:absolute;right:-5px;top:-5px;min-width:21px;height:21px;padding:1px 4px;box-sizing:border-box;border-radius:20px;background:#ffbd82;color:#203d3f;font:bold 12px/19px sans-serif;border:1px solid #203d3f}
.friend-notice{position:absolute;top:calc(78px + env(safe-area-inset-top));left:12px;max-width:min(420px,calc(100% - 24px));box-sizing:border-box;pointer-events:auto;display:flex;align-items:center;gap:8px;padding:12px;border-radius:14px;background:#f4f0d9;color:#173c40;box-shadow:0 5px 24px #0003;z-index:21;font-size:14px}
.friend-notice strong{flex:1}.friend-notice button{font:inherit;border:0;border-radius:8px;padding:9px;background:#b9dea7;color:#173c40}.friend-notice[hidden]{display:none}
#touch-ui .friend-filters button[aria-pressed="true"]{background:#b9dea7;color:#173c40;box-shadow:inset 0 0 0 2px #78a879}

#touch-ui .chat-privacy-note{display:block;font-size:10px;line-height:1.3;text-align:center;color:#d3e3dc}#touch-ui .chat-privacy-note a{color:inherit;text-decoration:underline;pointer-events:auto}

.daily-gift{background:#e4ebdb;border:1px solid #c1cbb5;border-radius:18px;padding:14px;margin:14px 0;color:#1b3d40}.daily-gift-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:12px 0}.daily-gift-days>div{text-align:center;border-radius:9px;padding:8px 2px;background:#f6f3e7}.daily-gift-days small,.daily-gift-days strong{display:block}.daily-gift-days .is-today{background:#264f50;color:white;outline:2px solid #d4a751}.daily-gift-days .is-collected{opacity:.55}.daily-gift>small{display:block;line-height:1.4;margin-top:8px}.daily-member{color:#75478b;font-weight:700}.daily-ready{position:relative}.daily-ready:after{content:'🎁';font-size:13px;position:absolute;right:0;top:0}

/* This illustration is a construction marker, not a promised gameplay image. */
#touch-ui .dungeon-preview-cover{display:grid;place-items:center;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 75%,#b0884650,transparent 45%),linear-gradient(150deg,#33424c,#141b24);min-height:130px}
#touch-ui .dungeon-door{position:absolute;bottom:-27px;font:170px/1 Georgia,serif;transform:rotate(180deg);color:#76817e;opacity:.65}
#touch-ui .dungeon-lantern{position:relative;color:#ffe4a5;font:70px/1 Georgia,serif;text-shadow:0 0 28px #ffcc7480}
