/* The Super Plumber — comic cover on the MS Paint palette.
   超级管道工：MS Paint 调色板上的漫画封面。 */
:root {
  --sky: #01a3ec;
  --yellow: #fff200;
  --red: #ed1c24;
  --green: #22e022;
  --ink: #111;
  --paper: #fff8dc;
  --white: #fff;
  --gutter: clamp(16px, 4vw, 56px);
  --head: 62px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: 'Bangers', 'Impact', sans-serif;
  --body: 'Patrick Hand', 'Comic Sans MS', sans-serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 20px/1.45 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: 0.03em; line-height: 0.95; }
p { margin: 0; }
code { font-family: var(--mono); }
.dot { opacity: 0.6; padding: 0 0.2em; }

/* Masthead / 刊头栏 */
.masthead { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: var(--head); padding: 0 var(--gutter); background: var(--yellow); border-bottom: 4px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 26px/1 var(--display); letter-spacing: 0.04em; white-space: nowrap; }
.brand-pill { width: 34px; height: 16px; border: 3px solid var(--ink); border-radius: 10px; background: linear-gradient(90deg, var(--green) 0 52%, var(--white) 52% 100%); transform: rotate(-30deg); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 19px; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.masthead-right { display: flex; align-items: center; gap: 10px; }
.nav-x { text-decoration: none; font: 400 20px/1 var(--display); padding: 8px 12px; border: 3px solid var(--ink); background: var(--white); border-radius: 6px; }
.nav-buy { display: inline-flex; gap: 6px; text-decoration: none; font: 400 20px/1 var(--display); letter-spacing: 0.04em; padding: 9px 14px; background: var(--ink); color: var(--yellow); border-radius: 6px; white-space: nowrap; }

/* Buttons / 按钮 */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; font: 400 22px/1 var(--display); letter-spacing: 0.05em; color: var(--ink); padding: 12px 20px; border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink); transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease); white-space: nowrap; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-yellow { background: var(--yellow); }
.btn-white { background: var(--white); }
.btn-red { background: var(--red); color: var(--white); }
.copy { cursor: pointer; font: 400 18px/1 var(--display); letter-spacing: 0.05em; padding: 9px 14px; border: 3px solid var(--ink); border-radius: 6px; background: var(--yellow); color: var(--ink); }
.copy-sm { font-size: 16px; padding: 6px 10px; border-width: 2px; }
.copy.is-copied { background: var(--green); }
.ca-label { font: 400 17px/1 var(--display); letter-spacing: 0.08em; padding: 5px 8px; background: var(--ink); color: var(--yellow); border-radius: 4px; }

/* Cover (hero) / 封面首屏 */
.cover { position: relative; min-height: calc(100svh - var(--head)); overflow: hidden; background: var(--sky); border-bottom: 5px solid var(--ink); }
.cover-art { position: absolute; inset: 0; }
.cover-art img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center bottom; }
.cover-frame { position: absolute; inset: 14px; border: 5px solid var(--ink); pointer-events: none; z-index: 1; }
.issue { position: absolute; z-index: 2; top: 30px; left: 30px; display: flex; flex-direction: column; align-items: center; padding: 8px 14px 4px; background: var(--yellow); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: rotate(-4deg); }
.issue span { font: 700 15px/1 var(--mono); }
.issue b { font: 400 52px/1 var(--display); }
.cover-copy { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: clamp(30px, 4.5vh, 56px) var(--gutter) 0; text-align: center; }
/* Wider than the art (16:9): fit the art by height, centred, edges faded into sky + a matching ground band, so the
   headline never lands on him. 视口比图更宽（16:9）时按高度放图并居中，两边渐隐到天空和同色地面，标题不压人。 */
@media (min-width: 1081px) and (min-aspect-ratio: 16/9) {
  .cover { background: linear-gradient(to top, #8f8c8b 0, #8f8c8b 3.3%, var(--ink) 3.3%, var(--ink) calc(3.3% + 3px), var(--sky) calc(3.3% + 3px)); }
  .cover-art img { position: absolute; left: 50%; bottom: 0; width: auto; height: 100%; object-fit: fill; transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%); }
}
@media (min-width: 1081px) { .cover-copy { max-width: none; } .title { white-space: nowrap; } }
.caption-box { display: inline-block; padding: 7px 14px; background: var(--yellow); border: 3px solid var(--ink); font: 400 clamp(17px, 2.4vh, 22px)/1.1 var(--body); text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 3px 3px 0 var(--ink); }
.title { margin-top: clamp(10px, 1.8vh, 18px); font-size: clamp(60px, min(9.2vw, 13.5vh), 160px); line-height: 0.92; color: var(--yellow); -webkit-text-stroke: 0.07em var(--ink); paint-order: stroke fill; text-shadow: 0.06em 0.06em 0 var(--ink); }
.title-the { font-size: 0.5em; color: var(--white); vertical-align: 0.55em; margin-right: 0.08em; }
.title-main { white-space: nowrap; }
.cover-lede { display: inline-block; margin-top: clamp(10px, 1.6vh, 18px); padding: 6px 14px; background: var(--white); border: 3px solid var(--ink); font-size: clamp(19px, 2.6vh, 25px); line-height: 1.25; }
.cover-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; margin-top: clamp(12px, 2vh, 22px); }
.ca-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--white); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink); }
.ca-short { font-size: 16px; font-weight: 700; }
.cover-note { margin-top: 12px; font-size: 18px; }
.burst { position: absolute; z-index: 2; top: 34px; right: 4.5vw; display: grid; place-items: center; width: 150px; height: 150px; background: var(--ink); clip-path: polygon(50% 0, 61% 26%, 90% 10%, 76% 38%, 100% 50%, 76% 62%, 90% 90%, 61% 74%, 50% 100%, 39% 74%, 10% 90%, 24% 62%, 0 50%, 24% 38%, 10% 10%, 39% 26%); transform: rotate(10deg); }
.burst::before { content: ''; position: absolute; inset: 6px; background: var(--red); clip-path: inherit; }
.burst span { position: relative; font: 400 26px/0.95 var(--display); letter-spacing: 0.04em; color: var(--yellow); text-align: center; -webkit-text-stroke: 1px var(--ink); }

/* SFX strip / 拟声词跑马灯 */
.sfx-strip { overflow: hidden; background: var(--red); border-bottom: 5px solid var(--ink); }
.sfx-track { display: flex; width: max-content; animation: sfx 26s linear infinite; }
.sfx-track span { padding: 14px 30px; font: 400 32px/1 var(--display); letter-spacing: 0.06em; color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
@keyframes sfx { to { transform: translateX(-50%); } }

/* Comic pages / 漫画内页 */
.page { position: relative; padding: clamp(56px, 8vw, 110px) var(--gutter); background-color: var(--paper); background-image: radial-gradient(rgba(17, 17, 17, 0.1) 1.3px, transparent 1.7px); background-size: 11px 11px; border-bottom: 5px solid var(--ink); }
.page > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.page-label { display: table; margin-bottom: 26px; padding: 8px 16px; background: var(--ink); color: var(--yellow); font: 400 24px/1 var(--display); letter-spacing: 0.08em; transform: rotate(-2deg); }
.page-label-inline { margin-left: 0; }
.panel { position: relative; background: var(--white); border: 4px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); }
.narration { display: inline-block; padding: 6px 12px; background: var(--yellow); border: 3px solid var(--ink); font: 400 17px/1.15 var(--body); text-transform: uppercase; letter-spacing: 0.05em; }
.bubble { position: relative; display: inline-block; margin: 6px 0 18px; padding: 10px 20px; background: var(--white); border: 3px solid var(--ink); border-radius: 28px; font: 400 26px/1 var(--display); letter-spacing: 0.05em; }
.bubble::before { content: ''; position: absolute; left: 28px; bottom: -21px; border-style: solid; border-width: 20px 16px 0 0; border-color: var(--ink) transparent transparent transparent; }
.bubble::after { content: ''; position: absolute; left: 31px; bottom: -14px; border-style: solid; border-width: 14px 11px 0 0; border-color: var(--white) transparent transparent transparent; }

/* Page one / 第一页 */
.panels-one { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: stretch; }
.panel-post { margin: 0; padding: 22px; background: var(--sky); display: flex; flex-direction: column; gap: 18px; transform: rotate(-1deg); }
.panel-post .narration { align-self: flex-start; }
.panel-post .post { margin: auto 0; }
.post { padding: 18px 18px 16px; background: var(--white); border: 1px solid #cfd9de; border-radius: 16px; box-shadow: 0 0 0 3px var(--ink); font: 400 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #0f1419; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-avatar { width: 48px; height: 48px; border-radius: 50%; }
.post-who { display: flex; flex-direction: column; line-height: 1.2; }
.post-name { font-weight: 700; }
.post-handle, .post-meta { color: #536471; }
.post-text { margin: 14px 0 12px; font-size: 24px; line-height: 1.3; }
.post-meta { font-size: 15px; padding-bottom: 12px; border-bottom: 1px solid #eff3f4; }
.post-stats { display: flex; gap: 18px; padding: 12px 0; font-size: 15px; color: #536471; border-bottom: 1px solid #eff3f4; }
.post-stats b { color: #0f1419; }
.post-link { display: inline-block; margin-top: 12px; color: #1d9bf0; font-weight: 600; text-decoration: none; }
.panel-story { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; align-items: flex-start; gap: 16px; transform: rotate(0.6deg); }
.panel-story h2 { font-size: clamp(40px, 4.4vw, 62px); }
.panel-story p:not(.narration):not(.bubble) { max-width: 36em; }
.narration-end { margin-top: auto; background: var(--white); }

/* Origin toy / 变身小互动 */
.origin-panel { position: relative; max-width: 1400px; border: 5px solid var(--ink); box-shadow: 9px 9px 0 var(--ink); background: var(--sky); overflow: hidden; }
.origin-stage { position: relative; aspect-ratio: 1672 / 941; }
.origin-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.45s var(--ease); }
.origin-on { opacity: 0; }
.origin.is-on .origin-on { opacity: 1; }
.origin.is-on .origin-off { opacity: 0; }
.origin-copy { position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: clamp(18px, 3vw, 44px) var(--gutter) 0; text-align: center; }
.origin-word { font: 400 clamp(44px, 6.4vw, 108px)/0.95 var(--display); letter-spacing: 0.03em; color: var(--yellow); -webkit-text-stroke: 0.06em var(--ink); paint-order: stroke fill; text-shadow: 0.05em 0.05em 0 var(--ink); }
.word-on, .sub-on { display: none; }
.origin.is-on .word-off, .origin.is-on .sub-off { display: none; }
.origin.is-on .word-on { display: block; }
.origin.is-on .sub-on { display: inline; }
.origin-sub { display: inline-block; margin: 12px 0 14px; padding: 5px 12px; background: var(--white); border: 3px solid var(--ink); font-size: clamp(17px, 1.5vw, 22px); }
.origin-btn { display: flex; margin: 0 auto; }

/* The code / 守则 */
.page-title { font-size: clamp(40px, 4.6vw, 66px); margin-bottom: 40px; }
.code-panels { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.code-panels .panel { padding: 30px 26px 28px; }
.code-panels .panel:nth-child(1) { transform: rotate(-1deg); }
.code-panels .panel:nth-child(2) { transform: rotate(0.8deg); background: var(--yellow); }
.code-panels .panel:nth-child(3) { transform: rotate(-0.5deg); }
.code-no { position: absolute; top: -26px; right: 18px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: var(--white); border: 4px solid var(--ink); font: 400 32px/1 var(--display); }
.code-panels h3 { font-size: 32px; margin-bottom: 10px; }

/* Join / 加入 */
.join-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.join-art { margin: 0; overflow: hidden; background: var(--sky); transform: rotate(-0.8deg); }
.join-art img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 82% 50%; }
.join-art figcaption { position: absolute; left: 14px; bottom: 14px; }
.join-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.join-copy .page-label { margin-bottom: 4px; }
.join-copy h2 { font-size: clamp(40px, 4.2vw, 60px); }
.ticker-inline { padding: 0 6px; background: var(--yellow); border: 2px solid var(--ink); font-family: var(--display); letter-spacing: 0.04em; }
.pre { padding: 10px 14px; background: var(--white); border: 3px dashed var(--ink); }
.join-row { display: flex; flex-wrap: wrap; gap: 12px; }
.ca-box { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; padding: 16px; background: var(--white); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.ca-full { font-size: 16px; font-weight: 700; word-break: break-all; }

/* Coupon (contract) / 合约区：剪角优惠券 */
.coupon-page { background-color: var(--sky); background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1.6px, transparent 2px); }
.coupon { position: relative; max-width: 1100px; padding: 14px; background: var(--white); border: 4px dashed var(--ink); }
.coupon-cut { position: absolute; top: -17px; left: 40px; padding: 2px 10px; background: var(--white); border: 3px solid var(--ink); font: 700 15px/1.2 var(--mono); }
.coupon-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; background: var(--red); border: 4px solid var(--ink); }
.coupon-title { font: 400 clamp(28px, 3.4vw, 44px)/1 var(--display); letter-spacing: 0.05em; color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.coupon-tag { padding: 6px 12px; background: var(--ink); color: var(--yellow); font: 400 20px/1 var(--display); letter-spacing: 0.08em; transform: rotate(3deg); white-space: nowrap; }
.coupon-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); padding: clamp(22px, 3vw, 36px) clamp(10px, 2vw, 26px) 10px; }
.stamp { margin: 0; align-self: start; padding: 12px 12px 8px; background: var(--white); box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px var(--ink); transform: rotate(-4deg); }
.stamp img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--ink); }
.stamp figcaption { padding-top: 8px; text-align: center; font: 400 22px/1 var(--display); letter-spacing: 0.06em; }
.coupon-main h2 { font-size: clamp(40px, 4.4vw, 60px); }
.coupon-sub { margin: 6px 0 18px; font-size: 20px; }
.coupon-rows { margin: 0; }
.coupon-rows > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 2px dotted var(--ink); }
.coupon-rows dt { font: 400 20px/1.3 var(--display); letter-spacing: 0.06em; }
.coupon-rows dd { margin: 0; font-size: 19px; line-height: 1.35; }
.coupon-rows code { font-size: 15px; font-weight: 700; word-break: break-all; }
.coupon-rows a { font-weight: 700; }
.coupon-sign { display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; margin-top: 18px; font-size: 17px; }
.sign { font: 400 36px/1 var(--display); color: var(--red); transform: rotate(-3deg); display: inline-block; }

/* Footer / 页尾 */
.footer { padding: 28px var(--gutter) 34px; background: var(--ink); color: var(--yellow); text-align: center; font-size: 18px; }

/* Reveal / 滚入淡入 */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .sfx-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* Short screens / 矮屏 */
@media (max-height: 780px) and (min-width: 1081px) { .cover-note { display: none; } }
@media (max-height: 1150px) and (min-width: 2000px) { .cover-note { display: none; } }
@media (max-width: 1279px) { .burst { display: none; } }

/* Tablet and phone: stack copy over the art / 平板和手机：文字在上，图在下叠放 */
@media (max-width: 1080px) {
  .nav { display: none; }
  .masthead-right { margin-left: auto; }
  .cover { display: flex; flex-direction: column; min-height: 0; }
  .cover-copy { order: 1; padding-top: 34px; }
  .cover-art { order: 2; position: relative; inset: auto; margin-top: -22%; }
  .cover-art img { height: auto; object-fit: initial; }
  .cover-frame { inset: 8px; border-width: 4px; }
  .issue { top: 20px; left: 20px; transform: rotate(-4deg) scale(0.8); transform-origin: top left; }
  .panels-one, .join-grid { grid-template-columns: 1fr; }
  .code-panels { grid-template-columns: 1fr; gap: 40px; max-width: 640px; }
  .coupon-body { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 19px; }
  .brand-word { font-size: 22px; }
  .nav-x { display: none; }
  .issue { display: none; }
  .cover-copy { padding-top: 30px; }
  .cover-art { margin-top: -63%; }
  .title { font-size: clamp(54px, 15vw, 80px); }
  .title-main { white-space: normal; }
  .cover-note { display: none; }
  .btn { font-size: 20px; padding: 11px 16px; }
  .origin-copy { position: static; padding: 18px 16px 20px; background: var(--white); border-top: 5px solid var(--ink); }
  .origin-stage { aspect-ratio: 4 / 3; }
  .origin-art { object-position: 50% 90%; }
  .origin-word { font-size: clamp(38px, 11vw, 56px); }
  .coupon { padding: 10px; }
  .coupon-head { flex-direction: column; align-items: flex-start; }
  .coupon-body { grid-template-columns: 1fr; }
  .stamp { width: 200px; justify-self: center; }
  .coupon-rows > div { grid-template-columns: 1fr; gap: 2px; }
  .panel-post, .panel-story, .code-panels .panel, .join-art { transform: none; }
}

/* Wide screens / 宽屏两档 */
@media (min-width: 2000px) {
  body { font-size: 22px; }
  :root { --gutter: 7vw; --head: 76px; }
  .brand { font-size: 32px; } .nav a { font-size: 23px; } .nav-buy, .nav-x { font-size: 24px; }
  .title { font-size: clamp(150px, min(7.6vw, 13vh), 230px); }
  .caption-box { font-size: 26px; } .cover-lede { font-size: 30px; } .cover-note { font-size: 24px; }
  .btn { font-size: 27px; padding: 15px 26px; } .copy { font-size: 22px; } .ca-short { font-size: 20px; }
  .issue b { font-size: 68px; } .burst { width: 200px; height: 200px; } .burst span { font-size: 34px; }
  .sfx-track span { font-size: 42px; }
  .page > * { max-width: 1800px; }
  .page-label { font-size: 30px; } .narration { font-size: 21px; } .bubble { font-size: 32px; }
  .post { font-size: 20px; } .post-text { font-size: 30px; }
  .origin-panel { max-width: 1800px; } .origin-sub { font-size: 27px; }
  .code-panels h3 { font-size: 40px; }
  .coupon { max-width: 1500px; } .coupon-body { grid-template-columns: 340px minmax(0, 1fr); }
  .coupon-rows > div { grid-template-columns: 160px minmax(0, 1fr); } .coupon-rows dt { font-size: 25px; } .coupon-rows dd { font-size: 23px; } .coupon-rows code, .ca-full { font-size: 19px; }
}
@media (min-width: 3000px) {
  body { font-size: 28px; }
  :root { --head: 96px; }
  .brand { font-size: 42px; } .nav a { font-size: 30px; } .nav-buy, .nav-x { font-size: 30px; }
  .title { font-size: clamp(200px, min(7vw, 12vh), 300px); }
  .caption-box { font-size: 33px; } .cover-lede { font-size: 38px; } .cover-note { font-size: 30px; }
  .btn { font-size: 34px; padding: 18px 32px; } .copy { font-size: 28px; } .ca-short { font-size: 26px; }
  .issue b { font-size: 88px; } .burst { width: 260px; height: 260px; } .burst span { font-size: 44px; }
  .sfx-track span { font-size: 54px; }
  .page > * { max-width: 2600px; }
  .page-label { font-size: 38px; } .narration { font-size: 27px; } .bubble { font-size: 40px; }
  .post { font-size: 26px; } .post-text { font-size: 38px; } .post-avatar { width: 64px; height: 64px; }
  .origin-panel { max-width: 2600px; } .origin-sub { font-size: 34px; }
  .code-panels h3 { font-size: 52px; }
  .coupon { max-width: 2100px; } .coupon-body { grid-template-columns: 460px minmax(0, 1fr); }
  .coupon-rows > div { grid-template-columns: 220px minmax(0, 1fr); } .coupon-rows dt { font-size: 32px; } .coupon-rows dd { font-size: 30px; } .coupon-rows code, .ca-full { font-size: 25px; }
  .sign { font-size: 52px; }
}
