/* Macro helper screen. Owner: B (adopted from A's skeleton 902c82f).
   2026-11-01 redesign by A on the user's instruction ("와포 스타일 · 토스처럼 미니멀 · 헤매지 않게 · 아이콘은 다"):
   one centered column like wafo's leader pages, a big question per step, wafo cards and pill chips, blue selection
   with ✓ (the site's --sel), class/spell/item icons, the main action large and near the answer.
   Built on the wafo.top design tokens, so the page sits inside the site layout unchanged.
   Every rule is scoped under .wmh (or .wmh-standalone for the dev page); nothing leaks into the host site.
   Colour roles: blue = chosen option, main action, links, focus; gold = key result values; green = done / copied;
   red = errors; amber = not yet verified / limits. States always carry words or marks, not colour alone. */

.wmh-feedback-callout{margin-top:24px;animation:wmh-feedback-enter .45s ease-out both}.wmh-feedback-callout.is-static{animation:none}.wmh-feedback-callout h2{font-size:19px;margin:0 0 8px}.wmh-feedback-callout p{line-height:1.65}.wmh-feedback-callout .wmh-btn{min-height:48px}
@keyframes wmh-feedback-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.wmh-feedback-callout{animation:none}}
.wmh {
  --wmh-bg: var(--bg, #0e1825);
  --wmh-surface: var(--surface, #162232);
  --wmh-raised: var(--surface-raised, #1a2739);
  --wmh-soft: var(--soft, #1a2638);
  --wmh-soft2: var(--soft2, #203049);
  --wmh-line: var(--line, #26354b);
  --wmh-line-strong: var(--line-strong, #34465f);
  --wmh-ink: var(--ink, #f3f6fb);
  --wmh-ink2: var(--ink2, #c9d3e3);
  --wmh-muted: var(--muted, #9daac0);
  --wmh-primary: var(--primary, #3468e6);
  --wmh-primary-hover: var(--primary-hover, #2c5bd6);
  --wmh-primary-soft: var(--primary-soft, #142a55);
  --wmh-primary-ink: var(--primary-ink, #a9c6ff);
  --wmh-gold: var(--gold, #f2c86b);
  --wmh-sel: var(--sel, #5b9dff);
  --wmh-sel-bg: #142b61;
  --wmh-card: #101b2c;
  --wmh-card-line: #42526c;
  --wmh-ok: var(--ok, #46d39a);
  --wmh-ok-soft: var(--ok-soft, #0f2a20);
  --wmh-danger: var(--danger, #ff7b7b);
  --wmh-danger-soft: var(--danger-soft, #2c1519);
  --wmh-warn: var(--warn, #f3b64d);
  --wmh-warn-soft: var(--warn-soft, #2a2112);
  --wmh-field: #0e141d;
  --wmh-radius: var(--radius, 10px);
  --wmh-radius-lg: var(--radius-lg, 12px);
  max-width: 800px;
  margin: 0 auto;
  color: var(--wmh-ink);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.wmh *, .wmh *::before, .wmh *::after { box-sizing: border-box; }
.wmh [hidden] { display: none !important; }
/* wafo.top styles bare elements (label{display:block;margin:16px 0 6px;font-weight:700}, p{margin:8px 0} …). Inside
   the helper its own classes decide; :where() keeps this reset weaker than every .wmh-* rule below. */
.wmh :where(label, legend, fieldset, figure) { margin: 0; font-size: inherit; font-weight: inherit; }
.wmh :focus-visible { outline: 3px solid var(--wmh-sel); outline-offset: 2px; }

/* Standalone dev page only (inside wafo.top the site's body styles apply). */
.wmh-standalone {
  margin: 0;
  background: radial-gradient(1100px 520px at 72% -160px, rgba(52, 90, 178, .18), transparent 70%), #0e1825;
  color: #f3f6fb;
  font: 16px/1.6 "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  letter-spacing: -.01em;
}
.wmh-standalone .wmh-main { max-width: 1200px; margin: 0 auto; padding: 28px 20px 72px; }

/* ---- header and tabs ------------------------------------------------------------------------------------------ */
.wmh-head { margin: 6px 0 20px; }
.wmh-title { margin: 0 0 6px; font-size: 30px; line-height: 1.22; letter-spacing: -.035em; font-weight: 800; color: #fff; }
.wmh-lead { margin: 0; color: var(--wmh-ink2); font-size: 16.5px; max-width: 680px; }
.wmh-boot { padding: 18px; border: 1px solid var(--wmh-line); border-radius: var(--wmh-radius-lg); color: var(--wmh-ink2); }
.wmh-boot p { margin: 0 0 10px; }
.wmh-boot p:last-child { margin-bottom: 0; }

/* Independent creation choices and a separate compact recommendation entry. */
.wmh .wmh-entry{margin-bottom:28px}.wmh .wmh-entry-making{display:flex;gap:12px}.wmh .wmh-entry-button,.wmh .wmh-entry-library{font:inherit;cursor:pointer;display:flex;align-items:center;gap:12px;text-align:left;padding:18px 20px;border:1px solid var(--wmh-line);border-radius:14px;background:var(--wmh-surface);color:var(--wmh-ink);min-height:80px;flex:1;min-width:0}.wmh .wmh-entry-button[aria-pressed=true]{background:var(--wmh-primary-soft);border-color:var(--wmh-sel);box-shadow:inset 0 0 0 1px var(--wmh-sel)}.wmh .wmh-entry-icon{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:var(--wmh-soft);color:var(--wmh-primary);flex:none;font-size:22px}.wmh .wmh-entry-copy strong{font-size:16px;font-weight:700;display:block;line-height:1.4}.wmh .wmh-entry-copy small{font-size:12px;color:var(--wmh-muted);display:block;line-height:1.6;margin-top:4px}.wmh .wmh-entry-library{width:100%;margin-top:22px;padding:10px 18px;min-height:60px;background:transparent;flex:none}.wmh .wmh-entry-library[aria-pressed=true]{border-color:var(--wmh-sel)}.wmh .wmh-entry-arrow{margin-left:auto;color:var(--wmh-muted);font-size:24px}.wmh .wmh-entry> .wmh-btn{margin-top:12px}
@media(max-width:540px){.wmh .wmh-entry-making{gap:8px}.wmh .wmh-entry-button{padding:14px 12px;gap:8px;align-items:flex-start;flex-direction:column}.wmh .wmh-entry-copy strong{font-size:14px}.wmh .wmh-entry-library{padding:10px 12px}}

.wmh-banner { margin-bottom: 16px; }
.wmh-banner:empty { display: none; }
.wmh-banner .wmh-notice { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.wmh-banner .wmh-options { margin-top: 0; }

/* ---- one column: questions, "이렇게 작동해요", extras --------------------------------------------------------------- */
.wmh-work { display: grid; gap: 22px; }
.wmh-panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* the open question */
.wmh-step { min-width: 0; }
.wmh-step-title { margin: 2px 0 4px; font-size: 24px; line-height: 1.32; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.wmh-step-title:focus, .wmh-h4:focus, .wmh-h2:focus, .wmh-h3:focus, .wmh-extra-title:focus { outline: none; }
.wmh-step-title:focus-visible, .wmh-h4:focus-visible, .wmh-h2:focus-visible, .wmh-h3:focus-visible, .wmh-extra-title:focus-visible { outline: 3px solid var(--wmh-sel); outline-offset: 3px; border-radius: 4px; }
.wmh-hint { margin: 6px 0 0; color: var(--wmh-muted); font-size: 14.5px; }
.wmh-badge { margin-left: 8px; padding: 1px 8px; border: 1px solid var(--wmh-line-strong); border-radius: 999px; color: var(--wmh-muted); font-size: 12.5px; font-weight: 650; vertical-align: 2px; }

/* what was chosen so far: one card, one row per answer */
.wmh-sumlist { border: 1px solid var(--wmh-line); border-radius: 14px; background: var(--wmh-surface); overflow: hidden; }
.wmh-sumrow { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; min-height: 52px; padding: 6px 8px 6px 16px; }
.wmh-sumrow + .wmh-sumrow { border-top: 1px solid var(--wmh-line); }
.wmh-sumrow-label { color: var(--wmh-muted); font-size: 14px; }
.wmh-sumrow-value { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }

/* choices: real radio inputs inside labels (keyboard behaviour stays native); the inputs are visually hidden */
.wmh-choices { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.wmh-legend { padding: 0; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--wmh-muted); }
.wmh-choice {
  position: relative; display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--wmh-card-line); border-radius: 12px; background: var(--wmh-card); color: var(--wmh-ink); cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.wmh-choice:hover { border-color: var(--wmh-primary-ink); }
/* z-index: the 1px input stays the top element at its point (icons are positioned too), so a click on the input
   itself (tests, assistive tools) reaches it; people click anywhere on the label. */
.wmh-choice > input { position: absolute; z-index: 1; opacity: 0; width: 1px; height: 1px; margin: 0; }
.wmh-choice.is-selected, .wmh-choice:has(> input:checked) {
  border-color: var(--wmh-sel); background: linear-gradient(180deg, #173063, #132952);
  box-shadow: inset 0 0 0 1px var(--wmh-sel), 0 0 0 1px rgba(91, 157, 255, .25), 0 0 18px rgba(61, 125, 255, .22);
}
.wmh-choice:has(> input:focus-visible) { outline: 3px solid var(--wmh-sel); outline-offset: 2px; }
.wmh-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wmh-choice-label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.wmh-choice-hint { color: var(--wmh-muted); font-size: 14px; }

/* big cards (무엇을 편하게 할까요?) and full-width rows (대상이 없으면?, 어디에 쓸까요?): tap = go on (→); chosen = ✓ */
.wmh-choices.is-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.wmh-choices.is-cards > .wmh-choice { min-height: 100px; padding: 18px 48px 18px 20px; border-radius: 14px; }
.wmh-choices.is-cards .wmh-choice-label { font-size: 19px; line-height: 1.4; font-weight: 800; }
.wmh-choices.is-cards .wmh-choice-hint { margin-top: 4px; }
.wmh-choices.is-rows { gap: 10px; }
.wmh-choices.is-rows > .wmh-choice { min-height: 60px; padding: 14px 48px 14px 18px; border-radius: 14px; }
.wmh-choices.is-rows .wmh-choice-label { font-size: 17px; }
.wmh-choices.is-cards > .wmh-choice::after, .wmh-choices.is-rows > .wmh-choice::after {
  content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--wmh-primary-ink); font-size: 22px; line-height: 1;
}
.wmh-choices.is-cards > .wmh-choice:has(> input:checked)::after, .wmh-choices.is-rows > .wmh-choice:has(> input:checked)::after,
.wmh-choices.is-cards > .wmh-choice.is-selected::after, .wmh-choices.is-rows > .wmh-choice.is-selected::after { content: "✓"; color: #fff; font-weight: 900; }

/* pill chips (직업, 같은 기술/다른 기술): chosen = blue + ✓ like the site's filters */
.wmh-choices.is-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wmh-choices.is-chips .wmh-legend { width: 100%; }
.wmh-choices.is-chips > .wmh-choice { min-height: 46px; padding: 6px 16px; border-radius: 999px; gap: 8px; background: var(--wmh-soft); }
.wmh-choices.is-chips > .wmh-choice:has(> .wmh-ico) { padding-left: 7px; }
.wmh-choices.is-chips .wmh-choice-label { font-size: 15.5px; }
.wmh-choices.is-chips > .wmh-choice:has(> input:checked) .wmh-choice-label::before,
.wmh-choices.is-chips > .wmh-choice.is-selected .wmh-choice-label::before { content: "✓"; font-weight: 900; }
.wmh-choices.is-chips .wmh-ico { width: 32px; height: 32px; border-radius: 50%; }
.wmh-choices.is-inline { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.wmh-pick-class { margin: 14px 0 0; }

/* spell / item icon grid */
.wmh-picker { margin-top: 18px; }
.wmh-choices.is-gridset { display: block; margin: 0; }
.wmh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.wmh-grid + .wmh-grid, .wmh-more-list { margin-top: 8px; }
.wmh-grid + .wmh-group-label, .wmh-custom + .wmh-group-label { margin-top: 16px; }
.wmh-choice.is-tile { min-height: 60px; padding: 9px 26px 9px 9px; gap: 10px; border-radius: 12px; }
.wmh-tile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.wmh-choice.is-tile:has(> input:checked)::after, .wmh-choice.is-tile.is-selected::after {
  content: "✓"; position: absolute; top: 6px; right: 9px; color: #fff; font-size: 14px; font-weight: 900; line-height: 1;
}
.wmh-grid.is-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wmh-grid.is-slots .wmh-choice.is-tile { min-height: 70px; }
/* [직접 입력하기]: first big tile; its form opens right under the big tiles */
.wmh-choice.is-custom { border-style: dashed; }
.wmh-choice.is-custom.is-selected, .wmh-choice.is-custom:has(> input:checked) { border-style: solid; }
.wmh-tile-hint { display: block; width: 100%; color: var(--wmh-muted); font-size: 13px; font-weight: 600; }
.wmh-custom { margin-top: 10px; padding: 14px 16px 16px; border: 1px solid var(--wmh-sel); border-radius: 14px; background: var(--wmh-bg); }
.wmh-custom > .wmh-field:first-child { margin-top: 0; }
.wmh-custom-msg { min-height: 1.5em; margin: 0; color: var(--wmh-warn); }
.wmh-custom-msg:empty { min-height: 0; }
.wmh-choices.is-rows.is-compact { margin-top: 12px; gap: 8px; }
.wmh-choices.is-rows.is-compact .wmh-legend { margin-bottom: 4px; font-size: 15px; color: var(--wmh-ink); }
.wmh-choices.is-rows.is-compact > .wmh-choice { min-height: 52px; padding: 10px 44px 10px 16px; }
.wmh-choices.is-rows.is-compact .wmh-choice-label { font-size: 16px; }
.wmh-nomatch { display: grid; gap: 8px; justify-items: start; margin-top: 10px; }
.wmh-nomatch .wmh-muted { margin: 0; }
.wmh-group-label { margin: 14px 0 6px; color: var(--wmh-muted); font-size: 13.5px; font-weight: 700; }
/* Only a label right at the top of the list loses its top margin. (:first-of-type also hit "자주 쓰는 아이템"
   under the big item tiles, gluing it to the wrong group.) */
.wmh-choices.is-gridset > legend + .wmh-group-label { margin-top: 0; }
.wmh-btn.is-more { width: 100%; margin-top: 10px; border: 1px dashed var(--wmh-line-strong); background: transparent; color: var(--wmh-primary-ink); }
.wmh-btn.is-more:hover:not(:disabled) { background: var(--wmh-soft); }
.wmh-search { margin: 0 0 12px; }
.wmh-search .wmh-input {
  padding-left: 42px;
  background: var(--wmh-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239daac0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E") no-repeat 14px 50% / 18px 18px;
}

/* icons: Blizzard pictures, or a letter tile (data-letter, drawn here so it never becomes page text) */
.wmh-ico {
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden; width: 40px; height: 40px;
  border-radius: 8px; background: #0b1220; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); color: #fff;
}
.wmh-ico img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wmh-ico.is-sm { width: 26px; height: 26px; border-radius: 6px; }
.wmh-ico.is-lg { width: 48px; height: 48px; border-radius: 10px; }
.wmh-ico.is-letter::before { content: attr(data-letter); font-size: 17px; font-weight: 800; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.wmh-ico.is-sm.is-letter::before { font-size: 12px; }
.wmh-ico.is-letter.tone-green { background: linear-gradient(135deg, #2f8a5f, #164a33); }
.wmh-ico.is-letter.tone-blue { background: linear-gradient(135deg, #3b6fd6, #1b356d); }
.wmh-ico.is-letter.tone-violet { background: linear-gradient(135deg, #7a55c9, #3b2766); }
.wmh-ico.is-letter.tone-red { background: linear-gradient(135deg, #b5473f, #5c1f1b); }
.wmh-ico.is-letter.tone-amber { background: linear-gradient(135deg, #c48a2c, #6a4512); }
.wmh-ico.is-letter.tone-gold { background: linear-gradient(135deg, #b8913c, #5e4515); }
.wmh-ico.is-letter.tone-gray { background: linear-gradient(135deg, #4b5a72, #253043); }

.wmh-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--wmh-soft2); color: var(--wmh-ink2); font-size: 12px; font-weight: 650; }
.wmh-tag.is-mock { background: var(--wmh-warn-soft); color: var(--wmh-warn); }

/* target priority list */
.wmh-presets, .wmh-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.wmh-presets .wmh-group-label, .wmh-add .wmh-group-label { width: 100%; margin: 0; }
.wmh-chain { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.wmh-chain-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 6px 8px 6px 14px; border: 1px solid var(--wmh-sel); border-radius: 12px; background: var(--wmh-sel-bg);
}
.wmh-chain-rank { color: var(--wmh-primary-ink); font-size: 13px; font-weight: 800; white-space: nowrap; }
.wmh-chain-label { font-weight: 700; }
.wmh-chain-tools { display: flex; gap: 4px; }
.wmh-chain-empty { margin: 14px 0 0; }
.wmh-chosen { margin: 14px 0 0; font-weight: 700; }
.wmh-step-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.wmh-btn.is-next { min-width: 160px; }
.wmh-note-line { margin: 0; }

/* ---- buttons, fields ----------------------------------------------------------------------------------------- */
.wmh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border: 1px solid transparent; border-radius: 12px; font: inherit; font-weight: 750; line-height: 1.3;
  text-align: center; cursor: pointer; color: var(--wmh-ink);
}
.wmh-btn:disabled { opacity: .5; cursor: not-allowed; }
.wmh-btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.wmh-btn.is-primary { min-height: 50px; padding: 12px 22px; background: var(--wmh-primary); color: #fff; }
.wmh-btn.is-primary:hover:not(:disabled) { background: var(--wmh-primary-hover); }
.wmh-btn.is-big { min-height: 58px; font-size: 18px; border-radius: 14px; }
.wmh-btn.is-secondary { background: var(--wmh-card); border-color: var(--wmh-card-line); color: #fff; }
.wmh-btn.is-secondary:hover:not(:disabled) { background: var(--wmh-soft2); }
.wmh-btn.is-ghost { background: transparent; color: var(--wmh-primary-ink); }
.wmh-btn.is-ghost:hover:not(:disabled) { background: var(--wmh-soft); }
.wmh-btn.is-small { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.wmh-btn.is-chip { min-height: 42px; padding: 8px 15px; border-radius: 999px; background: var(--wmh-soft); border-color: var(--wmh-line-strong); color: var(--wmh-ink2); font-size: 15px; font-weight: 700; }
.wmh-btn.is-chip:hover:not(:disabled) { border-color: var(--wmh-primary-ink); color: var(--wmh-ink); }
.wmh-btn.is-icon { min-width: 40px; min-height: 40px; padding: 0; border-radius: var(--wmh-radius); background: var(--wmh-soft); border-color: var(--wmh-line-strong); font-size: 17px; }
.wmh-btn.is-wide { width: 100%; }
.wmh-link { padding: 2px 0; border: 0; background: none; color: var(--wmh-primary-ink); font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.wmh-field { display: grid; gap: 6px; margin-top: 12px; }
.wmh-field.is-inline { grid-template-columns: minmax(110px, auto) minmax(0, 1fr); align-items: center; }
.wmh-label { font-size: 15px; font-weight: 700; }
.wmh-label-sm { margin: 0 0 8px; color: var(--wmh-muted); font-size: 14px; font-weight: 700; }
.wmh-input {
  width: 100%; min-height: 50px; padding: 11px 14px; border: 1px solid var(--wmh-line-strong); border-radius: 12px;
  background: var(--wmh-field); color: var(--wmh-ink); font: inherit;
}
.wmh-input::placeholder { color: #7f8ca3; }
.wmh-input:focus { border-color: var(--wmh-sel); outline: none; box-shadow: 0 0 0 3px rgba(59, 111, 240, .3); }
.wmh-input:disabled { opacity: .6; }
textarea.wmh-input { resize: vertical; line-height: 1.55; }
.wmh-code { font-family: ui-monospace, "Cascadia Mono", Consolas, "D2Coding", monospace; font-size: 15px; white-space: pre-wrap; word-break: break-all; }
.wmh-check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; margin-top: 12px; cursor: pointer; }
.wmh-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--wmh-primary); }

/* ---- notices ------------------------------------------------------------------------------------------------- */
.wmh-notice { margin: 0; padding: 12px 16px; border: 1px solid rgba(52, 104, 230, .4); border-radius: var(--wmh-radius-lg); background: var(--wmh-primary-soft); color: var(--wmh-ink); }
.wmh-notice p { margin: 0; }
.wmh-notice p + p { margin-top: 4px; }
.wmh-notice.is-error { background: var(--wmh-danger-soft); border-color: rgba(255, 123, 123, .5); }
.wmh-notice.is-warn, .wmh-notice.is-mock { background: var(--wmh-warn-soft); border-color: rgba(243, 182, 77, .45); }
.wmh-notice.is-ok { background: var(--wmh-ok-soft); border-color: rgba(70, 211, 154, .45); }
.wmh-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wmh-empty, .wmh-muted { color: var(--wmh-muted); }
.wmh-small { font-size: 14px; }

/* ---- "이렇게 작동해요" card ------------------------------------------------------------------------------------ */
.wmh-explain { padding: 20px 22px; border: 1px solid var(--wmh-line-strong); border-radius: 16px; background: var(--wmh-raised); }
.wmh-h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; color: #fff; }
.wmh-h3 { margin: 18px 0 8px; color: var(--wmh-ink2); font-size: 16px; letter-spacing: -.01em; }
.wmh-h4 { margin: 0; font-size: 16px; }
.wmh-summary p { margin: 0 0 6px; font-size: 17px; line-height: 1.65; }
.wmh-summary p:last-child { margin-bottom: 0; }
.wmh-summary.is-stale { opacity: .6; }
.wmh-make { display: grid; gap: 8px; margin-top: 18px; }
.wmh-make .wmh-notice, .wmh-make .wmh-muted { margin: 0; }
.wmh-meta { margin: 12px 0 0; color: var(--wmh-muted); font-size: 13.5px; }
.wmh-explain .wmh-warn-list { margin-top: 12px; }
.wmh-order-branch + .wmh-order-branch { margin-top: 10px; }
.wmh-order-head { margin: 0 0 4px; font-weight: 700; }
.wmh-order-steps { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.wmh-issues { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--wmh-line-strong); border-radius: var(--wmh-radius); }
.wmh-issues .wmh-h3 { margin-top: 0; }
.wmh-issues ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.wmh-issues .wmh-btn { margin-top: 10px; }
.wmh-issues.is-error { background: var(--wmh-danger-soft); border-color: rgba(255, 123, 123, .55); }
.wmh-issues.is-missing { background: var(--wmh-soft); }
.wmh-issues.is-warn { background: var(--wmh-warn-soft); border-color: rgba(243, 182, 77, .5); }
.wmh-scn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wmh-scn { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: var(--wmh-radius); background: var(--wmh-soft); }
.wmh-scn-when { color: var(--wmh-ink2); font-size: 14.5px; }
.wmh-scn-arrow { color: var(--wmh-muted); }
.wmh-scn-then { color: var(--wmh-gold); font-weight: 650; }
.wmh-scn.is-none .wmh-scn-then { color: var(--wmh-muted); }
.wmh-more summary { margin-top: 6px; color: var(--wmh-primary-ink); cursor: pointer; }
.wmh-notes ul, .wmh-notes-list, .wmh-warn-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--wmh-ink2); font-size: 14.5px; }
.wmh-warn-list li { color: var(--wmh-warn); }

/* folded "자세히 보기" boxes */
.wmh-fold { margin-top: 16px; border-top: 1px solid var(--wmh-line); }
.wmh-fold > summary { display: flex; align-items: center; min-height: 44px; color: var(--wmh-primary-ink); font-weight: 700; cursor: pointer; }
.wmh-fold > summary:focus-visible { outline: 3px solid var(--wmh-sel); outline-offset: 2px; border-radius: 6px; }
.wmh-fold > .wmh-order > .wmh-h3:first-child, .wmh-fold > section:first-of-type > .wmh-h3:first-child { margin-top: 4px; }

/* ---- optional extras after the card ------------------------------------------------------------------------- */
.wmh-extras { display: grid; gap: 12px; }
.wmh-extras-head { margin: 0; color: var(--wmh-muted); font-size: 14px; font-weight: 700; }
.wmh-extra { padding: 16px 18px; border: 1px solid var(--wmh-line); border-radius: 14px; background: var(--wmh-surface); }
.wmh-extra-title { margin: 0; font-size: 16.5px; font-weight: 750; }
details.wmh-extra > summary { display: flex; align-items: center; min-height: 32px; font-size: 16.5px; font-weight: 750; cursor: pointer; }
details.wmh-extra > summary:focus-visible { outline: 3px solid var(--wmh-sel); outline-offset: 3px; border-radius: 6px; }
.wmh-mods .wmh-add { margin-top: 12px; }
.wmh-mod { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--wmh-line-strong); border-radius: 14px; background: var(--wmh-bg); }
.wmh-mod-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.wmh-mod-tools { display: flex; gap: 4px; align-items: center; }
.wmh-mod .wmh-step { margin-top: 14px; }
.wmh-mod .wmh-step-title { font-size: 17px; font-weight: 750; }
.wmh-mod .wmh-sumlist { margin-top: 12px; }
.wmh-mod .wmh-notice { margin-top: 10px; }
.wmh-mod .wmh-picker { margin-top: 12px; }
.wmh-mod .wmh-choices.is-cards > .wmh-choice, .wmh-mod .wmh-choices.is-rows > .wmh-choice { min-height: 52px; }

/* ---- chat ---------------------------------------------------------------------------------------------------- */
.wmh-guide { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.wmh-example-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.wmh-example {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; min-height: 48px; padding: 10px 14px; text-align: left;
  border: 1px solid var(--wmh-card-line); border-radius: 12px; background: var(--wmh-card); color: var(--wmh-ink); font: inherit; cursor: pointer;
}
.wmh-example:hover { border-color: var(--wmh-primary-ink); }
.wmh-example .wmh-tag { flex: none; margin-top: 1px; }
.wmh-example-text { color: var(--wmh-ink2); }
.wmh-examples-fold > summary { min-height: 32px; font-weight: 650; color: var(--wmh-primary-ink); cursor: pointer; }
.wmh-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wmh-bubble { max-width: 100%; padding: 12px 14px; border: 1px solid var(--wmh-line); border-radius: 14px; background: var(--wmh-surface); }
.wmh-bubble.is-user { margin-left: 12%; background: var(--wmh-primary-soft); border-color: rgba(52, 104, 230, .35); }
.wmh-bubble.is-ai { margin-right: 6%; }
.wmh-bubble.is-error { background: var(--wmh-danger-soft); border-color: rgba(255, 123, 123, .45); }
.wmh-bubble.is-pending { color: var(--wmh-muted); }
.wmh-bubble-who { display: flex; gap: 6px; align-items: center; margin: 0 0 2px; color: var(--wmh-muted); font-size: 13px; font-weight: 650; }
.wmh-bubble-text { margin: 0; white-space: pre-wrap; }
.wmh-changes, .wmh-question { margin-top: 10px; }
.wmh-changes ul, .wmh-unsupported { margin: 4px 0 0; padding-left: 18px; }
.wmh-question-text { margin: 0; font-weight: 700; }
.wmh-confirm { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--wmh-sel); border-radius: 14px; background: var(--wmh-sel-bg); }
.wmh-confirm .wmh-h3 { margin-top: 0; color: #fff; }
.wmh-card-rows { margin: 0; display: grid; gap: 6px; }
.wmh-card-row { display: grid; grid-template-columns: minmax(96px, 30%) minmax(0, 1fr); gap: 10px; }
.wmh-card-row dt { color: var(--wmh-ink2); font-size: 14.5px; }
.wmh-card-row dd { margin: 0; font-weight: 700; }
.wmh-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wmh-composer { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--wmh-line-strong); border-radius: 16px; background: var(--wmh-surface); }
.wmh-composer-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: flex-end; }
.wmh-composer-bar .wmh-hint { margin: 0 auto 0 0; }
.wmh-count { margin: 0; color: var(--wmh-muted); font-size: 13.5px; }
.wmh-count.is-over { color: var(--wmh-danger); }
.wmh-btn.is-mic { gap: 6px; }
.wmh-mic-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wmh-btn.is-mic.is-on { border-color: var(--wmh-danger); background: var(--wmh-danger-soft); color: #fff; }
.wmh-mic-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wmh-danger); }
.wmh-mic-note { margin: 0; font-size: 13.5px; }
.wmh-mic-note.is-warn { color: var(--wmh-warn); }
.wmh-import { padding: 12px 16px; border: 1px solid var(--wmh-line); border-radius: 14px; background: var(--wmh-surface); }
.wmh-import summary { min-height: 32px; font-weight: 700; cursor: pointer; }
.wmh-import-result { display: grid; gap: 8px; margin-top: 10px; }
.wmh-issue-list { margin: 4px 0 0; padding-left: 18px; }
.wmh-pre { margin: 6px 0 0; padding: 10px 12px; border: 1px solid var(--wmh-line); border-radius: var(--wmh-radius); background: var(--wmh-field); font-family: ui-monospace, Consolas, monospace; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- result -------------------------------------------------------------------------------------------------- */
.wmh-res-head { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: space-between; }
.wmh-res-head .wmh-h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.wmh-res-head .wmh-h2::before {
  content: "✓"; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--wmh-ok-soft); box-shadow: inset 0 0 0 1px rgba(70, 211, 154, .55); color: var(--wmh-ok); font-size: 17px; font-weight: 900;
}
.wmh-res-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wmh-res-summary { margin-top: 10px; }
.wmh-res-grid { display: grid; gap: 26px; margin-top: 18px; }
.wmh-res-col { min-width: 0; }
.wmh-res-sec > .wmh-h3:first-child { margin-top: 0; }
.wmh-res-more > .wmh-res-sec, .wmh-res-more > .wmh-order, .wmh-res-more > .wmh-prov { margin-top: 20px; }
.wmh-res-more > summary + * { margin-top: 6px; }
.wmh-res-more .wmh-order > .wmh-h3 { margin-top: 0; }
.wmh-prov > .wmh-h3 { margin-top: 0; }
.wmh-body { padding: 18px; border: 1px solid var(--wmh-line-strong); border-radius: 16px; background: var(--wmh-raised); }
.wmh-macro-text { min-height: 0; background: #0b111b; font-size: 15.5px; field-sizing: content; }
.wmh-copy { display: grid; gap: 8px; margin-top: 12px; }
.wmh-copy-msg { margin: 0; min-height: 1.6em; font-weight: 700; }
.wmh-copy-msg:empty { min-height: 0; margin-top: -8px; }
.wmh-copy-msg.is-ok { color: var(--wmh-ok); }
.wmh-copy-msg.is-warn { color: var(--wmh-warn); }
.wmh-body .wmh-warn-list { margin-top: 4px; }
.wmh-phone-note { display: none; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--wmh-primary-soft); color: var(--wmh-ink); font-size: 14.5px; }
@media (max-width: 700px), (pointer: coarse) { .wmh-phone-note { display: block; } }
.wmh-body-details { margin-top: 6px; }
.wmh-body-details summary { display: flex; align-items: center; min-height: 36px; color: var(--wmh-muted); font-size: 14px; cursor: pointer; }
.wmh-body-details .wmh-hint { margin-top: 0; }
.wmh-res-guide .wmh-h3 { margin: 0 0 4px; color: #fff; font-size: 20px; }
.wmh-pics { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.wmh-pic figure { margin: 0; }
.wmh-pic figcaption { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-weight: 700; line-height: 1.45; }
.wmh-pic-n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--wmh-primary); color: #fff; font-size: 13px; font-weight: 800; }
.wmh-pic-svg { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--wmh-line); font-family: inherit; }
.wmh-res-guide > .wmh-res-sec > .wmh-hint { margin-top: 10px; }
.wmh-guide-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.wmh-try { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--wmh-sel); border-radius: 12px; background: var(--wmh-sel-bg); }
.wmh-try .wmh-h3 { margin: 0 0 2px; color: #fff; font-size: 15.5px; }
.wmh-try p { margin: 0; }
.wmh-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wmh-checks li::before { content: "•"; margin-right: 8px; color: var(--wmh-muted); }
.wmh-checks li.is-ok::before { content: "✓"; color: var(--wmh-ok); }
.wmh-checks li.is-warn::before { content: "!"; color: var(--wmh-warn); font-weight: 800; }
.wmh-prov { color: var(--wmh-ink2); font-size: 14.5px; }
.wmh-prov ul { margin: 4px 0 0; padding-left: 18px; }
.wmh-tester { margin-top: 10px; }
.wmh-tester summary { min-height: 32px; color: var(--wmh-primary-ink); font-weight: 650; cursor: pointer; }
.wmh-tester-grid { display: grid; gap: 8px; margin: 8px 0; }
.wmh-tester-result { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--wmh-radius); background: var(--wmh-soft); }

/* "게임에 넣는 법" drawings (guide-pics.js): game-like window, the thing to press ringed in blue with its number */
.wmh-pic-svg text { font-family: inherit; }
.wmh-pic-svg .gp-scene { fill: #0d1726; }
.wmh-pic-svg .gp-win { fill: #1d1813; stroke: #8c7442; stroke-width: 2; }
.wmh-pic-svg .gp-title { fill: #f2c86b; font-size: 13px; font-weight: 700; }
.wmh-pic-svg .gp-tab { fill: #2a2219; stroke: #6d5a35; }
.wmh-pic-svg .gp-tab.is-on { fill: #45361f; stroke: #d2ab5f; }
.wmh-pic-svg .gp-tab-t { fill: #eadfc4; font-size: 11px; font-weight: 700; }
.wmh-pic-svg .gp-slot { fill: #0e0c09; stroke: #4c3f27; }
.wmh-pic-svg .gp-slot.is-used { fill: #2b3b52; stroke: #4c5d78; }
.wmh-pic-svg .gp-btn { fill: #7b201b; stroke: #c99d50; }
.wmh-pic-svg .gp-btn.is-hl { fill: #8d2a22; stroke: #ffe3a6; }
.wmh-pic-svg .gp-btn-t { fill: #fff3d8; font-size: 12px; font-weight: 700; }
.wmh-pic-svg .gp-ring { fill: none; stroke: #5b9dff; stroke-width: 3; }
.wmh-pic-svg .gp-badge { fill: #3468e6; stroke: #fff; stroke-width: 1.5; }
.wmh-pic-svg .gp-badge-t { fill: #fff; font-size: 12px; font-weight: 800; }
.wmh-pic-svg .gp-log { fill: rgba(0, 0, 0, .28); }
.wmh-pic-svg .gp-chat-t { fill: #a7b6cc; font-size: 12px; }
.wmh-pic-svg .gp-chat-t.is-me { fill: #8fb3ff; }
.wmh-pic-svg .gp-input { fill: rgba(0, 0, 0, .55); stroke: #6b7686; }
.wmh-pic-svg .gp-input-t { fill: #f3f6fb; font-size: 13px; font-weight: 600; }
.wmh-pic-svg .gp-caret { fill: #f3f6fb; }
.wmh-pic-svg .gp-key { fill: #263247; stroke: #61718d; }
.wmh-pic-svg .gp-key-t { fill: #fff; font-size: 12px; font-weight: 800; }
.wmh-pic-svg .gp-key-t.is-small { font-size: 10px; }
.wmh-pic-svg .gp-label { fill: #eadfc4; font-size: 12px; font-weight: 600; }
.wmh-pic-svg .gp-field { fill: #07090c; stroke: #5c4c2e; }
.wmh-pic-svg .gp-field-t { fill: #f3f6fb; font-size: 13px; font-weight: 600; }
.wmh-pic-svg .gp-code { fill: #d7e3ff; font-size: 11px; font-family: ui-monospace, Consolas, monospace; }
.wmh-pic-svg .gp-muted { fill: #a1957d; font-size: 11px; }
.wmh-pic-svg .gp-q { fill: #3b2f1d; stroke: #d2ab5f; }
.wmh-pic-svg .gp-q-t { fill: #f2c86b; font-size: 16px; font-weight: 800; }
.wmh-pic-svg .gp-icon { stroke: #4c3f27; }
.wmh-pic-svg .gp-icon.tone-1 { fill: #2f5d46; }
.wmh-pic-svg .gp-icon.tone-2 { fill: #34507e; }
.wmh-pic-svg .gp-icon.tone-3 { fill: #6b3a2b; }
.wmh-pic-svg .gp-icon.tone-4 { fill: #4f3b70; }
.wmh-pic-svg .gp-icon.tone-5 { fill: #5f5530; }
.wmh-pic-svg .gp-bar { fill: #0a0f17; stroke: #3a4558; }
.wmh-pic-svg .gp-arrow { fill: none; stroke: #5b9dff; stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linecap: round; }
.wmh-pic-svg .gp-arrow.is-solid { stroke-dasharray: none; }
.wmh-pic-svg .gp-win.is-front { fill: #241d16; stroke: #b08d4c; }
.wmh-pic-svg .gp-q.is-picked { stroke: #ffe3a6; stroke-width: 2; }
.wmh-pic-svg .gp-arrowhead { fill: #5b9dff; }

.wmh-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- small screens ------------------------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .wmh-pics { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wmh-standalone .wmh-main { padding: 18px 14px 56px; }
  .wmh-title { font-size: 26px; }
  .wmh-tabs { display: flex; width: 100%; }
  .wmh-tab { flex: 1 1 0; padding: 8px 10px; font-size: 15px; }
  .wmh-step-title { font-size: 22px; }
  .wmh-explain { padding: 16px; }
  .wmh-body { padding: 14px; }
  .wmh-choices.is-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wmh-choices.is-cards > .wmh-choice { min-height: 84px; }
  .wmh-grid, .wmh-grid.is-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wmh-grid.is-slots .wmh-choice.is-custom { grid-column: 1 / -1; }
  .wmh-choice.is-tile { padding-right: 22px; }
  .wmh-ico { width: 36px; height: 36px; }
  .wmh-sumrow { grid-template-columns: minmax(0, 1fr) auto; }
  .wmh-sumrow-label { grid-column: 1 / -1; padding-top: 4px; font-size: 13px; }
  .wmh-step-actions .wmh-btn { flex: 1 1 100%; }
  .wmh-scn { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .wmh-scn-arrow { display: none; }
  .wmh-card-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wmh-field.is-inline { grid-template-columns: minmax(0, 1fr); }
  .wmh-bubble.is-user { margin-left: 6%; }
  .wmh-bubble.is-ai { margin-right: 0; }
  .wmh-res-head .wmh-h2 { font-size: 23px; }
}

@media (prefers-reduced-motion: no-preference) {
  .wmh-step.is-open, .wmh-bubble { animation: wmh-in .16s ease-out; }
  .wmh-mic-dot { animation: wmh-pulse 1.1s ease-in-out infinite; }
}
@keyframes wmh-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes wmh-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* Compact feedback entry: scoped to macro UI. */
.wmh .wmh-feedback-callout{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-top:24px;padding:20px;border:1px solid var(--wmh-line-strong);border-radius:16px;background:var(--wmh-surface);animation:none}.wmh .wmh-feedback-copy{flex:1 1 270px;min-width:0}.wmh .wmh-feedback-callout h2{margin:0 0 6px;font-size:17px;line-height:1.4;color:var(--wmh-ink)}.wmh .wmh-feedback-callout p{margin:0;font-size:13px;line-height:1.6;color:var(--wmh-muted)}.wmh .wmh-feedback-callout>.wmh-btn{flex:0 0 auto;min-height:48px;margin:0;background:#b73e4c;color:#fff;border-color:#b73e4c}.wmh .wmh-feedback-callout>[role=status]:empty{display:none}.wmh .wmh-feedback-callout>[role=status]{flex-basis:100%}@media(max-width:599px){.wmh .wmh-feedback-callout{padding:18px;gap:14px}.wmh .wmh-feedback-callout>.wmh-btn{width:100%;flex-basis:100%}}

/* Examples and the personal collection reuse the editor's surfaces, spacing and focus states. */
.wmh .wmh-shelf { margin: 0 0 18px; }
.wmh .wmh-shelf-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.wmh .wmh-shelf-panel { margin-top: 12px; padding: 18px; border: 1px solid var(--wmh-line-strong); border-radius: var(--wmh-radius-lg); background: var(--wmh-surface); }
.wmh .wmh-shelf-heading, .wmh .wmh-shelf-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.wmh .wmh-shelf-heading h2, .wmh .wmh-shelf-card-head h3 { margin: 0; }
.wmh .wmh-shelf-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .45fr); gap: 12px; margin: 16px 0 10px; }
.wmh .wmh-shelf-list { display: grid; gap: 10px; padding: 0; margin: 16px 0 0; list-style: none; }
.wmh .wmh-shelf-card { padding: 14px; border: 1px solid var(--wmh-line); border-radius: var(--wmh-radius); background: var(--wmh-card); min-width: 0; }
.wmh .wmh-shelf-empty { padding: 18px 0; color: var(--wmh-muted); }
.wmh .wmh-shelf-preview, .wmh .wmh-shelf-share { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--wmh-line-strong); }
.wmh .wmh-shelf-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.wmh .wmh-command-group { margin: 12px 0; }
.wmh .wmh-command-group .wmh-check { min-height: 38px; align-items: center; }
.wmh .wmh-result-keep { margin-bottom: 12px; }
@media (max-width: 560px) {
  .wmh .wmh-shelf-panel { padding: 14px; }
  .wmh .wmh-shelf-filters { grid-template-columns: minmax(0, 1fr); }
  .wmh .wmh-shelf-card .wmh-options { gap: 8px; }
  .wmh .wmh-shelf .wmh-btn { min-height: 44px; }
}
.wmh-harm-grid { max-height: 24rem; overflow-y: auto; overscroll-behavior: contain; padding: 3px; }
/* Web-only discovery: reuse existing controls and keep the creation flow intact. */
.wmh-discovery{margin:0 0 28px;padding:20px;border:1px solid var(--wmh-line);border-radius:16px;background:var(--wmh-surface);color:var(--wmh-ink)}
.wmh-discovery-heading{margin-bottom:18px}
.wmh-class-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.wmh .wmh-class-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:126px;min-width:0;padding:14px 8px;border:1px solid var(--wmh-line-strong);border-radius:12px;background:var(--wmh-card);color:var(--wmh-ink);font:inherit;cursor:pointer;text-align:center;white-space:normal;word-break:keep-all;overflow-wrap:anywhere}
.wmh .wmh-class-card:hover{border-color:var(--wmh-sel);background:var(--wmh-primary-soft)}.wmh-class-card img{border-radius:8px}.wmh-class-card strong{font-size:16px;line-height:1.4}.wmh-class-card span{font-size:13px;color:var(--wmh-muted)}.wmh .wmh-discovery-more{margin-top:16px}.wmh [data-class-back]{margin:0 0 12px;min-height:44px}
@media(max-width:700px){.wmh-class-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wmh .wmh-class-card{min-height:116px;padding:14px 12px}}
.wmh .wmh-discovery-heading h2{color:var(--wmh-ink);font-size:21px;margin:0 0 7px}
.wmh-discovery-label{font-size:13px;font-weight:700;color:var(--wmh-ink2);margin:18px 0 10px}
.wmh-discovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.wmh-discovery-card{padding:16px;border-radius:12px;border:1px solid var(--wmh-line);background:var(--wmh-card);display:flex;flex-direction:column;gap:9px;min-width:0}
.wmh-discovery-meta{display:flex;gap:8px;align-items:center;color:var(--wmh-ink2);font-size:13px;font-weight:600}.wmh-discovery-meta img{border-radius:6px}
.wmh .wmh-discovery-card h3{color:var(--wmh-ink);font-size:16px;margin:0;line-height:1.45}.wmh-discovery-card p{font-size:14px;line-height:1.6;margin:0 0 6px;color:var(--wmh-ink2)}.wmh-discovery-card button{margin-top:auto;min-height:44px}
.wmh-popular{margin-top:20px;border-top:1px solid var(--wmh-line);padding-top:16px}.wmh .wmh-popular h3{font-size:17px;color:var(--wmh-ink);font-weight:700;padding:6px 0;margin:0}
.wmh-popular-list{padding-left:25px}.wmh-popular-list li{padding:9px 0}.wmh-popular-list strong{margin-left:14px;white-space:nowrap}
@media(max-width:560px){.wmh-discovery{padding:16px}.wmh-discovery-heading{display:block}.wmh-discovery-grid{grid-template-columns:1fr}}

