:root {
  color-scheme: light;
  --ink: #30392d;
  --muted: #5e6b58;
  --surface: rgba(249, 248, 238, 0.94);
  --edge: rgba(58, 76, 47, 0.15);
  --accent: #486546;
  --accent-ink: #fffdf2;
  --tint: #a4b895;
  --shadow: 0 8px 32px #26351d0e, 0 1px 2px #26351d08;
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: #dfe4df;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
}
button,
a,
input {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
}
[hidden] {
  display: none !important;
}
#garden {
  min-height: 100svh;
}
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline-offset: -6px;
  cursor: grab;
}
#scene:active {
  cursor: grabbing;
}
body.night {
  color-scheme: dark;
  --ink: #f1eddc;
  --muted: #c1c8b7;
  --surface: rgba(30, 39, 39, 0.95);
  --edge: rgba(222, 232, 203, 0.17);
  --accent: #b8cfa5;
  --accent-ink: #23301e;
  --shadow: 0 10px 36px #0003;
}
.masthead {
  position: fixed;
  inset: max(24px, env(safe-area-inset-top)) 36px auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}
.masthead h1 {
  font:
    500 44px/0.85 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -1.7px;
  margin: 0;
}
.wordmark-dot {
  color: var(--accent);
}
.masthead p {
  font-size: 12px;
  letter-spacing: 0.02em;
  margin: 11px 0 0;
  color: var(--muted);
}
.quiet-button {
  pointer-events: auto;
  border: 1px solid var(--edge);
  border-radius: 99px;
  background: var(--surface);
  font-size: 11px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
.garden-controls {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100% - 32px));
  display: grid;
  gap: 12px;
}
.result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px;
}
.tree-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.eyebrow {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.15em;
  color: var(--muted);
}
#domain {
  font:
    19px/1.2 Georgia,
    "Times New Roman",
    serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.share-button {
  flex-shrink: 0;
  border: 1px solid var(--edge);
  background: var(--surface);
  border-radius: 99px;
  padding: 11px 16px;
  font-size: 12px;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px #26351d18;
}
.share-button span {
  margin-left: 6px;
}
.dock {
  padding: 17px 19px 13px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 10px;
}
.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background-color 0.18s, box-shadow 0.18s;
}
#url:focus {
  outline: none;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
#go,
.primary-action {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  padding: 13px 17px;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    filter 0.2s,
    transform 0.2s;
}
#go:hover,
.primary-action:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
#go span {
  margin-left: 8px;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin-top: 9px;
  border-top: 1px solid var(--edge);
  padding-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
#status {
  flex: 1;
}
#retry {
  font-size: 11px;
  border: 0;
  padding: 4px;
  background: transparent;
  text-decoration: underline;
}
.dock[data-state="error"] {
  border-color: #a96449;
}
.dock[data-state="error"] #status {
  color: #985037;
}
body.night .dock[data-state="error"] #status {
  color: #ffc6b0;
}
.dock[aria-busy="true"] .status-row:before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 1.8s ease-in-out infinite;
}
.footnote {
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0;
  color: var(--muted);
  opacity: 0.85;
}
.footnote a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--edge);
  text-underline-offset: 3px;
}
.footnote a:hover,
.footnote a:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}
.notice {
  position: fixed;
  left: 50%;
  top: 110px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 99px;
  background: var(--surface);
  font-size: 12px;
  box-shadow: var(--shadow);
}
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 26px;
  padding: 24px;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  box-shadow: 0 24px 100px #0003;
  overflow: auto;
}
dialog::backdrop {
  background: rgba(28, 38, 31, 0.32);
  backdrop-filter: blur(7px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 19px;
}
h2 {
  font:
    27px/1.2 Georgia,
    serif;
  margin: 8px 0 0;
  font-weight: 400;
}
.close-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
}
.card-preview {
  aspect-ratio: 1200/630;
  background: color-mix(in srgb, var(--tint) 18%, var(--surface));
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.card-preview img, .card-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-preview p {
  font-size: 12px;
  color: var(--muted);
}
#shareStatus {
  font-size: 12px;
  line-height: 1.55;
  min-height: 38px;
  color: var(--muted);
}
.share-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.share-actions button,
.share-actions a {
  font:
    600 12px/1.2 ui-sans-serif,
    sans-serif;
  text-align: center;
  text-decoration: none;
  padding: 14px 8px;
  border: 1px solid var(--edge);
  border-radius: 12px;
}
.share-actions button {
  background: transparent;
}
.share-actions a {
  border-color: transparent;
}
@keyframes breathe {
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}
@media (max-width: 600px) {
  .masthead {
    left: 20px;
    right: 20px;
    top: max(22px, env(safe-area-inset-top));
  }
  .masthead h1 {
    font-size: 30px;
  }
  .masthead p {
    font-size: 10px;
  }
  .quiet-button {
    font-size: 10px;
    padding: 9px 11px;
  }
  .garden-controls {
    gap: 10px;
  }
  .dock {
    padding: 14px 15px 11px;
    border-radius: 20px;
  }
  .result {
    padding: 0 8px;
  }
  #domain {
    font-size: 17px;
  }
  .share-button {
    padding: 10px 13px;
    font-size: 11px;
  }
  #go {
    padding: 12px;
    font-size: 11px;
  }
  #go span {
    margin-left: 3px;
  }
  input {
    font-size: 16px;
  }
  .share-actions {
    grid-template-columns: 1fr 1fr;
  }
  .share-actions a {
    grid-column: 1/-1;
  }
  dialog {
    padding: 19px;
  }
}
@media (max-height: 650px) {
  .masthead h1 {
    font-size: 32px;
  }
  .masthead p {
    margin-top: 7px;
  }
  .garden-controls {
    gap: 7px;
    bottom: 8px;
  }
  .dock {
    padding-top: 10px;
    padding-bottom: 8px;
  }
  .status-row {
    margin-top: 5px;
    padding-top: 6px;
  }
  .tree-label .eyebrow {
    display: none;
  }
}
@media (min-width: 1000px) {
  .garden-controls {
    left: 48px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 320px;
    gap: 24px;
  }
  .result { align-items: flex-start; flex-direction: column; gap: 20px; padding: 0; }
  .tree-label { gap: 10px; }
  #domain {
    font-size: 25px; white-space: normal; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  }
  .tree-label .eyebrow { display: inline; }
  .input-row { flex-direction: column; align-items: stretch; gap: 12px; }
  #go { padding: 14px; }
  .dock { padding: 21px; }
  .footnote { text-align: left; }
}

.close-button { display: grid; place-items: center; padding: 0; flex: 0 0 36px; }
.close-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.share-actions a, .share-actions button { display: flex; align-items: center; justify-content: center; min-height: 46px; }
@media (max-width: 600px) { .share-actions a { grid-column: auto; } }
