/* ===== Демо «Кто дарит?»: оболочка — панель снизу и редактор. Сами оформления — /t/themes.css ===== */
.dock-space { height: 170px; }

/* ---------- панель снизу ---------- */
.dock {
  position: fixed; z-index: 100; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom)); width: min(780px, calc(100% - 16px));
  background: rgba(14, 11, 46, .86); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; color: #fff;
  padding: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.dock-row { display: flex; align-items: center; gap: 8px; }
.dock-brand { display: flex; align-items: center; gap: 8px; font: 800 12px/1.1 "Unbounded", sans-serif; color: #fff; text-decoration: none; padding: 0 6px 0 0; white-space: nowrap; }
.dock-brand .home { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); font: 700 18px "Manrope", sans-serif; flex: none; transition: background .15s; }
.dock-brand:hover .home { background: rgba(255, 255, 255, .25); }
.seg .short { display: none; }
.dock-brand small { display: block; font: 700 10px "Manrope", sans-serif; color: #d4ff3a; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.seg { display: flex; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 3px; margin-left: auto; }
.seg button { border: 0; background: none; color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.seg button.on { background: #fff; color: #0e0b2e; }
.edit-btn { border: 0; background: #d4ff3a; color: #0e0b2e; font-weight: 800; padding: 10px 16px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 10px 2px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff;
  border-radius: 14px; padding: 8px 12px 8px 8px; font-weight: 700; font-size: 14px; transition: background .15s, transform .15s;
}
.chip:hover { background: rgba(255, 255, 255, .14); }
.chip.on { background: #d4ff3a; color: #0e0b2e; border-color: #d4ff3a; }
.sw { display: flex; width: 30px; height: 30px; border-radius: 9px; overflow: hidden; transform: rotate(-8deg); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); flex: none; }
.sw i { flex: 1; }
.hint {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); max-width: calc(100vw - 40px); text-align: center;
  background: #d4ff3a; color: #0e0b2e; font-weight: 800; font-size: 14px; padding: 10px 16px; border-radius: 14px; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: hint 1.4s ease-in-out infinite alternate; transition: opacity .4s;
}
.hint::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -8px; border: 8px solid transparent; border-top-color: #d4ff3a; }
.hint.gone { opacity: 0; pointer-events: none; }
@keyframes hint { to { transform: translate(-50%, -6px); } }

/* ---------- редактор ---------- */
.veil { position: fixed; inset: 0; background: rgba(8, 6, 30, .45); z-index: 110; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet {
  position: fixed; z-index: 120; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100% - 24px));
  background: #fff6e3; color: #0e0b2e; border: 3px solid #0e0b2e; border-radius: 24px; box-shadow: 10px 10px 0 #2530ff;
  display: flex; flex-direction: column; transform: translateX(calc(100% + 40px)); transition: transform .35s cubic-bezier(.2, .9, .3, 1);
}
body.editing .sheet { transform: none; }
body.editing .veil { opacity: 1; pointer-events: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.sheet-head h2 { font: 900 22px "Unbounded", sans-serif; margin: 0; }
.sheet-body { overflow-y: auto; padding: 4px 20px 20px; flex: 1; }
.sheet label { display: block; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.sheet input, .sheet textarea {
  width: 100%; font: 600 16px "Manrope", sans-serif; color: #0e0b2e; padding: 11px 13px; border-radius: 12px; border: 2.5px solid #0e0b2e; background: #fff;
}
.sheet textarea { resize: vertical; min-height: 74px; }
.sheet .note { font-size: 13px; color: #5a5470; margin: 6px 0 0; }
.g-row { display: grid; grid-template-columns: 46px 1fr 92px 34px; gap: 6px; margin-bottom: 8px; align-items: center; }
.g-row input { padding: 10px; font-size: 15px; }
.g-emo { height: 46px; border: 2.5px solid #0e0b2e; background: #fff; border-radius: 12px; font-size: 24px; padding: 0; }
.g-del { height: 34px; border: 0; background: none; font-size: 20px; color: #a99; }
.g-del:hover { color: #e8321f; }
.emo-pick { display: none; grid-template-columns: repeat(8, 1fr); gap: 4px; background: #fff; border: 2.5px solid #0e0b2e; border-radius: 12px; padding: 6px; margin: -2px 0 10px; }
.emo-pick.open { display: grid; }
.emo-pick button { border: 0; background: none; font-size: 22px; padding: 4px 0; border-radius: 8px; }
.emo-pick button:hover { background: #fff0c4; }
.add-g { width: 100%; border: 2.5px dashed #0e0b2e; background: none; border-radius: 12px; padding: 11px; font-weight: 800; }
.sheet-foot { padding: 12px 20px 18px; border-top: 2px solid rgba(14, 11, 46, .1); }
.done-btn { width: 100%; border: 3px solid #0e0b2e; background: #2530ff; color: #fff; font: 800 16px "Unbounded", sans-serif; padding: 14px; border-radius: 14px; box-shadow: 4px 4px 0 #0e0b2e; }
.sheet-foot p { margin: 10px 0 0; font-size: 12px; color: #5a5470; text-align: center; }
.x-btn { border: 0; background: none; font-size: 26px; line-height: 1; padding: 4px; color: #0e0b2e; }

@media (max-width: 640px) {
  .hint { white-space: normal; width: max-content; }
  .dock { border-radius: 20px; padding: 8px; }
  .dock-brand .bt { display: none; }
  .dock-brand { padding: 0; }
  .seg .full { display: none; }
  .seg .short { display: inline; }
  .seg { margin-left: 0; }
  .seg button { padding: 8px 11px; font-size: 13px; }
  .edit-btn { margin-left: auto; padding: 10px 13px; font-size: 13px; }
  .sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 86vh; border-radius: 24px 24px 0 0; border-width: 3px 0 0; box-shadow: none; transform: translateY(105%); }
  .g-row { grid-template-columns: 44px 1fr 78px 30px; }
}
