/* Date me / boyfriend application maker. Tokens only, so dark mode works; the paper keeps a light "document" feel via --surface. */
.tool.dma { gap: 16px; }
.tool .dma-screen, .tool .dma-make, .tool .dma-fill { display: flex; flex-direction: column; gap: 16px; }
.tool .dma-pick { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.tool .dma-field { display: flex; flex-direction: column; gap: 6px; }
.tool .dma-qhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tool .dma-count { font-size: 14px; font-weight: 750; color: rgb(var(--ink) / .5); font-variant-numeric: tabular-nums; }
.tool .dma-hint { font-size: 14px; line-height: 20px; font-weight: 650; color: rgb(var(--ink) / .6); margin-top: -8px; }

/* Editable question list */
.tool .dma-edit-list { display: flex; flex-direction: column; gap: 8px; counter-reset: none; }
.tool .dma-eq { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .07); }
.tool .dma-eq.is-new { animation: card-in .35s var(--ease-out) both; }
.tool .dma-eq-top { display: flex; align-items: flex-start; gap: 8px; }
.tool .dma-eq-n { flex: none; width: 26px; height: 26px; margin-top: 9px; border-radius: 13px; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: var(--link); background: rgb(var(--accent) / .14); }
.tool textarea.dma-qedit { flex: 1; min-height: 44px; padding: 10px 10px; resize: none; overflow: hidden; border-radius: 12px; box-shadow: none; background: transparent; font-size: 16px; line-height: 22px; font-weight: 800; color: rgb(var(--ink)); }
.tool textarea.dma-qedit:hover { box-shadow: inset 0 0 0 1px rgb(var(--ink) / .1); }
.tool .dma-eq-tools { flex: none; display: flex; }
.tool .dma-ico { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: rgb(var(--ink) / .5); background: none; transition: transform .16s ease-out, color .15s ease; -webkit-tap-highlight-color: transparent; }
.tool .dma-ico .tool-icon { width: 20px; height: 20px; }
.tool .dma-ico:active { transform: scale(.9); }
.tool .dma-ico:disabled { opacity: .3; }
.tool .dma-ico:focus-visible, .tool .dma-eopt:focus-visible, .tool .dma-add:focus-visible, .tool .dma-text-btn:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
.tool .dma-eopts { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 34px; }
.tool .dma-eopt { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 14px; text-align: left; font-size: 14px; line-height: 18px; font-weight: 700; color: rgb(var(--ink) / .75); background: var(--surface-2); transition: background-color .18s ease, color .18s ease, transform .16s ease-out; -webkit-tap-highlight-color: transparent; }
.tool .dma-eopt:active { transform: scale(.96); }
.tool .dma-eopt[aria-pressed="true"] { background: #D93A3A; color: #fff; }
.tool .dma-x { font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 8px; background: rgb(255 255 255 / .22); }
.tool .dma-free { padding-left: 34px; font-size: 14px; font-weight: 650; font-style: italic; color: rgb(var(--ink) / .5); }
.tool .dma-adds { display: flex; gap: 8px; flex-wrap: wrap; }
.tool .dma-add { flex: 1 1 140px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 18px; font-size: 15px; font-weight: 800; color: var(--link); background: transparent; box-shadow: inset 0 0 0 2px rgb(var(--accent) / .3); transition: transform .16s ease-out, background-color .2s ease; }
.tool .dma-add:active { transform: scale(.97); }
.tool .dma-add:disabled { opacity: .4; }
.tool .dma-add .tool-icon { width: 18px; height: 18px; }
.tool .dma-privacy { font-size: 13px; line-height: 19px; font-weight: 650; color: rgb(var(--ink) / .5); text-align: center; }
.tool .dma-text-btn { background: none; padding: 4px 2px; min-height: 32px; font: inherit; font-weight: 800; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* The paper form */
.tool .dma-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-radius: 18px; background: rgb(var(--accent) / .12); }
.tool .dma-bar p { font-size: 15px; line-height: 21px; font-weight: 700; }
.dma-paper { position: relative; padding: 22px 20px 20px; border-radius: 6px; background: var(--surface); color: rgb(var(--ink)); box-shadow: 0 1px 0 rgb(var(--ink) / .06), 0 12px 32px rgb(var(--ink) / .12); background-image: linear-gradient(rgb(var(--accent) / .05) 1px, transparent 1px); background-size: 100% 28px; }
.dma-paper::before { content: ''; position: absolute; inset: 8px; border: 1.5px solid rgb(var(--ink) / .7); border-radius: 2px; pointer-events: none; }
.dma-paper p, .dma-paper li { margin: 0; color: rgb(var(--ink)); }
.dma-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 0 4px 10px; border-bottom: 2px solid rgb(var(--ink) / .8); }
.dma-kicker { font-family: Georgia, 'Times New Roman', serif; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.dma-ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 500; opacity: .7; white-space: pre; }
.dma-title { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; line-height: 30px; font-weight: 400; padding: 14px 4px 6px; overflow-wrap: anywhere; }
.dma-title b { font-weight: 700; }
.dma-name { display: flex; align-items: baseline; gap: 10px; padding: 8px 4px 4px; }
.dma-name span { font-family: Georgia, serif; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; flex: none; }
.tool .dma-name input { min-height: 40px; padding: 4px 2px; border-radius: 0; background: transparent; box-shadow: inset 0 -1.5px 0 rgb(var(--ink) / .5); font-family: inherit; }
.tool .dma-name input:focus-visible { box-shadow: inset 0 -2.5px 0 rgb(var(--accent)); }
.dma-qs { list-style: none; margin: 8px 0 0; padding: 0 4px; display: flex; flex-direction: column; gap: 14px; }
.tool .dma-qs li + li { margin-top: 0; }
.dma-q { padding: 8px 6px; border-radius: 8px; transition: background-color .3s ease; }
.dma-q.is-missing { background: rgb(217 58 58 / .1); }
.dma-qt { font-size: 16px; line-height: 23px; font-weight: 800; }
.dma-qn { font-family: ui-monospace, Menlo, monospace; font-weight: 600; opacity: .6; }
.dma-opts { display: grid; grid-template-columns: 1fr; gap: 2px; margin-top: 6px; }
@media (min-width: 600px) { .dma-opts { grid-template-columns: 1fr 1fr; } }
.dma-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 20px; font-weight: 650; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .dma-opt:hover { background: rgb(var(--accent) / .06); } }
.dma-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dma-box { flex: none; width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgb(var(--ink) / .55); color: rgb(var(--ink)); transition: transform .16s ease-out; }
.dma-box .tool-icon { width: 18px; height: 18px; stroke-width: 3.2; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .22s var(--ease-out); }
.dma-opt input:checked + .dma-box .tool-icon { stroke-dashoffset: 0; }
.dma-opt:active .dma-box { transform: scale(.88); }
.dma-opt input:focus-visible + .dma-box { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
.dma-opt.is-db span:last-child { text-decoration: underline wavy #D93A3A; text-underline-offset: 4px; }
.tool textarea.dma-lines { min-height: 64px; margin-top: 6px; padding: 4px 2px; border-radius: 0; resize: none; background: transparent; box-shadow: none; line-height: 28px; font-weight: 600; background-image: linear-gradient(transparent 27px, rgb(var(--ink) / .3) 27px, rgb(var(--ink) / .3) 28px); background-size: 100% 28px; }
.tool textarea.dma-lines:focus-visible { box-shadow: none; background-image: linear-gradient(transparent 26px, rgb(var(--accent)) 26px, rgb(var(--accent)) 28px); }
.dma-office { position: relative; margin: 18px 4px 2px; min-height: 120px; padding: 10px 12px; border: 1.5px dashed rgb(var(--ink) / .45); border-radius: 4px; }
.dma-office-label { font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.dma-stamp-slot { display: grid; place-items: center; min-height: 80px; }

/* Stamp */
.dma-stamp { --c: rgb(var(--accent)); display: inline-flex; flex-direction: column; align-items: center; padding: 8px 18px; border: 4px solid var(--c); border-radius: 10px; color: var(--c); transform: rotate(-8deg); font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; mix-blend-mode: multiply; box-shadow: inset 0 0 0 2px var(--c); }
.dma-stamp span { font-size: 26px; line-height: 32px; font-weight: 900; letter-spacing: .08em; }
.dma-stamp small { font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.dma-stamp.is-approved { --c: #1F9D63; }
.dma-stamp.is-interview { --c: #8A2BDB; }
.dma-stamp.is-pending { --c: #C27C0E; }
.dma-stamp.is-denied { --c: #D93A3A; }
.dma-stamp.is-slam { animation: dma-slam .32s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes dma-slam { from { opacity: 0; transform: rotate(-14deg) scale(1.7); } 70% { opacity: 1; } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

.tool .dma-result { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); outline: 0; }
.tool .dma-verdict { font-size: 20px; line-height: 28px; font-weight: 900; color: rgb(var(--ink)); text-wrap: balance; }
.tool .dma-why { font-size: 14px; font-weight: 700; color: rgb(var(--ink) / .55); }
.tool .dma-err { font-size: 15px; font-weight: 800; color: #D93A3A; min-height: 0; }
.tool .dma-err:empty { display: none; }
.tool .dma-decide { display: flex; flex-direction: column; gap: 10px; }

/* Print: only the paper */
.dma-print { display: none; }
@media print {
  html.dma-printing body > *:not(.dma-print) { display: none !important; }
  html.dma-printing .dma-print { display: block; }
  .dma-print .dma-paper { box-shadow: none; background: #fff; color: #000; }
}
@media (prefers-color-scheme: dark) { .dma-stamp { mix-blend-mode: normal; } .dma-stamp.is-interview { --c: #D3A6FF; } }
@media (prefers-reduced-motion: reduce) { .dma-stamp.is-slam, .tool .dma-eq.is-new { animation: none; } .dma-box .tool-icon { transition: none; } }
/* Keep Send in reach while editing a long form */
.tool .dma-send { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 3; padding: 8px; margin: 0 -8px; border-radius: 32px; background: var(--bg); box-shadow: 0 -1px 0 rgb(var(--ink) / .04), 0 10px 30px rgb(var(--ink) / .14); flex-direction: row; }
.tool .dma-send .btn-primary { flex: 1 1 auto; }
.tool .dma-send .btn-secondary { flex: 0 0 auto; width: auto; }
/* Round 2: one-row chips, tool buttons, compact send bar, signature, bigger stamp, cream paper in dark mode, print layout */
.tool .dma-row-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.tool .dma-row-chips::-webkit-scrollbar { display: none; }
.tool .dma-row-chips button { flex: none; }
.tool .dma-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tool .dma-tool-btn { min-height: 40px; padding: 0 16px; border-radius: 20px; font-size: 14px; font-weight: 800; color: rgb(var(--ink) / .8); background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .1); transition: transform .16s ease-out; }
.tool .dma-tool-btn:active { transform: scale(.96); }
.tool .dma-tool-btn:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
.tool .dma-send { flex-wrap: nowrap; padding: 6px; gap: 6px; background: rgb(var(--accent) / .08); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.tool .dma-send .btn { min-height: 48px; }
.tool .tool-actions.dma-send .btn-primary { width: auto; flex: 1 1 auto; }
.tool .tool-actions.dma-send .btn-secondary { width: auto; flex: 0 0 auto; padding-left: 20px; padding-right: 20px; }
.tool .dma-make { padding-bottom: 4px; }
.dma-sign { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin: 22px 4px 0; }
.dma-sign span { padding-top: 28px; border-bottom: 1.5px solid rgb(var(--ink) / .5); font-family: Georgia, serif; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; opacity: .7; order: 0; display: flex; align-items: flex-end; }
.dma-stamp span { font-size: 40px; line-height: 46px; }
.dma-stamp { padding: 10px 24px; border-width: 5px; }
.dma-stamp-slot { min-height: 110px; }
@media (prefers-color-scheme: dark) {
  .dma-paper { --ink: 29 11 48; --surface: #FFFDF7; --accent: 167 60 255; color-scheme: light; }
  .dma-stamp { mix-blend-mode: multiply; }
  .dma-stamp.is-interview { --c: #8A2BDB; }
}
@media print {
  @page { margin: 12mm; }
  .dma-print .dma-paper { padding: 10px 16px; background-image: none; }
  .dma-print .dma-q { break-inside: avoid; padding: 4px; }
  .dma-print .dma-opts { grid-template-columns: 1fr 1fr; }
  .dma-print .dma-opt { min-height: 28px; font-size: 13px; }
  .dma-print .dma-qs { gap: 6px; }
}
.tool .dma-xi { display: inline-grid; place-items: center; width: 16px; height: 16px; opacity: .35; }
.tool .dma-xi .tool-icon { width: 14px; height: 14px; }
.tool .dma-row-chips { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
.tool .dma-send { background: var(--bg); }
.dma-stamp.is-official { --c: #C0237A; }
.tool .dma-story { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); animation: card-in .3s var(--ease-out) both; }
.tool .dma-story img { width: 135px; height: 240px; border-radius: 14px; flex: none; box-shadow: 0 6px 20px rgb(0 0 0 / .18); outline: 1px solid rgb(0 0 0 / .1); }
.tool .dma-story-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tool .dma-story .tool-actions { flex-direction: column; }
@media print {
}
@media (prefers-reduced-motion: reduce) { .tool .dma-story { animation: none; } }
.tool .dma-sum { padding-left: 34px; font-size: 14px; line-height: 20px; font-weight: 650; color: rgb(var(--ink) / .5); }
.tool .dma-x.is-on { background: #D93A3A; color: #fff; padding: 3px 8px; font-size: 12px; text-transform: none; letter-spacing: 0; }
.tool .dma-dbrow { display: flex; align-items: center; gap: 10px; margin-top: -6px; }
.tool .dma-dbrow .dma-hint { margin: 0; }
.tool .dma-dbbtn { flex: none; }
.tool .dma-dbbtn[aria-pressed="true"] { background: #D93A3A; color: #fff; box-shadow: none; }
.tool .dma-story .tool-actions .btn { width: 100%; }
@media (max-width: 599px) { .dma-stamp span { font-size: 28px; line-height: 34px; } .dma-stamp { padding: 8px 16px; } }
/* Round 5: no sticky bar (it covered content), answer chips, story buttons */
.tool .dma-send { position: static; margin: 0; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.tool .dma-sum { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 34px; }
.tool .dma-schip { padding: 4px 10px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 18px; font-weight: 700; color: rgb(var(--ink) / .7); }
.tool .dma-schip.is-db { background: #D93A3A; color: #fff; }
.tool .dma-story .tool-actions { display: flex; flex-direction: column; align-items: stretch; }
.tool .dma-story .tool-actions .btn { flex: none; width: 100%; min-height: 48px; }
.tool .dma-qhead { align-items: center; }
/* Round 6: one primary action, post/print group, round radio marks, closing question, live desktop preview, A6 card */
.tool .dma-editor { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tool .dma-qhead .dma-tool-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; }
.tool .dma-qhead .dma-tool-btn .tool-icon { width: 16px; height: 16px; }
.tool .dma-dbrow { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: -4px; }
.tool .dma-dbrow .dma-hint { margin: 0; }
.tool .dma-dbbtn { min-height: 44px; }
.tool .dma-tool-btn { min-height: 44px; }
.tool .dma-eq.is-close { box-shadow: inset 0 0 0 2px rgb(var(--accent) / .35); }
.tool .dma-more { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .07); }
.tool .dma-more-label { font-size: 13px; line-height: 18px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--ink) / .55); }
.tool .dma-more .dma-tools { justify-content: flex-start; }
.tool .dma-more .dma-tool-btn { background: var(--surface-2); box-shadow: none; }
.tool .dma-make > .dma-privacy, .tool .dma-editor > .dma-privacy { margin-top: -6px; }
.dma-box.is-radio { border-radius: 50%; }
.dma-box.is-radio i { width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--ink)); transform: scale(0); transition: transform .18s var(--ease-out); }
.dma-opt input:checked + .dma-box.is-radio i { transform: scale(1); }
.dma-q.is-close { margin-top: 6px; padding: 12px 12px 10px; border: 2px solid rgb(var(--ink) / .75); border-radius: 10px; }
.dma-q.is-close .dma-qt { font-family: Georgia, 'Times New Roman', serif; font-size: 20px; line-height: 27px; font-weight: 700; }
.dma-blankline { flex: 1; min-height: 28px; border-bottom: 1.5px solid rgb(var(--ink) / .5); }
.dma-note { padding: 10px 4px 0; text-align: center; font-family: Georgia, serif; font-style: italic; font-size: 18px; line-height: 24px; }
.tool .dma-yay { font-size: 15px; font-weight: 800; color: #C0237A; }
.tool .dma-result.is-official { box-shadow: inset 0 0 0 2px #C0237A, var(--shadow); }
.tool .dma-story .tool-chips button { min-height: 44px; }
.tool .dma-live { display: none; }
@media (min-width: 1000px) {
  .tool .dma-make { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 20px; align-items: start; }
  .tool .dma-live { display: block; position: sticky; top: 92px; }
  .tool .dma-live-label { margin-bottom: 8px; font-size: 13px; line-height: 18px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--ink) / .55); }
  .tool .dma-live-paper { width: 496px; zoom: .5; pointer-events: none; }
}
.tool .dma-cardp { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); animation: card-in .3s var(--ease-out) both; }
.tool .dma-cardp .dma-hint { margin: 0; }
.tool .dma-card-stage { display: grid; place-items: center; padding: 12px 0; border-radius: 16px; background: var(--surface-2); }
.dma-card { width: min(100%, 105mm); aspect-ratio: 105 / 148; overflow: hidden; outline: 1px dashed rgb(29 11 48 / .45); outline-offset: 6px; }
.dma-card .dma-paper { height: 100%; padding: 12px 12px 10px; border-radius: 2px; box-shadow: 0 6px 18px rgb(29 11 48 / .14); background-size: 100% 20px; }
.dma-card .dma-paper::before { inset: 5px; }
.dma-card .dma-head { padding-bottom: 5px; }
.dma-card .dma-kicker { font-size: 9px; }
.dma-card .dma-ref { font-size: 8px; }
.dma-card .dma-note { font-size: 13px; line-height: 17px; padding-top: 6px; }
.dma-card .dma-title { font-size: 14px; line-height: 18px; padding: 6px 2px 2px; }
.dma-card .dma-name { padding: 2px; gap: 6px; }
.dma-card .dma-name span { font-size: 9px; }
.dma-card .dma-blankline { min-height: 16px; }
.dma-card .dma-qs { gap: 3px; margin-top: 4px; padding: 0 2px; }
.dma-card .dma-q { padding: 2px 3px; }
.dma-card .dma-qt { font-size: 10.5px; line-height: 13px; }
.dma-card .dma-q.is-close { padding: 5px 6px; border-width: 1.5px; margin-top: 3px; }
.dma-card .dma-q.is-close .dma-qt { font-size: 12px; line-height: 15px; }
.dma-card .dma-opts { grid-template-columns: 1fr 1fr; gap: 0 4px; margin-top: 1px; }
.dma-card .dma-opt { min-height: 15px; padding: 0 2px; gap: 4px; font-size: 9px; line-height: 11px; }
.dma-card .dma-box { width: 9px; height: 9px; box-shadow: inset 0 0 0 1.2px rgb(var(--ink) / .6); }
.dma-card textarea.dma-lines { min-height: 22px; margin-top: 0; line-height: 11px; background-size: 100% 11px; background-image: linear-gradient(transparent 10px, rgb(var(--ink) / .3) 10px, rgb(var(--ink) / .3) 11px); }
.dma-card .dma-sign { margin-top: 6px; gap: 8px; }
.dma-card .dma-sign span { padding-top: 12px; font-size: 7px; }
.dma-card .dma-office { margin-top: 5px; min-height: 0; padding: 3px 6px; }
.dma-card .dma-office-label { font-size: 7px; }
.dma-card .dma-stamp-slot { min-height: 22px; }
@media (prefers-color-scheme: dark) { .dma-card { outline-color: rgb(255 255 255 / .4); } }
@media print {
  html.dma-printing .dma-print.is-card { display: grid; place-items: start center; padding-top: 10mm; }
  .dma-print.is-card .dma-card { width: 105mm; height: 148mm; aspect-ratio: auto; outline: .3mm dashed #888; outline-offset: 0; }
  .dma-print.is-card .dma-paper { box-shadow: none; padding: 4mm; }
  .dma-print.is-card .dma-q { padding: 2px 3px; }
  .dma-print .dma-q.is-close { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { .tool .dma-cardp { animation: none; } .dma-box.is-radio i { transition: none; } }
.tool .dma-more .dma-tool-btn { flex: 1 1 auto; }
.tool .dma-qhead .dma-count, .tool .dma-qhead .dma-tool-btn { white-space: nowrap; }
@media (max-width: 599px) {
  .tool .dma-story { flex-direction: column; align-items: stretch; }
  .tool .dma-story img { align-self: center; width: 180px; height: 320px; }
  .tool .dma-story .tool-chips { flex-wrap: nowrap; }
  .tool .dma-story .tool-chips button { flex: 1 1 0; }
}
/* A6 card: tight type so 4 questions plus the closing question fit the card */
.dma-card .dma-paper { background-image: none; letter-spacing: 0; }
.dma-card .dma-head { flex-wrap: nowrap; padding: 0 2px 4px; border-bottom-width: 1.5px; }
.dma-card .dma-kicker { font-size: 8px; letter-spacing: .12em; white-space: nowrap; }
.dma-card .dma-ref { font-size: 7px; }
.dma-card .dma-note { font-size: 11px; line-height: 14px; padding-top: 4px; }
.dma-card .dma-title { font-size: 12px; line-height: 15px; padding: 4px 2px 0; }
.dma-card .dma-qt { font-size: 9.5px; line-height: 12px; letter-spacing: 0; }
.dma-card .dma-opt { min-height: 12px; font-size: 8px; line-height: 10px; letter-spacing: 0; }
.dma-card .dma-q.is-close .dma-qt { font-size: 11px; line-height: 14px; }
.dma-card .dma-sign { margin-top: 4px; }
.dma-card .dma-sign span { padding-top: 10px; }
.tool .dma-card-stage .dma-card { width: 105mm; }
@media (max-width: 599px) { .tool .dma-card-stage .dma-card { zoom: .72; } }
.tool .dma-qhead .dma-tool-btn { padding: 0 12px; }

/* Reflow at 320 px (WCAG 1.4.10): rows wrap instead of pushing past the screen edge. Wider screens are unchanged. */
@media (max-width: 374px) {
  .tool .dma-qhead { flex-wrap: wrap; }
}
