/* Peiwan v2: reference-inspired portrait catalog, independent of business rules. */
:root{--pw-accent:#8848dc;--pw-ink:#292331;--pw-muted:#887f92;--pw-line:#eee9f4;--pw-paper:#fff;--pw-tint:#f7f3fc}
body.peiwan,body:has(.admin-tabs){background:#faf9fc;color:var(--pw-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
button,input,select,textarea,a{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--pw-accent);outline-offset:3px}
.peiwan #gate{background:radial-gradient(ellipse at 15% 15%,#ebdefb,transparent 60%),#faf8fd}
.peiwan .gate-card{box-shadow:0 16px 65px #63318b12;border:1px solid var(--pw-line);border-radius:24px}
.peiwan .gate-card button,.peiwan .auth-submit,.peiwan .pill-btn.primary{background:var(--pw-accent);color:white}
.peiwan .header{box-shadow:none;border-bottom:1px solid var(--pw-line);background:#fff}
.peiwan .catalog-header{padding:16px max(20px,calc((100vw - 1120px)/2));gap:24px;min-height:74px}
.peiwan .catalog-header .catalog-logo{display:flex;align-items:center;gap:10px;flex:0 1 auto;line-height:1.2}
.peiwan .catalog-logo img{width:34px;height:34px}
.peiwan .pw-brand{font-size:19px;font-weight:750;white-space:nowrap;color:var(--pw-ink)}
.peiwan .catalog-header .agency-nav a{background:none;color:#75677e;font-size:14px}
.peiwan .catalog-header .user-badge{background:var(--pw-tint);color:var(--pw-accent)}
.peiwan .catalog-header .pill-btn,.peiwan .catalog-header .user-badge{border-radius:8px}
.peiwan.pw-home .main{max-width:1160px;padding:30px 20px 60px;margin:auto}
.pw-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:0 0 25px}
.pw-eyebrow{font-size:10px;letter-spacing:3px;color:var(--pw-accent);font-weight:700}
.pw-heading h2{font-size:25px;font-weight:700;letter-spacing:.5px;margin-top:8px}
.pw-heading-note{font-size:13px;color:var(--pw-muted);padding-bottom:3px}
.peiwan .filter-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;grid-template-areas:"search search search search search" "city season style tags reset";gap:12px;background:#fff;border:1px solid var(--pw-line);border-radius:16px;padding:20px;margin:0 0 24px}
.peiwan .filter-bar #fCity{grid-area:city}.peiwan .filter-bar #fSeason{grid-area:season}.peiwan .filter-bar #fStyle{grid-area:style}.peiwan .filter-bar .tag-drop{grid-area:tags;min-width:0}
.peiwan .filter-bar select,.peiwan .filter-bar .tag-drop-btn{width:100%;min-width:0;height:44px;padding:0 12px;border:1px solid #e9e2f0;border-radius:8px;color:#6a6075;background:#fff;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.peiwan .filter-bar .btn-reset{grid-area:reset;border:0;border-radius:8px;background:var(--pw-tint);color:var(--pw-accent);padding:0 14px;font-size:13px;height:44px;line-height:44px}
.pw-search{grid-area:search;display:flex;align-items:center;border:1px solid var(--pw-line);border-radius:8px;background:#faf9fc;min-width:0;height:48px;overflow:hidden}
.pw-search>span{font-size:28px;padding-left:15px;color:#a29aaa}
.peiwan .filter-bar .pw-search input{flex:1;min-width:0;border:0;background:none;box-shadow:none;padding:12px;font-size:14px;width:auto}
.pw-search button{height:100%;border:0;background:var(--pw-accent);color:#fff;min-width:86px;font:600 14px inherit;cursor:pointer}
.peiwan .tabs{border:0;display:flex;gap:27px;overflow:auto;margin:0 0 21px;padding:0 2px;background:none}
.peiwan .tabs .tab{position:relative;padding:0 2px 12px;background:none;border:0;border-radius:0;color:#8f859b;font-size:17px;font-weight:500;flex:0 0 auto;cursor:pointer}
.peiwan .tabs .tab.active{color:var(--pw-accent);background:none;font-weight:700;box-shadow:none}
.peiwan .tabs .tab.active:after{content:"";position:absolute;width:22px;height:3px;background:var(--pw-accent);border-radius:3px;bottom:0;left:50%;transform:translateX(-50%)}
.peiwan .section-title{font-size:13px;color:#93879e;margin:0 0 15px;font-weight:400}
.peiwan .grid,.peiwan .sub-album-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 18px}
.peiwan .card{min-width:0;overflow:hidden;border-radius:12px;background:#fff;border:1px solid var(--pw-line);box-shadow:none;transition:box-shadow .2s,transform .2s}
@media(hover:hover){.peiwan .card:hover{transform:translateY(-3px);box-shadow:0 8px 25px #5c367813}}
.peiwan .card .cover{height:auto;aspect-ratio:4/5;padding:0;border-radius:0;position:relative;background:#f1edf6}
.peiwan .card .cover>img{width:100%;height:100%;object-fit:cover;object-position:center 22%;display:block}
.peiwan .cover .no-img{width:100%;height:100%;font-size:38px;color:#b19aca;background:#f1edf6}
.peiwan .card .card-body{padding:12px}
.peiwan .card .card-title-row{height:auto;min-height:24px}
.peiwan .card .card-title{font-size:16px;line-height:24px;font-weight:700;color:#2e2636}
.peiwan .copy-link{border:0;flex-shrink:0;background:#faf7ff;color:var(--pw-accent);border-radius:7px;padding:4px;font-size:12px}
.peiwan .card .card-desc{font-size:12px;line-height:19px;height:38px;min-height:0;color:#94899d;margin:7px 0 5px}
.peiwan .card .card-desc:empty{display:none}
.peiwan .card .tag-lines{height:auto;min-height:0;max-height:57px;gap:5px;margin:7px 0 0}
.peiwan .card .tag-row{height:auto;min-height:0;gap:4px;flex-wrap:wrap}
.peiwan .card .tag-row:empty{display:none}
.peiwan .tag,.peiwan .pc-tag{padding:2px 6px;border:1px solid #decdf3;background:#fff;color:#9a77bb;font-size:10px;border-radius:4px;line-height:15px}
.peiwan .badge{border-radius:4px;padding:3px 6px;font-size:10px;line-height:15px;box-shadow:none}
.peiwan .badge.featured,.peiwan .badge.pinned{background:var(--pw-accent);color:#fff}
.peiwan .badge.public{background:#ffffffe6;color:#8d71a4}
.peiwan .badges{top:8px;left:8px;right:8px}
.peiwan .album-corner{font-size:10px;padding:6px 8px;background:linear-gradient(transparent,#24153080);width:100%;right:0;bottom:0;justify-content:space-between;border-radius:0}
.peiwan .album-corner strong{font-size:14px}
.pw-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin:10px 0 7px;font-size:12px}
.pw-facts>div{display:flex;align-items:center;gap:5px;min-width:0}.pw-facts dt{display:flex;align-items:center;gap:4px;flex-shrink:0;color:#a293ad;font-weight:400;font-size:10px}.pw-facts i{font-style:normal;font-size:13px;color:#a373d0}.pw-facts>div:nth-child(4n+1) i{color:#8ebda6}.pw-facts>div:nth-child(4n) i{color:#c2b274}.pw-facts dd{margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#665a72;font-size:12px}
.peiwan.pw-detail .main{max-width:760px;padding:24px 18px 50px}
.peiwan.pw-detail .header{padding:13px max(18px,calc((100vw - 724px)/2));min-height:60px}
.peiwan.pw-detail .header h1{color:#3b3148;margin-right:0;font-weight:600}
.pw-hero{position:relative;width:100%;height:510px;border-radius:16px 16px 0 0;overflow:hidden;background:#ede7f4}
.pw-hero[hidden]{display:none}.pw-hero>img{width:100%;height:100%;object-fit:cover;object-position:center 25%;display:block}
.pw-hero-open{position:absolute;inset:0;width:100%;height:100%;background:linear-gradient(transparent 75%,#21102e35);border:0;color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;cursor:pointer}
.pw-hero-open>span{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border:2px solid #fff;border-radius:50%;font-size:32px;background:#ffffff20;text-shadow:0 1px 8px #0004}
.pw-hero-open>small{font-size:11px;text-shadow:0 1px 6px #0008}
.peiwan.pw-detail .info-card{display:block;padding:24px;background:#fff;border:1px solid var(--pw-line);border-radius:16px;margin-bottom:0;position:relative}
.peiwan.pw-detail.pw-has-hero .info-card{margin-top:-24px;border-radius:22px 22px 0 0;z-index:1}
.peiwan.pw-detail .info-title{font-size:23px;font-weight:700;color:var(--pw-ink)}
.peiwan.pw-detail .pw-facts{margin:18px 0;max-width:500px;gap:14px 28px}.peiwan.pw-detail .pw-facts dd{font-size:14px;white-space:normal;overflow-wrap:anywhere}.peiwan.pw-detail .pw-facts dt{font-size:12px}
.peiwan.pw-detail .info-desc{color:#807388;font-size:14px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:14px;max-width:none}
.peiwan.pw-detail .info-meta{color:#a296ab;font-size:11px;margin:12px 0}
.peiwan.pw-detail .info-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px;border-top:1px solid var(--pw-line);padding-top:16px}
.peiwan.pw-detail .info-actions button,.peiwan.pw-detail .info-actions a{border:1px solid #e8dff3;color:#8a65ac;background:#faf7fd;border-radius:8px;min-height:38px;padding:9px 14px;font-size:12px}
.peiwan.pw-detail #seatLink{background:var(--pw-accent);color:white;border-color:var(--pw-accent);margin-left:auto}
.peiwan.pw-detail .photo-grid{grid-template-columns:1fr;gap:0;background:#fff;padding:4px 24px 24px;border:1px solid var(--pw-line);border-top:0;border-radius:0 0 16px 16px}
.peiwan.pw-detail .photo-card{border-radius:0;background:#fff;box-shadow:none;margin:18px 0 0;overflow:hidden}
.peiwan.pw-detail .pc-img-wrap{height:auto;aspect-ratio:auto;background:#f6f2fa;border-radius:9px;overflow:hidden}
.peiwan.pw-detail .pc-img-wrap img,.peiwan.pw-detail .pc-img-wrap video{position:static;display:block;width:100%;height:auto;max-height:none;object-fit:contain}
.peiwan.pw-detail .pc-body{padding:12px 0}.peiwan.pw-detail .pc-name{font-size:13px;color:#655870}.peiwan.pw-detail .pc-description{font-size:14px;line-height:1.85;white-space:pre-wrap;color:#887b91}
.peiwan.pw-detail .sub-album-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}
.peiwan.agency-page .ag-head{background:#fff;border-bottom:1px solid var(--pw-line);box-shadow:none;color:var(--pw-ink)}
.peiwan.agency-page .ag-head h1{color:var(--pw-ink)}.peiwan.agency-page .ag-head a{background:var(--pw-tint);color:var(--pw-accent)}
.peiwan.agency-page .ag-card{border:1px solid var(--pw-line);box-shadow:none;border-radius:14px}
.peiwan.agency-page .ag-tabs button.on,.peiwan.agency-page button.primary{background:var(--pw-accent);color:#fff}
.peiwan #bottomInfoBar{position:static!important;background:transparent!important;color:#9c91a6!important;box-shadow:none!important;border-top:0!important;padding:24px 15px!important;font-size:11px!important}
@media(max-width:900px){.peiwan .grid{grid-template-columns:repeat(3,minmax(0,1fr))}.peiwan .catalog-header{padding:14px 20px}}
@media(max-width:620px){
 .peiwan .catalog-header{padding:12px 14px;gap:10px;min-height:61px}.peiwan .catalog-logo img{width:27px;height:27px}.peiwan .pw-brand{font-size:16px}.peiwan .catalog-header .catalog-logo{gap:6px}.peiwan .catalog-header .agency-nav a{font-size:12px;padding:6px 0}.peiwan .catalog-header .pill-btn,.peiwan .catalog-header .user-badge{font-size:12px;padding:5px 8px}
 .peiwan.pw-home .main{padding:22px 14px 35px}.pw-heading{margin-bottom:20px}.pw-heading h2{font-size:21px;margin-top:5px}.pw-eyebrow{font-size:9px;letter-spacing:2px}.pw-heading-note{display:none}
 .peiwan .filter-bar{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"search search" "city season" "style tags" "reset reset";border:0;background:none;border-radius:0;padding:0;gap:10px;margin-bottom:15px}
 .peiwan .filter-bar .btn-reset{justify-self:end;height:24px;line-height:24px;background:none;padding:0;font-size:11px}
 .peiwan .filter-bar select,.peiwan .filter-bar .tag-drop-btn{font-size:13px;height:42px;padding:0 10px}.pw-search{height:46px;background:#fff;margin-bottom:4px}.pw-search button{min-width:70px;font-size:14px}
 .peiwan .tabs{gap:27px;margin-bottom:16px}.peiwan .tabs .tab{font-size:16px;padding-bottom:11px}.peiwan .section-title{font-size:11px;margin-bottom:12px}
 .peiwan .grid,.peiwan .sub-album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 10px}.peiwan .card{border-radius:9px}.peiwan .card .card-body{padding:9px 8px}.peiwan .card .card-title{font-size:15px}.peiwan .card .card-desc{font-size:11px;line-height:17px;height:34px}.peiwan .card .tag-lines{max-height:55px}.peiwan .badges{top:6px;left:6px;right:6px}.peiwan .badge{font-size:9px;padding:1px 4px}
 .pw-facts{gap:8px 5px;margin:9px 0;font-size:11px}.pw-facts dd{font-size:11px}.pw-facts dt span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.pw-facts dt i{font-size:12px}.peiwan .tag{font-size:9px;padding:1px 4px}
 .peiwan.pw-detail .main{padding:0 0 35px}.peiwan.pw-detail .header{padding:10px 15px;min-height:52px}.peiwan.pw-detail .header h1{font-size:15px}.pw-hero{height:auto;aspect-ratio:1/1.05;border-radius:0}.peiwan.pw-detail .info-card{padding:21px 18px;border-left:0;border-right:0}.peiwan.pw-detail .info-title{font-size:20px}.peiwan.pw-detail .photo-grid{padding:0 18px 18px;border-left:0;border-right:0}.peiwan.pw-detail .pw-facts{gap:14px}.peiwan.pw-detail .pw-facts dt span{position:static;width:auto;height:auto;clip:auto}.peiwan.pw-detail .pw-facts dd{font-size:13px}.peiwan.pw-detail .info-actions{gap:6px}.peiwan.pw-detail .info-actions button,.peiwan.pw-detail .info-actions a{padding:8px 11px}.peiwan.pw-detail .sub-album-grid{padding:0 14px}
}
@media(max-width:360px){.peiwan .catalog-header{gap:7px;padding:10px}.peiwan .pw-brand{font-size:14px}.peiwan .catalog-header .catalog-logo img{width:23px;height:23px}.peiwan .catalog-header .agency-nav a{font-size:11px}.peiwan.pw-home .main{padding-left:10px;padding-right:10px}.peiwan .card .card-title{font-size:13px}.peiwan .copy-link{padding:2px}.peiwan .grid{gap:14px 8px}.pw-facts{gap:7px 3px}}
/* Keep original compact selectors from overriding the new card spacing. */
.peiwan.compact-catalog .card .tag{font-size:10px;line-height:15px;padding:2px 6px}
.peiwan.compact-catalog .album-corner{max-width:100%}
.peiwan.pw-detail .photo-card:hover{transform:none;box-shadow:none}
@media(max-width:620px){.peiwan.compact-catalog .card .tag{font-size:9px;padding:1px 4px}.peiwan .account-dropdown{max-width:68px}.peiwan .catalog-header .header-right{gap:5px}.peiwan .catalog-header .user-badge{max-width:68px}}
