*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

.fbr {
  --bg: #f4f1ea; --fg: #1d1d1b; --ac: #1d1d1b; --acfg: #fff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --line: color-mix(in srgb, var(--fg) 28%, transparent);
  --soft: color-mix(in srgb, var(--fg) 8%, transparent);
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column;
  background-color: var(--bg); background-size: cover; background-position: center;
  color: var(--fg); font-family: var(--font); line-height: 1.35; overflow: hidden;
}
.fbr-stage { flex: 1; overflow: auto; display: flex; padding: 40px 28px 110px; }
.fbr-q { margin: auto; width: 100%; max-width: 700px; }

.fbr-in { animation: fbr-up .38s cubic-bezier(.2,.7,.2,1) both; }
.fbr-in-back { animation: fbr-down .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fbr-up { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
@keyframes fbr-down { from { opacity: 0; transform: translateY(-44px); } to { opacity: 1; transform: none; } }

.fbr-title { margin: 0; font-size: clamp(24px, 4.2vw, 32px); font-weight: 500; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35em; }
.fbr-num { font-size: .75em; display: inline-flex; gap: 2px; opacity: .75; }
.fbr-num b { font-weight: 400; }
.fbr-star { opacity: .6; }
.fbr-t { outline: none; min-width: 2ch; }
.fbr-t[contenteditable], .fbr-desc[contenteditable] { border-radius: 4px; cursor: text; transition: background .15s; }
.fbr-t[contenteditable]:hover, .fbr-desc[contenteditable]:hover { background: var(--soft); }
.fbr-t[contenteditable]:focus, .fbr-desc[contenteditable]:focus { background: var(--soft); }
[contenteditable]:empty::before { content: attr(data-ph); opacity: .4; }
.fbr-desc { margin: 10px 0 0; font-size: clamp(16px, 2.6vw, 20px); opacity: .72; outline: none; white-space: pre-wrap; }
.fbr-desc.big { margin-top: 16px; }
.fbr-in-wrap { margin-top: 28px; }
.fbr-in-wrap:empty { margin: 0; }

.fbr-field {
  width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--line); border-radius: 0;
  color: inherit; font: inherit; font-size: clamp(22px, 4vw, 30px); padding: 6px 0 10px; outline: none; transition: border-color .2s;
}
.fbr-field:focus { border-color: var(--fg); }
.fbr-field::placeholder { color: color-mix(in srgb, var(--fg) 34%, transparent); }
textarea.fbr-field { resize: none; min-height: 3.8em; font-size: clamp(18px, 3vw, 24px); line-height: 1.4; }
input[type=date].fbr-field { color-scheme: light dark; max-width: 320px; }

.fbr-dur { display: flex; align-items: flex-start; gap: 10px; }
.fbr-dur b { font-size: 28px; font-weight: 400; opacity: .4; padding-top: 6px; }
.fbr-dur label { display: flex; flex-direction: column; gap: 4px; }
.fbr-dur input { width: 4ch; text-align: center; }
.fbr-dur label:first-child input { width: 5ch; }
.fbr-dur span { font-size: 13px; opacity: .6; text-align: center; }

.fbr-choices { display: flex; flex-direction: column; gap: 8px; max-width: 440px; }
.fbr-choice {
  display: flex; align-items: center; gap: 12px; text-align: left; background: var(--soft); border: 1px solid var(--line);
  color: inherit; font: inherit; font-size: 18px; padding: 10px 14px; border-radius: 8px; cursor: pointer; transition: background .15s, border-color .15s;
}
.fbr-choice kbd { font: 600 12px var(--font); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; background: var(--bg); }
.fbr-choice:hover { background: color-mix(in srgb, var(--fg) 14%, transparent); }
.fbr-choice.on { border-color: var(--ac); box-shadow: inset 0 0 0 1px var(--ac); background: color-mix(in srgb, var(--ac) 18%, transparent); }
.fbr-choice.on kbd { background: var(--ac); color: var(--acfg); border-color: var(--ac); }
.fbr-note { margin-top: 10px; font-size: 14px; opacity: .6; }

.fbr-rating { display: flex; flex-wrap: wrap; gap: 8px; }
.fbr-rate {
  width: 52px; height: 52px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line);
  color: inherit; font: inherit; font-size: 20px; cursor: pointer; transition: .15s;
}
.fbr-rate:hover { background: color-mix(in srgb, var(--fg) 14%, transparent); }
.fbr-rate.on { background: var(--ac); color: var(--acfg); border-color: var(--ac); }

.fbr-drop { display: block; cursor: pointer; }
.fbr-drop input { display: none; }
.fbr-drop-in {
  border: 2px dashed var(--line); border-radius: 12px; padding: 28px 20px; text-align: center; display: flex; flex-direction: column;
  gap: 6px; align-items: center; transition: .15s;
}
.fbr-drop:hover .fbr-drop-in, .fbr-drop.over .fbr-drop-in { border-color: var(--fg); background: var(--soft); }
.fbr-drop-in b { font-size: 18px; font-weight: 600; }
.fbr-drop-in span { font-size: 14px; opacity: .65; }
.fbr-drop-in img { max-height: 180px; max-width: 100%; border-radius: 8px; }

.fbr-err { min-height: 0; margin-top: 14px; display: none; padding: 8px 12px; border-radius: 6px; font-size: 15px; background: #c0392b; color: #fff; width: fit-content; max-width: 100%; }
.fbr-err.on { display: block; }

.fbr-actions { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.fbr-ok {
  background: var(--ac); color: var(--acfg); border: 0; border-radius: 8px; font: inherit; font-size: 20px; font-weight: 600;
  padding: 10px 20px; cursor: pointer; transition: transform .1s, opacity .15s;
}
.fbr-ok:hover { opacity: .88; }
.fbr-ok:active { transform: scale(.97); }
.fbr-ok:disabled { opacity: .55; cursor: default; }
.fbr-hint { font-size: 13px; opacity: .6; }
.fbr-hint b { font-weight: 500; }
.fbr.is-end .fbr-actions { display: none; }

.fbr-demo { margin-top: 22px; padding: 12px 14px; border-radius: 8px; background: var(--soft); font-size: 14px; word-break: break-all; }
.fbr-demo a { color: inherit; font-weight: 600; }

.fbr-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; }
.fbr-prog { width: 240px; max-width: 55%; height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.fbr-prog i { display: block; height: 100%; width: 0; background: var(--ac); transition: width .4s ease; }
.fbr-nav { display: flex; pointer-events: auto; }
.fbr-nav button {
  width: 38px; height: 34px; background: var(--ac); color: var(--acfg); border: 0; font: inherit; font-size: 17px; cursor: pointer;
}
.fbr-nav button:first-child { border-radius: 6px 0 0 6px; border-right: 1px solid color-mix(in srgb, var(--acfg) 25%, transparent); }
.fbr-nav button:last-child { border-radius: 0 6px 6px 0; }
.fbr-nav button:disabled { opacity: .35; cursor: default; }
.fbr.preview .fbr-nav { display: none; }

@media (max-width: 560px) {
  .fbr-stage { padding: 28px 18px 100px; }
  .fbr-ok { font-size: 18px; }
  .fbr-hint { display: none; }
}
