:root {
  color-scheme: dark;
  --sea: #0c1c2e;
  --sea-2: #13283d;
  --foam: #f4efe4;
  --brass: #e4b33c;
  --muted: #8fa0b3;
  --line: rgba(244, 239, 228, 0.14);
  --dock: rgba(12, 28, 46, 0.92);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--sea);
  color: var(--foam);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(10px + var(--safe-t)) 18px 10px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.04em;
}

.domain {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.domain:hover { color: var(--foam); }

#app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(228, 179, 60, 0.08), transparent 60%),
    var(--sea);
}

.stage.is-hot .drop {
  outline: 2px dashed var(--brass);
  outline-offset: -18px;
  background: rgba(228, 179, 60, 0.06);
}

canvas {
  display: none;
  max-width: min(100%, 1100px);
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: grab;
  touch-action: none;
}

.stage.has-image canvas { display: block; }
.stage.has-image .drop { display: none; }
canvas.is-drag { cursor: grabbing; }

.drop {
  text-align: center;
  padding: 48px 24px;
  width: min(640px, calc(100% - 32px));
  border-radius: 18px;
}

.drop-kicker {
  margin: 0 0 10px;
  color: var(--brass);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.drop-title {
  margin: 0;
  font-size: clamp(40px, 8vw, 72px);
  letter-spacing: -0.045em;
  font-weight: 650;
  line-height: 0.95;
}

.drop-sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.drop-note {
  margin: 22px auto 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--foam);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hint {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.dock {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  background: var(--dock);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foam);
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}

.field input:focus { border-color: rgba(228, 179, 60, 0.8); }

.actions { display: flex; gap: 8px; }

button { font: inherit; }

.ghost, .save {
  height: 42px;
  border-radius: 10px;
  padding: 0 14px;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--foam);
  border: 1px solid var(--line);
}

.save {
  background: var(--brass);
  color: #1b1608;
  border: 0;
  font-weight: 700;
}

.ghost:hover, .save:hover { filter: brightness(1.06); }

.foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  padding: 10px 18px calc(10px + var(--safe-b));
  color: var(--muted);
  font-size: 12px;
}

.foot p { margin: 0; }

@media (max-width: 720px) {
  .domain { display: none; }
  .dock { grid-template-columns: 1fr 1fr; }
  .actions { grid-column: 1 / -1; }
  .save { flex: 1; }
  .foot { display: none; }
}
