:root {
  --orange: #ff4d16;
  --orange-2: #ff6a25;
  --red: #ff314a;
  --ink: #211d1c;
  --muted: #817774;
  --cream: #fff7f1;
  --line: rgba(70, 45, 35, .09);
  --shadow: 0 18px 55px rgba(76, 39, 24, .16);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: #f6f6f6;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
button, input { font: inherit; }
button { color: inherit; }
button, [tabindex] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(255, 77, 22, .28); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

body { min-height: 100dvh; overflow: hidden; background: #f6f6f6; }

.preview-shell {
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100dvh, calc(100vw * 16 / 9));
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: #f6f6f6;
}

.phone {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  position: relative;
}

.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 0; background: #f7f7f7; }
.status-bar { background:transparent; backdrop-filter:none; padding:0; }

.status-bar { position: absolute; z-index: 25; inset: 0 0 auto; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 8px 24px 0; color: #191716; font-size: 13px; font-weight: 800; background: rgba(255,250,247,.88); backdrop-filter: blur(18px); }
.status-icons { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.signal { letter-spacing: -2px; transform: scaleY(.8); }
.wifi { font-size: 15px; transform: rotate(40deg); }
.battery { width: 23px; height: 11px; padding: 1.5px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.battery::after { content: ""; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: currentColor; }
.battery i { display: block; width: 75%; height: 100%; border-radius: 1px; background: #58bf46; }

.app-scroll { position: absolute; inset: 54px 0 0; overflow-x: hidden; overflow-y: auto; padding: 0 0 92px; background: #f6f6f6; scrollbar-width: none; overscroll-behavior: contain; }
.app-scroll::-webkit-scrollbar { display: none; }
.home-header { position: sticky; z-index: 15; top: 0; padding: 3px 10px 9px; background: linear-gradient(rgba(255,248,244,.98), rgba(255,255,255,.96)); backdrop-filter: blur(16px); }
.channel-tabs { display: flex; align-items: center; gap: 19px; height: 34px; overflow: hidden; white-space: nowrap; }
.channel-tabs button { height: 34px; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 650; cursor: pointer; position: relative; flex: 0 0 auto; }
.channel-tabs button span { margin-left: 2px; padding: 1px 3px; border-radius: 4px; background: var(--red); color: white; font-size: 8px; vertical-align: 2px; }
.channel-tabs button.active { color: var(--orange); font-size: 17px; font-weight: 850; }
.channel-tabs button.active::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 18px; height: 3px; transform: translateX(-50%); border-radius: 3px; background: var(--orange); }

.search-bar { height: 43px; display: flex; align-items: center; gap: 8px; padding: 3px 3px 3px 11px; border: 2px solid var(--orange); border-radius: 14px; background: white; box-shadow: 0 3px 11px rgba(255, 82, 23, .08); }
.scan-icon { width: 20px; height: 20px; border: 1.5px solid var(--orange); border-radius: 5px; position: relative; opacity: .9; }
.scan-icon::after { content: ""; position: absolute; inset: 5px -3px; background: white; border-top: 1.5px solid var(--orange); border-bottom: 1.5px solid var(--orange); }
.search-bar input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #2b2725; font-size: 13px; }
.search-bar input::placeholder { color: #9a9290; }
.camera-button { width: 28px; height: 34px; border: 0; background: none; color: #738396; font-size: 22px; cursor: pointer; }
.search-button { align-self: stretch; min-width: 62px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #ff6e2b, #ff4617); color: white; font-weight: 800; cursor: pointer; }

.shortcut-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 2px; padding: 13px 16px 10px; background: white; }
.shortcut { min-width: 0; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; transition: transform .16s; }
.shortcut:active { transform: scale(.9); }
.shortcut > span:last-child { max-width: 68px; overflow: hidden; color: #403a38; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: white; font-size: 21px; font-weight: 900; box-shadow: inset 0 -4px 8px rgba(0,0,0,.08); }
.shortcut-icon.orange { background: linear-gradient(145deg, #ff7526, #f63716); }
.shortcut-icon.pink { border-radius: 50%; background: linear-gradient(145deg, #ff3c82, #f00050); }
.shortcut-icon.black { background: linear-gradient(145deg, #555, #151515); }
.shortcut-icon.gold { border-radius: 50%; background: linear-gradient(145deg, #ffd23c, #ffa60a); }
.shortcut-icon.blue { background: linear-gradient(145deg, #6faeff, #3156e9); }
.shortcut-icon.green { border-radius: 50% 50% 45% 45%; background: linear-gradient(145deg, #5dcf70, #16ad4e); }
.shortcut-icon.yellow { border-radius: 50%; background: #ffd62f; }
.shortcut-icon.mint { background: linear-gradient(145deg, #5ddf7b, #20b04a); }
.shortcut-icon.sky { border-radius: 50%; background: linear-gradient(145deg, #67c6ff, #198add); }
.shortcut-icon.lime { background: linear-gradient(145deg, #d4e92f, #8cbb16); color: #252f12; }
.shortcut-icon.icon-img { background: none; padding: 0; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.10); }
.shortcut-icon.icon-img img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }

.promo-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 5px 16px 9px; background: white; }
.mini-promo { min-width: 0; height: 112px; padding: 8px; overflow: hidden; border: 0; border-radius: 10px; text-align: left; position: relative; cursor: pointer; transition: transform .18s; }
.mini-promo:active { transform: scale(.97); }
.mini-promo.live { background: linear-gradient(145deg, #482a5b, #e75891); color: white; }
.mini-promo.subsidy { background: linear-gradient(145deg, #fffdf7, #f7e7d0); }
.mini-promo.flash { background: linear-gradient(145deg, #fff7f1, #f6d8cc); }
.promo-title { position: relative; z-index: 2; display: block; font-size: 12px; font-weight: 850; white-space: nowrap; }
.promo-title b { color: var(--red); font-size: 8px; }
.live .promo-title b { color: white; background: var(--red); padding: 1px 3px; border-radius: 3px; }
.promo-visual { position: absolute; right: 5px; bottom: 17px; font-size: 50px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.13)); transform: rotate(-8deg); }
.promo-foot { position: absolute; z-index: 2; left: 8px; bottom: 7px; padding: 2px 5px; border-radius: 6px; background: rgba(255,255,255,.82); color: #322c2a; font-size: 9px; font-weight: 750; }

.wardrobe-banner-wrap { padding: 8px 16px 6px; background: #f6f6f6; }
.wardrobe-banner { position: relative; width: 100%; height: 202px; display: block; overflow: hidden; padding: 0; border: 0; border-radius: 24px; background: #ffe7da; text-align: left; cursor: pointer; box-shadow: 0 8px 20px rgba(126, 69, 45, .13); isolation: isolate; transition: transform .2s, box-shadow .2s; }
.wardrobe-banner:active { transform: scale(.985); box-shadow: 0 3px 11px rgba(126,69,45,.15); }
.wardrobe-banner::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(255,247,239,.98) 0%, rgba(255,240,227,.88) 39%, rgba(255,239,229,.18) 66%, transparent 100%); }
.wardrobe-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 57% center; transform: scale(1.04); animation: banner-breathe 5.5s ease-in-out infinite; }
.banner-shine { position: absolute; z-index: 4; top: -50%; left: -35%; width: 25%; height: 210%; transform: rotate(22deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); filter: blur(3px); animation: shine 4.8s ease-in-out infinite; pointer-events: none; }
.banner-copy { position: absolute; z-index: 3; left: 17px; top: 16px; width: 57%; }
.banner-kicker { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid rgba(255,103,52,.22); border-radius: 999px; background: rgba(255,255,255,.66); color: #c34d26; font-size: 9px; font-weight: 850; backdrop-filter: blur(8px); }
.banner-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(255,80,22,.12); }
.banner-copy strong { display: block; margin: 10px 0 5px; color: #623326; font-family: var(--font-brand); font-size: 24px; line-height: 1.06; letter-spacing: -.06em; }
.banner-sub { display: block; color: #8a5c50; font-size: 10px; font-weight: 650; }
.banner-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; padding: 8px 11px; border-radius: 999px; background: linear-gradient(135deg, #ff6e35, #ff3d1a); color: white; font-size: 11px; font-weight: 850; box-shadow: 0 7px 14px rgba(241,73,24,.23); }
.banner-cta b { font-size: 17px; line-height: 8px; }
.banner-badge { position: absolute; z-index: 3; top: 13px; right: 13px; width: 39px; height: 39px; display: grid; place-content: center; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(98,51,38,.67); color: #fff; text-align: center; font-size: 7px; line-height: 1; backdrop-filter: blur(7px); box-shadow: 0 4px 12px rgba(70,38,28,.15); }
.banner-badge b { display: block; margin-top: 2px; font-size: 11px; }

.recommend-section { padding: 5px 16px 20px; }
.section-heading { height: 42px; display: flex; align-items: center; justify-content: space-between; }
.section-heading > div { display: flex; align-items: baseline; gap: 7px; }
.section-heading strong { font-size: 18px; letter-spacing: -.04em; }
.section-heading span { color: #9b8c87; font-size: 9px; }
.section-heading button { border: 0; background: none; color: #8d7f7a; font-size: 10px; cursor: pointer; }
.style-chips { display: flex; gap: 7px; margin-bottom: 9px; overflow-x: auto; scrollbar-width: none; }
.style-chips::-webkit-scrollbar { display: none; }
.style-chips button { flex: 0 0 auto; padding: 6px 13px; border: 0; border-radius: 999px; background: white; color: #736864; font-size: 10px; font-weight: 750; cursor: pointer; }
.style-chips button.active { background: #201b19; color: white; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 8px; }
.product-card { min-width: 0; overflow: hidden; border-radius: 12px; background: white; box-shadow: 0 2px 9px rgba(61,44,36,.05); cursor: pointer; transition: transform .2s, box-shadow .2s, opacity .25s; }
.product-card:nth-child(odd) { margin-top: 0; }
.product-card:nth-child(even) { margin-top: 13px; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(65,42,31,.1); }
.product-card.hidden { display: none; }
.product-image { position: relative; height: 218px; overflow: hidden; background: #eee5ee; }
.product-image.tall { height: 248px; }
.product-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.image-tag { position: absolute; left: 7px; top: 7px; padding: 4px 7px; border-radius: 7px; background: rgba(44,34,50,.76); color: white; font-size: 8px; font-weight: 800; backdrop-filter: blur(6px); }
.image-tag.soft { background: rgba(255,255,255,.78); color: #9a502f; }
.favorite { position: absolute; right: 7px; top: 7px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.82); color: #4d403c; font-size: 19px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); transition: transform .18s, color .18s; }
.favorite.active { color: #ff3155; transform: scale(1.08); }
.product-info { padding: 9px 9px 11px; }
.product-info h2 { display: -webkit-box; overflow: hidden; margin: 0; color: #2b2726; font-size: 12px; line-height: 1.45; font-weight: 720; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-info h2 span { margin-right: 4px; padding: 2px 4px; border-radius: 4px; background: #fff0ea; color: var(--orange); font-size: 8px; vertical-align: 1px; }
.deal { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 8px; }
.deal b { padding: 2px 4px; border: 1px solid #ff6443; border-radius: 3px; color: #ff4422; }
.deal span { color: #aa9d98; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.price-row strong { color: var(--orange); font-size: 20px; letter-spacing: -.04em; }
.price-row strong small { font-size: 10px; }
.price-row > span { color: #9b918e; font-size: 8px; }
.seller { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: #817774; font-size: 8px; }
.avatar { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 8px; font-weight: 800; }
.avatar.lilac { background: #8e72c8; }.avatar.peach { background: #d9835d; }
.compact-card .product-image { height: 168px; }
.product-scene { display: grid; place-items: center; isolation: isolate; }
.product-scene.lavender { background: radial-gradient(circle at 38% 32%, #fff 0 5%, transparent 6%), linear-gradient(145deg, #eee7ff, #c9bcec); }
.product-scene.cream { background: radial-gradient(circle at 70% 23%, #fff 0 4%, transparent 5%), linear-gradient(145deg, #fff6e7, #f3d5c5); }
.scene-product { z-index: 2; font-size: 74px; filter: drop-shadow(0 18px 11px rgba(73,50,45,.2)); transform: rotate(-8deg); }
.scene-deco { position: absolute; z-index: 1; color: rgba(255,255,255,.85); font-size: 25px; }.scene-deco.one { top: 26px; right: 20px; }.scene-deco.two { bottom: 24px; left: 17px; }

.bottom-nav { position: absolute; z-index: 22; inset: auto 0 0; height: 80px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(60,48,43,.08); background: rgba(255,255,255,.94); backdrop-filter: blur(20px); }
.bottom-nav button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 0; border: 0; background: none; color: #352f2d; font-size: 9px; cursor: pointer; }
.bottom-nav button.active { color: var(--orange); font-weight: 800; }
.nav-icon { position: relative; height: 31px; display: grid; place-items: center; font-size: 25px; line-height: 1; }
.nav-icon.tao { width: 35px; border-radius: 50%; background: linear-gradient(145deg, #ff7e28, #ff4216); color: white; font-size: 18px; font-weight: 900; box-shadow: 0 4px 9px rgba(255,75,20,.2); }
.message-icon { font-size: 17px; letter-spacing: -1px; border: 1.7px solid currentColor; width: 26px; height: 22px; margin-top: 4px; border-radius: 11px; }
.message-icon i { position: absolute; right: -7px; top: -7px; width: 16px; height: 16px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: var(--orange); color: white; font-size: 8px; font-style: normal; }

.sheet-backdrop { position: absolute; z-index: 40; inset: 0; background: rgba(27,20,18,.4); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.sheet-backdrop.visible { opacity: 1; }
.task-sheet { position: absolute; z-index: 41; left: 0; right: 0; bottom: 0; padding: 17px 18px max(20px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fffaf7; transform: translateY(105%); transition: transform .34s cubic-bezier(.22,.9,.32,1); box-shadow: 0 -18px 45px rgba(66,36,26,.18); }
.task-sheet.open { transform: translateY(0); }
.sheet-close { position: absolute; z-index: 3; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.86); color: #725d55; font-size: 23px; cursor: pointer; }
.sheet-art { height: 142px; overflow: hidden; margin: -2px 0 13px; border-radius: 17px; background: #f6dfd2; }
.sheet-art img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.sheet-kicker { color: var(--orange); font-size: 10px; font-weight: 850; }
.task-sheet h2 { margin: 6px 0 7px; color: #4e3028; font-size: 21px; letter-spacing: -.04em; }
.task-sheet p { margin: 0; color: #82716b; font-size: 11px; line-height: 1.65; }
.task-steps { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; padding: 10px; border-radius: 13px; background: #fff0e8; }
.task-steps span { display: flex; align-items: center; gap: 5px; color: #6e4a3f; font-size: 9px; font-weight: 800; }
.task-steps b { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--orange); }
.task-steps i { color: #d5a190; font-style: normal; }
.primary-action { width: 100%; height: 47px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff712f, #ff3c17); color: white; font-weight: 850; cursor: pointer; box-shadow: 0 9px 18px rgba(255,67,23,.23); }
.task-sheet small { display: block; margin-top: 8px; color: #aaa09c; font-size: 8px; text-align: center; }
.toast { position: absolute; z-index: 60; left: 50%; bottom: 100px; max-width: 78%; padding: 10px 14px; border-radius: 999px; background: rgba(33,28,26,.9); color: white; font-size: 11px; font-weight: 700; text-align: center; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .22s, transform .22s; backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.banner-tap { animation: banner-pop .46s ease; }

@keyframes banner-breathe { 0%,100% { transform: scale(1.04) translate3d(0,0,0); } 50% { transform: scale(1.075) translate3d(-3px,-2px,0); } }
@keyframes shine { 0%, 40% { left: -35%; opacity: 0; } 50% { opacity: .8; } 70%, 100% { left: 130%; opacity: 0; } }
@keyframes banner-pop { 0%,100% { transform: scale(1); } 45% { transform: scale(.975); } 70% { transform: scale(1.012); } }

@media (max-width: 370px) {
  .channel-tabs { gap: 15px; }
  .wardrobe-banner { height: 190px; }
  .banner-copy strong { font-size: 22px; }
  .shortcut > span:last-child { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Unlocked healing companion entry: stays inside the shared phone frame. */
.home-companion-fab { position: absolute; z-index: 34; right: 9px; bottom: 89px; width: 67px; height: 77px; padding: 0; border: 0; background: transparent; cursor: pointer; filter: drop-shadow(0 8px 9px rgba(138,62,23,.2)); animation: home-pet-float 3.2s ease-in-out infinite; }
.home-companion-fab[hidden] { display: none !important; }
.home-companion-fab img { width: 67px; height: 77px; display: block; object-fit: contain; }
.home-companion-fab i { position: absolute; right: 4px; bottom: 4px; width: 19px; height: 19px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: linear-gradient(145deg,#ff8b48,#ff4b20); color: white; font-size: 8px; font-style: normal; box-shadow: 0 4px 8px rgba(240,68,20,.22); }
.home-companion-tip { position: absolute; right: 51px; top: -2px; width: max-content; max-width: 128px; padding: 7px 9px; border: 1px solid rgba(255,137,76,.16); border-radius: 12px 12px 2px 12px; background: rgba(255,250,246,.96); color: #754d3d; font-size: 7px; font-weight: 750; box-shadow: 0 7px 16px rgba(97,56,38,.1); opacity: 0; transform: translateY(5px) scale(.97); pointer-events: none; transition: .24s; }
.home-companion-fab.prompt .home-companion-tip { opacity: 1; transform: none; }
.home-companion-fab:active { animation: none; transform: scale(.92); }
@keyframes home-pet-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
