:root {
  color-scheme: dark;
  --background: #111820;
  --foreground: #f2f6f8;
  --muted: #aebac5;
  --surface: #202c38;
  --accent: #78e7c4;
  --accent-ink: #092d22;
  --negative: #ff9baf;
  --warning: #ffd18a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--foreground);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 240px; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.widget {
  width: 100%;
  max-width: 480px;
  min-height: min(100svh, 480px);
  margin-inline: auto;
  padding: clamp(20px, 6vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.token-name { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.status { display: flex; align-items: center; gap: 7px; margin: 5px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.status[data-state="fresh"] { color: var(--accent); }
.status[data-state="stale"], .status[data-state="error"] { color: var(--warning); }
.quote { padding-block: 8px; }
.label { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.price { font-size: clamp(28px, 10.5vw, 52px); line-height: 1.15; margin: 0; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.details { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 26px 0 0; }
dt { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
dd { margin: 0; font-size: 15px; font-weight: 550; font-variant-numeric: tabular-nums; }
dd[data-direction="up"] { color: var(--accent); }
dd[data-direction="down"] { color: var(--negative); }
.notice { margin: 0; color: var(--warning); font-size: 13px; line-height: 1.5; }
[hidden] { display: none !important; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button, .share {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  color: var(--foreground);
  background: var(--surface);
  transition: background-color 150ms ease-out;
}
button:hover { background: #2c3d4d; }
button:disabled { color: var(--muted); cursor: wait; }
.share { background: var(--accent); color: var(--accent-ink); }
.share:hover { background: #a0f0d7; }
footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; }
footer a { text-decoration-color: #708393; }
footer a:hover { color: var(--foreground); }
@media (max-width: 300px) {
  .header { flex-wrap: wrap; }
  .details { gap: 16px; }
  .actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  button, .share { transition: none; }
}
