/* 2026-10-31 homepage — 實驗室筆記風 (lab notebook), third design round.
   Loads last on the homepage, after incubator-home.css and header-v3.css (which defines the --v3-* tokens).
   Uses the shared --se-* palette so light and dark themes keep working. Neo-brutalist details stay
   restrained: thin dark outlines, small radii, hard offset shadows, one green and one yolk accent. */

/* Press feedback shared by buttons and cards */
body.se-site.lab-home :is(.se-roll-button,.se-roll-result,.se-collage-card,.se-fresh-card,.lab-card-surface,.se-stickers-button,.se-stickers-grid a,.se-closing-hello){transition:transform .18s ease,box-shadow .18s ease}

/* ---------- Hero ---------- */
body.se-site.lab-home .lab-home-intro{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,500px);gap:24px 32px;align-items:center;padding:24px 0 20px}
body.se-site.lab-home .lab-home-intro::before{content:'';grid-column:1/-1;grid-row:1;align-self:stretch;z-index:-1;border:1.5px solid var(--v3-line);border-radius:16px;background-color:var(--v3-paper);background-image:linear-gradient(var(--v3-grid) 1px,transparent 1px),linear-gradient(90deg,var(--v3-grid) 1px,transparent 1px);background-size:36px 36px}
body.se-site.lab-home .lab-hero-copy{grid-column:1;grid-row:1;padding:clamp(32px,4.5vw,64px) 0 clamp(32px,4.5vw,56px) clamp(24px,4.5vw,64px);min-width:0}
body.se-site.lab-home .lab-home-kicker{font:700 13px/1.6 var(--se-font);letter-spacing:.16em;color:var(--se-link);margin:0 0 18px}
body.se-site.lab-home .lab-hero-copy h1{font:700 clamp(44px,5.8vw,84px)/1.06 var(--se-font);letter-spacing:-.03em;margin:0 0 22px;color:var(--se-ink)}
body.se-site.lab-home .lab-hero-copy h1::first-line{text-decoration:none}
body.se-site.lab-home .lab-hero-copy h1>span:last-child{display:block;margin:6px 0 0;color:var(--se-link)}
body.se-site.lab-home .lab-hero-copy h1>#statTotal{display:inline;margin:0;color:inherit}
body.se-site.lab-home .lab-hero-lead{font-size:17px;line-height:1.8;color:var(--se-muted);margin:0 0 28px;max-width:460px}
body.se-site.lab-home .lab-hero-last{display:inline;margin:0 0 0 .5em}
body.se-site.lab-home .se-roll{display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px}
body.se-site.lab-home .se-roll-button{display:inline-flex;align-items:center;gap:10px;min-height:56px;padding:0 26px;border-radius:12px;border:1.5px solid #17362C;background:var(--v3-yolk);color:var(--v3-on-yolk);font:700 18px/1.2 var(--se-font);box-shadow:4px 4px 0 var(--v3-shadow);cursor:pointer}
body.se-site.lab-home .se-roll-shortcuts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin:0;font-size:15px;color:var(--se-muted)}
body.se-site.lab-home .se-roll-shortcuts a{color:var(--se-link);font-weight:700;text-decoration:underline;text-underline-offset:4px;min-height:44px;display:inline-flex;align-items:center;gap:.3em}
body.se-site.lab-home .se-roll-status{margin-top:18px}
body.se-site.lab-home .se-roll-result{display:inline-flex;align-items:center;gap:14px;max-width:100%;padding:10px 18px 10px 10px;border-radius:12px;border:1.5px solid var(--v3-line);background:var(--se-surface);color:var(--se-ink);box-shadow:4px 4px 0 var(--v3-shadow);text-decoration:none}
body.se-site.lab-home .se-roll-result[hidden]{display:none}
body.se-site.lab-home .se-roll-result img{width:104px;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:8px;border:1px solid var(--se-border);flex:none}
body.se-site.lab-home .se-roll-copy{display:flex;flex-direction:column;min-width:0}
body.se-site.lab-home .se-roll-type{font-size:13px;font-weight:700;color:var(--se-link)}
body.se-site.lab-home .se-roll-title{font-size:17px;font-weight:700;line-height:1.45}
body.se-site.lab-home .se-roll-title::after{content:' →'}

/* Collage of real covers with the experimenter egg */
body.se-site.lab-home .se-home-collage{grid-column:2;grid-row:1;position:relative;height:440px;margin:28px clamp(20px,3vw,44px) 28px 0;min-width:0}
body.se-site.lab-home .se-collage-card{position:absolute;display:block;padding:8px 8px 10px;border-radius:12px;border:1.5px solid var(--v3-line);background:var(--se-surface);color:var(--se-ink);box-shadow:5px 5px 0 var(--v3-shadow);text-decoration:none}
body.se-site.lab-home .se-collage-card img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:6px}
body.se-site.lab-home .se-collage-card span{display:block;padding:8px 4px 0;font-size:14px;font-weight:700;line-height:1.4}
body.se-site.lab-home .se-collage-card small{display:block;font-size:12px;font-weight:700;color:var(--se-link)}
body.se-site.lab-home .se-collage-card--quiz{left:0;top:4%;width:58%;transform:rotate(-5deg);z-index:1}
body.se-site.lab-home .se-collage-card--game{right:0;top:0;width:50%;transform:rotate(5deg);z-index:2}
body.se-site.lab-home .se-collage-card--tool{right:4%;bottom:2%;width:54%;transform:rotate(-2deg);z-index:3}
body.se-site.lab-home :is(.se-collage-card--quiz,.se-collage-card--tool)::before{content:'';position:absolute;top:-11px;width:76px;height:22px;background:var(--v3-yolk);opacity:.82}
body.se-site.lab-home .se-collage-card--quiz::before{left:38%;transform:rotate(3deg)}
body.se-site.lab-home .se-collage-card--tool::before{right:22%;transform:rotate(-4deg)}
body.se-site.lab-home .se-home-collage .se-collage-egg{position:absolute;left:0;bottom:-10px;width:clamp(150px,16vw,220px);height:auto;z-index:4;pointer-events:none}

/* ---------- 最近使用 strip (where the preview showed live player counts) ---------- */
body.se-site.lab-home main.lab-home-main{padding-top:0}
body.se-site.lab-home #lab-personal{margin:0 0 56px;padding:0;border:0;background:transparent}
body.se-site.lab-home #lab-personal[hidden]{display:none}
body.se-site.lab-home #lab-recent-panel{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;padding:0;border:0;background:transparent}
body.se-site.lab-home #lab-recent-panel .lab-personal-head{display:contents}
body.se-site.lab-home #lab-recent-title{display:flex;align-items:center;gap:8px;margin:0;padding-right:6px;font:700 16px/1.4 var(--se-font);color:var(--se-ink)}
body.se-site.lab-home #lab-recent-title::before{content:'';width:10px;height:10px;border-radius:50%;background:var(--v3-yolk);box-shadow:0 0 0 4px var(--se-mint)}
body.se-site.lab-home #lab-recent-list{display:flex;flex-wrap:wrap;gap:10px}
body.se-site.lab-home #lab-recent-list .lab-quick-link{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:10px;border:1.5px solid var(--se-border);background:var(--se-surface);color:var(--se-ink);font:500 14px/1.4 var(--se-font);text-decoration:none}
body.se-site.lab-home #lab-recent-list .lab-quick-link:hover{border-color:var(--v3-line)}
body.se-site.lab-home #lab-recent-panel [data-lab-clear-recent]{order:2;min-height:44px;padding:0 6px;border:0;background:transparent;color:var(--se-muted);font:500 13px/1.4 var(--se-font);text-decoration:underline;text-underline-offset:3px;cursor:pointer}

/* ---------- 本週新上架 ---------- */
body.se-site.lab-home .se-fresh{margin:0 0 80px}
body.se-site.lab-home .se-fresh[hidden]{display:none}
body.se-site.lab-home .se-fresh>h2{font:700 30px/1.35 var(--se-font);letter-spacing:-.02em;margin:0 0 20px;color:var(--se-ink)}
body.se-site.lab-home .se-fresh-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px}
body.se-site.lab-home .se-fresh-card{display:flex;flex-direction:column;overflow:hidden;border-radius:12px;border:1.5px solid var(--v3-line);background:var(--se-surface);color:var(--se-ink);box-shadow:4px 4px 0 var(--v3-shadow);text-decoration:none}
body.se-site.lab-home .se-fresh-cover{position:relative;display:block;border-bottom:1.5px solid var(--v3-line)}
body.se-site.lab-home .se-fresh-cover img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
body.se-site.lab-home .se-fresh-new{position:absolute;left:12px;top:12px;font:700 11px/1.3 var(--se-font);letter-spacing:.04em;padding:2px 7px;border-radius:4px;border:1px solid #17362C;background:var(--v3-yolk);color:#17362C}
body.se-site.lab-home .se-fresh-copy{display:flex;flex-direction:column;gap:4px;padding:14px 16px 18px}
body.se-site.lab-home .se-fresh-kind{font-size:12px;font-weight:700;color:var(--se-link)}
body.se-site.lab-home .se-fresh-copy h3{font:700 18px/1.4 var(--se-font);margin:0;color:var(--se-ink)}
body.se-site.lab-home .se-fresh-copy p{font-size:14px;line-height:1.6;margin:0;color:var(--se-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- Catalogue sections ---------- */
body.se-site.lab-home .lab-catalog-heading[hidden]{display:none}
body.se-site.lab-home .lab-category-heading{display:flex;align-items:flex-end;gap:12px;font:700 30px/1.35 var(--se-font);letter-spacing:-.02em;margin:0 0 20px}
body.se-site.lab-home .lab-category-heading>.se-heading-egg{order:-1;width:64px;height:64px;object-fit:contain;margin:0 0 -6px}
body.se-site.lab-home .lab-category-heading>span{margin-left:auto;align-self:center}
body.se-site.lab-home .lab-card-surface{padding:0;border:1.5px solid var(--v3-line);border-radius:12px;background:var(--se-surface);box-shadow:4px 4px 0 var(--v3-shadow)}
body.se-site.lab-home .lab-project-card:hover .lab-card-surface{border-color:var(--v3-line)}
body.se-site.lab-home .lab-project-preview{border-radius:0;border-bottom:1.5px solid var(--v3-line)}
body.se-site.lab-home .lab-project-preview img{object-fit:cover}
body.se-site.lab-home .lab-card-body{padding:12px 14px 16px}
body.se-site.lab-home .lab-card-title{margin:0}
body.se-site.lab-home .lab-card-title h3{font-size:16px}
/* Let the covers and titles do the explaining (neal.fun-style shelf) */
body.se-site.lab-home :is(.lab-card-status,.lab-tags,.lab-card-top){display:none}
body.se-site.lab-home :is(.lab-category-quiz,.lab-category-game) :is(.lab-card-description,.lab-card-action){display:none}
body.se-site.lab-home section.lab-category-quiz .lab-home-card-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}
body.se-site.lab-home section.lab-category-game .lab-home-card-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px}
body.se-site.lab-home .se-card-badges{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:6px}
body.se-site.lab-home .se-card-badges>span{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;line-height:1.6}
body.se-site.lab-home .se-badge-multi{color:var(--se-link)}
body.se-site.lab-home .se-badge-multi::before{content:'';width:8px;height:8px;border-radius:50%;background:#10B981}
body.se-site.lab-home .se-badge-board{color:var(--se-muted)}

/* Tools: tabs switch between four everyday groups of compact cards */
body.se-site.lab-home .se-tool-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}
body.se-site.lab-home .se-tool-tabs>button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:10px;border:1.5px solid var(--se-border);background:var(--se-surface);color:var(--se-ink);font:500 15px/1.4 var(--se-font);cursor:pointer}
body.se-site.lab-home .se-tool-tabs>button>span{font-size:13px;color:var(--se-muted)}
body.se-site.lab-home .se-tool-tabs>button[aria-selected=true]{border-color:var(--v3-line);background:#047857;color:#FFFFFF;font-weight:700}
body.se-site.lab-home .se-tool-tabs>button[aria-selected=true]>span{color:#E3F3EC}
body.se-site.lab-home .se-tool-group[hidden]{display:none}
body.se-site.lab-home section.lab-category-tool .lab-home-card-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}
body.se-site.lab-home section.lab-category-tool .lab-card-surface{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;gap:0 14px;padding:10px;box-shadow:3px 3px 0 var(--v3-shadow)}
body.se-site.lab-home section.lab-category-tool .lab-project-preview{border:1px solid var(--se-border);border-radius:8px}
body.se-site.lab-home section.lab-category-tool .lab-card-body{padding:0}
body.se-site.lab-home section.lab-category-tool .lab-card-action{display:none}
body.se-site.lab-home section.lab-category-tool .lab-card-title h3{font-size:15px}
body.se-site.lab-home section.lab-category-tool .lab-card-title .lab-favorite{margin:-10px -6px 0 0}
body.se-site.lab-home section.lab-category-tool .lab-card-description{font-size:13px;line-height:1.55;margin:2px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- LINE 貼圖 ---------- */
body.se-site.lab-home .se-stickers{display:flex;flex-wrap:wrap;align-items:center;gap:32px 40px;margin:80px auto 0;padding:clamp(24px,4vw,48px);border-radius:16px;border:1.5px solid var(--v3-line);background:#047857;color:#FFFFFF;scroll-margin-top:24px}
body.se-site.lab-home .se-stickers-copy{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:14px}
body.se-site.lab-home .se-stickers-kicker{margin:0;font:700 12px/1.6 var(--se-font);letter-spacing:.16em;color:#FBBF24}
body.se-site.lab-home .se-stickers h2{margin:0;font:700 clamp(30px,3.6vw,44px)/1.2 var(--se-font);letter-spacing:-.02em;color:#FFFFFF}
body.se-site.lab-home .se-stickers-copy>p:not(.se-stickers-kicker){margin:0;max-width:420px;font-size:16px;line-height:1.75;color:#E3F3EC}
body.se-site.lab-home .se-stickers-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px 20px;margin-top:6px}
body.se-site.lab-home .se-stickers-button{display:inline-flex;align-items:center;min-height:52px;padding:0 24px;border-radius:12px;border:1.5px solid #17362C;background:#FBBF24;color:#17362C;box-shadow:4px 4px 0 #17362C;font:700 17px/1.2 var(--se-font);text-decoration:none}
body.se-site.lab-home .se-stickers-qr{display:flex;align-items:center;gap:12px;margin:0}
body.se-site.lab-home .se-stickers-qr img{width:92px;height:92px;border-radius:10px;background:#FFFFFF;padding:4px;box-sizing:border-box;image-rendering:pixelated}
body.se-site.lab-home .se-stickers-qr figcaption{font-size:13px;line-height:1.5;color:#E3F3EC}
body.se-site.lab-home .se-stickers-grid{flex:1 1 460px;min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0;padding:0;list-style:none}
body.se-site.lab-home .se-stickers-grid a{display:flex;flex-direction:column;align-items:center;gap:2px;height:100%;padding:12px 10px 14px;border-radius:14px;border:1.5px solid #17362C;background:#FFFAF0;color:#17362C;box-shadow:4px 4px 0 #17362C;text-align:center;text-decoration:none;box-sizing:border-box}
body.se-site.lab-home .se-stickers-grid img{width:100%;max-width:140px;height:auto;aspect-ratio:1;object-fit:contain;margin-bottom:6px}
body.se-site.lab-home .se-sticker-name{font:700 16px/1.4 var(--se-font)}
body.se-site.lab-home .se-sticker-set{font-size:12px;line-height:1.5;color:#4B5E55}

/* ---------- Say Hello card ---------- */
body.se-site.lab-home .se-home-closing{display:block;margin:64px auto 72px;padding:0;border:0}
body.se-site.lab-home .se-closing-card{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;padding:22px 28px;border-radius:16px;border:1.5px solid var(--v3-line);background:var(--se-surface)}
body.se-site.lab-home .se-closing-card .se-mascot{width:96px;height:96px;object-fit:contain;flex:none}
body.se-site.lab-home .se-closing-copy{flex:1 1 260px;display:flex;flex-direction:column;gap:2px}
body.se-site.lab-home .se-closing-copy h2{margin:0;font:700 24px/1.4 var(--se-font);letter-spacing:-.01em;color:var(--se-ink)}
body.se-site.lab-home .se-closing-copy p{margin:0;font-size:15px;line-height:1.7;color:var(--se-muted)}
body.se-site.lab-home .se-closing-hello{display:inline-flex;align-items:center;min-height:48px;padding:0 22px;border-radius:12px;border:1.5px solid var(--v3-line);background:#17362C;color:#FFFAF0;box-shadow:4px 4px 0 #047857;font:700 16px/1 var(--se-font);text-decoration:none}

/* Hover lifts; pressing pushes the element into its own shadow */
@media(hover:hover){
 body.se-site.lab-home :is(.se-roll-button,.se-roll-result,.se-fresh-card,.se-stickers-button,.se-stickers-grid a):hover,body.se-site.lab-home .lab-project-card:hover .lab-card-surface{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--v3-shadow)}
 body.se-site.lab-home :is(.se-stickers-button,.se-stickers-grid a):hover{box-shadow:6px 6px 0 #17362C}
 body.se-site.lab-home .se-closing-hello:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 #047857}
 body.se-site.lab-home .se-collage-card:hover{box-shadow:8px 8px 0 var(--v3-shadow);z-index:5}
}
body.se-site.lab-home :is(.se-roll-button,.se-roll-result,.se-fresh-card,.se-stickers-button,.se-stickers-grid a,.se-closing-hello):active,body.se-site.lab-home .lab-project-card:active .lab-card-surface{transform:translate(3px,3px);box-shadow:0 0 0 transparent}

@media(max-width:1023px){
 body.se-site.lab-home .lab-home-intro{grid-template-columns:minmax(0,1fr) 360px}
 body.se-site.lab-home .se-home-collage{height:360px}
 body.se-site.lab-home .lab-hero-last{display:block;margin:0}
}
@media(max-width:767px){
 body.se-site.lab-home .lab-home-intro{grid-template-columns:1fr;gap:16px;padding-top:16px}
 body.se-site.lab-home .lab-home-intro::before{grid-row:1/3}
 body.se-site.lab-home .lab-hero-copy{grid-column:1;grid-row:1;padding:28px 20px 0}
 body.se-site.lab-home .lab-hero-copy h1{font-size:40px;line-height:1.1;margin-bottom:16px}
 body.se-site.lab-home .lab-hero-lead{font-size:16px;margin-bottom:22px}
 body.se-site.lab-home .se-roll-button{width:100%;justify-content:center}
 body.se-site.lab-home .se-roll-result{width:100%}
 body.se-site.lab-home .se-home-collage{grid-column:1;grid-row:2;height:300px;margin:4px 20px 28px}
 body.se-site.lab-home .se-collage-card span{font-size:13px}
 body.se-site.lab-home .se-home-collage .se-collage-egg{width:130px}
 body.se-site.lab-home #lab-personal{margin-bottom:40px}
 body.se-site.lab-home .se-fresh{margin-bottom:56px}
 body.se-site.lab-home :is(.se-fresh>h2,.lab-category-heading){font-size:26px}
 body.se-site.lab-home .se-fresh-grid{display:flex;overflow-x:auto;gap:14px;padding:0 0 8px;scroll-snap-type:x mandatory}
 body.se-site.lab-home .se-fresh-card{flex:0 0 78%;scroll-snap-align:start}
 body.se-site.lab-home .lab-category-heading>.se-heading-egg{width:52px;height:52px}
 body.se-site.lab-home :is(section.lab-category-quiz,section.lab-category-game) .lab-home-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body.se-site.lab-home :is(.lab-category-quiz,.lab-category-game) .lab-card-body{padding:10px 10px 12px}
 body.se-site.lab-home :is(.lab-category-quiz,.lab-category-game) .lab-card-title h3{font-size:14px;line-height:1.45}
 body.se-site.lab-home :is(.lab-category-quiz,.lab-category-game) .lab-card-title .lab-favorite{margin:-10px -10px 0 -4px}
 body.se-site.lab-home .se-tool-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
 body.se-site.lab-home .se-tool-tabs>button{flex:none}
 body.se-site.lab-home section.lab-category-tool .lab-home-card-grid{grid-template-columns:1fr}
 body.se-site.lab-home section.lab-category-tool .lab-card-surface{grid-template-columns:104px minmax(0,1fr)}
 body.se-site.lab-home .se-stickers{margin-top:56px}
 body.se-site.lab-home .se-stickers-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body.se-site.lab-home .se-stickers-button{width:100%;justify-content:center}
 body.se-site.lab-home .se-home-closing{margin:48px auto 56px}
 body.se-site.lab-home .se-closing-card{padding:20px}
 body.se-site.lab-home .se-closing-card .se-mascot{width:72px;height:72px}
}
@media(prefers-reduced-motion:reduce){
 body.se-site.lab-home :is(.se-roll-button,.se-roll-result,.se-collage-card,.se-fresh-card,.lab-card-surface,.se-stickers-button,.se-stickers-grid a,.se-closing-hello){transition:none}
 body.se-site.lab-home :is(.se-roll-button,.se-roll-result,.se-fresh-card,.se-stickers-button,.se-stickers-grid a,.se-closing-hello):is(:hover,:active),body.se-site.lab-home .lab-project-card:is(:hover,:active) .lab-card-surface{transform:none}
}


/* Five-character family, including Damak. */
body.se-site.lab-home .se-stickers-grid{grid-template-columns:repeat(5,minmax(0,1fr));flex-basis:560px}
@media(max-width:767px){body.se-site.lab-home .se-stickers-grid{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%}}

/* Match the text-free Damak portrait to the other character silhouettes. */
body.se-site.lab-home .se-stickers-grid img[data-se-character="damak"]{transform:translate(2%,-4.8%) scale(1.36);transform-origin:center}
