/* The page: the top (island, headline, tabs), Describe it, and the close. */

/* The top edge is the Mac's screen edge: content scrolling up behind the island fades out. */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 206px;
  z-index: 5;
  background: linear-gradient(var(--bg) 55%, transparent);
  pointer-events: none;
}

/* ---- Top ---- */
.hero { padding: 236px 0 56px; text-align: center; }
.roll {
  font-size: clamp(32px, 6.4vw, 76px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin: 0 0 14px;
}
.roll-slot {
  display: block;
  margin: 0 auto;
  height: 1.15em;
  line-height: 1.15em;
  overflow: hidden;
  vertical-align: bottom;
  text-align: left;
}
.slot-track { display: block; transition: transform .55s cubic-bezier(.2, .9, .25, 1.1); }
.roll-slot { transition: width .55s cubic-bezier(.2, .9, .25, 1); }
.slot-track > span { display: block; width: max-content; height: 1.15em; color: var(--lime); white-space: nowrap; }
.plain { color: var(--muted); font-size: 18px; margin: 0 0 22px; }

/* ---- Tabs ---- */
.tabs {
  display: flex; justify-content: center; gap: 8px; margin: 40px auto 0;
  overflow-x: auto; scrollbar-width: none; padding: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  flex: none; height: 40px; padding: 0 18px; border-radius: 20px; cursor: pointer;
  font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: none; border: 1px solid #2a2a2a;
  transition: color .25s, background .25s, border-color .25s;
}
.tabs [role="tab"]:hover { color: var(--text); border-color: #444; }
.tabs [role="tab"][aria-selected="true"] { color: #000; background: var(--lime); border-color: var(--lime); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.tabs [role="tab"].pulse { animation: tab-pulse .6s ease-out; }
@keyframes tab-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.tab-caption { min-height: 1.5em; margin: 14px auto 0; max-width: 560px; color: #bdbdbd; font-size: 15px; }
.tab-captions { list-style: none; padding: 0; margin: 20px auto 0; max-width: 560px; text-align: left; color: #bdbdbd; font-size: 14px; }
.tab-captions b { display: inline-block; min-width: 96px; color: var(--lime); font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* ---- Describe it ---- */
.describe { padding: 72px 0 40px; text-align: center; }
.kicker { font: 11px var(--mono); letter-spacing: .14em; color: var(--lime); }
.describe .head { font-size: clamp(32px, 5vw, 56px); margin: 12px 0 14px; }
.text { color: #bdbdbd; font-size: 17px; margin: 0 auto; max-width: 520px; }
.create-demo { margin: 32px auto 0; max-width: 560px; }

/* ---- Close ---- */
.close { text-align: center; padding: 72px 0 96px; }
.close .head { font-size: clamp(32px, 5vw, 56px); margin-bottom: 28px; }

footer { color: var(--muted); font: 12px var(--mono); text-align: center; padding: 32px 16px 48px; border-top: 1px solid var(--line); }

/* ---- Narrow screens ---- */
@media (max-width: 720px) {
  .hero { padding: 168px 0 40px; }
  .tabs { justify-content: flex-start; margin-left: -16px; margin-right: -16px; padding: 4px 16px; }
  .tabs [role="tab"] { height: 44px; }
  .text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .slot-track { transition: none; }
  .tabs [role="tab"].pulse { animation: none; }
}

/* Describe it: the Create widget panel (CreateWidgetView) */
.create-panel {
  width: min(520px, 100%); margin: 0 auto; padding: 16px; border-radius: 12px; text-align: left;
  display: flex; flex-direction: column; gap: 14px;
  background: #050505; border: 1px solid var(--hairline);
}
.create-field {
  min-height: 2lh; padding: 10px; border-radius: 8px; font: 13px/1.35 var(--sans, system-ui);
  color: var(--t1); background: var(--key); border: 1px solid var(--hairline);
}
.create-field:empty::before { content: 'Describe a widget, e.g. a pomodoro with a long break every 4 rounds'; color: var(--t2); }
.create-panel .keys { display: flex; gap: 6px; margin-top: -6px; }
.create-panel .grow { flex: 1; }
.create-status { min-height: 1lh; font: 13px/1.35 var(--sans, system-ui); color: var(--t2); }
.create-status.done { color: var(--t1); }

/* Phones: full-size keys for the scaled island, with Add more and while Claude asks. */
.phone-keys > div { display: none; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.phone-keys button {
  min-height: 44px; padding: 0 16px; border-radius: 10px; font: 600 14px var(--mono, ui-monospace);
  color: var(--text, #f2f2f2); background: #1a1a1a; border: 1px solid rgba(255, 255, 255, .08); cursor: pointer;
}
.phone-keys [data-answer="allow"] { background: var(--lime); color: #0b0b0b; }
html.island-scaled[data-tab="add-more"] .edit-controls,
html.island-scaled[data-island-alert="claude"] .alert-keys { display: flex; }
@media (prefers-reduced-motion: reduce) { .roll-slot { transition: none; } }

/* ---- What each widget does ---- */
.about-hint { margin: 10px auto 0; font-size: 13px; color: var(--muted); }
.see-all { color: var(--lime); text-decoration: none; font-weight: 600; }
.see-all:hover { text-decoration: underline; }
@media (hover: none) { .hover-only { display: none; } }

.sheet {
  width: min(760px, calc(100vw - 32px)); max-height: min(84vh, 900px); padding: 0 28px 28px; border-radius: 16px;
  color: var(--text); background: #111; border: 1px solid #2a2a2a; text-align: left;
}
.sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 24px 0 8px; background: #111; }
.sheet h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.sheet .sheet-close { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -12px; border-radius: 22px; color: var(--muted); font-size: 24px; text-decoration: none; }
.sheet .sheet-close:hover { color: var(--text); background: #1c1c1c; }
.sheet-intro, .sheet-note { margin: 8px 0 0; color: #bdbdbd; font-size: 14px; line-height: 1.55; }
.sheet-note b { color: var(--text); }
.sheet h3 { margin: 26px 0 10px; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.sheet dl { margin: 0; display: grid; gap: 12px; }
.sheet dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; }
.sheet dt { font: 600 12px/21px var(--mono); }
.sheet dd { margin: 0; color: #bdbdbd; font-size: 14px; line-height: 21px; }
.sheet .short { color: var(--text); }
@media (max-width: 560px) { .sheet { padding: 0 18px 22px; } .sheet dl > div { grid-template-columns: 1fr; gap: 2px; } }
/* No JS: the link's #widgets shows the sheet in the page. */
.sheet:target { display: block; position: static; margin: 40px auto; }
.sheet h2:focus { outline: none; }
