/* 内容页：温暖画廊。玩法、内容开放规则与现有路由保持不变。 */
body.jigsaw { --ink: #283c33; --quiet: #626c63; --green: #31594a; --paper: #f7f5f0; --line: #dedfd5; margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.jigsaw *, .jigsaw *::before, .jigsaw *::after { box-sizing: border-box; }
.jigsaw [hidden] { display: none !important; }
.jigsaw h1, .jigsaw h2, .jigsaw h3, .jigsaw h4, .jigsaw p { margin: 0; color: inherit; }
.jigsaw h1, .jigsaw h2, .jigsaw h3, .jigsaw .lobster { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; line-height: 1.2; letter-spacing: -.025em; }
.jigsaw h1 { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 18px; }
.jigsaw h2, .jigsaw h2.lobster { font-size: 29px; margin-bottom: 16px; }
.jigsaw h3, .jigsaw h3.lobster { font-size: 24px; margin-bottom: 14px; }
.jigsaw h4 { font-size: 18px; margin: 26px 0 10px; }
.jigsaw a { color: var(--green); text-decoration: none; text-underline-offset: 4px; }
.jigsaw a:hover { text-decoration: underline; }
.jigsaw a:focus-visible, .jigsaw button:focus-visible, .jigsaw input:focus-visible, .jigsaw textarea:focus-visible, .jigsaw select:focus-visible { outline: 3px solid #a55d37; outline-offset: 4px; }
.jigsaw img { max-width: 100%; height: auto; }
.jigsaw ::selection { background: #d8e6da; color: #203e30; }
.jigsaw input, .jigsaw textarea, .jigsaw select, .jigsaw button { font: inherit; }
.jigsaw input:not([type='checkbox']):not([type='radio']), .jigsaw textarea, .jigsaw select { border: 1px solid #b6c0b6; border-radius: 8px; padding: 11px 14px; background: #fffefa; color: var(--ink); min-width: 0; }
.jigsaw input[type='checkbox'], .jigsaw input[type='radio'] { accent-color: var(--green); width: 18px; height: 18px; }
.jigsaw input[type='submit'], .jigsaw input[type='button'], .jigsaw .jigsaw-button, .jigsaw a.play-button, .jigsaw .terms-button.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--green); border-radius: 8px; color: #fff; background: var(--green); cursor: pointer; font: 600 15px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; text-decoration: none; }
.jigsaw input[type='submit']:hover, .jigsaw .jigsaw-button:hover, .jigsaw a.play-button:hover { background: #244535; }
.jigsaw .jigsaw-button.grey { background: #f3f4ee; color: var(--ink); border-color: var(--line); }
.jigsaw .wrap { width: min(1160px, calc(100% - 80px)); margin-left: auto; margin-right: auto; }
.jigsaw #header { border-bottom: 1px solid var(--line); background: #faf9f5; }
.jigsaw .header-row { display: flex; align-items: center; gap: 34px; min-height: 100px; }
.jigsaw a.mast-logo, .jigsaw a.footer-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font: 700 28px/1.1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; letter-spacing: -.025em; text-decoration: none; flex: none; }
.jigsaw .brand-icon { display: block; width: 40px; height: 40px; border-radius: 22%; flex: none; }
.jigsaw .primary-nav { display: flex; gap: 25px; flex: 1; align-items: center; }
.jigsaw .primary-nav a { color: #4b5b50; font-size: 14px; font-weight: 500; padding: 12px 0; white-space: nowrap; }
.jigsaw .primary-nav a[aria-current] { color: var(--green); box-shadow: 0 2px 0 var(--green); }
.jigsaw .header-create { font-size: 14px; border: 1px solid #bcc7bc; border-radius: 7px; padding: 9px 15px; white-space: nowrap; }
.jigsaw .header-create span { margin-left: 12px; }
.jigsaw .skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: #fff; padding: 12px; }
.jigsaw .skip-link:focus { top: 12px; }
.jigsaw #inner { padding: 48px 0 68px; min-height: 60vh; }
.jigsaw #content-sidebar-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 258px; gap: 55px; align-items: start; }
.jigsaw.full-width #content-sidebar-wrap { display: block; }
.jigsaw #content { min-width: 0; outline: none; }
.jigsaw .sidebar { font-size: 15px; padding-top: 6px; }
.jigsaw .sidebar .widget { border-left: 1px solid var(--line); padding-left: 25px; }
.jigsaw .searchform { display: flex; gap: 8px; margin: 0 0 25px; }
.jigsaw .s { width: 100%; min-width: 0; }
.jigsaw .sidebar .searchform { flex-wrap: wrap; }
.jigsaw .sidebar .s { flex-basis: 100%; }
.jigsaw .sidelinks { list-style: none; margin: 0; padding: 0; }
.jigsaw .sidelinks a { display: block; padding: 9px 0; }
.jigsaw .sidebar-divider { border-top: 1px solid var(--line); margin: 15px 0; }
.jigsaw .eyebrow { font: 600 11px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; letter-spacing: .14em; color: #686f5e; margin-bottom: 13px; }
.jigsaw .home-intro { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 32px; gap: 24px; }
.jigsaw .home-intro h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.07; margin: 0; max-width: 670px; }
.jigsaw .home-intro > p { color: var(--quiet); font-size: 17px; margin-bottom: 5px; }
.jigsaw .section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.jigsaw .section-heading h2 { margin: 0; }
.jigsaw .section-heading > a, .jigsaw .section-heading > span { font-size: 14px; }
.jigsaw .section-heading > span { color: var(--quiet); }
.jigsaw .section-heading .eyebrow { margin-bottom: 6px; }
.jigsaw .feat-puzzles { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 38px; }
.jigsaw .daily-aside { padding-left: 32px; border-left: 1px solid var(--line); }
.jigsaw .daily-aside h2 { font-size: 25px; }
.jigsaw .spotlight { min-width: 0; }
.jigsaw .thumb, .jigsaw .thumb a, .jigsaw .thumb img { display: block; }
.jigsaw .thumb { overflow: hidden; border-radius: 10px; background: #e8e9df; }
.jigsaw .thumb a { line-height: 0; }
.jigsaw .thumb img { width: 100%; height: auto; aspect-ratio: 25 / 18; object-fit: cover; transition: transform .25s ease; }
@media (hover: hover) { .jigsaw .thumb a:hover img { transform: scale(1.025); } }
.jigsaw .spot-caption { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-top: 16px; }
.jigsaw .spot-name { color: var(--ink); font: 500 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
.jigsaw .spot-cta { flex: none; font-size: 14px; font-weight: 600; padding: 9px 0; }
.jigsaw .spot-cta span { margin-left: 7px; }
.jigsaw .daily-feature .spot-cta { background: var(--green); color: white; border-radius: 7px; padding: 11px 18px; }
.jigsaw .daily-aside .spot-caption { flex-wrap: wrap; gap: 0 12px; }
.jigsaw .browse-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.jigsaw .browse-note p { color: var(--quiet); margin-bottom: 7px; }
.jigsaw .recent-section { grid-column: 1 / -1; padding: 28px 0 36px; border-bottom: 1px solid var(--line); }
.jigsaw .recent-section h2 { font-size: 24px; }
.jigsaw .thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
.jigsaw .thumbs:empty { display: none; }
.jigsaw .thumbs > div { min-width: 0; }
.jigsaw a.hs { display: block; line-height: 0; border-radius: 6px; }
.jigsaw a.hs img { display: block; width: 76px; height: 62px; object-fit: cover; border-radius: 6px; }
.jigsaw .recent-thumbs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; }
.jigsaw .recent-thumbs a.hs img { width: 100%; height: auto; aspect-ratio: 1.2; }
.hs-pop { position: absolute; z-index: 1000; padding: 7px; border-radius: 10px; background: #fffefa; box-shadow: 0 8px 35px #24362935; pointer-events: none; line-height: 0; }
.hs-pop img { width: 208px; height: 150px; object-fit: cover; border-radius: 5px; }
.jigsaw .curated { padding-top: 6px; }
.jigsaw .curated .thumbs { margin-top: 18px; }
.jigsaw .spot-tag { color: var(--quiet); font-size: 15px; margin: -4px 0 16px; }
.jigsaw .home-extra { padding-top: 38px; margin-top: 42px; border-top: 1px solid var(--line); }
.jigsaw #started { margin: 0 0 42px; border: 0; padding: 24px; border-radius: 10px; background: #eaf0e5; }
.jigsaw #started h2 { font-size: 26px; }
.jigsaw #started .mini-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.jigsaw #started .mini > a { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; align-content: start; }
.jigsaw #started .mini-img { grid-row: 1 / 4; height: 88px; margin: 0; aspect-ratio: 1; }
.jigsaw #started .mini-name { padding-right: 34px; }
.jigsaw #started .mini-bar { align-self: start; }
.jigsaw #started .mini-remove { top: -7px; right: -5px; box-shadow: none; background: transparent; }
/* 多人房间列表（首页 Your multiplayer games，/multiplayer/ 的 Open games 与 Your games；src/js/mp-rooms.js）：同 #started 的横排。 */
.jigsaw #mp-recent.home-extra { margin-top: 0; padding-top: 0; border-top: 0; margin-bottom: 42px; }
.jigsaw .mp-rooms .mini-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.jigsaw .mp-rooms .mini > a { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; align-content: start; }
.jigsaw .mp-rooms .mini-img { grid-row: 1 / 4; height: 88px; margin: 0; aspect-ratio: 1; }
.jigsaw .mp-rooms .mini-name { padding-right: 34px; }
.jigsaw .mp-rooms .mini-bar { align-self: start; }
.jigsaw .mp-rooms .mini-remove { top: -7px; right: -5px; box-shadow: none; background: transparent; }
.jigsaw .page-text .mp-rooms { margin: 32px 0; }
@media (max-width: 600px) { .jigsaw .mp-rooms .mini-grid { grid-template-columns: minmax(0, 1fr); } }
.jigsaw .mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.jigsaw .mini { position: relative; display: block; min-width: 0; font-size: 15px; }
.jigsaw .mini > a { display: block; }
.jigsaw .mini-img { display: block; width: 100%; aspect-ratio: 1.39; margin-bottom: 12px; border-radius: 8px; overflow: hidden; background: #e5e9df; }
.jigsaw .mini-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jigsaw .mini-img.blank { display: grid; place-items: center; font: 24px Georgia, serif; color: var(--green); }
.jigsaw .mini-name { display: block; color: var(--ink); font-weight: 500; line-height: 1.45; }
.jigsaw .mini-info { display: block; color: var(--quiet); font-size: 13px; margin-top: 4px; }
.jigsaw .mini-bar { display: block; height: 4px; margin-top: 10px; background: #d1dacb; border-radius: 3px; overflow: hidden; }
.jigsaw .mini-bar i { display: block; height: 100%; background: var(--green); }
.jigsaw .mini-remove { position: absolute; top: 5px; right: 5px; width: 36px; height: 36px; border-radius: 50%; border: 0; color: var(--ink); background: #fffefa; font-size: 24px; cursor: pointer; box-shadow: 0 2px 6px #0002; }
.jigsaw .explore-thumbs a.hs img { width: 150px; height: 108px; }
.jigsaw .more-puzzles { text-align: center; margin-top: 50px; padding: 36px 24px; background: #e9ede3; border-radius: 12px; }
.jigsaw .home-search { max-width: 550px; margin: 22px auto 16px; }
.jigsaw .nav-bar { font-size: 14px; line-height: 2; }
.jigsaw .home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 36px; }
.jigsaw .text-link { border-top: 1px solid #cbd5c6; padding-top: 18px; }
.jigsaw .text-link a { display: block; font-size: 16px; line-height: 1.6; }
.jigsaw .follow { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; }
.jigsaw .follow h2 { font-size: 25px; margin-bottom: 8px; }
.jigsaw .follow p { color: var(--quiet); font-size: 15px; }
.jigsaw .follow-links { display: flex; flex-direction: column; font-size: 14px; gap: 8px; }
.jigsaw .breadcrumb { font-size: 13px; color: var(--quiet); margin-bottom: 24px; overflow-wrap: anywhere; }
.jigsaw .page-heading { margin-bottom: 30px; }
.jigsaw .page-heading p:not(.eyebrow) { color: var(--quiet); max-width: 600px; }
.jigsaw .entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
.jigsaw .entries .entry { display: flex; flex-direction: column; min-width: 0; }
.jigsaw .entries .entry-content { order: -1; margin-bottom: 14px; }
.jigsaw .entries .entry-title { font: 500 19px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; letter-spacing: 0; margin-bottom: 5px; }
.jigsaw .entry-title a { color: var(--ink); }
.jigsaw .post-info { font-size: 13px; color: var(--quiet); margin-bottom: 16px; }
.jigsaw .entries .post-info { margin-bottom: 0; }
.jigsaw .post-meta:empty { display: none; }
.jigsaw .navigation { padding: 32px 0 10px; font-size: 14px; }
.jigsaw .navigation ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.jigsaw .navigation li a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; }
.jigsaw .navigation li.active a { background: var(--green); color: #fff; border-color: var(--green); }
.jigsaw .navigation .go-page { margin-top: 20px; }
.jigsaw .go-page input[type='text'] { width: 70px; }
.jigsaw .taxonomy-description { margin-bottom: 24px; }
.jigsaw .taxonomy-description p { color: var(--quiet); }
.jigsaw #puzzle .post-info { font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.jigsaw #puzzle .thumb-large { margin: 26px 0 20px; }
.jigsaw #puzzle .thumb-large img { aspect-ratio: auto; }
.jigsaw #puzzle .is-locked a, .jigsaw #puzzle.is-locked .thumb a { cursor: default; }
.jigsaw .stats-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14px; margin-bottom: 24px; }
.jigsaw .completions { color: var(--quiet); }
.jigsaw .counter { font-weight: 600; color: var(--ink); }
.jigsaw .fb-share { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; }
.jigsaw .fb-share b { margin-right: 8px; }
.jigsaw .credit, .jigsaw .mystery-about { font-size: 15px; margin: 22px 0; color: var(--quiet); }
.jigsaw .categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.jigsaw .cat { margin-bottom: 30px; }
.jigsaw .cat-thumbs { display: flex; gap: 8px; margin-bottom: 12px; }
.jigsaw .cat-thumbs a.hs img { width: 70px; height: 60px; }
.jigsaw .cat-link { font-size: 19px; font-weight: 600; }
.jigsaw .subcat-link, .jigsaw .wish-links a { font-size: 15px; line-height: 2; }
.jigsaw .wish-empty { color: var(--quiet); font-size: 14px; }
.jigsaw .wish-row { margin: 0 0 30px; }
.jigsaw .wish.on { background: #e7eddf; color: var(--ink); }
.jigsaw .wish.on .heart { color: #9e4837; }
.jigsaw .page-text { max-width: 68ch; overflow-wrap: break-word; }
.jigsaw .page-text p { margin-bottom: 16px; }
.jigsaw .page-text h2 { margin-top: 32px; font-size: 27px; }
.jigsaw .page-text h1 { margin-bottom: 16px; }
.jigsaw .page-lead { color: var(--quiet); font-size: 18px; line-height: 1.6; }
.jigsaw .help-answer { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; scroll-margin-top: 24px; }
.jigsaw .help-answer h2, .jigsaw .help-answer h3 { font: 600 19px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; letter-spacing: 0; margin-bottom: 10px; }
.jigsaw .help-answer > :last-child { margin-bottom: 0; }
.jigsaw .help-answer h2 { margin-top: 0; }
.jigsaw .help-toc { background: #edf0e7; border-radius: 10px; padding: 18px 22px; margin: 24px 0 30px; }
.jigsaw .help-toc ul { margin: 0; padding-left: 18px; }
.jigsaw .help-toc li:last-child { margin-bottom: 0; }
.jigsaw .help-toc a { display: inline-block; padding: 3px 0; }
.jigsaw .how-to-steps li { padding-left: 5px; margin-bottom: 14px; }
.jigsaw .how-to-steps li::marker { color: var(--green); font-weight: 700; }
.jigsaw .copy-note { padding: 14px 18px; border-left: 3px solid var(--green); background: #edf0e7; border-radius: 0 8px 8px 0; }
.jigsaw .field-hint { color: var(--quiet); font-size: 14px; margin: 8px 0 0; }
.jigsaw .page-text h4, .jigsaw .page-text h5 { font-size: 18px; margin: 28px 0 10px; }
.jigsaw .page-text ul, .jigsaw .page-text ol { padding-left: 24px; margin: 16px 0 24px; }
.jigsaw .page-text li { margin-bottom: 8px; }
.jigsaw .page-text pre { overflow-wrap: anywhere; white-space: pre-wrap; padding: 16px; background: #eeeee5; border-radius: 8px; font-size: 13px; }
.jigsaw .qa-q { font-weight: 600; margin: 28px 0 10px !important; }
.jigsaw .qa-a { margin-bottom: 12px !important; }
.jigsaw .back-top { font-size: 13px; margin-bottom: 30px !important; }
.jigsaw .support-mail { margin: 20px 0; }
.jigsaw table.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.jigsaw table.keys td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.jigsaw kbd { border: 1px solid #c6ccbf; border-radius: 4px; padding: 2px 6px; font-size: 13px; background: #fffefa; }
.jigsaw .create-lead { color: var(--quiet); margin: 18px 0 32px; }
.jigsaw .create-label { display: block; margin-top: 24px; margin-bottom: 8px; font-size: 15px; font-weight: 500; }
.jigsaw .help-q { float: right; }
.jigsaw .help-q a { display: inline-flex; width: 28px; height: 28px; justify-content: center; align-items: center; background: #e5eadf; border-radius: 50%; }
.jigsaw input.create-url { width: 100%; }
.jigsaw .create-example { display: block; font-size: 13px; color: var(--quiet); margin: 7px 0 22px; }
.jigsaw .create-preview { padding: 18px; background: #eeeee6; border-radius: 8px; color: var(--quiet); font-size: 14px; }
.jigsaw .create-preview img { display: block; max-height: 200px; border-radius: 6px; }
.jigsaw .create-check { margin: 24px 0; font-size: 15px; }
.jigsaw .create-check input { vertical-align: middle; }
.jigsaw .create-colors { display: flex; flex-wrap: wrap; gap: 12px; margin: 15px 0 24px; }
.jigsaw .create-color-btn { width: 44px; height: 44px; padding: 0; border: 2px solid #fff; border-radius: 8px; outline: 1px solid #b2bbae; background-size: 128px; cursor: pointer; }
.jigsaw .create-color-btn.on { outline: 3px solid var(--green); outline-offset: 2px; }
.jigsaw .create-choices { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.jigsaw .create-submit { margin: 28px 0; }
.jigsaw .create-result { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }
.jigsaw .copy-row { display: flex; gap: 10px; margin: 10px 0 22px; align-items: flex-start; }
.jigsaw .copy-row input, .jigsaw .copy-row textarea { flex: 1; width: 100%; font-size: 14px; }
.jigsaw .copy-row textarea { resize: vertical; }
.jigsaw .create-error, .jigsaw .photo-error, .jigsaw .error { color: #a42c2c; }
/* 账户页与 App 页（account_page、app_page） */
.jigsaw #account-signed-in { margin-bottom: 32px; }
.jigsaw #account-signed-in .create-submit { display: flex; flex-wrap: wrap; gap: 10px; }
.jigsaw #account-code-form .create-submit { display: flex; flex-wrap: wrap; gap: 10px; }
.jigsaw .app-cta { margin: 22px 0 34px; }
.jigsaw input.invalid { border-color: #a42c2c; }
.jigsaw .photo-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 25px 0; }
.jigsaw .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jigsaw .jigsaw-overlay, .jigsaw .terms-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; background: #20352980; display: none; align-items: center; justify-content: center; padding: 20px; }
.jigsaw .jigsaw-overlay.on, .jigsaw .terms-overlay.open { display: flex; }
.jigsaw .jigsaw-dialog, .jigsaw .terms-dialog { width: min(100%, 480px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; padding: 32px; border-radius: 14px; background: #fffefa; box-shadow: 0 24px 70px #172a2933; }
.jigsaw .jigsaw-dialog p, .jigsaw .terms-text { margin-bottom: 20px; font-size: 16px; }
.jigsaw .jigsaw-buttons, .jigsaw .terms-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }
.jigsaw .terms-button { border: 1px solid #bec8ba; border-radius: 8px; padding: 10px 20px; min-height: 44px; color: var(--ink); background: #f1f2eb; cursor: pointer; }
.jigsaw .mp-shot { margin: 28px 0 !important; }
.jigsaw .mp-shot img { border-radius: 8px; }
.jigsaw .ad { text-align: center; }
.jigsaw .ad-content { grid-column: 1/-1; min-height: 250px; }
.jigsaw .ad-sidebar { min-height: 250px; margin-bottom: 25px; }
.jigsaw .ad-sidebarSticky { position: sticky; top: 20px; }
.jigsaw .ad-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fffefa; }
.jigsaw .ad-footer ins { display: inline-block; width: 320px; height: 50px; }
.jigsaw .ad-close { position: absolute; right: 10px; top: -34px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.jigsaw #footer { background: #e9ece2; border-top: 1px solid #d8dfd0; padding: 38px 0 30px; }
.jigsaw a.footer-brand { font-size: 24px; gap: 9px; margin-bottom: 10px; }
.jigsaw .footer-brand .brand-icon { width: 32px; height: 32px; }
.jigsaw #footer p { color: var(--quiet); font-size: 14px; }
.jigsaw .footer-nav { display: flex; gap: 12px 24px; flex-wrap: wrap; margin: 24px 0; font-size: 14px; }
.jigsaw .copyright { font-size: 12px; color: var(--quiet); }
body.jigsaw:has(> .ad-footer) #footer { padding-bottom: 120px; }
@media (max-width: 1050px) { .jigsaw .header-row { gap: 25px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 18px; } .jigsaw .primary-nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 16px; } .jigsaw .header-create { margin-left: auto; } .jigsaw #content-sidebar-wrap { gap: 32px; grid-template-columns: minmax(0, 1fr) 220px; } .jigsaw .daily-label { display: none; } }
@media (max-width: 800px) { .jigsaw .wrap { width: calc(100% - 40px); } .jigsaw #content-sidebar-wrap { display: block; } .jigsaw .sidebar { margin-top: 42px; } .jigsaw .sidebar .widget { border-left: 0; border-top: 1px solid var(--line); padding: 25px 0 0; } .jigsaw .sidebar .sidelinks { columns: 2; } .jigsaw .sidebar .searchform { max-width: 450px; flex-wrap: nowrap; } .jigsaw .feat-puzzles { gap: 28px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .jigsaw .daily-aside { padding-left: 20px; } .jigsaw .spot-caption { flex-wrap: wrap; gap: 8px; } .jigsaw .mini-grid { gap: 24px 16px; } .jigsaw .home-intro > p { font-size: 15px; } }
@media (max-width: 600px) { .jigsaw { font-size: 16px; } .jigsaw .wrap { width: calc(100% - 32px); } .jigsaw .header-row { padding-top: 20px; padding-bottom: 8px; gap: 12px; } .jigsaw a.mast-logo { font-size: 24px; gap: 9px; } .jigsaw .mast-logo .brand-icon { width: 36px; height: 36px; } .jigsaw .primary-nav { gap: 8px 16px; flex-wrap: wrap; justify-content: flex-start; } .jigsaw .primary-nav a { font-size: 13px; padding-top: 10px; padding-bottom: 10px; } .jigsaw .header-create { padding: 7px 10px; font-size: 12px; } .jigsaw #inner { padding-top: 30px; } .jigsaw .home-intro { align-items: flex-start; flex-direction: column; margin: 0 0 30px; gap: 15px; } .jigsaw .home-intro > p br { display: none; } .jigsaw .home-intro > p { max-width: 280px; } .jigsaw .feat-puzzles { grid-template-columns: minmax(0, 1fr); gap: 28px; } .jigsaw .daily-aside { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); } .jigsaw .daily-aside .thumb { max-width: 100%; } .jigsaw .recent-section { padding-top: 5px; } .jigsaw .recent-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } .jigsaw .curated { padding-top: 20px; } .jigsaw .curated h2, .jigsaw .section-heading h2 { font-size: 25px; } .jigsaw .section-heading { gap: 9px; } .jigsaw .mini-grid, .jigsaw .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jigsaw #started { padding: 18px; } .jigsaw #started .mini-grid { grid-template-columns: minmax(0, 1fr); } .jigsaw .home-extra { margin-top: 30px; padding-top: 28px; } .jigsaw .home-actions { grid-template-columns: 1fr; gap: 22px; } .jigsaw .follow { flex-direction: column; } .jigsaw .entries { gap: 26px 16px; } .jigsaw .entries .entry-title { font-size: 16px; } .jigsaw .entries .post-info { font-size: 12px; } .jigsaw .categories { grid-template-columns: 1fr; } .jigsaw .more-puzzles { padding: 26px 16px; } .jigsaw .more-puzzles h2 { font-size: 25px; } .jigsaw .home-search { gap: 6px; } .jigsaw .home-search input { padding: 10px; } .jigsaw .jigsaw-dialog, .jigsaw .terms-dialog { padding: 26px 20px; } .jigsaw .copy-row { flex-wrap: wrap; } .jigsaw .copy-row input, .jigsaw .copy-row textarea { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { .jigsaw *, .jigsaw *::before, .jigsaw *::after { transition: none !important; animation: none !important; } }

/* ======== 旧播放器（/play/ 的 src/js/player/play.js）与照片编辑器（photo-editor.js）的样式：从旧 site.css 原样保留。
   元素选择器限定为 :where(body.player)（优先级不变），以免影响内容页。======== */
/* 本作 UI 风格：现代简约（jigsaw-ui-style）。颜色只用 App 主题色。 */
@font-face { font-family: "Roboto"; font-weight: 700; src: url("/assets/fonts/Roboto-Bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "lucide"; src: url("/assets/fonts/lucide.ttf") format("truetype"); font-display: block; }
:root {
  --background: rgb(237, 240, 244);
  --surface: #fff;
  --text: rgb(22, 24, 28);
  --secondary: rgb(138, 143, 153);
  --muted: rgb(110, 116, 128);
  --accent: rgb(52, 199, 89);
  --accent-pressed: rgb(41, 166, 73);
  --accent-soft: rgba(52, 199, 89, .14);
  --chip: rgb(230, 234, 240);
  --off: rgb(209, 213, 220);
  --separator: rgb(226, 229, 234);
  --destructive: rgb(255, 59, 48);
  --gold: rgb(255, 184, 0);
  --dim: rgba(0, 0, 0, .45);
  --font: Roboto, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
:where(body.player), :where(body.player) * { box-sizing: border-box; }
html, body { margin: 0; }
:where(body.player) { background: var(--background); color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
:where(body.player) a { color: inherit; text-decoration: none; }
:where(body.player) img { display: block; max-width: 100%; }
:where(body.player) button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }
.icon { font-family: lucide; font-style: normal; font-weight: normal; line-height: 1; display: inline-block; speak: never; }
.more { color: var(--accent); font-weight: 700; font-size: 15px; white-space: nowrap; }
/* 按钮、胶囊、开关 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 26px; border-radius: 24px; font-weight: 700; font-size: 17px; }
.btn .icon { font-size: 20px; }
.btn.green { background: var(--accent); color: #fff; }
.btn.green:active { background: var(--accent-pressed); }
.btn.grey { background: var(--chip); color: var(--text); }
.btn.red { background: var(--destructive); color: #fff; }
.btn.plain { color: var(--accent); padding: 0 8px; height: 36px; }
.btn[disabled] { background: var(--off); color: #fff; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--chip); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; }
.chip.on { background: var(--accent); color: #fff; }
.switch { position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--off); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: var(--surface); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }

/* ---- 播放器 ---- */
body.player { background: var(--tray, var(--background)); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#stage { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100vw; height: 100vh; display: block; touch-action: none; visibility: hidden; }
#stage.ready { visibility: visible; }
/* DrawRail：托盘色底，右缘 1px Separator；矮屏时可滚动。 */
.menu { position: fixed; left: 0; top: 0; bottom: 0; width: 80px; background: var(--tray, var(--surface)); border-right: 1px solid var(--separator);
  display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 6px; z-index: 5; overflow-y: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu .tool { flex: none; }
.menu .tool { width: 64px; padding: 8px 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.menu .tool .icon { width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.menu .tool span.text { font-size: 12px; color: var(--secondary); }
.menu .tool.on, .menu .tool.on span.text { color: var(--accent); }
.menu .tool.on .icon { background: var(--accent-soft); }
.menu .tool[disabled] { color: var(--off); }
.menu .spacer { flex: 1; }
.menu .timer { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; padding: 6px 8px; border-radius: 10px; flex: none; }
.menu .count { flex: none; }
@media (max-height: 760px) {
  .menu { gap: 2px; padding: 8px 0; }
  .menu .tool { padding: 4px 0; }
  .menu .tool span.text { display: none; }
}
.menu .count { font-size: 12px; color: var(--secondary); margin-bottom: 4px; }
/* DrawMenuItem(dark)：图标白 85%、文字白 70%、禁用白 35%；选中仍为 Accent。 */
.menu.dark .tool, .menu.dark .timer { color: rgba(255, 255, 255, .85); }
.menu.dark .tool span.text, .menu.dark .count { color: rgba(255, 255, 255, .7); }
.menu.dark .tool[disabled] { color: rgba(255, 255, 255, .35); }
.menu.dark .tool.on, .menu.dark .tool.on span.text { color: var(--accent); }
.preview { position: fixed; left: 96px; top: 16px; width: 380px; max-width: 40vw; border-radius: 10px; overflow: hidden; z-index: 4; display: none; pointer-events: none; }
.preview.on { display: block; }
.overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: var(--dim); display: none; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.overlay.on { display: flex; }
.dialog { position: relative; background: var(--surface); border-radius: 16px; padding: 28px 24px 24px; width: 100%; max-width: 380px; text-align: center; }
.dialog .hero-icon { width: 64px; height: 64px; border-radius: 32px; margin: 0 auto 14px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 32px; }
.dialog h2 { font-size: 20px; margin: 0 0 6px; }
.dialog p { font-size: 18px; color: var(--secondary); margin: 0 0 20px; }
.dialog .stack { display: flex; flex-direction: column; gap: 10px; }
.dialog .close { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; color: var(--muted); font-size: 20px; }
/* 背景栏（DrawBackgrounds）：棋盘区底部浮起的白卡片，色块横向滚动；选中项外加绿色描边环。 */
.backgrounds { position: fixed; left: 88px; right: calc(2 * var(--panel, 72px) + 8px); bottom: 8px; height: 96px; background: var(--surface);
  border-radius: 16px; z-index: 6; display: none; padding: 0 6px; }
.backgrounds.on { display: block; }
.backgrounds .strip { height: 100%; display: flex; align-items: flex-start; gap: 7px; padding: 12px 14px 0; overflow-x: auto; scrollbar-width: thin; }
.swatch { flex: none; width: 63px; height: 63px; border-radius: 10px; background-size: cover; background-position: center; position: relative; }
.swatch.solid { box-shadow: inset 0 0 0 1px var(--separator); }
.swatch.on::after { content: ""; position: absolute; top: -5px; right: -5px; bottom: -5px; left: -5px; border-radius: 15px; border: 2.5px solid var(--accent); }
/* 亮度弹窗（底部箭头款）：白色圆角卡片、两端太阳图标、浅灰轨道绿色进度、白色圆形滑块。 */
.brightness { --gap: -10px; position: fixed; width: 255px; height: 50px; background: var(--surface); border-radius: 14px; border: 1px solid var(--separator);
  z-index: 7; display: none; align-items: center; justify-content: center; gap: 0; touch-action: none; }
.brightness.on { display: flex; }
.brightness .icon { color: var(--secondary); }
.brightness .min { font-size: 14px; margin-right: 12px; }
.brightness .max { font-size: 20px; margin-left: 8px; }
.brightness .track { position: relative; width: 166px; height: 6px; border-radius: 3px; background: var(--chip); }
.brightness .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); min-width: 6px; }
.brightness .knob { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 11px; background: var(--surface); border: 1px solid var(--off); }
@media (min-width: 600px) and (min-height: 600px) {
  .backgrounds { height: 122px; }
  .backgrounds .strip { gap: 10px; }
  .swatch { width: 84px; height: 84px; }
  .brightness { --gap: -15px; width: 325px; height: 67px; }
  .brightness .track { width: 208px; }
  .brightness .knob { width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 13px; }
  .brightness .min { font-size: 16px; margin-right: 14px; }
  .brightness .max { font-size: 26px; margin-left: 10px; }
}
.overlay.solid { background: var(--tray, var(--background)); }
.options-dialog { text-align: left; max-width: 440px; }
.options-dialog h2 { text-align: center; margin-bottom: 4px; }
.options-dialog .label { font-size: 15px; color: var(--secondary); margin: 18px 0 10px; }
.options-dialog .stack { margin-top: 24px; }
.help-dialog { text-align: left; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; }
.help-dialog h2 { text-align: center; }
.help-dialog h3 { font-size: 16px; margin: 20px 0 8px; }
.help-list { list-style: none; margin: 12px 0 0; padding: 0; }
.help-list li { display: flex; gap: 12px; padding: 8px 0; font-size: 15px; line-height: 1.45; }
.help-list .icon { color: var(--accent); font-size: 20px; flex: none; margin-top: 1px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 18px; font-size: 15px; align-items: center; }
.keys dt, .keys dd { margin: 0; }
kbd { display: inline-flex; min-width: 30px; height: 28px; padding: 0 8px; align-items: center; justify-content: center; border-radius: 8px;
  background: var(--chip); font: 700 13px var(--font); }
body.mp #modify-tool { display: none; }
.loading { position: fixed; top: 0; right: 0; bottom: 0; left: 80px; display: flex; align-items: center; justify-content: center; color: var(--secondary); font-size: 16px; z-index: 3; pointer-events: none; }
.loading.off { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(22, 24, 28, .9); color: #fff; border-radius: 20px;
  padding: 10px 18px; font-size: 13px; z-index: 30; display: none; }
.toast.on { display: block; }

/* 多人：邀请、玩家列表、他人名字标签、断线遮罩。 */
#invite-tool, body.mp #restart, body.mp #save-file { display: none; }
body.mp #invite-tool { display: flex; }
.menu .tool { position: relative; }
.menu .tool .num { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dialog input { font: inherit; font-size: 15px; color: var(--text); background: var(--chip); border: 0; outline: none; height: 44px; border-radius: 22px;
  padding: 0 16px; caret-color: var(--accent); user-select: text; -webkit-user-select: text; min-width: 0; }
.field { display: flex; gap: 8px; margin-bottom: 18px; }
.field input { flex: 1; }
.field .btn { height: 44px; padding: 0 18px; flex: none; }
.dialog .input { display: block; width: 100%; }
.field-label { display: block; text-align: left; font-size: 15px; color: var(--secondary); margin: 0 0 8px; }
#players-title { margin-top: 18px; }
.players { list-style: none; margin: 0; padding: 0; text-align: left; max-height: 180px; overflow-y: auto; }
.players li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--separator); font-size: 16px; }
.players li span { color: var(--secondary); font-size: 15px; }
.tags { position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; background: rgba(22, 24, 28, .9); color: #fff; border-radius: 12px; padding: 3px 10px; font-size: 13px; white-space: nowrap; }
.blocker { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: var(--dim); display: none; align-items: center; justify-content: center; z-index: 25; }
.blocker.on { display: flex; }
.blocker span { background: var(--surface); border-radius: 20px; padding: 10px 18px; font-size: 15px; }

/* 完成页：画布上是暗色模糊背景、原图卡片、光带、徽章与鼓励词；用时、下一张与顶栏图标的位置由 victory.js 按原版布局逐帧设置。 */
.victory { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 22; display: none; color: #fff; user-select: none; -webkit-user-select: none; }
.victory.on { display: block; }
.victory canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; }
.v-time { position: absolute; display: flex; align-items: center; justify-content: center; gap: 6px; color: rgba(255, 255, 255, .85); font: 700 15px var(--font); opacity: 0; }
.v-time .icon { width: 16px; font-size: 15px; text-align: center; }
.v-next { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; visibility: hidden; }
.v-title { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 16px; white-space: nowrap; }
#v-thumbs a, .v-more { pointer-events: auto; }
#v-thumbs a { position: absolute; overflow: hidden; background: rgba(255, 255, 255, .12); }
#v-thumbs img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.v-more { position: absolute; padding: 0; }
.v-icon { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; justify-content: center; visibility: hidden; }
.v-icon .icon { font-size: 20px; }
/* 分享卡片：遮罩上的白卡片，上为预览，下为分享与保存。 */
.share { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: var(--dim); z-index: 23; display: none; }
.share.on { display: block; }
.share-card { position: absolute; background: var(--surface); border-radius: 16px; padding: 14px 14px 0; }
.share-preview { position: relative; }
.share-preview img { width: 100%; height: 100%; }
.share-close { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 16px; background: var(--surface); color: var(--muted);
  display: flex; align-items: center; justify-content: center; }
.share-close .icon { font-size: 18px; }
.share-row { position: relative; height: 68px; display: flex; align-items: center; justify-content: center; }
.share-row .btn { width: 150px; height: 44px; padding: 0; }
.share-save { position: absolute; right: 0; top: 12px; width: 44px; height: 44px; border-radius: 22px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.share-save .icon { font-size: 22px; }
.chip[disabled] { opacity: .4; cursor: default; }
.help-dialog .credits { font-size: 15px; margin: 0; }
.help-dialog .credits a, .toast a { color: inherit; text-decoration: underline; }
.photo-editor { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 30; background: rgb(26, 26, 26); touch-action: none; }
.photo-editor canvas { display: block; width: 100%; height: 100%; }

.jigsaw .nav-short { display: none; }
@media (max-width: 600px) { .jigsaw .nav-full { display: none; } .jigsaw .nav-short { display: inline; } .jigsaw .primary-nav { justify-content: space-between; flex-wrap: nowrap; gap: 10px; } }

.jigsaw .file-button { position: relative; overflow: hidden; }
.jigsaw .file-button input[type="file"] { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; opacity: 0; padding: 0; cursor: pointer; }
.jigsaw .file-button:focus-within { outline: 3px solid #a55d37; outline-offset: 4px; }
@media (pointer: coarse) { .jigsaw .mini-remove { width: 44px; height: 44px; } }
