/* 02 的单列结构和小圆角控件，统一使用 03 的奶油珊瑚配色。 */
:root {
    color-scheme: light;
    --page-bg: #fff8f2;
    --surface: #fffdfb;
    --text: #4a3630;
    --muted: #806960;
    --accent: #c9513d;
    --accent-hover: #ad4030;
    --accent-soft: #fbe9e2;
    --border: #eadfd9;
    --accent-border: #edbfb2;
    --control-radius: 6px;
    --card-radius: 10px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, a, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
img { max-width: 100%; }
p { margin: 0; }
strong { color: var(--accent); font-weight: 600; }

/* 页面只有一套流式布局，窄屏通过可用宽度自然收缩。 */
.rich_media_wrp {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 26px 14px calc(100px + env(safe-area-inset-bottom, 0px));
}
.rich_media_title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    font-size: clamp(21px, 5.4vw, 27px);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.4px;
}
.rich_media_title::before {
    content: "";
    flex: 0 0 5px;
    height: 28px;
    border-radius: 2px;
    background: var(--accent);
}
.developer-note, .step-card {
    padding: clamp(14px, 3vw, 20px);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface);
}
.developer-note { margin-bottom: 16px; }
.developer-note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.developer-icon, .step-number {
    display: inline-flex;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
}
.developer-icon { font-size: 16px; }
.developer-note-header h2 { margin: 0; font-size: 17px; line-height: 1.55; }
.developer-content p + p { margin-top: 10px; }
.step-card { margin-top: 16px; }
.step-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.step-header h2 { margin: 0; font-size: 19px; line-height: 32px; }
.step-header-start { align-items: flex-start; margin-bottom: 4px; }
.step-summary { flex: 1 1 180px; line-height: 1.7; }
.step-number svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.example-image {
    display: block;
    width: 72%;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}
/* 保留系统长按菜单和原有长按下载绑定。 */
#downloadableImage { cursor: pointer; -webkit-touch-callout: default; user-select: auto; }
.copy-hint { margin: 0 0 12px; color: var(--accent); font-size: 13px; text-align: right; }
.search-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-btn {
    flex: 1 0 auto;
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid var(--accent-border);
    border-radius: var(--control-radius);
    background: #fff6f0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
.keyword-btn:active { background: var(--accent-soft); }
.step-note { margin-top: 14px; color: var(--muted); font-size: 14px; }
.important-note { margin-top: 10px; color: var(--accent); font-weight: 600; }
.example-title { margin: 18px 0 12px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 17px; }

/* 箭头只定位在大图区域内，缩略图不参与大图的高度计算。 */
.slideshow-viewport, .reward-viewport { position: relative; overflow: hidden; border-radius: var(--control-radius); }
.slideshow-viewport { background: #241e1c; }
.slideshow-slide { display: none; }
.slideshow-slide.active { display: block; }
.task-tip-img { display: block; width: 100%; height: auto; }
.carousel-arrow {
    display: flex;
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(28, 24, 22, 0.65);
    color: #fff;
}
.carousel-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.slideshow-prev, .reward-prev { left: 8px; }
.slideshow-next, .reward-next { right: 8px; }
.slideshow-dots, .reward-dots { display: flex; align-items: center; justify-content: center; gap: 8px; }
.slideshow-dots { margin-top: 8px; }
.slideshow-dot, .reward-dot {
    position: relative;
    overflow: hidden;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: var(--control-radius);
    background: var(--surface);
}
.slideshow-dot { flex: 1 1 0; min-width: 0; max-width: 136px; }
.slideshow-dot img { display: block; width: 100%; height: auto; border-radius: 3px; }
.slideshow-dot span { position: absolute; bottom: 5px; left: 6px; width: 18px; height: 18px; border: 1px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; line-height: 16px; }
.slideshow-dot.active, .reward-dot.active { border-color: var(--accent); }
.reward-slideshow { display: flex; align-items: stretch; }
.reward-slide {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    height: auto;
    max-height: 360px;
    padding: 0 45px;
    object-fit: contain;
}
.reward-prev, .reward-next { width: 32px; height: 32px; padding: 6px; background: var(--accent); }
.carousel-count { margin: 8px 0; color: var(--muted); font-size: 13px; text-align: center; }
.reward-dot { width: 78px; }
.reward-dot img { display: block; width: 100%; height: 82px; object-fit: contain; }
.copy-toast {
    display: none;
    position: fixed;
    top: calc(20px + env(safe-area-inset-top, 0px));
    left: 50%;
    z-index: 10002;
    max-width: calc(100% - 28px);
    padding: 8px 14px;
    transform: translateX(-50%);
    border-radius: var(--control-radius);
    background: var(--text);
    color: #fff;
    font-size: 13px;
    text-align: center;
}
.copy-toast.show { display: block; }
@media (hover: hover) {
    .keyword-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
    .carousel-arrow:hover { background: var(--accent-hover); }
    .slideshow-dot:hover, .reward-dot:hover { border-color: var(--accent-border); }
}
@media print {
    body { background: #fff; }
    .rich_media_wrp { max-width: none; padding: 0; }
    .copy-toast, .carousel-arrow { display: none; }
}
