/* 可嵌入的开奖小窗口和说明页（internal/server/embed.go，2026-11-17）。
   颜色沿用 lite.css 的蓝黄变量；小窗口的宽度按 300–600px 排，单彩种高 220px、全部彩种高 430px。 */

/* ---- 小窗口 ---- */
html, body.embed { height: 100%; }
body.embed { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; overflow-wrap: anywhere; }
body.embed[data-theme="dark"] {
  --bg: #0b1530; --card: #111f3f; --ink: #eef3ff; --muted: #aebbd8; --line: #283a61;
  --link: #a9c6ff; --mint: #16264a; --stat-bg: #16264a;
}
.embed-card { display: flex; flex-direction: column; min-height: 100%; padding: 10px 12px; background: var(--card); }
.embed-head { margin: 0 0 6px; }
.embed-kicker { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.embed-head h1 { margin: 1px 0 0; font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.embed-when { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.embed-balls { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.embed .ball { color: #10264f !important; }
body.embed[data-view="single"] .ball { min-width: 36px; height: 36px; padding: 0 5px; font-size: 18px; }
.embed-empty { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.embed-next { margin: 8px 0 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.embed-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11px; }
.embed-foot a { color: var(--link); font-weight: 700; text-decoration: none; }
.embed-foot a:hover { text-decoration: underline; }
.embed-backup { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.3; }
.embed-backup-mark { color: var(--muted); font-size: 10px; font-weight: 700; }

/* 全部彩种：每个彩种一行，号码球缩小，300px 宽也放得下。 */
body.embed[data-view="all"] .embed-list { display: grid; gap: 0; margin: 2px 0 0; padding: 0; list-style: none; }
body.embed[data-view="all"] .embed-row { display: flex; align-items: center; gap: 5px; min-height: 27px; border-top: 1px solid var(--line); }
body.embed[data-view="all"] .embed-row:first-child { border-top: 0; }
body.embed[data-view="all"] .embed-game { flex: 0 0 62px; overflow: hidden; font-size: 11px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
body.embed[data-view="all"] .embed-when { margin: 0; flex: 0 0 auto; font-size: 10px; font-weight: 600; white-space: nowrap; }
body.embed[data-view="all"] .embed-balls { flex: 1 1 auto; justify-content: flex-end; gap: 3px; margin-top: 0; }
body.embed[data-view="all"] .ball { min-width: 20px; height: 20px; padding: 0 2px; font-size: 11px; box-shadow: inset 0 -1px 0 var(--yellow-edge); }
body.embed[data-view="all"] .embed-empty { margin: 0 0 0 auto; font-size: 10px; }
@media (max-width: 340px) {
  body.embed[data-view="all"] .embed-game { flex-basis: 50px; font-size: 10px; }
  body.embed[data-view="all"] .embed-when { font-size: 9px; }
  body.embed[data-view="all"] .ball { min-width: 19px; height: 19px; padding: 0 2px; font-size: 10px; }
}

/* ---- 说明页 ---- */
.widget-intro { margin: 0 0 4px; }
.widget-builder { display: grid; gap: 14px; }
.widget-fields { display: grid; gap: 10px; }
.widget-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.widget-controls .hint, .widget-preview .hint { margin-top: 8px; }
.widget-frame { overflow: auto; padding: 12px; border: 1px dashed var(--pill-line); border-radius: 12px; background: var(--stat-bg); }
.widget-frame iframe { display: block; width: 100%; max-width: 600px; margin: 0 auto; border: 0; border-radius: 10px; background: var(--card); }
.widget-snippet { display: block; width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--pill-line); border-radius: 10px; background: var(--card); color: var(--ink); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; }
.widget-copy { min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 700; }
.widget-copy:hover { background: var(--primary-dark); }
@media (min-width: 640px) {
  .widget-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
