/* 幸运相册：制作器的界面（首页、编辑、发布和分享的弹窗）。相册本身的样子在 tpl.css。
 * 深梅色底 + 一个强调色（粉），和 LuckyLab 总站里相册卡片的配色一致。间距用 4 的倍数，圆角 12 / 20 / 胶囊。 */
:root { --bg: #17121c; --panel: #221a29; --panel2: #2c2135; --line: #ffffff1f; --text: #f3ece6; --muted: #b3a6b8; --pink: #f2b8c6; --pink2: #e79fb1; --gold: #e8c26a; --bad: #ff9a8a;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "Hiragino Mincho ProN", "Nanum Myeongjo", Georgia, "Times New Roman", serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 var(--sans); }
body { min-height: 100vh; min-height: 100dvh; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.dim { color: var(--muted); font-size: 13.5px; }
.wait { text-align: center; color: var(--muted); padding: 30vh 20px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 99px; border: 1px solid #ffffff3d; background: none; color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: #ffffff12; }
.btn.pri { background: var(--pink); border-color: var(--pink); color: #23151c; }
.btn.pri:hover { background: var(--pink2); border-color: var(--pink2); }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.btn.lg { min-height: 52px; padding: 14px 28px; font-size: 16px; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--bad); border-color: #ff9a8a55; }
.btn.on { border-color: var(--pink); color: var(--pink); }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .5; cursor: default; }
.btn i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pub { display: inline-flex; align-items: center; gap: 10px; } .pub i { padding-left: 10px; border-left: 1px solid #23151c40; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; margin-top: 0; }
.coin { width: 18px; height: 18px; vertical-align: -3px; }
.price { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-weight: 600; white-space: nowrap; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #17121ce6; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; }
.brand img { display: block; }
.top-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 99px; background: #ffffff10; border: 1px solid var(--line); text-decoration: none; font-size: 14px; white-space: nowrap; }
.pill b { color: var(--gold); }
.pill.name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 34px; color: var(--muted); }
.la-langwrap { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #ffffff10; color: var(--text); display: grid; place-items: center; position: relative; flex: none; }
.la-lang { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
@media (max-width: 420px) { .pill.name { display: none; } }

/* 首页 */
.home > section { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hero { padding-top: 64px !important; padding-bottom: 56px !important; }
.kicker { font-size: 12px; letter-spacing: .28em; color: var(--pink); font-weight: 600; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(42px, 12vw, 76px); line-height: 1.2; margin-top: 14px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--pink); }
.lead { color: var(--muted); font-size: 16px; max-width: 34em; margin-top: 20px; }
.facts { list-style: none; display: grid; gap: 12px; margin: 28px 0 32px; }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.facts b { flex: none; color: var(--text); font-weight: 600; padding-left: 14px; position: relative; }
.facts b::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.facts span { color: var(--muted); font-size: 14px; }
/* 首屏右侧的三张示例相纸（手机上排在按钮下面） */
.hero-art { position: relative; height: 240px; margin-top: 44px; }
.hero-art figure { position: absolute; margin: 0; background: #fbf5e9; padding: 7px 7px 26px; box-shadow: 0 18px 40px #0008; width: 44%; max-width: 250px; }
.hero-art img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-art figure:nth-child(1) { left: 0; top: 14px; transform: rotate(-7deg); }
.hero-art figure:nth-child(2) { left: 50%; margin-left: -22%; top: 0; transform: rotate(3deg); z-index: 1; }
.hero-art figure:nth-child(3) { right: 0; top: 22px; transform: rotate(8deg); }
.home h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.4; }
.mine { padding-bottom: 48px !important; }
.mine-list { display: grid; gap: 12px; margin-top: 16px; }
.mine-list article { display: flex; gap: 16px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.mine-cover { flex: none; width: 96px; height: 120px; border-radius: 12px; overflow: hidden; background: var(--panel2); display: grid; place-items: center; color: var(--muted); }
.mine-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mine-list h3 { font-size: 17px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mine-list p { color: var(--muted); font-size: 13px; }
.mine-list article > div { min-width: 0; flex: 1; }
.chip { display: inline-block; font-size: 12px; line-height: 1; padding: 6px 10px; border-radius: 99px; background: #ffffff12; color: var(--muted); margin-top: 6px; }
.chip.on { background: #f2b8c626; color: var(--pink); } .chip.bad { background: #ff9a8a26; color: var(--bad); }
.tpls { padding-top: 16px !important; padding-bottom: 64px !important; scroll-margin-top: 64px; }
.tpl-list { display: grid; gap: 20px; margin-top: 24px; }
.tpl { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.tpl-thumb { height: 300px; overflow: hidden; position: relative; pointer-events: none; background: var(--panel2); }
.tpl-thumb > div { width: 390px; transform-origin: 0 0; transform: scale(var(--k, 1)); }
.tpl-thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(#221a2900, var(--panel)); }
.tpl-info { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tpl-tag { font-size: 12px; color: var(--pink); letter-spacing: .06em; }
.tpl h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.3; }
.tpl-info > p { color: var(--muted); font-size: 14px; }
.tpl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 13px !important; margin-top: 4px; }
.tpl .row { margin-top: auto; padding-top: 14px; } .tpl .row > * { flex: 1; }
.how { padding-bottom: 56px !important; }
.how ol { margin: 16px 0 0; padding-left: 1.4em; color: var(--muted); display: grid; gap: 8px; max-width: 46em; }
.how li::marker { color: var(--gold); font-weight: 600; }
.foot { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 13px; }
.foot p { flex-basis: 100%; }
@media (min-width: 760px) {
  .hero { padding-top: 96px !important; padding-bottom: 72px !important; position: relative; min-height: 600px; }
  .hero > :not(.hero-art) { max-width: 56%; }
  .hero-art { position: absolute; right: 20px; top: 110px; width: 40%; height: 440px; margin: 0; }
  .hero-art figure { width: 58%; max-width: 280px; padding: 9px 9px 34px; }
  .hero-art figure:nth-child(2) { top: 96px; left: 44%; margin-left: 0; } .hero-art figure:nth-child(3) { top: 10px; right: auto; left: 30%; z-index: 0; }
  .hero-art figure:nth-child(1) { top: 150px; z-index: 2; }
  .facts { grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 40px; } .facts li { flex-direction: column; gap: 2px; }
  .mine-list { grid-template-columns: repeat(2, 1fr); } .tpl-list { grid-template-columns: repeat(3, 1fr); }
  .tpl-thumb { height: 340px; }
}

/* 编辑 */
.ed-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ed-top .back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; margin-left: -8px; }
.ed-top > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ed-top span { font-size: 12px; color: var(--muted); } .ed-top span.bad { color: var(--bad); }
.ed { max-width: 1180px; margin: 0 auto; padding: 12px 16px 120px; }
.ed-form { display: grid; gap: 12px; }
.ed-form section { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.ed-form h2 { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.ed-form h2 span { font-size: 13px; color: var(--muted); font-weight: 400; }
.note { background: #f2b8c61f; color: var(--pink); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.note.bad { background: #ff9a8a1f; color: var(--bad); }
.f { display: block; margin-top: 12px; } .f:first-child { margin-top: 0; }
.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.f input, .f textarea, .f select, .link input { width: 100%; background: #ffffff0d; border: 1px solid #ffffff2e; border-radius: 12px; padding: 10px 12px; min-height: 44px; font-size: 16px; line-height: 1.5; -webkit-appearance: none; appearance: none; }
.f textarea { resize: vertical; display: block; }
.f select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.f select option { color: #222; }
.f input + input, .f select + input { margin-top: 8px; }
.f input::placeholder, .f textarea::placeholder { color: #ffffff59; }
.f input:focus, .f textarea:focus, .f select:focus { outline: 2px solid var(--pink); outline-offset: 0; border-color: transparent; }
.f input[type="date"] { color-scheme: dark; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 12px; } .f2 .f { margin-top: 0; } .f2 .f:nth-child(n + 3) { margin-top: 12px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph, .ph-add { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--panel2); cursor: pointer; display: block; color: var(--text); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph i { position: absolute; left: 6px; font-style: normal; font-size: 11px; line-height: 1; padding: 5px 7px; border-radius: 99px; background: #17121cd9; }
.ph .cv { top: 6px; color: var(--gold); } .ph .hint { bottom: 6px; color: var(--muted); } .ph .st { bottom: 6px; right: 6px; text-align: center; color: var(--pink); }
.ph.up img { opacity: .45; } .ph.err img { opacity: .3; } .ph.err .st { color: var(--bad); }
.ph-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed #ffffff4d; background: none; font-size: 13px; color: var(--pink); }
.ph-add svg { transform: rotate(180deg); } .ph-add.off { opacity: .4; cursor: default; }
.ch { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.ch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .ch-head b { font: italic 20px/1 Georgia, serif; color: var(--pink); } .ch-head span { flex: 1; color: var(--muted); font-size: 13px; }
.ic { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; display: grid; place-items: center; cursor: pointer; flex: none; }
.ic:disabled { opacity: .3; cursor: default; }
.tracks { display: grid; gap: 8px; }
.track { display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 14px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.track.on { border-color: var(--pink); background: #f2b8c614; }
.track input { accent-color: var(--pink); width: 18px; height: 18px; margin: 0; } .track span { flex: 1; }
.ed-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #17121cf2; border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ed-prev { display: none; }
.show-prev .ed-prev { display: block; position: fixed; inset: 0; z-index: 60; background: #000; }
.show-prev .phone, .show-prev iframe { width: 100%; height: 100%; }
iframe { border: 0; display: block; background: #1e1a17; }
.close-prev { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 61; background: #17121cf2; }
@media (min-width: 1000px) {
  .ed { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 32px; align-items: start; padding-top: 24px; }
  .ed-prev { display: block; position: sticky; top: 80px; }
  .phone { width: 414px; height: min(820px, calc(100vh - 190px)); border-radius: 36px; border: 12px solid #0d0a10; box-shadow: 0 30px 70px #0009, 0 0 0 1px #ffffff26; overflow: hidden; background: #000; }
  .phone iframe { width: 100%; height: 100%; }
  .close-prev, .prev-btn { display: none; }
  .ed-bar { justify-content: flex-end; } .ed-bar .grow { flex: 0 1 360px; }
  .ph-grid { grid-template-columns: repeat(5, 1fr); }
}

/* 弹窗里的内容（弹窗本身的样子在 tpl.css 的 .la-modal） */
.la-modal .dim { margin-bottom: 4px; }
.la-modal.tall > div { max-width: 520px; }
.sheet-img { height: 180px; border-radius: 12px; overflow: hidden; background: #0003; margin-bottom: 16px; }
.sheet-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bill { display: grid; gap: 8px; margin: 4px 0 16px; padding: 14px 16px; border-radius: 12px; background: #ffffff0d; }
.bill div { display: flex; justify-content: space-between; gap: 12px; } .bill dt { color: var(--muted); }
.points { margin: 0 0 16px; padding-left: 1.3em; color: var(--muted); font-size: 13.5px; display: grid; gap: 4px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; margin-bottom: 4px; }
.agree input { accent-color: var(--pink); width: 20px; height: 20px; flex: none; margin: 1px 0 0; }
.link { display: flex; gap: 8px; margin: 12px 0 4px; } .link input { flex: 1; min-width: 0; font-size: 14px; }
.outs { display: grid; gap: 8px; margin-top: 16px; } .outs .btn { white-space: normal; }
.out-img { max-height: 62vh; overflow: auto; border-radius: 12px; background: #0004; margin-bottom: 12px; } .out-img img { display: block; width: 100%; }
.tpl-pick { display: grid; gap: 8px; margin-top: 12px; }
.tpl-pick button { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: none; cursor: pointer; }
.tpl-pick button span:not(.price) { color: var(--muted); font-size: 13px; grid-column: 1; } .tpl-pick .price { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.tpl-pick button.on { border-color: var(--pink); background: #f2b8c614; cursor: default; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
