/* Compact community discovery. All rules stay inside the homepage. */
#home{--home-paper:#fff7f8;--home-surface:#fff;--home-ink:#342032;--home-muted:#765065;--home-rose:#b62f64;--home-rose-hover:#912249;--home-line:#e8c6d5;--home-blush:#f8dce7;--home-wine:#4c1530;--home-on-wine:#fff;--home-wine-muted:#f4d7e4;--home-highlight:#ffd0ac;max-width:none;min-height:100svh;padding:0;background:var(--home-paper);color:var(--home-ink);display:flex;flex-direction:column;scrollbar-color:#b97893 var(--home-paper)}
#home ::selection{background:#efb0ca;color:var(--home-ink)}
#home :is(a,button,input,summary,[tabindex]):focus-visible{outline:3px solid var(--home-rose);outline-offset:3px}
#home a{text-underline-offset:4px}
#home svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#home :is(.home-header,.home-content,.home-footer){width:min(1120px,100% - 64px);margin-inline:auto}
#home .home-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:76px;padding:14px 0;border-bottom:1px solid var(--home-line)}
#home .wordmark{font-family:'Noto Sans Thai',sans-serif;font-size:29px;line-height:1;letter-spacing:-.035em;font-weight:700;color:var(--home-wine)}
#home .brand-dot{width:6px;height:6px;background:var(--home-rose)}
#home .header-account{display:flex;gap:20px;align-items:center}
#home .account-link{display:inline-flex;align-items:center;min-height:44px;font-size:.875rem;text-decoration:none;white-space:nowrap;color:var(--home-muted)}
#home .account-link:hover{color:var(--home-rose);text-decoration:underline}
#home .home-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:10px 16px;background:var(--home-rose);border:0;border-radius:9px;color:#fff;text-decoration:none;font-size:.875rem;font-weight:600;white-space:nowrap;transition:background .18s ease}
#home .home-button:hover{background:var(--home-rose-hover)}
#home .home-content{display:block;flex:1;padding:0 0 36px}
#home .community-intro{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(0,2fr);align-items:stretch;margin:24px 0 28px;padding:0;min-height:270px;background:var(--home-wine);border-radius:16px;overflow:hidden}
#home .intro-copy{display:flex;flex-direction:column;justify-content:center;padding:26px;min-width:0}
#home .intro-illustration{display:block;align-self:center;width:100%;height:auto;max-height:300px;object-fit:contain;object-position:center}
#home .community-intro h1{margin:0;font-size:clamp(1.65rem,2.6vw,2rem);line-height:1.5;font-weight:700;letter-spacing:-.025em;text-wrap:balance;color:var(--home-on-wine)}
#home .community-intro h1 span{display:block;color:var(--home-highlight)}
#home .community-intro p{margin:10px 0 0;color:var(--home-wine-muted);font-size:.875rem;line-height:1.8;max-width:35ch}
#home .library-heading{display:flex;align-items:baseline;gap:12px}
#home .library-heading h2{margin:0;font-size:1.125rem;line-height:1.6;font-weight:600}
#home #catalog-count{color:var(--home-muted);font-size:.8125rem;font-variant-numeric:tabular-nums}
#home .catalog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:13px 0 20px;border-bottom:1px solid var(--home-line)}
#home .catalog-tabs{display:flex;gap:24px;min-width:0}
#home .catalog-tabs button{position:relative;min-height:46px;padding:8px 12px 12px;border:0;border-radius:8px 8px 0 0;background:transparent;color:var(--home-muted);font-size:.875rem;font-weight:500;white-space:nowrap}
#home .catalog-tabs button::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:3px;border-radius:3px 3px 0 0;background:transparent;transition:background .18s ease}
#home .catalog-tabs button[aria-selected=true]{color:var(--home-rose);font-weight:700;background:var(--home-blush)}
#home .catalog-tabs button[aria-selected=true]::after{background:var(--home-rose)}
#home .catalog-tabs button:hover{color:var(--home-rose)}
#home #catalog-note{margin:0 0 5px;font-size:.8125rem;line-height:1.7;color:var(--home-muted);text-align:right}
#home .discovery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;align-items:start;border-radius:12px}
#home .discovery-card{display:block;min-width:0;background:var(--home-surface);border:1px solid var(--home-line);border-radius:12px;text-decoration:none;color:var(--home-ink);transition:border-color .18s ease,background .18s ease}
#home .card-art{position:relative;margin:-1px -1px 0}
#home .card-cover{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:12px 12px 0 0;background:var(--home-blush)}
#home .cover-placeholder{display:flex;align-items:center;justify-content:center;color:var(--home-rose);font-weight:600;font-size:1.125rem;letter-spacing:-.025em}
#home .card-copy{padding:13px 15px 14px;min-width:0}
#home .card-title{margin:0;font-size:1rem;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
#home .card-author{margin:4px 0 12px;color:var(--home-muted);font-size:.8125rem;line-height:1.6;overflow-wrap:anywhere}
#home .card-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
#home .card-meta{font-size:.75rem;line-height:1.7;color:var(--home-muted);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#home .card-action{display:inline-flex;align-items:center;gap:5px;font-size:.8125rem;white-space:nowrap;color:var(--home-rose);font-weight:600}
#home .card-action svg{width:14px;height:14px}
#home .discovery-card:hover{border-color:#b97893;background:#fff0f5}
#home .discovery-card:hover .card-title{color:var(--home-rose)}
#home .ranking-number{position:absolute;top:10px;left:10px;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--home-rose);color:#fff;font-size:.875rem;font-weight:700;font-variant-numeric:tabular-nums}
#home .discovery-empty{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0;padding:30px 0;font-size:.875rem;line-height:1.8;color:var(--home-muted)}
#home .discovery-empty a{color:var(--home-rose);display:inline-flex;align-items:center;min-height:44px}
#home .account-section{display:none;padding:28px 0 14px;scroll-margin-top:20px}
#home:is(.is-story,.is-account) .community-only{display:none}
#home:is(.is-story,.is-account) .account-section{display:grid;gap:24px;align-items:start}
#home.is-account .account-section{max-width:420px;margin:auto}
#home.is-story .account-section{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);column-gap:52px;max-width:1000px;margin:auto}
#home .account-back{grid-column:1/-1;display:inline-flex;align-items:center;gap:8px;min-height:44px;width:fit-content;text-decoration:none;color:var(--home-muted);font-size:.875rem}
#home .account-back:hover{color:var(--home-rose)}
#home .selected-art{display:none;min-width:0}
#home.is-story .selected-art{display:block}
#home .selected-art img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:12px}
#home .selected-art p{margin:12px 0;color:var(--home-muted);font-size:.8125rem;line-height:1.8}
#home .entry-panel{max-width:none;min-width:0;width:100%;border:0;padding:0}
#home .entry-panel h2{font-size:1.5rem;line-height:1.5;overflow-wrap:anywhere;margin:0 0 8px}
#home .entry-panel>.muted{font-size:.875rem;color:var(--home-muted);line-height:1.8;margin:0 0 20px}
#home .stack{gap:14px}
#home .entry-panel button{min-height:44px}
#home .entry-panel :is(input,button){border-color:var(--home-line);border-radius:8px}
#home .entry-panel input{background:var(--home-surface);color:var(--home-ink);caret-color:var(--home-rose)}
#home .entry-panel input::placeholder{color:var(--home-muted)}
#home :is(.primary,#auth-submit,#recovery-submit){background:var(--home-rose);border-color:var(--home-rose);color:#fff}
#home :is(.primary,#auth-submit,#recovery-submit):hover{background:var(--home-rose-hover)}
#home .auth-tabs{margin:22px 0 18px;border-color:var(--home-line);gap:22px}
#home .auth-tabs button{font-size:.875rem;border-radius:0;color:var(--home-muted)}
#home .auth-tabs button.active{color:var(--home-rose);box-shadow:0 2px 0 var(--home-rose)}
#home .entry-panel .studio-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;margin:8px 0;color:var(--home-rose);font-size:.875rem}
#home .entry-panel #home-album{display:block;margin:0 0 8px;width:100%}
#home .entry-panel .text-button{padding-left:0;font-size:.8125rem;color:var(--home-muted)}
#home .entry-note{margin:16px 0 0;color:var(--home-muted);font-size:.75rem;line-height:1.8}
#home:not(.is-story) .entry-note{display:none}
#home .home-footer{display:block;flex-shrink:0;padding:17px 0 20px;border-top:1px solid var(--home-line);font-size:.75rem;color:var(--home-muted)}
#home .footer-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px 24px}
#home .footer-top>p{margin:0;line-height:1.8}
#home .community-rules{max-width:620px}
#home .community-rules>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:flex-end;gap:8px;color:var(--home-ink);list-style:none;white-space:nowrap}
#home .community-rules>summary::-webkit-details-marker{display:none}
#home .community-rules>summary::after{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-top:-4px}
#home .community-rules[open]>summary::after{transform:rotate(225deg);margin-top:4px}
#home .rules-copy{padding:0 0 8px;font-size:.8125rem;line-height:1.8}
#home .rules-copy p{margin:8px 0;max-width:72ch}
#home .footer-notice{margin:0;font-size:.75rem;line-height:1.8}
#home .home-footer span{max-width:none}
@media(min-width:1600px){#home :is(.home-header,.home-content,.home-footer){width:min(1200px,100% - 80px)}}
#home .intro-copy ::selection{background:var(--home-highlight);color:var(--home-wine)}
@media(min-width:601px) and (max-width:900px){#home .community-intro{grid-template-columns:1fr;min-height:0}#home .intro-copy{padding:22px 26px}#home .community-intro h1 span{display:inline}#home .community-intro p{max-width:none}#home .intro-illustration{height:auto;min-height:0;max-height:none;aspect-ratio:1916/821;object-fit:contain}}
@media(max-width:900px){#home .discovery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}#home .catalog-toolbar{align-items:start;flex-direction:column;gap:0}#home #catalog-note{order:-1;margin:0 0 2px;text-align:left}#home.is-story .account-section{column-gap:28px}}
@media(max-width:600px){#home :is(.home-header,.home-content,.home-footer){width:calc(100% - 32px)}#home .home-header{min-height:66px;padding:10px 0;gap:12px}#home .wordmark{font-size:24px}#home .header-account{gap:12px}#home .account-link{font-size:.8125rem}#home .home-button{padding:9px 12px;font-size:.8125rem}#home .home-button svg{width:16px;height:16px}#home .community-intro{grid-template-columns:1fr;min-height:0;margin:18px 0 24px;padding:0;border-radius:12px}#home .intro-copy{padding:20px}#home .intro-illustration{height:auto;min-height:0;max-height:none;aspect-ratio:1916/821;object-fit:contain}#home .community-intro h1{font-size:1.5rem;line-height:1.5}#home .community-intro h1 span{display:inline}#home .community-intro p{font-size:.875rem;margin-top:7px;max-width:38ch}#home .catalog-tabs{width:100%;justify-content:space-between;gap:10px}#home .catalog-tabs button{font-size:.8125rem;padding-inline:9px}#home .catalog-toolbar{margin:9px 0 16px}#home #catalog-note{font-size:.75rem;margin-bottom:2px}#home .discovery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}#home .card-copy{padding:11px}#home .card-title{font-size:.9375rem}#home .card-author{font-size:.75rem;margin-bottom:10px}#home .card-bottom{align-items:start;flex-direction:column;gap:5px}#home .home-content{padding-bottom:28px}#home .footer-top{flex-direction:column;gap:0}#home .community-rules{width:100%}#home .community-rules>summary{justify-content:flex-start}#home .home-footer{padding:16px 0 20px}#home .footer-notice{max-width:60ch}#home:is(.is-story,.is-account) .account-section{grid-template-columns:1fr;gap:18px;padding-top:14px}#home .entry-panel h2{font-size:1.375rem}#home .selected-art img{max-height:260px}#home .selected-art p{margin-bottom:0}}
@media(max-width:359px){#home .header-account{gap:8px}#home .home-button{padding-inline:10px}#home .home-button svg{display:none}#home .wordmark{font-size:22px}#home .catalog-tabs{gap:6px}#home .card-copy{padding:10px}}
@media(prefers-reduced-motion:reduce){#home *,#home *::after{transition:none!important;animation:none!important}}

#home .card-cover,#home .selected-art img{aspect-ratio:16/9;object-fit:contain;background:var(--home-blush)}
