:root {
    --bg: #f6f6f7;
    --bg-accent: #fff5e8;
    --panel: #ffffff;
    --line: rgba(28, 31, 35, 0.08);
    --text: #1f2129;
    --muted: #8a8f98;
    --accent: #ffb400;
    --accent-strong: #ff8a00;
    --accent-soft: rgba(255, 180, 0, 0.14);
    --danger-soft: rgba(255, 132, 94, 0.14);
    --shadow: 0 10px 28px rgba(28, 31, 35, 0.08);
    --shadow-soft: 0 6px 18px rgba(28, 31, 35, 0.05);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

button,
a,
input {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    background: none;
}

.feed-app {
    width: min(100%, 680px);
    height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 18%, #f8f8f8 100%);
    box-shadow: 0 0 0 1px rgba(28, 31, 35, 0.04);
}

.feed-app__top {
    position: relative;
    z-index: 20;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav__tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.top-nav__tabs::-webkit-scrollbar,
.platform-row::-webkit-scrollbar,
.filter-menu::-webkit-scrollbar {
    display: none;
}

.top-nav__tab {
    position: relative;
    flex: 0 0 auto;
    padding: 6px 0 10px;
    color: #3a3d44;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.top-nav__tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    transform: scaleX(0.4);
    opacity: 0;
}

.top-nav__tab.is-active {
    color: #111318;
}

.top-nav__tab.is-active::after {
    background: linear-gradient(90deg, #ffd44c, #ffbf00);
    transform: scaleX(1);
    opacity: 1;
}

.top-nav__search {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #1f2129;
    font-size: 14px;
    font-weight: 800;
    background: #f5f6f8;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #f7f8fa;
}

.search-panel[hidden] {
    display: none;
}

.search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
}

.search-panel button {
    flex-shrink: 0;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 700;
}

.platform-row {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.platform-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 58px;
    color: #666d76;
}

.platform-entry__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffb62f, #ff8a00);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(255, 138, 0, 0.24);
}

.platform-entry__icon--all {
    background: linear-gradient(135deg, #ffcf54, #ff9f1c);
}

.platform-entry__label {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.platform-entry.is-active .platform-entry__label {
    color: #17191f;
    font-weight: 700;
}

.filter-row {
    position: relative;
    margin-top: 14px;
}

.filter-row__buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.filter-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f7f8fa;
    color: #3d4148;
}

.filter-chip span {
    font-size: 13px;
    color: #7d838c;
}

.filter-chip strong {
    font-size: 13px;
    font-weight: 700;
    color: #17191f;
    max-width: 56px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-chip.is-open {
    background: #fff4df;
}

.filter-menus {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.filter-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.filter-menu[hidden] {
    display: none;
}

.filter-menu__item {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f7f8fa;
    color: #5d636d;
    font-size: 13px;
    white-space: nowrap;
}

.filter-menu__item.is-active {
    background: linear-gradient(135deg, #ffe38c, #ffc531);
    color: #6a4700;
    font-weight: 700;
}

.feed-app__content {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 12px 18px;
    background:
        radial-gradient(circle at top right, rgba(255, 191, 0, 0.12), transparent 22%),
        linear-gradient(180deg, #fffaf3 0%, #f6f6f7 42%, #f6f6f7 100%);
}

.feed-hero,
.feed-highlight,
.feed-card,
.feed-empty {
    background: var(--panel);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.feed-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px;
    padding: 16px;
}

.feed-hero__title {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.feed-hero__subtitle {
    margin-top: 6px;
    color: #757b84;
    font-size: 13px;
    line-height: 1.5;
}

.feed-hero__notice {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg-accent);
    color: #7d5a12;
    font-size: 13px;
    line-height: 1.6;
}

.feed-hero__aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 14px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff5d8, #fffaf0);
}

.feed-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    color: #ff8a00;
    font-size: 11px;
    font-weight: 800;
}

.feed-hero__aside strong {
    margin-top: 10px;
    font-size: 28px;
    line-height: 1;
}

.feed-hero__aside span:last-child {
    margin-top: 8px;
    color: #7c818a;
    font-size: 12px;
    line-height: 1.5;
}

.feed-highlight {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff7e8, #fffdf8);
}

.feed-highlight__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 180, 0, 0.16);
    color: #a87300;
    font-size: 11px;
    font-weight: 800;
}

.feed-highlight__text {
    margin-top: 10px;
    color: #44484f;
    font-size: 14px;
    line-height: 1.7;
}

.feed-stream {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.feed-card {
    padding: 14px;
}

.feed-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.feed-card__publisher {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.feed-card__avatar,
.feed-card__avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
}

.feed-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.feed-card__publisher-meta {
    min-width: 0;
}

.feed-card__publisher-top,
.feed-card__publisher-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.feed-card__publisher-name {
    font-size: 15px;
    font-weight: 800;
    color: #17191f;
}

.feed-card__publisher-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 130, 84, 0.14);
    color: #ff7a45;
    font-size: 11px;
    font-weight: 700;
}

.feed-card__channel,
.feed-card__time {
    color: #8b9098;
    font-size: 12px;
}

.feed-card__share-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff4df;
    color: #d68a00;
    font-size: 13px;
    font-weight: 700;
}

.feed-card__body {
    margin-top: 12px;
}

.feed-card__shop {
    color: #9a7c37;
    font-size: 12px;
    font-weight: 700;
}

.feed-card__title {
    margin: 8px 0 0;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 800;
    color: #16181e;
}

.feed-card__content-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.feed-card__content-list li {
    position: relative;
    padding-left: 14px;
    color: #464b54;
    font-size: 14px;
    line-height: 1.7;
}

.feed-card__content-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #49a5ff;
}

.feed-card__tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.feed-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.feed-card__tag--soft {
    background: #f3f5f7;
    color: #646b75;
}

.feed-card__tag--coupon {
    background: #fff1e9;
    color: #ff7a45;
}

.feed-card__price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.feed-card__price {
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    color: #ff5a2a;
}

.feed-card__origin-price {
    color: #9ba1aa;
    font-size: 13px;
    text-decoration: line-through;
}

.feed-card__note {
    color: #8b9098;
    font-size: 12px;
}

.feed-card__media {
    margin-top: 14px;
}

.feed-card__media-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-card__media:not(.has-qr):not(.has-gallery) .feed-card__media-grid {
    grid-template-columns: minmax(0, 1fr);
}

.feed-card__media-item {
    position: relative;
    overflow: hidden;
    min-height: 148px;
    border-radius: 16px;
    background: #f4f6f8;
}

.feed-card__media-item.is-wide {
    min-height: 180px;
}

.feed-card__media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-card__media-item--qr {
    padding: 12px;
    background: #fffaf0;
    border: 1px solid rgba(255, 180, 0, 0.16);
}

.feed-card__media-item--qr img {
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.feed-card__media-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 180, 0, 0.14);
    color: #a87300;
    font-size: 11px;
    font-weight: 800;
}

.feed-card__footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.feed-card__footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 10px;
    border-radius: 14px;
    background: #f5f6f8;
    color: #49505a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.feed-card__footer-btn--primary {
    background: linear-gradient(135deg, #ffd44c, #ffbc00);
    color: #5c3c00;
}

.feed-empty {
    margin-top: 14px;
    padding: 36px 20px;
    text-align: center;
}

.feed-empty__title {
    font-size: 18px;
    font-weight: 800;
}

.feed-empty__text {
    margin-top: 8px;
    color: #858b95;
    font-size: 14px;
    line-height: 1.7;
}

.feed-app__bottom {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 18px rgba(28, 31, 35, 0.04);
}

.bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8b9098;
}

.bottom-tab__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    font-size: 12px;
    font-weight: 800;
    color: #5d636d;
}

.bottom-tab__label {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

.bottom-tab.is-active {
    color: #1a1d23;
}

.bottom-tab.is-active .bottom-tab__icon {
    background: linear-gradient(135deg, #ffe28b, #ffbf00);
    color: #6a4700;
}

.feed-toast {
    position: fixed;
    left: 50%;
    bottom: calc(72px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 40;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(27, 30, 35, 0.84);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

@media (min-width: 720px) {
    body {
        background: linear-gradient(180deg, #f2f2f3 0%, #ececed 100%);
    }

    .feed-app {
        border-radius: 28px;
        overflow: hidden;
        margin: 18px auto;
        height: calc(100vh - 36px);
    }
}

@media (max-width: 560px) {
    .feed-app__top {
        padding-left: 10px;
        padding-right: 10px;
    }

    .top-nav__tab {
        font-size: 16px;
    }

    .filter-row__buttons {
        gap: 8px;
    }

    .filter-chip {
        padding: 10px;
    }

    .filter-chip strong {
        max-width: 52px;
    }

    .feed-app__content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .feed-hero {
        grid-template-columns: 1fr;
    }

    .feed-hero__aside {
        align-items: flex-start;
    }

    .feed-card {
        padding: 12px;
    }

    .feed-card__title {
        font-size: 18px;
    }

    .feed-card__media-item {
        min-height: 132px;
    }

    .feed-card__footer {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .feed-card__footer-btn {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 12px;
    }
}
