/* 应用商店 · 独立界面样式（iOS App Store 风格）
 * 全部选择器限定在 #love-mi-app-store 与 .lmas- 前缀，不影响其他模块。
 */
#love-mi-app-store {
    --lmas-bg: #f2f2f7;
    --lmas-card: #ffffff;
    --lmas-ink: #1c1c1e;
    --lmas-ink-2: #3a3a3c;
    --lmas-gray: #8e8e93;
    --lmas-gray-2: #aeaeb2;
    --lmas-gray-3: #c7c7cc;
    --lmas-line: rgba(60, 60, 67, 0.16);
    --lmas-fill: #e9e9eb;
    --lmas-fill-2: #f2f2f7;
    --lmas-blue: #007aff;
    --lmas-red: #ff3b30;
    --lmas-pink: #ff2d55;
    --lmas-green: #34c759;
    --lmas-orange: #ff9500;
    --lmas-safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
    --lmas-safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
    --lmas-tabbar-h: 50px;
    --lmas-radius: 18px;
    position: absolute;
    inset: 0;
    z-index: 6800;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--lmas-ink);
    background: var(--lmas-bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

#love-mi-app-store[hidden] { display: none !important; }

#love-mi-app-store *,
#love-mi-app-store *::before,
#love-mi-app-store *::after { box-sizing: border-box; }

#love-mi-app-store button {
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

#love-mi-app-store img { -webkit-user-drag: none; user-select: none; }

/* ------------------------------------------------------------------ 布局骨架 */

.lmas-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--lmas-bg);
}

.lmas-screen[hidden] { display: none !important; }

.lmas-screen--white { background: var(--lmas-card); }

.lmas-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 calc(var(--lmas-tabbar-h) + var(--lmas-safe-bottom) + 24px);
    scrollbar-width: none;
}

.lmas-scroll::-webkit-scrollbar { display: none; }

.lmas-scroll--no-tab { padding-bottom: calc(var(--lmas-safe-bottom) + 32px); }

/* 顶部紧凑导航栏：大标题页滚动后淡入标题 */
.lmas-navbar {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(64px, auto) minmax(0, 1fr) minmax(64px, auto);
    align-items: center;
    min-height: calc(44px + var(--lmas-safe-top));
    padding: var(--lmas-safe-top) 8px 0;
    background: rgba(242, 242, 247, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid transparent;
    transition: border-color 0.2s ease;
}

.lmas-screen--white .lmas-navbar { background: rgba(255, 255, 255, 0.86); }

.lmas-navbar.is-scrolled { border-bottom-color: var(--lmas-line); }

.lmas-navbar-title {
    margin: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lmas-navbar.is-scrolled .lmas-navbar-title,
.lmas-navbar--static .lmas-navbar-title { opacity: 1; transform: none; }

.lmas-nav-side { display: flex; align-items: center; min-height: 44px; }
.lmas-nav-side--end { justify-content: flex-end; }

.lmas-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 44px;
    padding: 0 8px 0 4px;
    border: 0;
    background: transparent;
    color: var(--lmas-blue);
    font-size: 17px;
    font-weight: 400;
    white-space: nowrap;
}

.lmas-nav-btn:active { opacity: 0.4; }
.lmas-nav-btn svg { width: 12px; height: 20px; flex: 0 0 auto; }
.lmas-nav-btn--text { padding: 0 8px; }
.lmas-nav-btn--bold { font-weight: 600; }
.lmas-nav-btn[disabled] { color: var(--lmas-gray-3); pointer-events: none; }

/* 大标题区 */
.lmas-large-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 20px 8px;
}

.lmas-kicker {
    margin: 0 0 2px;
    color: var(--lmas-gray);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.lmas-title {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* 头像 */
.lmas-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #5e5ce6, #bf5af2);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.lmas-avatar--lg { width: 64px; height: 64px; font-size: 26px; }
.lmas-avatar--sm { width: 30px; height: 30px; font-size: 13px; }

/* ------------------------------------------------------------------ Tab 栏 */

.lmas-tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--lmas-tabbar-h) + var(--lmas-safe-bottom));
    padding: 0 6px var(--lmas-safe-bottom);
    background: rgba(249, 249, 249, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--lmas-line);
}

.lmas-tabbar[hidden] { display: none !important; }

.lmas-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--lmas-gray);
    font-size: 10px;
    font-weight: 500;
}

.lmas-tab svg { width: 26px; height: 26px; }
.lmas-tab.is-active { color: var(--lmas-blue); }
.lmas-tab:active { opacity: 0.6; }

/* ------------------------------------------------------------------ 通用卡片与行 */

.lmas-section { padding: 18px 20px 0; }

.lmas-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.lmas-section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lmas-section-sub {
    margin: 2px 0 0;
    color: var(--lmas-gray);
    font-size: 13px;
}

.lmas-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--lmas-blue);
    font-size: 15px;
    white-space: nowrap;
}

.lmas-link:active { opacity: 0.5; }

.lmas-card {
    overflow: hidden;
    border-radius: var(--lmas-radius);
    background: var(--lmas-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.lmas-card + .lmas-card { margin-top: 16px; }

.lmas-card-head {
    padding: 14px 16px 6px;
}

.lmas-card-kicker {
    margin: 0;
    color: var(--lmas-gray);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lmas-card-title {
    margin: 2px 0 0;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lmas-list { margin: 0; padding: 0; list-style: none; }

.lmas-row {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border: 0;
    width: 100%;
    text-align: left;
    background: transparent;
}

.lmas-row:active { background: rgba(0, 0, 0, 0.035); }

.lmas-row + .lmas-row::before {
    content: "";
    position: absolute;
    left: 90px;
    right: 0;
    top: 0;
    border-top: 0.5px solid var(--lmas-line);
}

.lmas-row-icon {
    position: relative;
    width: 62px;
    height: 62px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.lmas-row-body { min-width: 0; }

.lmas-row-title {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 500;
}

.lmas-row-sub {
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--lmas-gray);
    font-size: 13px;
}

.lmas-row-meta {
    margin: 3px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lmas-gray);
    font-size: 12px;
}

.lmas-row-meta svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }
.lmas-row-meta--bubble { white-space: nowrap; }

.lmas-row-rank {
    display: inline-block;
    min-width: 18px;
    color: var(--lmas-ink);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.lmas-row--ranked { grid-template-columns: 20px 62px minmax(0, 1fr) auto; }
.lmas-row--ranked + .lmas-row--ranked::before { left: 122px; }

/* 分区图标（渐变 + 线性 glyph） */
.lmas-type-icon {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    background: linear-gradient(135deg, var(--lmas-accent, #5e5ce6), var(--lmas-accent2, #bf5af2));
}

.lmas-type-icon svg { width: 54%; height: 54%; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.lmas-type-icon--theme {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    place-items: stretch;
    gap: 12%;
    padding: 16%;
    background: var(--lmas-theme-bg, #0b2545);
}

.lmas-type-icon--theme span { display: block; min-width: 0; min-height: 0; }

.lmas-type-icon--theme span { border-radius: 18%; }

.lmas-type-icon--stickers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    padding: 3px;
    background: #fff;
}

.lmas-type-icon--stickers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    background: var(--lmas-fill-2);
}

/* 获取按钮 */
.lmas-get {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 15px;
    background: var(--lmas-fill);
    color: var(--lmas-blue);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.lmas-get:active { opacity: 0.6; }
.lmas-get.is-loading { color: transparent; pointer-events: none; }
.lmas-get.is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(0, 122, 255, 0.25);
    border-top-color: var(--lmas-blue);
    animation: lmas-spin 0.8s linear infinite;
}
.lmas-get.is-done { color: var(--lmas-blue); }
.lmas-get--filled { background: var(--lmas-blue); color: #fff; }
.lmas-get--filled.is-done { background: rgba(0, 122, 255, 0.12); color: var(--lmas-blue); }
.lmas-get--filled.is-loading::after { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.lmas-get--white { background: rgba(255, 255, 255, 0.92); color: var(--lmas-ink); }
.lmas-get--white.is-loading::after { border-color: rgba(0, 0, 0, 0.18); border-top-color: var(--lmas-ink); }
.lmas-get--lg { height: 34px; min-width: 88px; font-size: 16px; }

.lmas-get.is-done { gap: 4px; }
.lmas-get.is-done svg { width: 12px; height: 12px; flex: none; }

.lmas-download-menu { position: absolute; inset: 0; z-index: 30; }
.lmas-download-options {
    position: absolute;
    padding: 5px;
    border: 1px solid var(--lmas-line);
    border-radius: 14px;
    background: var(--lmas-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.lmas-download-options > button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--lmas-ink);
    text-align: left;
    white-space: nowrap;
}

.lmas-download-options > button:active,
.lmas-download-options > button:focus-visible { background: var(--lmas-fill-2); }
.lmas-download-options > button > svg { width: 18px; height: 18px; flex: none; color: var(--lmas-blue); }
.lmas-download-options > button > svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

body:has(#love-mi-app-store:not([hidden])) #download-ready-modal { z-index: 6801; }

@keyframes lmas-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ 今日：大卡片 */

.lmas-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    padding: 18px 18px 16px;
    border: 0;
    border-radius: var(--lmas-radius);
    width: 100%;
    text-align: left;
    color: #fff;
    background: linear-gradient(160deg, var(--lmas-accent, #5e5ce6), var(--lmas-accent2, #bf5af2));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 14px 34px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.lmas-hero:active { transform: scale(0.985); }
.lmas-hero { transition: transform 0.18s ease; }

.lmas-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.28), transparent 42%),
        radial-gradient(circle at 20% 90%, rgba(0, 0, 0, 0.18), transparent 50%);
    pointer-events: none;
}

.lmas-hero > * { position: relative; }

.lmas-hero-kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.lmas-hero-title {
    margin: 4px 0 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.lmas-hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    margin: 18px 0;
}

.lmas-hero-art .lmas-row-icon {
    width: 108px;
    height: 108px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.lmas-hero-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.lmas-hero-foot-title {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
}

.lmas-hero-foot-sub {
    margin: 1px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0.8;
}

/* 分区快捷横滑 */
.lmas-hscroll {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.lmas-hscroll::-webkit-scrollbar { display: none; }

.lmas-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px 0 8px;
    border: 0;
    border-radius: 20px;
    background: var(--lmas-card);
    color: var(--lmas-ink);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    scroll-snap-align: start;
}

.lmas-pill:active { opacity: 0.6; }

.lmas-category-tags { flex-wrap: wrap; gap: 8px; overflow: visible; }
.lmas-category-tags .lmas-pill { padding: 0 8px; font-size: 13px; }
.lmas-category-tags .lmas-pill.is-selected { background: var(--lmas-blue); color: #fff; }
.lmas-category-tags .lmas-pill:focus-visible { outline: 2px solid var(--lmas-blue); outline-offset: 2px; }

.lmas-pill .lmas-row-icon { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }

/* ------------------------------------------------------------------ 分区页 */

.lmas-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px;
}

.lmas-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 110px;
    padding: 12px 14px;
    border: 0;
    border-radius: 16px;
    text-align: left;
    color: #fff;
    background: linear-gradient(150deg, var(--lmas-accent, #5e5ce6), var(--lmas-accent2, #bf5af2));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.16s ease;
}

.lmas-tile:active { transform: scale(0.97); }

.lmas-tile svg {
    position: absolute;
    right: -6px;
    top: -4px;
    width: 64px;
    height: 64px;
    stroke: rgba(255, 255, 255, 0.55);
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lmas-tile-title { margin: 0; font-size: 18px; font-weight: 700; }
.lmas-tile-sub { margin: 2px 0 0; font-size: 12px; opacity: 0.85; }

/* 分段控件 */
.lmas-seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 2px;
    border-radius: 9px;
    background: rgba(118, 118, 128, 0.12);
}

.lmas-seg-btn {
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--lmas-ink);
    font-size: 13px;
    font-weight: 500;
}

.lmas-seg-btn.is-active {
    background: var(--lmas-card);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06);
}

.lmas-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 20px 4px;
}

.lmas-toolbar .lmas-seg { flex: 0 0 168px; }
.lmas-toolbar-count { flex: 1 1 auto; color: var(--lmas-gray); font-size: 13px; text-align: right; }

/* ------------------------------------------------------------------ 搜索 */

.lmas-search {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    margin: 0 20px 12px;
    padding: 0 8px 0 10px;
    border-radius: 10px;
    background: rgba(118, 118, 128, 0.12);
    color: var(--lmas-gray);
}

.lmas-search svg { width: 16px; height: 16px; flex: 0 0 auto; }

.lmas-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--lmas-ink);
    font: inherit;
    font-size: 17px;
}

.lmas-search input::placeholder { color: var(--lmas-gray); }

.lmas-search-clear {
    display: none;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--lmas-gray-2);
    color: #fff;
    font-size: 13px;
    line-height: 20px;
}

.lmas-search.has-value .lmas-search-clear { display: block; }

.lmas-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.lmas-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 16px;
    background: var(--lmas-card);
    color: var(--lmas-ink);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lmas-chip:active { opacity: 0.6; }
.lmas-chip.is-active { background: var(--lmas-blue); color: #fff; }
.lmas-chip--tag { background: var(--lmas-fill-2); box-shadow: none; color: var(--lmas-blue); font-weight: 500; height: 28px; padding: 0 10px; font-size: 13px; }

/* ------------------------------------------------------------------ 详情页 */

.lmas-detail-header {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding: 8px 20px 0;
}

.lmas-detail-header .lmas-row-icon {
    width: 118px;
    height: 118px;
    border-radius: 26px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.lmas-detail-head-body { display: flex; flex-direction: column; min-width: 0; }

.lmas-detail-name {
    margin: 2px 0 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    word-break: break-word;
}

.lmas-detail-dev {
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lmas-gray);
    font-size: 14px;
    text-align: left;
}

.lmas-detail-dev b { color: var(--lmas-blue); font-weight: 500; }

.lmas-detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.lmas-icon-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--lmas-blue);
}

.lmas-icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lmas-icon-btn:active { opacity: 0.5; }

.lmas-infostrip {
    display: flex;
    margin: 18px 0 0;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.lmas-infostrip::-webkit-scrollbar { display: none; }

.lmas-infocell {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-width: 96px;
    padding: 6px 12px 4px;
    color: var(--lmas-gray);
    text-align: center;
}

.lmas-infocell + .lmas-infocell { border-left: 0.5px solid var(--lmas-line); }

.lmas-infocell-label {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lmas-infocell-value {
    margin: 4px 0 2px;
    color: var(--lmas-gray);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.lmas-infocell-value--sm { font-size: 14px; padding-top: 3px; }
.lmas-infocell-value svg { width: 18px; height: 18px; vertical-align: -3px; }
.lmas-infocell-note { margin: 0; font-size: 11px; }

.lmas-divider { margin: 16px 20px 0; border: 0; border-top: 0.5px solid var(--lmas-line); }

.lmas-preview-box {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
    background: var(--lmas-fill-2);
}

.lmas-screen--white .lmas-preview-box { background: var(--lmas-bg); }

.lmas-summary {
    margin: 0;
    color: var(--lmas-ink-2);
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.lmas-summary.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lmas-summary-more {
    display: block;
    margin: 2px 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lmas-blue);
    font-size: 15px;
}

.lmas-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* 信息分组列表 */
.lmas-info-list { margin: 0; padding: 0; list-style: none; }

.lmas-info-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 0.5px solid var(--lmas-line);
    font-size: 15px;
}

.lmas-info-item:last-child { border-bottom: 0; }
.lmas-info-item dt { color: var(--lmas-gray); flex: 0 0 auto; }
.lmas-info-item dd { margin: 0; text-align: right; color: var(--lmas-ink); min-width: 0; word-break: break-word; }
.lmas-info-item dd small { display: block; color: var(--lmas-gray); font-size: 12px; margin-top: 2px; }

.lmas-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 149, 0, 0.14);
    color: #c46a00;
    font-size: 12px;
    font-weight: 600;
}

.lmas-license-badge--open { background: rgba(52, 199, 89, 0.14); color: #1f8a3f; }

/* 点赞与留言 */
.lmas-rating {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.lmas-like-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 84px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: var(--lmas-fill-2);
    color: var(--lmas-ink);
}

.lmas-screen--white .lmas-like-btn { background: var(--lmas-bg); }
.lmas-like-btn svg { width: 30px; height: 30px; stroke: var(--lmas-pink); fill: none; stroke-width: 1.8; stroke-linejoin: round; transition: transform 0.18s ease; }
.lmas-like-btn.is-liked svg { fill: var(--lmas-pink); }
.lmas-like-btn:active svg { transform: scale(1.18); }
.lmas-like-count { margin: 4px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.lmas-like-label { margin: 0; color: var(--lmas-gray); font-size: 11px; }

.lmas-rating-side p { margin: 0; color: var(--lmas-gray); font-size: 13px; line-height: 1.45; }
.lmas-rating-side strong { display: block; color: var(--lmas-ink); font-size: 15px; font-weight: 600; margin-bottom: 2px; }

.lmas-comment-composer {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: var(--lmas-fill-2);
}

.lmas-screen--white .lmas-comment-composer { background: var(--lmas-bg); }

.lmas-comment-composer textarea {
    display: block;
    width: 100%;
    min-height: 68px;
    padding: 0;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: var(--lmas-ink);
    font: inherit;
    font-size: 15px;
    line-height: 1.45;
}

.lmas-comment-composer textarea::placeholder { color: var(--lmas-gray); }

.lmas-comment-composer--locked { padding: 14px 12px; }
.lmas-comment-locked { margin: 0; color: var(--lmas-gray); font-size: 13px; line-height: 1.45; text-align: center; }

.lmas-composer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: var(--lmas-gray);
    font-size: 12px;
}

.lmas-composer-foot .lmas-get { min-width: 64px; }

.lmas-comments { margin: 12px 0 0; padding: 0; list-style: none; }

.lmas-comment {
    padding: 12px 0;
    border-bottom: 0.5px solid var(--lmas-line);
}

.lmas-comment:last-child { border-bottom: 0; }

.lmas-comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lmas-comment-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.lmas-comment-name small { margin-left: 6px; color: var(--lmas-blue); font-weight: 500; font-size: 11px; }
.lmas-comment-time { color: var(--lmas-gray); font-size: 12px; white-space: nowrap; }
.lmas-comment-text { margin: 8px 0 0 40px; color: var(--lmas-ink-2); font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.lmas-comment-actions { display: flex; gap: 14px; margin: 6px 0 0 40px; }
.lmas-comment-actions .lmas-link { font-size: 13px; }
.lmas-comment-actions .lmas-link--danger { color: var(--lmas-red); }

.lmas-comment.is-mine { background: linear-gradient(90deg, rgba(0, 122, 255, 0.05), transparent); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }

/* ------------------------------------------------------------------ 开发者页 */

.lmas-profile {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 16px;
}

.lmas-profile-name {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lmas-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: left;
}

.lmas-profile-name svg { width: 16px; height: 16px; stroke: var(--lmas-blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.lmas-profile-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmas-profile-sub { margin: 3px 0 0; color: var(--lmas-gray); font-size: 13px; }
.lmas-profile-sub code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

.lmas-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 0.5px solid var(--lmas-line);
}

.lmas-stat { padding: 12px 8px 14px; text-align: center; }
.lmas-stat + .lmas-stat { border-left: 0.5px solid var(--lmas-line); }
.lmas-stat-value { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.lmas-stat-label { margin: 2px 0 0; color: var(--lmas-gray); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.lmas-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 14px;
    background: var(--lmas-blue);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.28);
}

.lmas-btn-primary:active { opacity: 0.75; }
.lmas-btn-primary svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lmas-btn-primary[disabled] { opacity: 0.45; box-shadow: none; }

.lmas-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--lmas-card);
    color: var(--lmas-blue);
    font-size: 16px;
    font-weight: 600;
}

.lmas-btn-secondary--danger { color: var(--lmas-red); }
.lmas-btn-secondary:active { opacity: 0.6; }
.lmas-owner-actions { display: grid; gap: 10px; }
.lmas-owner-actions .lmas-form-hint { margin: 0 0 2px; }

.lmas-nsfw-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 5px;
    background: rgba(255, 59, 48, 0.12);
    color: var(--lmas-red);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    vertical-align: 2px;
}

.lmas-variant-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 5px;
    background: rgba(50, 173, 230, 0.14);
    color: #1f8fc4;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    vertical-align: 2px;
    white-space: nowrap;
}

.lmas-variant-box { margin-top: 14px; }
.lmas-variant-box .lmas-form-label { margin-bottom: 6px; }

.lmas-agree-list { margin: 0; padding: 4px 0; list-style: none; }
.lmas-agree-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; }
.lmas-agree-list li + li { border-top: 0.5px solid var(--lmas-line); }
.lmas-agree-list p { margin: 0; }
.lmas-agree-list .lmas-option-desc { margin-top: 2px; }
.lmas-agree-check { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; stroke: var(--lmas-green); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.lmas-status {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(52, 199, 89, 0.14);
    color: #1f8a3f;
    font-size: 11px;
    font-weight: 600;
}

.lmas-status--removed { background: rgba(142, 142, 147, 0.16); color: var(--lmas-gray); }

.lmas-row-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lmas-row-actions .lmas-link { font-size: 13px; }
.lmas-row-actions .lmas-link--danger { color: var(--lmas-red); }

/* 我的作品：可长按的行（长按已下架作品 → 彻底删除）。禁掉系统长按选字 / 菜单，按住期间给按压反馈 */
.lmas-row--pressable {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
}
.lmas-row--pressable.is-pressing { background: rgba(0, 0, 0, 0.06); transition: background 0.45s ease 0.1s; }
.lmas-row--removed .lmas-row-icon { opacity: 0.55; filter: saturate(0.4); }
.lmas-row--removed .lmas-row-title { color: var(--lmas-gray); }

/* ------------------------------------------------------------------ 空态 / 提示 */

.lmas-empty {
    padding: 40px 24px;
    color: var(--lmas-gray);
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}

.lmas-empty svg { width: 48px; height: 48px; margin-bottom: 10px; stroke: var(--lmas-gray-3); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lmas-empty strong { display: block; color: var(--lmas-ink); font-size: 17px; font-weight: 600; margin-bottom: 4px; }

.lmas-notice {
    margin: 12px 20px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 149, 0, 0.12);
    color: #8a4b00;
    font-size: 13px;
    line-height: 1.45;
}

.lmas-notice--info { background: rgba(0, 122, 255, 0.1); color: #0a4f9e; }

.lmas-toast {
    position: absolute;
    left: 50%;
    bottom: calc(var(--lmas-tabbar-h) + var(--lmas-safe-bottom) + 18px);
    z-index: 60;
    max-width: calc(100% - 48px);
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(28, 28, 30, 0.92);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    transform: translate(-50%, 10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lmas-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.lmas-skeleton {
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.05));
    background-size: 200% 100%;
    animation: lmas-shimmer 1.2s ease-in-out infinite;
}

@keyframes lmas-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ 底部弹层（分享须知 / 上传 / 编辑作品信息 / 编辑名称 / 下架确认） */

.lmas-sheet-backdrop {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.lmas-sheet-backdrop.is-visible { opacity: 1; }
.lmas-sheet-backdrop[hidden] { display: none !important; }

.lmas-sheet {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 92%;
    border-radius: 16px 16px 0 0;
    background: var(--lmas-bg);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lmas-sheet-backdrop.is-visible .lmas-sheet { transform: none; }

.lmas-sheet--short { max-height: 70%; }

.lmas-sheet-grabber {
    width: 36px;
    height: 5px;
    margin: 6px auto 0;
    border-radius: 3px;
    background: var(--lmas-gray-3);
}

.lmas-sheet-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 50px;
    padding: 0 8px;
}

.lmas-sheet-head .lmas-nav-side--end { justify-content: flex-end; }
.lmas-sheet-title { margin: 0; text-align: center; font-size: 17px; font-weight: 600; }

.lmas-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px calc(var(--lmas-safe-bottom) + 24px);
}

.lmas-sheet-body::-webkit-scrollbar,
.lmas-sheet-body .lmas-local-list::-webkit-scrollbar,
.lmas-sheet-body textarea::-webkit-scrollbar,
.lmas-preview-code::-webkit-scrollbar { display: none; width: 0; height: 0; }
.lmas-sheet-body .lmas-local-list,
.lmas-sheet-body textarea,
.lmas-preview-code { scrollbar-width: none; -ms-overflow-style: none; }

.lmas-role-preview { margin-top: 12px; }
.lmas-role-preview-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.lmas-role-avatar { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; }
.lmas-role-preview .lmas-preview-code { max-height: 220px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; background: var(--lmas-fill-2); color: var(--lmas-ink); }

.lmas-form-group {
    margin-top: 18px;
}

.lmas-form-label {
    display: flex;
    justify-content: space-between;
    margin: 0 16px 6px;
    color: var(--lmas-gray);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lmas-form-label small { text-transform: none; letter-spacing: 0; }
.lmas-form-label .is-over { color: var(--lmas-red); }

.lmas-form-card {
    overflow: hidden;
    border-radius: 12px;
    background: var(--lmas-card);
}

.lmas-form-hint { margin: 6px 16px 0; color: var(--lmas-gray); font-size: 12px; line-height: 1.45; }

.lmas-input,
.lmas-textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--lmas-ink);
    font: inherit;
    font-size: 17px;
}

.lmas-textarea { min-height: 120px; resize: vertical; line-height: 1.45; font-size: 16px; }
.lmas-input::placeholder, .lmas-textarea::placeholder { color: var(--lmas-gray-2); }

.lmas-option-list { margin: 0; padding: 0; list-style: none; }

.lmas-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    background: transparent;
    text-align: left;
}

.lmas-option + .lmas-option { border-top: 0.5px solid var(--lmas-line); }
.lmas-option:active { background: rgba(0, 0, 0, 0.035); }
.lmas-option-title { margin: 0; font-size: 16px; }
.lmas-option-desc { margin: 2px 0 0; color: var(--lmas-gray); font-size: 13px; line-height: 1.4; }
.lmas-option-check { width: 22px; height: 22px; stroke: var(--lmas-blue); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.lmas-option.is-selected .lmas-option-check { visibility: visible; }
.lmas-option.is-selected .lmas-option-title { color: var(--lmas-blue); font-weight: 600; }

.lmas-type-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
}

.lmas-type-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px 8px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    background: var(--lmas-fill-2);
    color: var(--lmas-ink);
    font-size: 13px;
    font-weight: 500;
}

.lmas-type-opt .lmas-row-icon { width: 40px; height: 40px; border-radius: 11px; box-shadow: none; }
.lmas-type-opt.is-selected { border-color: var(--lmas-blue); background: rgba(0, 122, 255, 0.08); color: var(--lmas-blue); font-weight: 600; }

.lmas-source-tabs { padding: 12px 12px 0; }

.lmas-source-body { padding: 8px 12px 12px; }

.lmas-file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 96px;
    padding: 14px;
    border: 1.5px dashed var(--lmas-gray-3);
    border-radius: 12px;
    background: var(--lmas-fill-2);
    color: var(--lmas-gray);
    text-align: center;
    font-size: 14px;
    width: 100%;
}

.lmas-file-drop strong { color: var(--lmas-blue); font-weight: 600; font-size: 15px; }
.lmas-file-drop small { font-size: 12px; }
.lmas-file-drop.is-ready { border-style: solid; border-color: var(--lmas-green); background: rgba(52, 199, 89, 0.08); color: var(--lmas-ink); }

.lmas-local-list { max-height: 220px; overflow-y: auto; margin: 0; padding: 0; list-style: none; border-radius: 10px; background: var(--lmas-fill-2); }
.lmas-local-list .lmas-option { padding: 10px 12px; }
.lmas-local-list .lmas-option-title { font-size: 15px; }

.lmas-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
}

.lmas-toggle-row p { margin: 0; }
.lmas-toggle-row .lmas-option-desc { margin-top: 2px; }

.lmas-switch {
    position: relative;
    flex: 0 0 auto;
    width: 51px;
    height: 31px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: rgba(120, 120, 128, 0.32);
    transition: background 0.2s ease;
}

.lmas-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease;
}

.lmas-switch[aria-checked="true"] { background: var(--lmas-green); }
.lmas-switch[aria-checked="true"]::after { transform: translateX(20px); }

.lmas-agreement {
    margin: 18px 4px 0;
    color: var(--lmas-gray);
    font-size: 12px;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ 软键盘态（由 overlay-keyboard-compat-guard 打上 .lovemi-overlay-kb-active 并收紧 bottom） */

/* 弹层遮罩被收紧到键盘上方后，弹层允许占满剩余高度，正文在内部滚动；去掉入场位移过渡，避免键盘动画期间来回抖 */
.lmas-sheet-backdrop.lovemi-overlay-kb-active { transition: none; }
.lmas-sheet-backdrop.lovemi-overlay-kb-active .lmas-sheet { max-height: calc(100% - 6px); transition: none; }
.lmas-sheet-backdrop.lovemi-overlay-kb-active .lmas-sheet-body { padding-bottom: 16px; }

/* 页面内输入框（搜索 / 留言）：页面变矮后，聚焦元素滚到可视区时与键盘边缘留一点余量；底部 Tab 栏此时压在键盘下，隐藏以免在窄屏上抢位置 */
.lmas-screen.lovemi-overlay-kb-active .lmas-scroll { padding-bottom: 24px; }
body[data-lovemi-overlay-kb="1"] #love-mi-app-store .lmas-tabbar { visibility: hidden; }
body[data-lovemi-overlay-kb="1"] #love-mi-app-store input:focus,
body[data-lovemi-overlay-kb="1"] #love-mi-app-store textarea:focus { scroll-margin-bottom: 16px; scroll-margin-top: 16px; }

/* ------------------------------------------------------------------ 预览组件（适配器输出） */

.lmas-preview-theme { display: grid; gap: 12px; }

.lmas-preview-phone {
    display: grid;
    gap: 10px;
    width: 150px;
    margin: 0 auto;
    padding: 12px 10px;
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}

.lmas-preview-phone-bar { height: 10px; border-radius: 5px; }
.lmas-preview-phone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lmas-preview-phone-tile { aspect-ratio: 1; border-radius: 8px; border: 0.5px solid transparent; }
.lmas-preview-phone-btn { height: 26px; border-radius: 13px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; display: grid; place-items: center; }

.lmas-preview-swatches { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.lmas-swatch { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--lmas-gray); }
.lmas-swatch-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18); }

.lmas-preview-note { margin: 8px 0 0; color: var(--lmas-gray); font-size: 12px; }
.lmas-preview-note:first-child { margin-top: 0; }

.lmas-preview-colorbar { display: flex; height: 26px; overflow: hidden; border-radius: 8px; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.lmas-preview-colorseg { flex: 1 1 auto; }

.lmas-preview-code {
    margin: 10px 0 0;
    max-height: 200px;
    overflow: auto;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1c1c1e;
    color: #e5e5ea;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.45;
    white-space: pre;
}

.lmas-preview-list { display: grid; gap: 8px; }
.lmas-preview-row { padding: 10px 12px; border-radius: 10px; background: var(--lmas-card); }
.lmas-preview-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lmas-preview-row-title { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmas-preview-row-tag { flex: 0 0 auto; padding: 1px 6px; border-radius: 5px; background: var(--lmas-fill-2); color: var(--lmas-gray); font-size: 11px; }
.lmas-preview-row-text { margin: 4px 0 0; color: var(--lmas-gray); font-size: 13px; line-height: 1.4; }

.lmas-sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lmas-sticker-cell { margin: 0; text-align: center; }
.lmas-sticker-cell img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--lmas-card); }
.lmas-sticker-cell.is-broken img { opacity: 0.25; }
.lmas-sticker-name { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lmas-gray); font-size: 11px; }

/* 窄屏微调 */
@media (max-width: 340px) {
    .lmas-title { font-size: 30px; }
    .lmas-detail-header { grid-template-columns: 96px minmax(0, 1fr); }
    .lmas-detail-header .lmas-row-icon { width: 96px; height: 96px; border-radius: 22px; }
    .lmas-type-picker { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}
