/* Exact proportions from the approved dual-phone mockup. */
.phone-shell { width: min(100%, 430px); padding: 54px 16px 82px; }
.page-head { margin: 4px 2px 14px; }
.page-head h1, .title-row h1, .flow-page h1 { font-size: 25px; }
.section-heading { gap: 8px; margin: 14px 2px 10px; }
.section-heading h2 { font-size: 15px; }
.tab-page[data-page="home"] .section-heading p { display: none; }
.portrait-feed { gap: 10px; }
.portrait-card { height: auto; border-radius: 12px; }
.portrait-card:nth-child(1) { aspect-ratio: 429 / 212; }
.portrait-card:nth-child(2) { aspect-ratio: 429 / 193; }
.portrait-card:nth-child(3) { aspect-ratio: 429 / 189; }
.portrait-card .card-gradient, .portrait-card .card-copy, .portrait-card .heart { display: none; }
.card-copy { top: 10px; right: auto; bottom: auto; left: 10px; padding: 5px 8px; border-radius: 6px; background: rgba(20, 18, 16, .62); }
.card-copy b { font-size: 11px; }
.card-copy small { display: none; }
.portrait-card > [data-action] { right: 5px; bottom: 5px; width: 74px; height: 38px; padding: 0; opacity: 0; }
.heart { top: 7px; right: 8px; font-size: 22px; }
.pinned { position: relative; display: block; height: auto; aspect-ratio: 438 / 177; border: 0; border-radius: 12px; }
.pinned > img { position: absolute; inset: 0; }
.pinned > div { position: absolute; z-index: 2; inset: 0; padding: 0; }
.pinned > div > :not(button) { display: none; }
.pinned #open-styling { position: absolute; left: 18px; bottom: 12px; width: 88px; height: 36px; margin: 0; padding: 0; opacity: 0; }
.pinned > div { padding: 14px 0 12px 14px; }
.pinned h2 { margin: 9px 0 5px; font-size: 16px; }
.pinned button { margin-top: 10px; padding: 7px 14px; font-size: 11px; }
.feed-title { display: none; }
.banner-feed { gap: 8px; margin-top: 10px; }
.banner { height: auto; border-radius: 10px; }
.banner.large { height: auto; aspect-ratio: 436 / 183; }
.banner.wide { height: auto; aspect-ratio: 438 / 175; }
.banner-pair { gap: 8px; }
.banner-pair .banner:first-child { height: auto; aspect-ratio: 209 / 184; }
.banner-pair .banner:last-child { height: auto; aspect-ratio: 217 / 184; }
.banner > div, .banner > span, .banner > button { display: none; }
.bottom-tabs { width: min(100%, 430px); padding: 6px 10px calc(7px + env(safe-area-inset-bottom)); }
.portrait-create-flow { padding: 8px 2px 20px; }
.create-style-preview { position: relative; overflow: hidden; height: 188px; margin-top: 18px; border-radius: 14px; background: #211f1d; }
.create-style-preview img { width: 100%; height: 100%; object-fit: cover; }
.create-style-preview > div { position: absolute; right: 12px; bottom: 12px; left: 12px; display: flex; justify-content: space-between; color: #fff; }
.create-style-preview small { padding: 4px 8px; border-radius: 99px; background: rgba(20,18,16,.6); }
.ratio-switch button { display: flex; align-items: center; justify-content: center; gap: 7px; }
.ratio-switch button small { font-size: 12px; font-weight: 500; }
.ratio-switch button b { font-size: 15px; }
.portrait-template-list { display: grid; gap: 16px; }.portrait-template { padding: 14px; border: 1px solid #eee3da; border-radius: 18px; background: #fff; }.portrait-template header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.portrait-template header b,.portrait-template header small { display: block; }.portrait-template header b { font-size: 17px; }.portrait-template header small { margin-top: 4px; color: #77736f; font-size: 11px; }.portrait-template header em { padding: 5px 8px; border-radius: 99px; background: #fff0e8; color: #ff684d; font-size: 10px; font-style: normal; }.template-case-track { display: flex; gap: 9px; margin-top: 13px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }.template-case-track::-webkit-scrollbar { display: none; }.template-case-track button { flex: 0 0 78%; height: 232px; padding: 0; overflow: hidden; scroll-snap-align: start; border: 0; border-radius: 14px; background: #eee; }.template-case-track img { width: 100%; height: 100%; object-fit: cover; }.template-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }.template-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 99px; background: #d7cec8; }.template-dots button.is-active { width: 17px; background: #ff684d; }.template-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 9px; margin-top: 13px; }.template-social,.template-cta { display: flex; min-height: 43px; margin: 0; align-items: center; justify-content: center; border-radius: 99px; font-size: 11px; font-weight: 800; }.template-social { gap: 7px; padding: 0 10px; border: 1px solid #eee3da; background: #fff; color: #3a3633; }.template-social > span { display: flex; }.template-social img { width: 21px; height: 21px; margin-right: -6px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }.template-social b { margin-left: 4px; white-space: nowrap; }.template-social.is-liked { border-color: #ffc2b6; background: #fff0eb; color: #f05239; }.template-cta { border: 0; background: #ff684d; color: #fff; }.portrait-style-flow { padding: 8px 2px 24px; }.portrait-style-flow > h1 { margin: 16px 4px 0; }.three-tabs { grid-template-columns: repeat(3,1fr); }
.ratio-description,.effect-disclaimer { margin: 8px 4px 0; color: #77736f; font-size: 11px; line-height: 1.5; }
.effect-disclaimer { margin-top: 12px; }
.generation-confirmation { margin-top: 14px; padding: 14px; border: 1px solid #eee3da; border-radius: 14px; background: #fff; }
.generation-confirmation h2 { margin: 0 0 8px; font-size: 15px; }
.generation-confirmation p { display: flex; justify-content: space-between; gap: 14px; margin: 7px 0; color: #77736f; font-size: 11px; }
.generation-confirmation b { color: #262321; text-align: right; }
.result-panel button + button { margin-top: 7px; }

.home-title { padding: 12px 4px 18px; }
.home-title h1 { font-size: 27px; letter-spacing: -1px; }
.home-section-title { display:flex; align-items:center; justify-content:space-between; margin:0 4px 11px; }
.home-section-title b { font-size:17px; }
.home-section-title span { color:#9b9088; font-size:11px; }
.featured-template { margin:0; padding:0; border:0; background:transparent; }
.featured-template-track { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; border-radius:18px; }
.featured-template-track::-webkit-scrollbar,.discovery-rail::-webkit-scrollbar { display:none; }
.featured-template-track > button { position:relative; flex:0 0 100%; height:286px; padding:0; overflow:hidden; scroll-snap-align:start; border:0; background:#ddd; text-align:left; }
.featured-template-track > button + button { margin-left:10px; }
.featured-template-track img { width:100%; height:100%; object-fit:cover; }
.featured-template-track > button::after { content:""; position:absolute; inset:42% 0 0; background:linear-gradient(transparent,rgba(12,10,9,.76)); pointer-events:none; }
.featured-template-copy { position:absolute; z-index:1; right:16px; bottom:16px; left:16px; color:#fff; }
.featured-template-copy small,.featured-template-copy b { display:block; text-shadow:0 1px 7px rgba(0,0,0,.3); }
.featured-template-copy small { margin-bottom:4px; font-size:11px; opacity:.9; }
.featured-template-copy b { font-size:20px; }
.featured-template-track em { position:absolute; z-index:1; top:13px; left:13px; padding:5px 8px; border-radius:99px; background:rgba(255,255,255,.92); color:#514a45; font-size:10px; font-style:normal; }
.featured-template .template-dots { margin-top:9px; }
.featured-template .template-actions { margin-top:10px; }
.discovery-title { margin-top:26px; }
.discovery-rail { display:flex; gap:10px; overflow-x:auto; padding:0 4px 6px; scrollbar-width:none; }
.discovery-rail button { position:relative; flex:0 0 142px; height:166px; padding:0; overflow:hidden; border:0; border-radius:14px; background:#ddd; text-align:left; }
.discovery-rail img { width:100%; height:100%; object-fit:cover; }
.discovery-rail button::after { content:""; position:absolute; inset:54% 0 0; background:linear-gradient(transparent,rgba(0,0,0,.67)); pointer-events:none; }
.discovery-rail span { position:absolute; z-index:1; right:10px; bottom:10px; left:10px; color:#fff; font-size:12px; font-weight:800; }
.personal-style-entry { position:relative; display:flex; align-items:center; gap:12px; width:100%; height:104px; margin-top:24px; padding:14px; overflow:hidden; border:0; border-radius:14px; background:#28221f; color:#fff; text-align:left; }.personal-style-entry::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(20,16,14,.78),rgba(20,16,14,.28)); }.personal-style-entry > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }.personal-style-entry > span,.personal-style-entry > em { position:relative; z-index:1; }.personal-style-entry > span { display:block; max-width:225px; }.personal-style-entry b,.personal-style-entry small { display:block; }.personal-style-entry b { font-size:15px; }.personal-style-entry small { margin-top:5px; color:rgba(255,255,255,.78); font-size:10px; }.personal-style-entry em { margin-left:auto; color:#fff; font-size:11px; font-style:normal; }.view-samples { width:100%; margin-top:12px; padding:11px; border:0; background:transparent; color:#6e625c; font-size:12px; }.samples-page { padding-bottom:80px; }.samples-layout { display:flex; min-height:610px; margin:0 -16px; background:#fff; }.sample-categories { flex:0 0 92px; padding:8px 0; overflow-y:auto; background:#f1efed; }.sample-categories button { display:block; width:100%; min-height:48px; padding:8px 9px; border:0; background:transparent; color:#5b5550; font-size:12px; text-align:center; }.sample-categories button.is-active { background:#fff; color:#24211f; font-weight:800; }.sample-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:10px; flex:1; padding:10px; overflow-y:auto; }.sample-grid button { padding:0 0 8px; overflow:hidden; border:0; border-radius:9px; background:#fff; color:#37312d; font-size:11px; text-align:center; }.sample-grid img { width:100%; height:160px; border-radius:8px; object-fit:cover; }.sample-grid b { display:block; padding-top:7px; }

/* Backend-driven content states and template surfaces. */
.content-state { margin: 12px 2px; padding: 18px 14px; border: 1px solid #eee3da; border-radius: 14px; background: #fff; color: #77736f; font-size: 12px; line-height: 1.6; text-align: center; }
.content-state p { margin: 0; }
.content-state button { margin-top: 10px; padding: 8px 14px; border: 0; border-radius: 99px; background: #ff684d; color: #fff; font-weight: 700; }
.content-state.is-loading { position: relative; overflow: hidden; color: #918780; }
.content-state.is-loading::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: linear-gradient(90deg, transparent, #ff684d, transparent); animation: content-loading 1.1s linear infinite; }
.content-state.is-empty { background: #fffdfb; }
.content-state.is-error { border-color: #f0c2b6; background: #fff7f3; color: #9a4938; }
@keyframes content-loading { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.asset-frame { display: block; width: 100%; height: 100%; overflow: hidden; background: #eee8e2; }
.asset-frame.has-no-asset { display: grid; place-items: center; min-height: 160px; color: #8d837c; font-size: 12px; }
.asset-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait-template .template-case-track > .asset-frame { flex: 0 0 100%; height: 232px; border-radius: 14px; }
.portrait-template + .portrait-template { margin-top: 4px; }
.sample-results { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.sample-grid { flex: 0 0 auto; }
.sample-grid button > .asset-frame { height: 160px; border-radius: 8px; }
.sample-grid button > .asset-frame img { border-radius: 8px; }
.sample-load-more { align-self: center; margin: 4px 10px 18px; padding: 9px 18px; border: 1px solid #eee3da; border-radius: 99px; background: #fff; color: #6e625c; font-size: 12px; }
.template-ratio-summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid #eee3da; border-radius: 14px; background: #fff; }
.template-ratio-summary small { color: #77736f; }
.template-ratio-summary b { color: #ff684d; font-size: 18px; }
.prototype-notice { margin-top: 14px !important; padding: 10px 12px; border-left: 3px solid #ff684d; border-radius: 0 9px 9px 0; background: #fff0e8; color: #8f4a3a !important; line-height: 1.55; }
.style-strip button .asset-frame { height: 112px; }
.featured-style.has-no-asset::before { content: "暂无模板封面"; position: absolute; inset: 0; display: grid; place-items: center; color: #77736f; }
.primary-cta:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.personal-style-entry[hidden] + .home-section-title { margin-top: 0; }
.personal-style-entry:not([hidden]) + .home-section-title { margin-top: 26px; }

@media (min-width: 520px) {
  .phone-shell { min-height: calc(100vh - 24px); margin: 12px auto; border-radius: 26px; }
  .bottom-tabs { bottom: 12px; border-radius: 0 0 26px 26px; }
}
