@font-face {
  font-family: "Aldrich";
  src: url("../fonts/Aldrich.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --font-display: "Aldrich", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-ui: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;

  --text: rgba(242, 239, 255, 0.92);
  --text-soft: rgba(226, 222, 246, 0.66);
  --text-faint: rgba(210, 205, 236, 0.42);
  --line: rgba(211, 205, 255, 0.14);
  --line-strong: rgba(220, 215, 255, 0.24);

  --panel-a: rgba(18, 16, 43, 0.63);
  --panel-b: rgba(38, 30, 64, 0.47);
  --panel-c: rgba(82, 58, 74, 0.28);
  --modal-a: rgba(25, 22, 54, 0.95);
  --modal-b: rgba(43, 33, 63, 0.92);
  --modal-c: rgba(65, 45, 63, 0.9);
  --blur: 24px;

  --accent: rgba(241, 215, 174, 0.86);
  --accent-solid: hsl(38, 56%, 78%);
  --accent-line: rgba(241, 215, 174, 0.34);
  --accent-wash: rgba(241, 215, 174, 0.09);
  --glow: rgba(133, 122, 241, 0.18);
  --veil-warm: rgba(255, 208, 177, 0.08);
  --veil-cool: rgba(116, 102, 232, 0.11);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #0b0918;
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 1px solid rgba(224, 218, 255, 0.62);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* ---------- Background scene ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #090817;
}

.scene__blur {
  position: absolute;
  z-index: 0;
  inset: -9%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(52px) saturate(1.2) brightness(0.72);
  transform: scale(1.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.scene.has-shrunk-bg .scene__blur {
  opacity: 1;
}

.scene__image {
  position: absolute;
  z-index: 1;
  inset: -1.5%;
  background-image: url("../images/bg.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.012);
  filter: saturate(1.025);
}

.scene.has-custom-bg .scene__image {
  inset: 0;
  transform: none;
  filter: none;
}

.scene__veil {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    radial-gradient(100% 70% at 75% 84%, var(--veil-warm), transparent 62%),
    radial-gradient(70% 52% at 80% 20%, var(--veil-cool), transparent 68%),
    linear-gradient(90deg, rgba(6, 6, 20, 0.2) 0%, transparent 30%, transparent 68%, rgba(6, 5, 18, 0.15) 100%),
    linear-gradient(180deg, rgba(5, 5, 17, 0.29) 0%, transparent 26%, transparent 70%, rgba(5, 5, 16, 0.2) 100%);
}

.scene.has-custom-bg .scene__veil {
  opacity: 0.58;
}

.scene__grain {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0.032;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

/* ---------- Stage & glass panels ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.stage > * {
  pointer-events: auto;
}

.panel {
  position: absolute;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(152deg, var(--panel-a) 0%, var(--panel-b) 56%, var(--panel-c) 100%);
  box-shadow:
    0 26px 64px rgba(4, 3, 15, 0.3),
    0 2px 10px rgba(4, 3, 15, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(213, 199, 244, 0.055);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(118%);
  backdrop-filter: blur(var(--blur)) saturate(118%);
}

.panel.is-entering {
  animation: panel-in 0.8s cubic-bezier(0.22, 0.72, 0.22, 1);
}

.panel::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.055), transparent 25%, transparent 76%, rgba(255, 228, 211, 0.03));
}

.panel::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 13%;
  right: 13%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(235, 230, 255, 0.48), transparent);
  opacity: 0.62;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Clock ---------- */

.clock-panel {
  --clock-scale: 1;
  --clock-opacity: 1;
  --clock-fade: 100%;
  --clock-font: 130px;
  left: 0;
  top: 0;
  width: min(calc(760px * var(--clock-scale)), calc(100vw - 36px));
  padding: clamp(22px, 2.8vw, 38px) clamp(20px, 4vw, 50px) clamp(18px, 2.2vw, 30px);
  border-radius: 32px;
  text-align: center;
  border-color: var(--line);
  background:
    linear-gradient(
      152deg,
      color-mix(in srgb, var(--panel-a) var(--clock-fade, 100%), transparent) 0%,
      color-mix(in srgb, var(--panel-b) var(--clock-fade, 100%), transparent) 56%,
      color-mix(in srgb, var(--panel-c) var(--clock-fade, 100%), transparent) 100%
    );
  border-color: color-mix(in srgb, var(--line) var(--clock-fade, 100%), transparent);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.clock-panel.is-dragging {
  cursor: grabbing;
}

.clock__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--font-display);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.3em;
  color: var(--text-faint);
}

.clock__live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 10px var(--accent-line);
  animation: live-pulse 3s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.clock__zone {
  padding-left: 18px;
  border-left: 1px solid var(--line);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: rgba(203, 198, 231, 0.36);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.clock__display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: clamp(16px, 2.2vw, 26px);
  font-family: var(--font-display);
  font-size: var(--clock-font);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.005em;
  color: rgba(244, 242, 255, 0.94);
  text-shadow: 0 10px 60px var(--glow);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clock__digits {
  display: inline-flex;
  align-items: baseline;
}

.clock__digit {
  display: inline-block;
  width: var(--digit-width, 0.73em);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.clock-panel[data-font="mono"] .clock__display {
  font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;
  font-weight: 300;
  letter-spacing: 0;
}

.clock-panel[data-font="thin"] .clock__display {
  font-family: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 200;
  letter-spacing: 0.012em;
}

.clock-panel[data-font="serif"] .clock__display {
  font-family: "Georgia", "Times New Roman", "Songti SC", "SimSun", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.clock__sep {
  margin: 0 0.045em;
  color: rgba(224, 219, 250, 0.36);
  transform: translateY(-0.045em);
  animation: colon-breathe 2s ease-in-out infinite;
}

@keyframes colon-breathe {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.62;
  }
}

.clock__ms {
  font-size: 0.42em;
  letter-spacing: 0.02em;
  color: rgba(230, 224, 250, 0.5);
  margin-left: 0.08em;
}

.clock__ms-dot {
  margin-right: 0.05em;
  opacity: 0.75;
}

.clock__ampm {
  font-size: 0.2em;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-left: 0.5em;
  transform: translateY(-0.5em);
}

.clock__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(14px, 2vw, 24px);
  padding-top: clamp(12px, 1.6vw, 18px);
  border-top: 1px solid var(--line);
}

.clock__date {
  font-family: var(--font-display);
  font-size: clamp(10.5px, 0.95vw, 13px);
  line-height: 1.3;
  letter-spacing: 0.18em;
  color: rgba(224, 220, 244, 0.72);
  white-space: nowrap;
}

.clock__weekday {
  flex: none;
  padding: 4px 10px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  background: var(--accent-wash);
}

/* ---------- Widgets ---------- */

.widget {
  width: 300px;
  max-width: calc(100vw - 12px);
  min-width: 220px;
  min-height: 150px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(152deg, var(--panel-a) 0%, var(--panel-b) 56%, var(--panel-c) 100%),
    rgba(7, 6, 18, 0.34);
}

.widget.is-dragging,
.widget.is-resizing {
  user-select: none;
  -webkit-user-select: none;
}

.widget__resize {
  position: absolute;
  z-index: 4;
  touch-action: none;
}

.widget__resize--e {
  top: 14px;
  right: -4px;
  bottom: 14px;
  width: 10px;
  cursor: ew-resize;
}

.widget__resize--w {
  top: 14px;
  bottom: 14px;
  left: -4px;
  width: 10px;
  cursor: ew-resize;
}

.widget__resize--s {
  right: 14px;
  bottom: -4px;
  left: 14px;
  height: 10px;
  cursor: ns-resize;
}

.widget__resize--n {
  top: -4px;
  right: 14px;
  left: 14px;
  height: 10px;
  cursor: ns-resize;
}

.widget__resize--se {
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.widget__resize--sw {
  bottom: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  cursor: nesw-resize;
}

.widget__resize--ne {
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  cursor: nesw-resize;
}

.widget__resize--nw {
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.widget__grip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  width: 11px;
  height: 11px;
  color: rgba(235, 230, 250, 0.4);
  background:
    linear-gradient(135deg, transparent 0 46%, currentColor 46% 54%, transparent 54%),
    linear-gradient(135deg, transparent 0 70%, currentColor 70% 78%, transparent 78%);
  pointer-events: none;
  transition: color 0.2s ease;
}

.widget:hover .widget__grip {
  color: rgba(235, 230, 250, 0.72);
}

.widget__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 10px 10px 15px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  zoom: var(--widget-scale, 1);
}

.widget.is-dragging .widget__head {
  cursor: grabbing;
}

.widget__dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 8px var(--accent-line);
}

.widget__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
  border-radius: 6px;
  outline: none;
}

.widget__title[contenteditable="true"] {
  padding: 2px 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.widget__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
}

.widget__hide {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(222, 214, 240, 0.36);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.widget__hide svg {
  width: 12px;
  height: 12px;
}

.widget__hide:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(240, 232, 250, 0.8);
}

.widget__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 0 14px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 214, 255, 0.18) transparent;
  zoom: var(--widget-scale, 1);
}

.widget__body::-webkit-scrollbar {
  width: 3px;
}

.widget__body::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(220, 214, 255, 0.18);
}

.widget__body > * {
  flex: none;
}

.widget__body > .memo-input {
  flex: 1 1 auto;
}

.w-clock {
  font-family: var(--font-display);
  font-size: 33px;
  line-height: 1.08;
  letter-spacing: 0.015em;
  color: rgba(245, 243, 255, 0.95);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tab-digit {
  display: inline-block;
  width: var(--digit-width, 0.73em);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.tab-ch {
  display: inline-block;
  white-space: pre;
}

.w-clock--sm {
  font-size: 27px;
}

.w-sub {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.w-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.w-row--tight {
  gap: 5px;
}

.w-field {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.w-input {
  width: 100%;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(7, 6, 20, 0.32);
  color: rgba(240, 237, 252, 0.85);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.03em;
  outline: none;
  color-scheme: dark;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.w-input:hover {
  border-color: var(--line-strong);
}

.w-input:focus {
  border-color: var(--accent-line);
  background: rgba(9, 8, 24, 0.44);
}

.w-field .w-input {
  width: 54px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 11px;
  text-align: center;
}

.w-input[type="datetime-local"] {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.w-input[type="number"] {
  -webkit-appearance: textfield;
  appearance: textfield;
}

.w-input[type="number"]::-webkit-outer-spin-button,
.w-input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.w-chip:disabled {
  opacity: 0.35;
  cursor: default;
}

.w-chip:disabled:hover {
  border-color: var(--line);
  background: transparent;
  color: var(--text-faint);
}

.w-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}

.wbtn {
  flex: 1;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wbtn svg {
  width: 12px;
  height: 12px;
}

.wbtn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.wbtn:active {
  transform: translateY(1px);
}

.wbtn--accent {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}

.wbtn--accent:hover {
  border-color: var(--accent);
  color: var(--text);
}

.wbtn:disabled,
.wbtn:disabled:hover {
  opacity: 0.35;
  cursor: default;
  transform: none;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-faint);
}

.wbtns {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.wbtns .wbtn {
  flex: 1;
}

.w-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.w-chip {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-faint);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.w-chip:hover {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}

.w-progress {
  height: 3px;
  margin: 10px 0 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.w-progress__bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
  transition: width 0.15s linear;
}

.laps {
  max-height: 86px;
  margin: 9px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 214, 255, 0.18) transparent;
}

.laps::-webkit-scrollbar {
  width: 3px;
}

.laps::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(220, 214, 255, 0.18);
}

.laps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.laps li:first-child {
  border-top: 0;
}

.laps li b {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.memo-input {
  display: block;
  width: 100%;
  min-height: 92px;
  max-height: none;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 7, 20, 0.22);
  color: rgba(238, 235, 250, 0.85);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  outline: none;
  resize: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.memo-input::placeholder {
  color: rgba(207, 201, 231, 0.28);
}

.memo-input:focus {
  border-color: var(--line-strong);
  background: rgba(8, 7, 20, 0.34);
}

.memo-meta {
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-align: right;
}

/* Multi-row time widgets */

.time-rows {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}

.time-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.time-row:last-child {
  border-bottom: 0;
}

.time-row__label {
  flex: none;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.time-row__value {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: rgba(245, 243, 255, 0.95);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-row__value.is-expired {
  color: rgba(230, 224, 248, 0.6);
}

.count-state {
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* Image widget */

.photo-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 168px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 13px;
  background: rgba(7, 6, 18, 0.24);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-frame.is-dragging {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.photo-frame.has-image {
  border-style: solid;
}

.photo-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: rgba(232, 228, 246, 0.68);
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.photo-empty__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 3px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}

.photo-empty small {
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.photo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-tools {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  gap: 4px;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.widget:hover .photo-tools,
.photo-tools:focus-within {
  opacity: 1;
}

@media (hover: none) {
  .photo-tools {
    opacity: 0.92;
  }
}

.photo-tool {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(8, 7, 20, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
  font-family: var(--font-ui);
  font-size: 8.5px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.photo-tool:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.photo-tool--danger:hover {
  border-color: rgba(233, 178, 178, 0.32);
  background: rgba(112, 52, 66, 0.3);
  color: rgba(246, 206, 206, 0.9);
}

.empty-hint {
  margin: 10px 0 2px;
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* ---------- Dock ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 2.4vh, 24px);
  z-index: 60;
  display: flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 7, 20, 0.58);
  box-shadow: 0 12px 34px rgba(4, 3, 15, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  transform: translateX(-50%);
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dock:hover,
.dock:focus-within {
  opacity: 1;
}

.dock__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(232, 226, 248, 0.62);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.dock__btn svg {
  width: 16px;
  height: 16px;
}

.dock__btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 245, 255, 0.92);
}

.dock__btn:active {
  transform: translateY(1px);
}

.dock__btn.is-active {
  background: var(--accent-wash);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* ---------- Modals ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
}

.modal__scrim {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 4, 16, 0.52);
  cursor: default;
  -webkit-backdrop-filter: blur(9px) saturate(95%);
  backdrop-filter: blur(9px) saturate(95%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(880px, 88svh);
  overflow: hidden;
  border: 1px solid rgba(221, 215, 255, 0.18);
  border-radius: 24px;
  background: linear-gradient(155deg, var(--modal-a), var(--modal-b) 62%, var(--modal-c));
  box-shadow:
    0 40px 100px rgba(3, 2, 12, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
  -webkit-backdrop-filter: blur(30px) saturate(125%);
  backdrop-filter: blur(30px) saturate(125%);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.26s ease, transform 0.3s cubic-bezier(0.22, 0.72, 0.22, 1);
}

.modal__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(242, 233, 255, 0.4), transparent);
}

.modal.is-open .modal__scrim,
.modal.is-open .modal__panel {
  opacity: 1;
}

.modal.is-open .modal__panel {
  transform: translateY(0) scale(1);
}

.modal--wide .modal__panel {
  width: min(700px, 100%);
}

.modal__head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 24px 12px;
}

.modal__eyebrow {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.24em;
  color: rgba(206, 201, 232, 0.38);
}

.modal__title {
  margin: 0;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.1em;
  color: rgba(244, 241, 255, 0.92);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(226, 220, 255, 0.12);
  border-radius: 50%;
  background: rgba(222, 215, 255, 0.055);
  color: rgba(232, 228, 246, 0.56);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.icon-btn svg {
  width: 13px;
  height: 13px;
}

.icon-btn:hover {
  border-color: rgba(235, 229, 255, 0.26);
  background: rgba(226, 219, 255, 0.11);
  color: rgba(247, 244, 255, 0.85);
}

.modal__close {
  margin-top: 2px;
}

.modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 214, 255, 0.2) transparent;
}

.modal__body::-webkit-scrollbar {
  width: 4px;
}

.modal__body::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(220, 214, 255, 0.18);
}

.modal__footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 24px 17px;
  border-top: 1px solid rgba(215, 208, 250, 0.09);
  background: rgba(8, 7, 22, 0.14);
}

.modal__footer .spacer {
  flex: 1;
}

.modal__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint {
  margin: 0 0 16px;
  font-size: 10.5px;
  line-height: 1.75;
  letter-spacing: 0.035em;
  color: rgba(216, 211, 236, 0.46);
}

.btn {
  padding: 9px 15px;
  border: 1px solid rgba(226, 219, 255, 0.13);
  border-radius: 10px;
  background: rgba(222, 215, 255, 0.045);
  color: rgba(233, 229, 248, 0.6);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  border-color: rgba(232, 226, 255, 0.26);
  background: rgba(225, 218, 255, 0.09);
  color: rgba(244, 241, 255, 0.85);
}

.btn:active {
  transform: translateY(1px);
}

.btn--accent {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}

.btn--accent:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: rgba(250, 245, 232, 0.96);
  filter: brightness(1.25);
}

.btn--danger {
  border-color: rgba(233, 178, 178, 0.12);
  color: rgba(227, 190, 190, 0.46);
}

.btn--danger:hover {
  border-color: rgba(233, 178, 178, 0.28);
  background: rgba(112, 52, 66, 0.16);
  color: rgba(242, 202, 202, 0.8);
}

.btn:disabled,
.btn:disabled:hover {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Settings controls ---------- */

.setting {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.setting:first-child {
  padding-top: 2px;
  border-top: 0;
}

.setting__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: rgba(203, 197, 227, 0.46);
  text-transform: uppercase;
}

.setting__value {
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: none;
}

.setting__hint {
  margin: 9px 0 0;
  font-size: 9px;
  line-height: 1.65;
  letter-spacing: 0.03em;
  color: rgba(205, 199, 228, 0.3);
}

.range {
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border: 2px solid rgba(9, 8, 22, 0.7);
  border-radius: 50%;
  background: var(--accent-solid);
  box-shadow: 0 0 12px var(--accent-line);
  -webkit-appearance: none;
  appearance: none;
}

.range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(9, 8, 22, 0.7);
  border-radius: 50%;
  background: var(--accent-solid);
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(7, 6, 20, 0.25);
}

.segmented button {
  flex: 1;
  height: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.segmented button:hover {
  color: var(--text-soft);
}

.segmented button[aria-pressed="true"] {
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
}

.toggle-row__text {
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(232, 228, 246, 0.72);
}

.toggle-row__hint {
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

.switch {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 38px;
  height: 21px;
}

.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(238, 235, 250, 0.7);
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + span {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.switch input:checked + span::after {
  background: var(--accent-solid);
  transform: translateX(17px);
}

.switch input:focus-visible + span {
  outline: 1px solid rgba(224, 218, 255, 0.62);
  outline-offset: 3px;
}

.switch input:disabled + span {
  opacity: 0.35;
  cursor: not-allowed;
}

.pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pos-grid button {
  display: grid;
  place-items: center;
  height: 42px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(224, 218, 240, 0.34);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pos-grid button i {
  display: block;
  width: 18px;
  height: 10px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.9;
}

.pos-grid button:hover {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}

.wtiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.wtile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wtile:hover {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.wtile:active {
  transform: translateY(1px);
}

.wtile svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0.85;
}

.wtile b {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 252, 0.9);
}

.wtile small {
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}

.wrows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.wrow.is-hidden {
  opacity: 0.55;
}

.wrow__dot {
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.wrow__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(238, 234, 249, 0.8);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wrow__meta {
  flex: none;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.wrow__btn {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.wrow__btn svg {
  width: 12px;
  height: 12px;
}

.wrow__btn:hover {
  border-color: rgba(235, 229, 255, 0.26);
  background: rgba(226, 219, 255, 0.1);
  color: rgba(247, 244, 255, 0.85);
}

.wrow__btn.is-off {
  color: rgba(222, 214, 240, 0.28);
}

.wrow__btn.is-danger:hover {
  border-color: rgba(233, 178, 178, 0.26);
  background: rgba(112, 52, 66, 0.16);
  color: rgba(242, 202, 202, 0.8);
}

/* ---------- Background editor ---------- */

.bg-editor__body {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bg-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 28px 22px;
  border: 1px dashed rgba(221, 214, 250, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(100% 120% at 50% 0%, var(--accent-wash), transparent 62%),
    rgba(8, 7, 22, 0.19);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.24s ease, background 0.24s ease;
}

.bg-upload:hover,
.bg-upload.is-dragging {
  border-color: var(--accent-line);
  background:
    radial-gradient(100% 120% at 50% 0%, var(--accent-wash), transparent 62%),
    rgba(13, 10, 30, 0.26);
}

.bg-upload__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 0 30px var(--accent-wash);
}

.bg-upload h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.13em;
  color: rgba(241, 237, 253, 0.85);
}

.bg-upload p {
  margin: 8px 0 17px;
  font-size: 9.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: rgba(210, 205, 232, 0.43);
}

.bg-crop {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bg-crop__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.bg-crop__name {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(224, 219, 245, 0.5);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bg-crop__change {
  flex: none;
  padding: 7px 11px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.bg-crop__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.bg-crop__stage {
  position: relative;
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(228, 221, 255, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, #080714 25%, #080714 75%, rgba(255, 255, 255, 0.025) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow:
    0 18px 46px rgba(3, 2, 12, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.bg-crop__stage:active {
  cursor: grabbing;
}

.bg-crop__blur {
  position: absolute;
  inset: -14%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(20px) saturate(1.15) brightness(0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bg-crop__stage.is-shrunk .bg-crop__blur {
  opacity: 1;
}

.bg-crop__stage img {
  position: absolute;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.bg-crop__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-position: 33.333% 0, 66.666% 0, 0 33.333%, 0 66.666%;
  background-size: 33.333% 100%, 33.333% 100%, 100% 33.333%, 100% 33.333%;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(239, 224, 197, 0.25),
    inset 0 0 60px rgba(4, 3, 15, 0.2);
}

.bg-crop__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 7px;
  border: 1px solid rgba(226, 218, 250, 0.13);
  border-radius: 999px;
  background: rgba(6, 5, 18, 0.5);
  color: rgba(226, 220, 244, 0.52);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.09em;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.bg-crop__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bg-zoom {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 9px;
  letter-spacing: 0.11em;
  color: rgba(211, 205, 233, 0.45);
}

.bg-zoom input {
  flex: 1;
  min-width: 90px;
  accent-color: var(--accent-solid);
  cursor: pointer;
}

.bg-zoom__value {
  flex: none;
  width: 46px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.bg-crop__reset {
  flex: none;
  padding: 8px 11px;
  font-size: 9.5px;
}

.bg-crop__note {
  margin: 0;
  font-size: 8.5px;
  line-height: 1.65;
  letter-spacing: 0.035em;
  color: rgba(205, 199, 228, 0.33);
}

.bg-status {
  min-height: 16px;
  margin: 0;
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: 0.035em;
  color: rgba(208, 202, 231, 0.4);
}

.bg-status.is-error {
  color: rgba(239, 174, 174, 0.78);
}

.bg-status.is-success {
  color: rgba(223, 205, 170, 0.7);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 74px;
  z-index: 200;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 8, 24, 0.8);
  box-shadow: 0 18px 40px rgba(3, 2, 12, 0.4);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--text-soft);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .clock-panel {
    width: min(calc(760px * var(--clock-scale)), calc(100vw - 28px));
    padding: 22px 18px 18px;
    border-radius: 26px;
  }

  .clock__display {
    margin-top: 16px;
  }

  .clock__meta {
    gap: 12px;
    letter-spacing: 0.22em;
  }

  .clock__zone {
    display: none;
  }

  .widget {
    width: 286px;
  }

  .modal__head {
    padding: 20px 18px 10px;
  }

  .modal__body {
    padding: 0 18px 16px;
  }

  .modal__footer {
    padding: 12px 18px 15px;
  }

  .bg-crop__frame {
    min-height: 90px;
  }

  .bg-crop__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }

  .bg-crop__reset {
    align-self: flex-end;
  }

  .dock {
    bottom: 10px;
  }

  .toast {
    bottom: 60px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 560px) {
  .modal__footer {
    gap: 8px;
  }

  .modal__actions {
    flex: 1;
    width: auto;
  }

  .modal__footer > .btn {
    flex: 0 0 auto;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .modal__actions .btn {
    flex: 1;
    white-space: nowrap;
  }
}

@media (max-height: 700px) and (min-width: 721px) {
  .clock-panel {
    padding-top: 20px;
    padding-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
