/* Buzzmoji quiz maker */
body.maker { background: var(--mist); min-height: 100dvh }
.mbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px clamp(12px, 3vw, 28px); background: rgba(255, 255, 255, .94); border-bottom: 3px solid var(--ink); backdrop-filter: blur(8px) }
.mbar .grow { flex: 1 }
.mbar nav { display: flex; gap: 6px; flex-wrap: wrap }
.mwrap { width: min(1280px, 100% - 24px); margin: 0 auto; padding: 22px 0 60px }
.mh1 { margin: 0; font: 900 clamp(1.8rem, 3.6vw, 2.6rem)/1.05 var(--f-display); font-stretch: 116%; letter-spacing: -.02em }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px }
.lib-head p { margin: 6px 0 0; color: var(--muted) }
.lib-acts { display: flex; gap: 10px; flex-wrap: wrap }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px }
.qcard2 { display: grid; gap: 10px; align-content: start; background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--sh-sm); padding: 16px; position: relative }
.qcard2__top { display: flex; align-items: center; gap: 12px }
.qcard2__top .emo { width: 56px; height: 56px; font-size: 48px; flex: 0 0 auto }
.qcard2 h3 { margin: 0; font: 900 1.15rem/1.15 var(--f-display); font-stretch: 112%; overflow-wrap: anywhere }
.qcard2 small { color: var(--muted); font-weight: 600 }
.qcard2__acts { display: flex; flex-wrap: wrap; gap: 6px }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 16px; border: 3px dashed #C9C3E3; border-radius: 24px; background: #fff }
.empty img { width: 110px; height: 110px }
.sec-h { margin: 34px 0 14px; font: 900 1.4rem/1.1 var(--f-display); font-stretch: 112% }

/* editor */
.ed { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start }
.ed-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px }
.ed-title { flex: 1; min-width: 220px; font: 900 1.5rem/1.1 var(--f-display); font-stretch: 112%; border: 3px solid transparent; background: transparent; border-radius: 14px; padding: 8px 10px }
.ed-title:hover { border-color: var(--line) }
.ed-title:focus { outline: none; border-color: var(--ink); background: #fff }
.save-st { font-weight: 700; color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: 6px }
.save-st.ok { color: #04633F } .save-st.warn { color: #9A4A00 }
.rail { position: sticky; top: 84px; display: grid; gap: 14px; max-height: calc(100dvh - 100px); overflow: auto; padding: 2px 6px 6px 2px }
.qlist { display: grid; gap: 8px }
.qi { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 16px; border: 2.5px solid var(--line); background: #fff; cursor: pointer; text-align: left; width: 100% }
.qi:hover { border-color: #B9B1DD }
.qi[aria-current="true"] { border-color: var(--ink); background: #FFF6D6; box-shadow: var(--sh-sm) }
.qi.bad { border-color: #E8344E }
.qi__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--ink); color: #fff; font: 900 .85rem/1 var(--f-display) }
.qi__t { min-width: 0; font-weight: 700; font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.qi__t small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem }
.qi__m { display: flex; flex-direction: column; gap: 2px }
.qi__m button { border: 0; background: transparent; padding: 2px 4px; border-radius: 6px; font-size: .8rem; line-height: 1 }
.qi__m button:hover { background: var(--mist) }
.add-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px }
.add-row .btn { min-height: 42px; font-size: .85rem; padding: 6px 8px }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px }
.themes button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; border: 2.5px solid var(--line); background: #fff; font-weight: 800; font-size: .8rem }
.themes button[aria-pressed="true"] { border-color: var(--ink); background: var(--yellow); box-shadow: var(--sh-sm) }
.themes .mini { display: flex; gap: 2px }
.themes .mini img { width: 20px; height: 20px }
.qedit { display: grid; gap: 18px }
.qedit__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.qedit__h h2 { margin: 0; font: 900 1.3rem/1 var(--f-display); font-stretch: 112% }
.qtext-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start }
.emo-btn { width: 72px; height: 72px; border-radius: 18px; border: 3px solid var(--ink); background: var(--mist); display: grid; place-items: center; padding: 6px; box-shadow: var(--sh-sm) }
.emo-btn img, .emo-btn .emo--text { width: 54px; height: 54px; font-size: 44px; line-height: 54px; text-align: center }
.qtext { font: 800 1.3rem/1.3 var(--f-body); min-height: 92px }
.counter { justify-self: end; font-size: .8rem; color: var(--muted); font-weight: 700 }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.opt { --c: var(--c0); --on: #fff; position: relative; display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 20px; border: 3px solid var(--ink); background: var(--c); color: var(--on); box-shadow: var(--sh-sm) }
.opt[data-i="1"] { --c: var(--c1) } .opt[data-i="2"] { --c: var(--c2); --on: var(--ink) } .opt[data-i="3"] { --c: var(--c3) } .opt[data-i="4"] { --c: var(--c4) } .opt[data-i="5"] { --c: var(--c5); --on: var(--ink) }
.opt__ic { width: 50px; height: 50px; border-radius: 14px; background: rgba(255, 255, 255, .92); border: 2.5px solid var(--ink); display: grid; place-items: center }
.opt__ic img { width: 38px; height: 38px }
.opt input[type="text"] { min-width: 0; width: 100%; border: 0; background: transparent; color: inherit; font: 800 1.1rem/1.2 var(--f-body); padding: 8px 4px; border-bottom: 2px dashed rgba(255, 255, 255, .55) }
.opt[data-i="2"] input[type="text"], .opt[data-i="5"] input[type="text"] { border-bottom-color: rgba(27, 20, 70, .35) }
.opt input[type="text"]::placeholder { color: currentColor; opacity: .65 }
.opt input[type="text"]:focus { outline: none; border-bottom-style: solid }
.opt__acts { display: flex; align-items: center; gap: 6px }
.ok-btn { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(255, 255, 255, .9); display: grid; place-items: center; padding: 4px; transition: transform 200ms var(--ease-spring) }
.ok-btn img { width: 32px; height: 32px; opacity: .25; filter: grayscale(1) }
.ok-btn[aria-pressed="true"] { background: #fff; transform: scale(1.1) }
.ok-btn[aria-pressed="true"] img { opacity: 1; filter: none }
.del-opt { border: 0; background: rgba(255, 255, 255, .25); color: inherit; width: 30px; height: 30px; border-radius: 9px; font-weight: 900 }
.opt.is-ok { box-shadow: 0 0 0 4px #fff, 5px 5px 0 4px var(--ink) }
.qrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px }
.img-prev { display: flex; align-items: center; gap: 10px }
.img-prev img { width: 120px; height: 80px; object-fit: cover; border-radius: 12px; border: 2.5px solid var(--ink) }
.issues { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: #FFF1F3; border: 2.5px solid #E8344E; font-weight: 700; color: #8A0020 }

/* emoji picker */
.emopick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 52vh; overflow: auto }
.emopick button { aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; padding: 4px; font-size: 26px }
.emopick button:hover { border-color: var(--ink); background: var(--mist) }
.emopick img { width: 100%; height: 100% }

/* import */
.drop { display: grid; justify-items: center; gap: 10px; padding: 26px 16px; border: 3px dashed var(--ink); border-radius: 22px; background: var(--mist); text-align: center; cursor: pointer }
.drop.over { background: #FFF6D6 }
.drop img { width: 84px; height: 84px }
.fmt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
.fmt-grid > div { padding: 12px; border-radius: 16px; background: #fff; border: 2.5px solid var(--line); font-size: .9rem }
.fmt-grid b { display: block; margin-bottom: 4px }
.fmt-pre { white-space: pre-wrap; font: 600 .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--mist); border-radius: 12px; padding: 10px; margin: 6px 0 0 }
.prev-list { display: grid; gap: 8px; max-height: 40vh; overflow: auto; padding-right: 4px }
.prev-q { padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: .92rem }
.prev-q b { display: block }
.prev-q .ok { color: #04633F; font-weight: 800 }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px }
.tabs button { border: 2.5px solid var(--ink); background: #fff; border-radius: 12px; padding: 8px 14px; font-weight: 800 }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff }

@media (max-width: 980px) {
  .ed { grid-template-columns: 1fr }
  .rail { position: static; max-height: none }
  .fmt-grid { grid-template-columns: 1fr }
}
@media (max-width: 640px) {
  .opts { grid-template-columns: 1fr }
  .qrow { grid-template-columns: 1fr 1fr }
  .mbar .bz-logo__t { display: none }
}
