.portal-home{max-width:1120px;padding:20px 28px 26px;--portal-ink:#244c4d}
.portal-screen .world-bar button{visibility:hidden;pointer-events:none}
.portal-home a{text-decoration:none;color:var(--portal-ink);touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.portal-home a:focus-visible,.portal-more summary:focus-visible{outline:4px solid #207e86;outline-offset:4px}
.portal-home svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;flex:none}
.portal-welcome{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;min-height:254px;padding:28px 38px;border:1px solid #c8e1d0;border-radius:30px;background:linear-gradient(120deg,#e9f6e7,#d8ede6);box-shadow:0 7px 0 #d3e5d9}
.portal-intro{position:relative;z-index:2;width:55%}.portal-eyebrow{font-size:14px;font-weight:700;color:#5c7c70}
.portal-intro h1{font-size:clamp(28px,3.6vw,40px);line-height:1.28;letter-spacing:-.05em;margin:10px 0 18px;color:var(--portal-ink)}
.portal-start{display:inline-flex;align-items:center;gap:22px;justify-content:center;min-height:56px;padding:12px 24px;border-radius:19px;background:#2c8273;color:#fff!important;font-size:20px;font-weight:900;box-shadow:0 5px 0 #246a60;transition:transform .15s,box-shadow .15s}
.portal-start:active{transform:translateY(4px);box-shadow:0 1px 0 #246a60}
.portal-cast{position:absolute;width:45%;height:94%;right:0;bottom:0;pointer-events:none}.portal-cast:before{content:'';position:absolute;width:120%;height:80%;background:#b8d9bc;right:-18%;bottom:-34%;border-radius:50%}
.portal-path{position:absolute;width:100%;height:28%;left:-5%;bottom:1%;background:#e3d9a9;border-radius:50%;transform:rotate(-7deg)}
.portal-sprite{position:relative;display:block;overflow:hidden;flex:none}.portal-sprite>img{position:absolute;max-width:none!important;object-fit:fill!important;margin:0!important;pointer-events:none;filter:none!important}
.portal-cast .portal-sprite{position:absolute;bottom:12%;filter:drop-shadow(0 7px 3px #4d785e30)}.portal-jjae{height:86%;left:3%}.portal-poppy{height:40%;left:25%;bottom:8%!important}.portal-host{height:82%;right:2%}
.portal-heading{font-size:21px;font-weight:800;letter-spacing:-.04em;margin:24px 0 14px;color:var(--portal-ink)}
.portal-creative-doors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-bottom:18px}
.portal-creative-door{display:flex;align-items:center;justify-content:center;gap:17px;min-width:0;min-height:112px;padding:10px 20px;border:2px solid #d4e5cf;border-radius:24px;background:#f3f6df;--portal-creative-shadow:#d8e2c7;box-shadow:0 5px 0 var(--portal-creative-shadow)}
.portal-creative-drawing{border-color:#dbd4e5;background:#f8eef4;--portal-creative-shadow:#e5d6df}
.portal-creative-door:active{transform:translateY(3px);box-shadow:0 2px 0 var(--portal-creative-shadow)}
.portal-creative-picture{display:block;flex:none;width:126px;height:88px;pointer-events:none}
.portal-creative-picture>svg{display:block;width:100%;height:100%}
.portal-creative-door>strong{font-size:24px;line-height:1.25;letter-spacing:-.04em;word-break:keep-all;pointer-events:none}
.portal-doors{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.portal-door{position:relative;isolation:isolate;display:flex;flex-direction:column;overflow:hidden;min-width:0;min-height:218px;border:2px solid #d4e6de;border-radius:25px;background:#fffdfa;box-shadow:0 5px 0 #d7e6de;transition:transform .15s,box-shadow .15s}
.portal-door:active{transform:translateY(4px);box-shadow:0 1px 0 #d7e6de}.portal-picture{display:flex;position:relative;justify-content:center;align-items:center;width:100%;height:132px;margin:0;background:#e8f2e9;pointer-events:none}
.portal-picture>img{display:block;width:78%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 2px #284d4c20);pointer-events:none}.portal-door-copy{display:flex;flex-direction:column;padding:12px 16px 18px;gap:5px}.portal-door strong{font-size:24px;letter-spacing:-.04em;line-height:1.2}.portal-door-copy>span{font-size:13px;color:#657b75;line-height:1.35;padding-right:10px}
.portal-door-arrow{position:absolute;right:8px;bottom:22px;color:#52766d}.portal-door-arrow svg{width:19px;height:19px}
.portal-math{border-color:#eddfb4;box-shadow:0 5px 0 #e8dbb6}.portal-math .portal-picture{background:#faf0cc}.portal-social{border-color:#efd8c9;box-shadow:0 5px 0 #ead4c6}.portal-social .portal-picture{background:#fce8dc}.portal-science{border-color:#c9e0e8;box-shadow:0 5px 0 #c9dfe4}.portal-science .portal-picture{background:#e2f3f6}
.portal-name>img{width:80%;transform:translateX(-9%) scale(.95)}.portal-word{position:absolute;right:11px;top:12px;padding:6px 9px;border:2px solid #c6d5c0;border-radius:12px;background:#fffdf4;font-size:18px;font-weight:900;transform:rotate(4deg)}
.portal-eggs{gap:0;padding:27px 13px 2px}.portal-eggs>img{width:34%;height:86%;margin:0 -2px;transform:rotate(-7deg)}.portal-eggs>img:nth-of-type(2){transform:translateY(-5px)}.portal-eggs>img:nth-of-type(3){transform:rotate(7deg)}.portal-count{position:absolute;top:12px;left:0;right:0;text-align:center;font-size:23px;font-weight:900;letter-spacing:3px;color:#917249}
.portal-friends{gap:15%;padding:7px 12px}.portal-friends .portal-sprite{height:95%;max-width:44%}.portal-friends>img{position:absolute;width:34%;height:60%;left:33%;bottom:0}.portal-friends .portal-sprite:last-child{transform:scaleX(-1)}
.portal-science .portal-picture{overflow:hidden}.portal-science .portal-picture>img{width:45%;height:90%;z-index:1;transform:translate(4px,-9px) rotate(-10deg)}.portal-water{position:absolute;width:66%;height:48%;left:17%;bottom:10px;border:3px solid #83b8c4;border-top:4px solid #83b8c4;border-radius:5px 5px 28px 28px;background:#b4dfe9;box-shadow:inset 0 5px 0 #def9fa}.portal-ripple{position:absolute;z-index:2;left:26%;bottom:39px;width:48%;height:13px;border-bottom:3px solid #65a8bb;border-radius:50%}
.portal-more{margin-top:24px;border:1px solid #dce6df;border-radius:20px;background:#fffdfa}.portal-more summary{min-height:54px;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;font-size:16px;font-weight:700;color:#526d64}.portal-more summary::-webkit-details-marker{display:none}.portal-more summary svg{width:19px;height:19px;transform:rotate(90deg)}.portal-more[open] summary svg{transform:rotate(-90deg)}
.portal-extras{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 14px 14px}.portal-extras>a,.portal-extras>button{display:flex;align-items:center;gap:10px;min-height:70px;border:1px solid #e0e9df;border-radius:16px;background:#f8faf5;padding:10px 12px;text-align:left;font-size:16px;box-shadow:none}.portal-extras>a>img{width:54px;height:48px;object-fit:contain}.portal-extras>a>span:not(.portal-mini-count){display:flex;flex-direction:column;gap:4px;flex:1}.portal-extras b{font-size:16px;line-height:1.3}.portal-extras small{font-size:12px;color:#6a8176}.portal-extras svg{width:17px;height:17px;margin-left:auto}.portal-mini-count{min-width:54px;text-align:center;font-size:26px;font-weight:900;color:#528376}
.portal-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px;color:#75897d;font-size:13px}.portal-footer button{min-height:48px;border:0;background:transparent;padding:9px 2px 9px 12px;box-shadow:none;font-size:13px;color:#667d70}
@media(hover:hover){.portal-door:hover{transform:translateY(-3px);box-shadow:0 8px 0 #d7e6de}.portal-start:hover{background:#247765}}
@media(max-width:760px){.portal-home{padding:15px 18px 20px}.portal-doors{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.portal-welcome{min-height:220px;padding:23px 24px}.portal-intro{width:58%}.portal-intro h1{font-size:29px}.portal-eyebrow{font-size:12px}.portal-cast{width:44%;height:83%}.portal-cast .portal-jjae{left:0;height:86%}.portal-cast .portal-poppy{left:16%;height:37%}.portal-cast .portal-host{right:-10%;height:73%}.portal-start{font-size:18px;gap:14px;padding:12px 18px;min-height:53px}.portal-door{min-height:190px}.portal-picture{height:118px}.portal-door strong{font-size:23px}.portal-door-copy{padding:11px 13px 14px}.portal-heading{margin-top:23px;font-size:20px}.portal-door-copy>span{font-size:12px}}
@media(max-width:430px){.portal-home{padding:12px 14px 18px}.portal-welcome{min-height:194px;padding:19px 18px;border-radius:25px}.portal-intro h1{font-size:24px;line-height:1.3;margin-bottom:16px}.portal-eyebrow{font-size:11px}.portal-start{font-size:17px;min-height:51px;gap:10px;padding:10px 15px}.portal-start svg{width:20px;height:20px}.portal-cast{width:45%;height:78%}.portal-door{min-height:176px;border-radius:21px}.portal-picture{height:106px}.portal-door strong{font-size:22px}.portal-door-copy{padding:10px 11px 13px}.portal-door-copy>span{font-size:11px;letter-spacing:-.02em}.portal-door-arrow{right:4px;bottom:17px}.portal-word{font-size:15px;padding:5px 7px;right:6px}.portal-heading{margin:22px 0 13px;font-size:19px}.portal-more{margin-top:20px}.portal-footer{font-size:11px}.portal-extras{grid-template-columns:1fr}}
@media(max-height:490px) and (min-width:700px){.portal-home{padding-top:12px}.portal-welcome{min-height:175px;padding:17px 28px}.portal-intro h1{font-size:28px;margin:6px 0 12px}.portal-cast{width:40%;height:95%}.portal-doors{grid-template-columns:repeat(4,minmax(0,1fr))}.portal-picture{height:110px}.portal-door{min-height:184px}.portal-door strong{font-size:21px}.portal-heading{margin:20px 0 12px}}
@media(prefers-reduced-motion:reduce){.portal-home *{transition:none!important;animation:none!important}}
@media(max-width:760px){.portal-cast .portal-host{right:0}}
@media(max-width:760px){.portal-creative-doors{gap:14px;margin-bottom:18px}.portal-creative-door{flex-direction:column;gap:6px;min-height:150px;padding:11px 10px;border-radius:22px}.portal-creative-picture{width:114px;height:84px}.portal-creative-door>strong{font-size:22px}}
@media(max-width:430px){.portal-creative-doors{gap:12px;margin-bottom:16px}}
@media(max-width:430px){.portal-cast .portal-host{display:none}.portal-cast .portal-jjae{height:96%;left:5%}.portal-cast .portal-poppy{left:30%;height:42%;bottom:10%!important}.portal-intro h1{font-size:22px}}
@media(max-width:380px){.portal-intro h1{font-size:21px}}
/* Keep both concrete play choices visible on short landscape screens. */
@media(max-height:490px) and (min-width:560px){
 .portal-home{padding-top:8px}
 .portal-welcome{min-height:132px;padding:12px 22px}
 .portal-intro{width:55%}.portal-eyebrow{display:none}
 .portal-intro h1{font-size:22px;line-height:1.15;margin:0 0 8px}
 .portal-start{min-height:46px;font-size:17px;padding:9px 15px;gap:10px}
 .portal-cast{width:43%;height:92%}
 .portal-heading{font-size:19px;margin:12px 0 8px}
 .portal-creative-doors{gap:12px;margin-bottom:16px}
 .portal-creative-door{min-height:80px;flex-direction:row;gap:12px;padding:8px 12px}
 .portal-creative-picture{width:80px;height:56px}
 .portal-creative-door>strong{font-size:22px}
}

/* Same friend and same familiar writing entrance; no separate activity menu. */
.portal-ahyeon-invite{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:10px 16px;min-height:72px;border:2px solid #d8c9e6;border-radius:22px;background:#f1ebf7;color:#624d76;text-decoration:none}
.portal-ahyeon-invite>span:nth-child(2){flex:1;display:grid;gap:4px}
.portal-ahyeon-invite strong{font-size:19px}.portal-ahyeon-invite small{font-size:14px;color:#6c6277}
.portal-ahyeon-invite>span:last-child{font-size:32px}.portal-ahyeon-invite:focus-visible{outline:4px solid #6d5590;outline-offset:3px}
.portal-ahyeon-portrait{width:58px;height:58px;flex-shrink:0;border-radius:50%;background:#e5d9ed url('assets/ahyeon-friend-v322.png') no-repeat -31px 0;background-size:360px 120px}
@media(max-height:490px) and (min-width:560px){.portal-ahyeon-invite{padding:4px 12px;min-height:60px}.portal-ahyeon-invite small{display:none}}
