body.yg-is-owner [data-yg-copy],
body.yg-is-owner [data-yg-media],
body.yg-is-owner .yg-shell-law {
  cursor: text;
  outline: 1px dashed transparent;
  outline-offset: 4px;
}

body.yg-is-owner [data-yg-copy]:hover,
body.yg-is-owner [data-yg-media]:hover,
body.yg-is-owner .yg-shell-law:hover {
  outline-color: rgba(29, 78, 216, 0.45);
  background: rgba(255, 255, 255, 0.22);
}

body.yg-is-owner [contenteditable="true"] {
  outline: 2px solid #1d4ed8 !important;
  outline-offset: 4px;
  background: #fff;
}

.yg-edit-hint {
  display: none;
  margin: 0;
  padding: 8px 16px;
  text-align: center;
  background: #1d4ed8;
  color: #fff;
  font: 600 13px/1.35 system-ui, Helvetica, sans-serif;
}

body.yg-is-owner .yg-edit-hint {
  display: block;
}

body.yg-fmt-open {
  padding-top: 96px;
}

.yg-fmt {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483640;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 8px 12px 10px;
  background: #111;
  color: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font: 600 12px/1 system-ui, Helvetica, sans-serif;
  max-width: none;
}

.yg-fmt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
  width: 100%;
}

.yg-fmt[hidden] {
  display: none !important;
}

.yg-fmt button,
.yg-fmt select,
.yg-fmt input[type="color"] {
  border: 1px solid #444;
  background: #222;
  color: #ffe566;
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  cursor: pointer;
}

.yg-fmt select {
  max-width: 148px;
  color: #ffe566;
}

.yg-fmt input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 2px;
}

.yg-fmt button:hover,
.yg-fmt select:hover,
.yg-fmt input[type="color"]:hover {
  background: #333;
}

.yg-fmt-grp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yg-fmt-lbl {
  color: #aaa;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yg-fmt-sep {
  width: 1px;
  height: 22px;
  background: #444;
  margin: 0 3px;
}

.yg-fmt-b { font-weight: 800; }
.yg-fmt-i { font-style: italic; }
.yg-fmt-u { text-decoration: underline; }
.yg-fmt-s { text-decoration: line-through; }

.yg-fmt-swatches {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 2px;
}

.yg-fmt-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #888;
  padding: 0;
  cursor: pointer;
}

.yg-fmt-align button {
  min-width: 52px;
}

.yg-fmt-painter {
  background: #3f2d00 !important;
}

.yg-fmt-painting .yg-fmt-painter {
  background: #a16207 !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px #ffe566;
}

.yg-fmt-done {
  background: #1d4ed8 !important;
  color: #fff !important;
  border-color: #1d4ed8 !important;
  font-weight: 800;
  margin-left: 4px;
}

.yg-shell-law ul,
.yg-shell-law ol {
  margin: 0 0 18px;
  padding-left: 1.6em;
  font-size: clamp(19px, 1.45vw, 23px);
  line-height: 1.72;
}

.yg-shell-law li {
  margin: 0 0 6px;
}

.yg-shell-law a,
[data-yg-copy] a {
  color: #1d4ed8;
  text-decoration: underline;
}

.yg-photo-lb-guest-note,
.yg-disaster-lb-guest-note {
  margin: 0 0 8px;
  color: #bbb;
  font: 12px/1.35 system-ui, Helvetica, sans-serif;
}

@media (max-width: 900px) {
  body.yg-fmt-open {
    padding-top: 132px;
  }
}

@media (max-width: 640px) {
  body.yg-fmt-open {
    padding-top: 0;
  }

  .yg-fmt {
    top: auto;
    bottom: 0;
    border-radius: 12px 12px 0 0;
    max-height: 42vh;
    overflow: auto;
  }
}
