:root {
  --bg: #0c0c0e;
  --stage: #09090b;
  --panel: #131316;
  --raise: #1b1b20;
  --raise-2: #23232a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #ededf0;
  --muted: #8c8c96;
  --faint: #5b5b64;
  --accent: #6b8cff;
  --accent-soft: rgba(107, 140, 255, 0.14);
  --danger: #ff5c6c;
  --ok: #3ccf8e;
  --warn: #f5b342;
  --pop:
    0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 14px 40px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font:
    13px/1.5 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "PingFang SC",
    "Helvetica Neue",
    Arial,
    sans-serif;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
}
button {
  background: var(--raise);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
  transition:
    background 0.14s,
    border-color 0.14s,
    color 0.14s,
    box-shadow 0.14s;
}
button:hover {
  background: var(--raise-2);
  border-color: rgba(255, 255, 255, 0.18);
}
button:active {
  background: #18181c;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:focus-visible,
.slot:focus-within,
.dz:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.primary {
  background: #f3f3f5;
  border-color: #f3f3f5;
  color: #0c0c0e;
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 4px 14px rgba(255, 255, 255, 0.08);
}
button.primary:hover {
  background: #fff;
  border-color: #fff;
}
button.primary:active {
  background: #dcdce0;
}
button.on {
  background: var(--accent-soft);
  border-color: rgba(107, 140, 255, 0.5);
  color: #d6dfff;
}
button.icon {
  padding: 7px 9px;
  font-size: 15px;
  line-height: 1;
}

.slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  min-width: 66px;
  transition:
    border-color 0.14s,
    background 0.14s;
}
.slot:hover,
.slot.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.slot .th {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot img {
  height: 60px;
  width: auto;
  border-radius: 8px;
  background: #060607;
  display: none;
  box-shadow:
    0 0 0 1px var(--line-2),
    0 4px 14px rgba(0, 0, 0, 0.45);
}
.slot.has img {
  display: block;
}
.slot .ph {
  width: 44px;
  height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  background: rgba(255, 255, 255, 0.03);
}
.slot.has .ph {
  display: none;
}
.slot b {
  font-weight: 500;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.slot.has b {
  display: none;
}
.slot.has {
  padding: 0;
  border-color: transparent;
  border-style: solid;
  background: none;
}
.slot.has:hover {
  border-color: transparent;
  background: none;
}
.slot.has:hover img {
  box-shadow:
    0 0 0 2px var(--accent),
    0 4px 14px rgba(0, 0, 0, 0.45);
}
.slot input {
  display: none;
}
.x {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f3f3f5;
  color: #111;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  user-select: none;
}
.x:hover {
  background: #ffe4e6;
  color: #c8102e;
}
.slot.has:hover .x {
  display: flex;
}
.dz.done:hover .x {
  display: flex;
}
.dz .x {
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  font-size: 15px;
}
#bSwap {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}
#bSwap:hover:not(:disabled) {
  color: var(--text);
  background: var(--raise);
}

main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.2px) 0 0/22px
      22px,
    radial-gradient(120% 90% at 50% 40%, #101013 0%, var(--stage) 70%);
}
#view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: none;
  touch-action: none;
}
#view.pan {
  cursor: grab;
}
#view.pan.dragging {
  cursor: grabbing;
}
#cursor {
  position: absolute;
  pointer-events: none;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  outline: 1px solid rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
#cursor.restore {
  border-color: var(--ok);
}
#cursor.soft {
  border-style: dashed;
}

#empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 24px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.brand svg {
  width: 40px;
  height: 40px;
  display: block;
  margin-bottom: 2px;
}
.brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.dzs {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dzjoin {
  color: var(--faint);
  font-size: 18px;
  font-weight: 300;
  flex: none;
}
.dz {
  width: 250px;
  height: 184px;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--muted);
  text-align: center;
  padding: 14px;
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.008)
  );
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease),
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}
.dzc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 100%;
}
.dz i {
  font-style: normal;
  font:
    500 10.5px/1 ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
  letter-spacing: 0.14em;
  color: var(--faint);
  margin-bottom: 6px;
}
.dz b {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.dz em {
  font-style: normal;
  font-size: 11.5px;
  margin-top: 12px;
  color: var(--text);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s;
}
.dz:hover,
.dz.over {
  border-color: rgba(107, 140, 255, 0.7);
  background: linear-gradient(
    180deg,
    rgba(107, 140, 255, 0.09),
    rgba(107, 140, 255, 0.03)
  );
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}
.dz:hover em,
.dz.over em {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.dz.done {
  border-style: solid;
  border-color: rgba(60, 207, 142, 0.55);
  transform: none;
  background: #060607;
}
.dz.done img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 17px;
  background: #060607;
}
.dz.done .tag {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.dz input {
  display: none;
}
#empty p.note {
  color: var(--faint);
  font-size: 12px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
#empty p.note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
main.over #empty .dz:not(.done) {
  border-color: var(--accent);
}

#hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(22, 22, 26, 0.96);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 8px 8px 8px 16px;
  max-width: 70%;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--pop);
  white-space: nowrap;
}
#hint > div {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #c9c9d1;
}
#hint .hb {
  display: flex;
  gap: 6px;
  flex: none;
}
#hint b {
  color: #fff;
  font-weight: 600;
}
#hint button {
  flex: none;
  padding: 6px 12px;
}
#busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.6);
  font-size: 13.5px;
  color: #fff;
  gap: 12px;
  letter-spacing: 0.02em;
}
#busy::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#cands {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
#cands button {
  position: absolute;
  pointer-events: auto;
  transform: translate(0, -100%);
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  padding: 4px 10px;
  border-radius: 7px 7px 7px 2px;
  border: 0;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}
#cands button.c0 {
  background: #22a86a;
}
#cands button.c1 {
  background: #d4900f;
}
#cands button.c2 {
  background: #e0455a;
}
#cands button.c3 {
  background: #3b78e7;
}
#cands button.c4 {
  background: #9450e0;
}
#cands button:hover {
  filter: brightness(1.15);
}
#chip,
#keys {
  position: absolute;
  bottom: 12px;
  background: rgba(18, 18, 21, 0.85);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#chip {
  left: 12px;
  pointer-events: none;
}
#keys {
  right: 12px;
  cursor: pointer;
  user-select: none;
  transition:
    color 0.14s,
    background 0.14s;
}
#keys:hover,
#keys.on {
  color: var(--text);
  background: rgba(34, 34, 40, 0.95);
  border-color: var(--line-2);
}
#keysPanel {
  position: absolute;
  right: 12px;
  bottom: 44px;
  background: rgba(20, 20, 24, 0.97);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 14px;
  row-gap: 7px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--pop);
  z-index: 6;
}
#keysPanel > div {
  display: contents;
}
#keysPanel kbd {
  font:
    500 11px/1.5 ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
  color: var(--text);
  background: var(--raise);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0 7px;
  text-align: center;
  white-space: nowrap;
  justify-self: end;
}
#keysPanel span {
  white-space: nowrap;
}
#toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 6px);
  background: rgba(22, 22, 26, 0.96);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 7px 15px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.22s var(--ease),
    transform 0.22s var(--ease);
  box-shadow: var(--pop);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.ok {
  color: var(--ok);
}
#toast.warn {
  color: var(--warn);
}

#bar {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #151518, var(--panel));
  position: relative;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.25);
}
#links,
#credit {
  position: absolute;
  bottom: 6px;
}
#credit {
  left: 14px;
  font-size: 10.5px;
  line-height: 1;
  color: #46464e;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.14s;
}
#credit:hover {
  color: var(--muted);
}
#links {
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
#links a {
  color: #46464e;
  text-decoration: none;
  transition: color 0.14s;
}
#links a:hover {
  color: var(--muted);
}
#tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
#tools > * {
  flex: none;
}
.sep {
  width: 1px;
  height: 20px;
  background: var(--line-2);
  margin: 0 4px;
}
#tools > button,
#tools .seg {
  height: 34px;
  box-sizing: border-box;
}
#tools > button {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}
#tools > button.arrow {
  padding: 0 9px;
}
#tools .seg button {
  height: 100%;
  padding: 0 11px;
}
.grp {
  display: inline-flex;
  gap: 6px;
}
#status {
  font-size: 12px;
  color: var(--muted);
}
#status.ok {
  color: var(--ok);
}
#status.warn {
  color: var(--warn);
}
#status.busy {
  color: var(--accent);
}
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #0e0e11;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.seg button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.seg button.on {
  background: var(--raise-2);
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 1px 3px rgba(0, 0, 0, 0.5);
}
#tool button.on[data-mode="erase"] svg {
  color: var(--accent);
}
#tool button.on[data-mode="restore"] svg {
  color: var(--ok);
}
.seg svg,
button.ic svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.ic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#bShowMask .eye-open {
  display: none;
}
#bShowMask.on .eye-open {
  display: block;
}
#bShowMask.on .eye-closed {
  display: none;
}
#bShowMask.on {
  background: rgba(255, 45, 85, 0.13);
  border-color: rgba(255, 45, 85, 0.45);
  color: #ffd0da;
}
.ctl {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctl label {
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.ctl input[type="range"] {
  width: 92px;
}
#tipPrev {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #0e0e11;
  border: 1px solid var(--line);
  flex: none;
}
.ctl .val {
  width: 36px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
label.chk.inline {
  margin: 0;
}
#tools.off > * {
  opacity: 0.3;
  pointer-events: none;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  background: transparent;
  margin: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: #f3f3f5;
  border: 0;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s;
}
input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}
input[type="range"]:active::-webkit-slider-thumb {
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 1px 4px rgba(0, 0, 0, 0.5);
}
input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}
input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f3f3f5;
  border: 0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
}
input[type="range"]:focus-visible {
  outline: none;
}
input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--accent);
}

#adv {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 330px;
  max-height: calc(100% - 28px);
  overflow: auto;
  background: rgba(20, 20, 24, 0.98);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--pop);
  z-index: 5;
}
#adv h3 {
  margin: 14px 0 6px;
  font-size: 11px;
  color: var(--faint);
  font-weight: 600;
  letter-spacing: 0.12em;
}
#adv h3:first-child {
  margin-top: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.row label {
  color: var(--muted);
  width: 44px;
  flex: none;
}
.row input[type="range"] {
  flex: 1;
  min-width: 0;
}
.row .val {
  width: 44px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.row .btns {
  display: flex;
  gap: 6px;
  flex: 1;
}
.row .btns button {
  flex: 1;
  padding: 6px 8px;
}
.readout {
  font:
    11px/1.65 ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
  color: var(--muted);
  background: #0e0e11;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  margin: 4px 0;
}
.readout b {
  color: var(--text);
  font-weight: 500;
}
label.chk {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  margin: 6px 0;
}
label.chk input {
  accent-color: var(--accent);
  margin: 0;
}
.nudge {
  display: grid;
  grid-template-columns: repeat(3, 26px);
  grid-template-rows: repeat(2, 24px);
  gap: 2px;
}
.nudge button {
  padding: 0;
  font-size: 12px;
  border-radius: 6px;
}
.info {
  color: var(--muted);
  font-size: 11.5px;
  margin: 4px 0;
}
#adv::-webkit-scrollbar {
  width: 8px;
}
#adv::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
@supports (height: 100dvh) {
  html,
  body {
    height: 100dvh;
  }
}

#app:has(#empty:not([hidden])) #bar .slots,
#app:has(#empty:not([hidden])) #tools {
  display: none;
}
#app:has(#empty:not([hidden])) #bar {
  background: transparent;
  box-shadow: none;
  border-top-color: transparent;
}

.on-touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .on-desk {
    display: none;
  }
  .on-touch {
    display: inline;
  }
  body {
    -webkit-touch-callout: none;
  }
  button,
  .slot,
  .dz,
  #cands button {
    touch-action: manipulation;
  }
  .slot.has .x,
  .dz.done .x {
    display: flex;
  }
  .dz:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--line-2);
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025),
      rgba(255, 255, 255, 0.008)
    );
  }
  .dz:hover em {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line-2);
    color: var(--text);
  }
  .dz.done:hover {
    border-color: rgba(60, 207, 142, 0.55);
    background: #060607;
  }
  .slot:hover {
    border-color: var(--line-2);
    background: none;
  }
  #keys {
    pointer-events: none;
  }
  #keysPanel {
    display: none !important;
  }
  input[type="range"] {
    height: 28px;
  }
  input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -8.5px;
  }
  input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 640px) {
  #empty {
    gap: 22px;
    padding: 16px;
  }
  .brand {
    gap: 8px;
  }
  .brand svg {
    width: 34px;
    height: 34px;
  }
  .brand h1 {
    font-size: 21px;
  }
  .brand p {
    font-size: 12.5px;
    max-width: 300px;
    line-height: 1.6;
  }
  .dzs {
    width: 100%;
    max-width: 420px;
    gap: 10px;
  }
  .dzjoin {
    display: none;
  }
  .dz {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 170px;
    border-radius: 16px;
    padding: 10px;
  }
  .dz b {
    font-size: 15.5px;
  }
  .dzc > span {
    font-size: 12px;
  }
  .dz em {
    margin-top: 10px;
    padding: 4px 10px;
  }
  .dz.done img {
    border-radius: 15px;
  }
  #empty p.note {
    font-size: 11.5px;
  }

  #bar {
    padding: 8px 0 22px;
    gap: 8px;
  }
  .slots {
    gap: 8px;
  }
  .slot {
    min-width: 0;
    padding: 4px 8px;
  }
  .slot img {
    width: auto !important;
    height: auto !important;
    max-width: 72px;
    max-height: 42px;
    border-radius: 6px;
  }
  .slot .ph {
    width: 34px;
    height: 26px;
    font-size: 15px;
  }
  #bSwap {
    width: 26px;
    height: 26px;
  }
  #tools {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    width: 100%;
    padding: 0 12px;
  }
  #tools::-webkit-scrollbar {
    display: none;
  }
  #bPng {
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.6) inset,
      -14px 0 12px 2px var(--panel);
  }

  #hint {
    left: 10px;
    right: 10px;
    bottom: 10px;
    transform: none;
    max-width: none;
    white-space: normal;
    font-size: 12.5px;
    padding: 8px 8px 8px 12px;
    gap: 10px;
  }
  #hint > div {
    overflow: visible;
  }
  #chip,
  #keys {
    top: 10px;
    bottom: auto;
  }
  #toast {
    max-width: calc(100% - 24px);
    white-space: normal;
    text-align: center;
    bottom: 12px;
  }
  #credit {
    left: 12px;
  }
  #links {
    right: 12px;
  }
}
