/* TinyPDF.in Email Playground. Layered on db/play.css (site header, theme tokens). */
.ep-app { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 1480px) { .ep-app { width: calc(100vw - 40px); max-width: 2400px; position: relative; left: 50%; transform: translateX(-50%); } }
.ep-bar, .ep-vbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ep-bar { padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ep-bar .grow, .ep-vbar .grow { flex: 1; }
.ep-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ep select, .ep input[type=text] { font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 7px; padding: 4px 7px; max-width: 100%; }
.ep-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ep-btn { appearance: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 7px; padding: 5px 11px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ep-btn:hover { border-color: var(--ink-2); }
.ep-ib { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px; padding: 0 8px; font-size: 15px; cursor: pointer; line-height: 1.5; }
.ep-ib:disabled { opacity: .35; cursor: default; }
.ep-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.ep-seg button { appearance: none; border: 0; background: var(--surface); color: var(--ink-2); font-size: 12.5px; padding: 4px 10px; cursor: pointer; }
.ep-seg button + button { border-left: 1px solid var(--line); }
.ep-seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ep-seg.sm button { padding: 3px 9px; font-size: 12px; }
.ep-seg i { font-style: normal; opacity: .8; }
.ep-note { font-size: 12.5px; color: var(--muted); }
.ep-note code, .ep-prob code, .ep-vars code, .about code { font-family: var(--f-mono); font-size: .92em; }
.ep .bad { color: var(--err-ink); }
.ep-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 640px; }
.ep-edit { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; }
.ep-pane { display: flex; flex-direction: column; flex: 1.6; min-height: 0; }
.ep-pane.ep-json { flex: 1; border-top: 1px solid var(--line); }
.ep-ph { display: flex; align-items: center; gap: 10px; padding: 7px 12px; flex-wrap: wrap; }
.ep-ph h2 { font: 600 15px/1.2 var(--f-display); margin: 0; }
.ep-ph .ep-note { margin-left: auto; }
.ep-ed { flex: 1; display: flex; min-height: 160px; background: var(--code-bg); border-top: 1px solid var(--line); }
.ep-gut { margin: 0; padding: 8px 6px 8px 8px; min-width: 3.4em; text-align: right; color: var(--muted); background: var(--gutter); font: 12.5px/19px var(--f-mono); overflow: hidden; user-select: none; border-right: 1px solid var(--line); white-space: pre; max-height: none; align-self: stretch; contain: size; }
.ep-ed textarea { flex: 1; min-width: 0; border: 0; margin: 0; padding: 8px 10px; resize: none; background: transparent; color: var(--ink); font: 12.5px/19px var(--f-mono); tab-size: 2; white-space: pre; overflow: auto; }
.ep-ed textarea:focus-visible { outline: none; }
.ep-ed:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.ep-view { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; min-width: 0; background: var(--surface-2); }
.ep-rec { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.ep-size { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ep-size.warn { color: #b45309; } .ep-size.bad { color: var(--err-ink); font-weight: 600; }
.ep-approx { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ep-frame { flex: 1; display: flex; justify-content: center; min-height: 560px; }
.ep-device { width: 100%; max-width: 760px; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; overflow: hidden; color: #1f2937; font-family: Roboto, "Segoe UI", Arial, sans-serif; }
.ep-device iframe { flex: 1; width: 100%; min-height: 460px; border: 0; background: #fff; }
.ep-frame.phone .ep-device { max-width: 375px; border: 10px solid #1b2230; border-radius: 26px; }
.ep-mailhead { border-bottom: 1px solid #d1d5db; background: #f3f4f6; padding: 6px 10px; font: 13px/1.45 Arial, Helvetica, sans-serif; }
.ep-mailhead table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.ep-mailhead table, .ep-mailhead tr, .ep-mailhead th, .ep-mailhead td { background: none !important; border: 0 !important; font-family: Arial, Helvetica, sans-serif !important; font-size: 13px !important; line-height: 1.45; white-space: normal; text-overflow: clip; overflow: visible; max-width: none; text-transform: none; letter-spacing: 0; }
.ep-mailhead th { width: 64px; text-align: right; vertical-align: top; padding: 1px 10px 1px 0; color: #6b7280; font-weight: 700; white-space: nowrap; }
.ep-mailhead td { padding: 1px 0; color: #111827; overflow-wrap: anywhere; }
.ep-mailhead tr.subject td { font-weight: 700 !important; }
.ep-mailhead .missing { color: #b91c1c; font-style: italic; font-weight: 400; }
.ep-dark-chrome .ep-device, .ep-dark-chrome .ep-device iframe { background: #1f1f1f; }
.ep-dark-chrome .ep-mailhead { background: #2a2a2a; border-color: #3a3a3a; }
.ep-dark-chrome .ep-mailhead td { color: #f3f4f6; }
.ep-dark-chrome .ep-mailhead th { color: #9ca3af; }
.ep-env { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.ep-envgrid { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 6px 10px; padding: 0 12px; }
.ep-envgrid label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); min-width: 0; }
.ep-envgrid label.wide { grid-column: 1 / -1; }
.ep-envgrid input { font-family: var(--f-mono); font-size: 12.5px !important; }
@media (max-width: 640px) { .ep-envgrid { grid-template-columns: 1fr; } }
.ep-probs { border-top: 1px solid var(--line); padding: 4px 0 10px; }
.ep-probs > .ep-note { padding: 0 12px; }
#ep-plist { padding: 4px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 8px; }
.ep-prob { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; background: var(--surface); min-width: 0; }
.ep-prob.s3 { border-left-color: var(--err-ink); } .ep-prob.s2 { border-left-color: #d97706; }
.ep-prob p { margin: 4px 0; color: var(--ink-2); }
.ep-ptop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ep-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.ep-badge.s3 { color: var(--err-ink); border-color: var(--err-ink); } .ep-badge.s2 { color: #b45309; border-color: #d97706; }
.ep-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.ep-chip { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ep-chip.s3 { color: var(--err-ink); border-color: var(--err-ink); background: var(--err-bg); }
.ep-chip.s2 { color: #b45309; border-color: #d97706; }
.ep-chip.s1 { color: var(--ok-ink); }
.ep-notes { margin: 4px 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; }
.ep-who { font-weight: 600; color: var(--ink); }
.ep-at { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ep-ln { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent); border-radius: 5px; padding: 0 6px; font: 11.5px var(--f-mono); cursor: pointer; }
.ep-ln:hover { border-color: var(--accent); }
.ep-vars { grid-column: 1 / -1; margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.ep-vars .k-missing b, .ep-vars .k-json b, .ep-vars .k-unclosed b { color: var(--err-ink); }
.ep-vars .k-empty b, .ep-vars .k-object b { color: #b45309; }
.ep-vars .k-unused b { color: var(--muted); }
.ep-ok { grid-column: 1 / -1; color: var(--ok-ink); margin: 6px 0; }
.ep-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: 92vw; }
.ep-toast.show { opacity: 1; }
.about table { width: 100%; border-collapse: collapse; font: inherit; font-size: 14px; margin: 10px 0 16px; min-width: 0; }
.about th, .about td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: normal; max-width: none; font-family: inherit; position: static; background: none; }
@media (max-width: 1100px) { .ep-main { grid-template-columns: minmax(0, 1fr); } .ep-edit { border-right: 0; border-bottom: 1px solid var(--line); } .ep-pane { min-height: 340px; } #ep-plist { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .ep-frame.phone .ep-device { border-width: 6px; } }
.ep-lbl { min-width: 0; max-width: 100%; } .ep-bar select { max-width: min(100%, 70vw); }
.ep-approx-tag { font-size: 11.5px; font-weight: 600; color: #b45309; border: 1px solid #d97706; border-radius: 999px; padding: 0 7px; }
.ep-approx { border-color: #d97706; }


/* PDF Generator: added after the Email Playground styles (shared layout) */
.ep-pdfopts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12.5px; color: var(--muted); }
.ep-pdfopts label { display: inline-flex; align-items: center; gap: 5px; }
.ep-pdfopts select { font-size: 12.5px; padding: 3px 6px; }
.ep-pdfdl { display: inline-flex; align-items: center; gap: 10px; }
.ep-pdfnote { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ep-pdfnote .bad { color: #dc2626; font-weight: 600; }
.ep-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0 16px; min-height: 520px; overflow: hidden; }
.ep-sheet { position: relative; flex: none; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.18); box-sizing: border-box; }
.ep-sheet .clip { overflow: hidden; position: relative; }
.ep-sheet iframe { border: 0; display: block; background: transparent; pointer-events: none; }
.ep-sheet .pn { position: absolute; right: 8px; bottom: 5px; font: 11px Arial, sans-serif; color: #9ca3af; }
.ep-sheet .mg { position: absolute; border: 1px dashed rgba(37,99,235,.35); pointer-events: none; }
.ep-pages { flex: 1; min-height: 0; }
.ep-pager #ep-pgn { font-weight: 600; }
.ep-rec + .ep-rec { border-left: 1px solid var(--line); padding-left: 10px; }
.ep-btn-pdf { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
