/* isdou.app — Tactile Hardware Stream Deck Studio Hub */
:root {
  --desk: radial-gradient(circle at 50% 42%, #f4f2ec 0%, #eae6dd 62%, #ded9ce 100%);
  --desk-solid: #eae6dd;
  --ink: #17191d;
  --muted: #5b616b;
  --dim: #7b818c;
  --accent: #16a34a;
  --rule: rgba(23, 25, 29, 0.12);
  --glass-bg: rgba(252, 252, 250, 0.92);
  --glass-border: rgba(255, 255, 255, 0.88);
  --glass-shadow: 0 24px 56px rgba(15, 20, 28, 0.20), 0 2px 10px rgba(15, 20, 28, 0.10);
  --pill-bg: rgba(255, 255, 255, 0.78);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

html[data-finish="obsidian"] {
  --desk: radial-gradient(circle at 50% 42%, #13171e 0%, #090b0f 70%, #050608 100%);
  --desk-solid: #090b0f;
  --ink: #f2f1ef;
  --muted: #b0b5be;
  --dim: #737b88;
  --accent: #f080b0;
  --rule: rgba(242, 241, 239, 0.13);
  --glass-bg: rgba(18, 22, 30, 0.92);
  --glass-border: rgba(242, 241, 239, 0.20);
  --glass-shadow: 0 26px 64px rgba(0, 0, 0, 0.65);
  --pill-bg: rgba(20, 24, 32, 0.78);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--desk-solid);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fullscreen Hardware Console Stage (100dvh) */
.deck-stage {
  position: relative;
  height: 100dvh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  background: var(--desk);
  overflow: hidden;
  transition: background 0.35s ease;
}

.top-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 3.5vw, 44px);
  font: 11.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav-logo {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.14em;
}
.nav-role {
  color: var(--dim);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav-right a,
.nav-ctrl {
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-right a:hover,
.nav-ctrl:hover {
  color: var(--ink);
}
.nav-ctrl {
  background: var(--pill-bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 11px;
  font: 10.5px/1.1 var(--mono);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.nav-lang {
  color: var(--accent) !important;
  font-weight: 600;
}

.canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: manipulation;
}

.bottom-hint-bar {
  position: relative;
  z-index: 15;
  display: flex;
  justify-content: center;
  padding: 0 16px 20px;
  pointer-events: none;
}
.hint-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  font: 11px/1.2 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hint-sep {
  opacity: 0.35;
}
.hint-index-link {
  color: var(--ink);
  font-weight: 600;
}

/* Desktop Liquid Glass Popover */
.glass-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 296px;
  padding: 15px 16px 16px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  box-shadow: var(--glass-shadow);
  color: var(--ink);
  will-change: transform;
  animation: popIn 0.18s var(--ease);
}
.glass-popover[hidden] { display: none; }

@keyframes popIn {
  from { opacity: 0; scale: 0.96; }
  to { opacity: 1; scale: 1; }
}

.gp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.gp-code {
  font: 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--dim);
}
.gp-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--rule);
  color: var(--muted);
  font: 14px/1 var(--mono);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gp-close:hover { color: var(--ink); }

.gp-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.gp-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  flex-shrink: 0;
  object-fit: cover;
}
.gp-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.gp-plat {
  margin-top: 3px;
  font: 11px/1.2 var(--mono);
  color: var(--dim);
}
.gp-desc {
  margin: 0 0 13px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.gp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  font: 11.5px/1.2 var(--mono);
  font-weight: 500;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.gp-btn:hover { transform: translateY(-1px); }
.gp-apple {
  background: #111317;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.gp-primary {
  background: var(--ink);
  color: var(--desk-solid);
}

/* Mobile Handheld Bottom Dock */
.mobile-dock {
  display: none;
}

/* Below-the-fold Semantic Studio Index (SEO/GEO Crawlability + Quick Directory) */
.archive-section {
  background: var(--desk-solid);
  border-top: 1px solid var(--rule);
  padding: clamp(56px, 7vw, 88px) clamp(20px, 4vw, 44px) 64px;
}
.archive-inner {
  max-width: 980px;
  margin: 0 auto;
}
.archive-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px dotted var(--rule);
  margin-bottom: 8px;
}
.archive-head h2 {
  margin: 0;
  font: 600 13px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.archive-head p {
  margin: 0;
  font: 12px/1.4 var(--mono);
  color: var(--dim);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.archive-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 14px;
  border-bottom: 1px dotted var(--rule);
  transition: background 0.15s ease;
}
.archive-row:nth-child(odd) { border-right: 1px dotted var(--rule); }
.archive-row:hover { background: rgba(127, 127, 127, 0.06); }
.archive-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  border: 1px solid var(--rule);
  flex-shrink: 0;
  object-fit: cover;
}
.archive-meta { min-width: 0; flex: 1; }
.archive-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.archive-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.archive-tag {
  font: 10.5px/1 var(--mono);
  color: var(--dim);
  flex-shrink: 0;
}
.archive-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-footer {
  max-width: 980px;
  margin: 36px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font: 12px/1.6 var(--mono);
  color: var(--dim);
}
.archive-footer a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .deck-stage {
    height: auto;
    min-height: 100dvh;
  }
  .nav-role { display: none; }
  .canvas-wrap {
    height: 470px;
    flex: 0 0 auto;
  }
  .bottom-hint-bar { display: none; }
  .glass-popover { display: none !important; }
  .mobile-dock {
    display: block;
    padding: 0 16px 24px;
  }
  .md-modes {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 12px;
    justify-content: center;
  }
  .md-mode {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: var(--pill-bg);
    color: var(--muted);
    font: 11px/1.1 var(--mono);
    cursor: pointer;
  }
  .md-mode.active {
    background: var(--ink);
    color: var(--desk-solid);
    border-color: var(--ink);
  }
  .md-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--glass-shadow);
  }
  .md-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--rule);
    flex-shrink: 0;
  }
  .md-info { min-width: 0; flex: 1; }
  .md-name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
  .md-plat { font: 10.5px/1.2 var(--mono); color: var(--dim); margin-top: 2px; }
  .md-desc {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .md-go {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--desk-solid);
    font: 11px/1.1 var(--mono);
    white-space: nowrap;
  }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-row:nth-child(odd) { border-right: 0; }
  .archive-row { padding-inline: 2px; }
}
