:root{--cream:#fff2dc;--ink:#512f1d;--muted:#916d53;--width:1170px}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:100px}
body{margin:0;background:var(--cream);color:var(--ink);font-family:'Microsoft JhengHei','Noto Sans TC',system-ui,sans-serif;line-height:1.5;-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}img{display:block;max-width:100%;height:auto}h1,h2,h3,p{margin:0}
[hidden]{display:none!important}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #e15e66;outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip-link{position:absolute;top:-80px;left:10px;background:#fff;padding:10px;z-index:999}.skip-link:focus{top:10px}
.site-width{width:min(var(--width),calc(100% - 36px));margin-inline:auto}
.site-header{background:#fff6e9;position:sticky;top:0;z-index:50;box-shadow:0 2px 0 #aa7d5033}
.header-inner{min-height:96px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.header-logo{display:block;width:220px;flex:none}.header-logo img{width:100%}
.desktop-nav{display:flex;gap:5px;align-items:center;justify-content:center;min-width:0;flex:1}
.desktop-nav a,.desktop-nav button{display:block;border:0;padding:0;background:none;flex:0 1 160px;max-width:174px;min-width:100px}
.desktop-nav img{width:100%}.desktop-nav :is(a,button):hover{transform:translateY(-2px)}
.header-food{display:block;flex:none;width:170px}.header-food img{width:100%}
.hero{padding-top:22px}.hero-stage{min-height:540px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0;background:url('assets/scenes/foodstreet.webp') center 65%/cover no-repeat;position:relative;overflow:hidden;border-radius:26px;box-shadow:0 5px 0 #b18154}
.hero-logo{width:min(54%,570px);margin-top:12px;filter:drop-shadow(0 6px 5px #533b2044)}
.hero-message{position:relative;width:min(64%,610px);margin-top:0}
.hero-message>img{width:100%}
.hero-message-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:0 8% 2%;line-height:1.35}
.hero-message-text strong{font-size:clamp(14px,1.75vw,20px);font-weight:900}.hero-message-text small{font-size:clamp(9px,.95vw,13px);margin-top:5px;color:#86533b;font-weight:800}
.start-button{display:block;width:min(41%,410px);margin-top:-2px;z-index:1}.start-button img{width:100%}.start-button:hover{transform:translateY(-3px)}
.games-section{padding:54px 0 70px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h1,.section-heading h2{font-size:clamp(25px,3vw,39px);letter-spacing:-.03em}.section-heading p{font-size:14px;color:var(--muted);margin-top:6px}.section-eyebrow{display:block;font-size:11px;letter-spacing:.12em;color:#b36c34;font-weight:800;margin-bottom:6px}.section-mascot{width:100px}
.filters{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin-bottom:16px}
.filter-button{flex:0 1 201px;width:201px;min-width:0;display:block;padding:0;border:0;background:none;transition:transform .12s ease,filter .12s ease}
.filter-button img{width:100%;height:auto;object-fit:contain}
.filter-button:hover,.filter-button.selected{transform:translateY(-2px);filter:drop-shadow(0 3px 2px #9a5e3b5c)}
.search-bar{display:block;position:relative;width:min(100%,510px);margin:0 auto 28px;aspect-ratio:624/103}
.search-art{width:100%;height:auto}
.search-bar input{position:absolute;left:16.5%;top:27%;width:57%;height:57%;padding:0 2px;border:0;outline:0;background:transparent;color:#593926;font-size:clamp(12px,1.3vw,17px);font-weight:700;line-height:normal;min-width:0;appearance:none}
.search-bar input::placeholder{color:#876a56;opacity:.8}
.search-bar:focus-within{filter:drop-shadow(0 2px 5px #c17f4f70)}
.game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:18px;max-width:1050px;margin:0 auto}
.game-card{min-width:0;display:flex;align-items:center;flex-direction:column;overflow:visible}
.game-cover{display:block;width:100%;max-width:320px;overflow:visible;transition:transform .13s ease}
.game-cover img{display:block;width:100%;height:auto;object-fit:contain;max-height:none}
.game-cover:hover{transform:translateY(-3px)}
.card-actions{margin-top:1px;display:flex;justify-content:center;align-items:center}
.favorite-button{background:none;border:0;display:inline-flex;align-items:center;gap:7px;color:#7c4d37;font-weight:800;font-size:13px;padding:6px 12px}
.favorite-button img{width:25px;height:25px;object-fit:contain}
.favorite-button[aria-pressed="true"]{color:#df4678}
.empty-state{position:relative;max-width:775px;margin:0 auto}
.empty-state>img{width:100%}
.empty-state button{position:absolute;bottom:10%;left:32%;width:36%;height:28%;background:transparent;border:0}
.coming-section{padding:22px 0 60px}.coming-layout{display:flex;align-items:center;gap:28px;justify-content:center}.coming-layout>img{width:205px;max-width:35%}.coming-copy{max-width:530px}.coming-copy h3{font-size:23px}.coming-copy p{margin-top:10px;color:var(--muted);font-size:14px;line-height:1.8}
.about-section{display:flex;align-items:center;justify-content:center;gap:28px;padding:32px 5%;margin-bottom:55px}.about-mascot{width:180px;flex:none}.about-body{max-width:620px}.about-body h2{font-size:clamp(22px,2.5vw,31px)}.about-body p{margin:12px 0;color:var(--muted);font-size:14px;line-height:1.75}.about-body a{display:block;width:min(100%,365px)}.about-body a:hover{transform:translateY(-2px)}
.site-footer{padding:18px 0 28px;background:#f6e6d0}.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;color:#745038}.footer-inner a{text-decoration:underline}.mobile-nav{display:none}
.toast{position:fixed;left:50%;bottom:25px;transform:translate(-50%,18px);opacity:0;pointer-events:none;z-index:99;background:#59351e;color:#fff8e7;font-weight:800;padding:11px 20px;border-radius:16px;box-shadow:0 5px 12px #30201233;transition:opacity .15s ease,transform .15s ease;white-space:nowrap;max-width:94vw;font-size:13px}
.toast.show{opacity:1;transform:translate(-50%,0)}
/* Game player remains a real iframe and retains existing game logic. */
.play-header{display:flex;gap:18px;align-items:center;justify-content:space-between;min-height:94px}.back-button{width:165px;flex:none}.back-button img{width:100%}.play-brand{display:block;width:205px}.play-brand img{width:100%}.player-actions{display:flex;align-items:center;gap:10px}.round-icon{border:0;background:none;padding:2px;width:46px}.round-icon img{width:100%}.simple-action{display:inline-block;border:1px solid #a8764c;background:#fff5e3;color:var(--ink);border-radius:24px;padding:9px 16px;font-size:14px;font-weight:900}.simple-action:hover{filter:brightness(.98)}.player-main{padding:26px 0 55px}.player-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.player-heading h1{font-size:clamp(24px,3.1vw,36px)}.player-heading p:not(.section-eyebrow){font-size:13px;color:var(--muted)}
.player-frame{height:min(75vh,760px);min-height:480px;width:100%;background:#f6dcae;position:relative;overflow:hidden;border:4px solid #c09059;border-radius:20px}.player-frame iframe{display:block;width:100%;height:100%;border:0;background:#fff5e5}
.player-frame:fullscreen{height:100vh;border:0;border-radius:0}.player-missing{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#fff2d7;gap:16px;text-align:center}.player-missing img{width:110px}.player-missing a{text-decoration:underline}
.player-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 0}.player-help h2{font-size:19px}.player-help p{font-size:13px;margin-top:6px;color:var(--muted)}.player-buttons{display:flex;gap:10px;flex-wrap:wrap}.related-games{padding-top:30px}.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.related-item{display:flex;align-items:center;gap:12px;padding:12px;background:#fff6ea;border-radius:16px}.related-item img{width:100px;aspect-ratio:4/3;object-fit:cover;border-radius:10px}.related-item h3{font-size:16px}.related-item small{color:var(--muted)}
@media(max-width:950px){.header-inner{min-height:78px}.header-logo{width:178px}.header-food{width:135px}.desktop-nav{gap:0}.desktop-nav a,.desktop-nav button{min-width:72px}.hero-stage{min-height:480px}.hero-logo{width:min(68%,540px)}.hero-message{width:min(80%,600px)}.start-button{width:min(48%,360px)}.filter-button{flex-basis:180px}.search-bar{width:480px}}
@media(max-width:700px){html{scroll-padding-top:75px}.site-width{width:calc(100% - 22px)}.site-header{position:relative}.header-inner{min-height:80px}.header-logo{width:min(58%,230px)}.header-food{width:38%;max-width:175px}.desktop-nav{display:none}.hero{padding-top:10px}.hero-stage{min-height:380px;border-radius:18px}.hero-logo{width:88%;max-width:395px}.hero-message{width:93%;margin-top:-3px}.hero-message-text strong{font-size:clamp(12px,3.5vw,16px)}.hero-message-text small{font-size:clamp(8px,2.3vw,11px);margin-top:2px}.start-button{width:68%;max-width:320px}.games-section{padding-top:38px;padding-bottom:42px}.section-heading{margin-bottom:16px}.section-heading h1,.section-heading h2{font-size:26px}.section-heading p{font-size:12px}.section-mascot{width:76px}.filters{gap:7px;max-width:470px;margin:0 auto 12px}.filter-button{flex:0 1 calc(50% - 5px);max-width:195px}.search-bar{width:min(100%,460px);margin-bottom:22px}.search-bar input{font-size:clamp(13px,3.6vw,17px)}.game-grid{grid-template-columns:1fr;gap:18px}.game-cover{max-width:370px}.card-actions{margin-top:0}.coming-section{padding:10px 0 35px}.coming-layout{gap:16px}.coming-layout>img{width:150px;max-width:42%}.coming-copy h3{font-size:18px}.coming-copy p{font-size:12px}.about-section{padding:14px 2% 22px;gap:10px;margin-bottom:34px}.about-mascot{width:28%}.about-body h2{font-size:20px}.about-body p{font-size:12px;margin:5px 0}.about-body a{width:min(100%,290px)}.site-footer{padding:16px 0 88px}.footer-inner{align-items:flex-start;flex-direction:column;gap:6px;font-size:11px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:60;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:3px;padding:8px 6px calc(8px + env(safe-area-inset-bottom));background:#fff7e9;box-shadow:0 -2px 10px #5f321d25}.mobile-nav a,.mobile-nav button{border:0;background:none;padding:0;min-width:0}.mobile-nav img{width:100%;height:auto;object-fit:contain}.toast{bottom:85px}.play-header{min-height:73px;gap:6px}.back-button{width:86px}.play-brand{width:140px}.player-actions{gap:5px}.round-icon{width:36px}.simple-action{padding:8px 10px;font-size:11px}.player-main{padding:16px 0 35px}.player-frame{height:calc(100dvh - 210px);min-height:460px;border-width:2px}.player-heading h1{font-size:23px}.player-heading>button{flex:none}.player-bottom{align-items:flex-start;flex-direction:column}.related-grid{grid-template-columns:1fr}}
@media(max-width:370px){.hero-stage{min-height:332px}.hero-logo{width:90%}.hero-message{width:96%}.start-button{width:75%}.section-heading h1{font-size:23px}.section-mascot{width:59px}.search-bar{width:100%}.about-body h2{font-size:17px}.play-brand{width:125px}.back-button{width:80px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
/* Mobile first-screen spacing: keep the functional search field clear of fixed navigation. */
@media(max-width:700px){
  .header-inner{min-height:68px}
  .hero-stage{min-height:315px}
  .hero-logo{width:79%;margin-top:0}
  .hero-message{width:91%}
  .start-button{width:61%}
  .games-section{padding-top:20px}
  .section-heading{margin-bottom:8px}
  .filters{gap:4px;margin-bottom:4px}
  .filter-button{flex:0 1 calc(50% - 4px);max-width:175px}
}
@media(max-width:370px){
  .hero-stage{min-height:293px}
  .hero-logo{width:81%}
  .start-button{width:66%}
}

/* V1.5.2: redesigned complete card assets, never crop/distort the image. */
.game-grid{align-items:start}
.game-card,.game-cover,.game-cover img{overflow:visible}
.game-cover{display:block;width:100%;max-width:344px;aspect-ratio:auto}
.game-cover img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;image-rendering:auto}
@media(max-width:700px){.game-cover{max-width:370px}}
