/* =========================================================================
   ZynNFT — iOS design language on a white canvas.

   One accent (Pi purple) on white, the way a modern iPhone app looks: large
   titles, grouped lists with hairline separators, continuous-radius pills,
   soft shadows, and a translucent bottom tab bar. Deliberately not a crypto
   site: no dark theme, no gradients, no neon.
   ========================================================================= */

:root {
  /* Surfaces — iOS system colours on a white base. */
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;
  --card: #ffffff;
  --fill: #f2f2f7;
  --fill-2: #e9e9ee;

  /* Text. */
  --label: #1c1c1e;
  --label-2: rgba(60, 60, 67, 0.6);
  --label-3: rgba(60, 60, 67, 0.3);

  /* A single hairline, the way UIKit draws a separator. */
  --separator: rgba(60, 60, 67, 0.12);
  --separator-strong: rgba(60, 60, 67, 0.22);

  /* The one accent. Pi purple, used sparingly. */
  --accent: #7c3aed;
  --accent-press: #6d28d9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-soft-2: rgba(124, 58, 237, 0.16);

  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;

  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 980px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 1px 3px rgba(0, 0, 0, 0.06), 0 24px 60px rgba(0, 0, 0, 0.16);

  --tabbar-h: 58px;

  /* SF Pro is not on the web; the system stack resolves to it on Apple devices
     and to the platform's own face everywhere else. */
  --font: -apple-system, blinkmacsystemfont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", "Helvetica Neue", inter, roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg-grouped);
  color: var(--label);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

/* The app is a single column — a phone-width canvas centred on desktop, full
   bleed on mobile. Flex column so the tab bar sits below the scrolling view. */
/* The app canvas — full bleed on all screens */
#app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

@media (min-width: 520px) {
  body {
    background: var(--bg-grouped);
  }
  #app {
    height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

/* ========================================================= iOS Status Bar */

.ios-status-bar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--label);
  user-select: none;
  flex: none;
}

.ios-time {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 14px;
  width: 48px;
}

.ios-dynamic-island {
  width: 112px;
  height: 26px;
  background: #000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}
.ios-dynamic-island:hover {
  transform: scale(1.03);
}

.island-lens {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3556 0%, #0d111d 70%, #000 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
}

.island-sensor {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #111;
}

.ios-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 58px;
  justify-content: flex-end;
}

.ios-status-icons svg {
  height: 12px;
  width: auto;
  fill: currentColor;
}

.ios-battery {
  width: 22px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px;
  display: flex;
  align-items: center;
  position: relative;
}
.ios-battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 2.5px;
  width: 1.5px;
  height: 4px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}
.battery-level {
  width: 78%;
  height: 100%;
  background: currentColor;
  border-radius: 1.5px;
}

/* Home Indicator */
.ios-home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.24);
  z-index: 35;
  pointer-events: none;
}

#view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* No `scroll-behavior: smooth`: `setTab` resets scrollTop after every render,
     and a smooth rule turned that one-line jump into an animated scrub the
     person's next flick has to fight. Wheel and touch scrolling were never
     smooth-scrolled by this property — it only governed programmatic jumps. */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

/* =========================================================== large titles */

/* The sticky header a UIKit app shows before you scroll. */
.largetitle-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px 20px 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(25px) saturate(1.8);
  -webkit-backdrop-filter: blur(25px) saturate(1.8);
  border-bottom: 0.5px solid var(--separator);
}

.largetitle {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.largetitle-bar .actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.largetitle-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

/* Small inline header for pushed pages. */
.navbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 0.5px solid var(--separator);
}
.navbar .title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--fill);
  color: var(--label);
  flex: none;
  transition: transform 0.12s, background 0.15s;
}
.iconbtn:active { transform: scale(0.92); background: var(--fill-2); }
.iconbtn svg { width: 19px; height: 19px; }

/* ================================================================ content */

.view {
  padding: 0 20px;
}

.sectionhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}
.sectionhead h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.sectionhead .link {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.eyebrow {
  margin: 20px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--label-2);
}

p.lede {
  margin: 6px 0 0;
  color: var(--label-2);
  font-size: 15px;
}

/* Horizontal rail, the way iOS apps scroll a row of cards. */
.rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 20px 6px;
  margin: 0 -20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }

