/* Rummytrove — Mobile-First App Discovery */

:root {
  --ian-bg: #f7f8fa;
  --ian-surface: #ffffff;
  --ian-ink: #171923;
  --ian-ink-soft: #3d4450;
  --ian-muted: #777f8c;
  --ian-brand: #4169e1;
  --ian-brand-soft: #e8eefc;
  --ian-line: #e9ecf1;
  --ian-danger: #c23b3b;
  --ian-radius: 12px;
  --ian-radius-sm: 8px;
  --ian-radius-pill: 999px;
  --ian-max: 1080px;
  --ian-font: "Inter", "Segoe UI", system-ui, sans-serif;
  --ian-header-h: 56px;
  --ian-tabbar-h: 56px;
  --ian-safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--ian-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ian-ink-soft);
  background: var(--ian-bg);
  overflow-x: clip;
  max-width: 100%;
  /* Space for mobile tab bar (keep footer clear of tab bar) */
  padding-bottom: calc(var(--ian-tabbar-h) + var(--ian-safe-bottom) + 16px);
}

.ian-main,
.ian-container,
.ian-page-shell,
.ian-related-strip,
.ian-app-detail {
  max-width: 100%;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ian-brand); text-decoration: none; }
a:hover { color: #2f4fc4; }

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  color: var(--ian-ink);
  font-weight: 700;
  line-height: 1.25;
  font-family: var(--ian-font);
}

h1 { font-size: 1.45rem; letter-spacing: -0.02em; }
h2 { font-size: 1.1rem; }
p { margin: 0 0 0.85em; }
ul, ol { margin: 0 0 0.85em; padding-left: 1.15em; }

.screen-reader-text,
.ian-skip-link { position: absolute; left: -9999px; }
.ian-skip-link:focus {
  left: 10px; top: 10px; z-index: 1000;
  background: var(--ian-brand); color: #fff; padding: 8px 12px; border-radius: 8px;
}

.ian-container {
  width: 100%;
  max-width: var(--ian-max);
  margin-inline: auto;
  padding-inline: 14px;
}

/* Header */
.ian-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(247, 248, 250, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ian-line);
  padding-top: env(safe-area-inset-top, 0px);
}

.ian-header-inner {
  min-height: var(--ian-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 6px;
}

.ian-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 52px);
}

/* Fallback mark (no custom logo) */
.ian-brand-mark,
.ian-brand-mark svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  display: block;
}

/* Wide custom logo (icon + Rummytrove wordmark) */
.ian-brand-logo {
  display: block;
  width: auto;
  height: 40px;
  max-width: min(240px, 62vw);
  object-fit: contain;
  object-position: left center;
  flex-shrink: 1;
  border-radius: 0;
}

.ian-brand-text { display: flex; flex-direction: column; min-width: 0; justify-content: center; }
.ian-brand-name {
  font-weight: 800; font-size: 0.98rem; color: var(--ian-ink);
  letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ian-menu { list-style: none; margin: 0; padding: 0; display: none; }
.ian-primary-nav--desktop { display: none; }

.ian-nav-toggle,
.ian-nav-close {
  border: 1px solid var(--ian-line);
  background: var(--ian-surface);
  border-radius: 10px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  cursor: pointer; color: var(--ian-ink); font-size: 1.3rem;
  flex: 0 0 40px;
}

.ian-nav-toggle-bars,
.ian-nav-toggle-bars::before,
.ian-nav-toggle-bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.ian-nav-toggle-bars::before,
.ian-nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.ian-nav-toggle-bars::before { top: -5px; }
.ian-nav-toggle-bars::after { top: 5px; }

.ian-nav-panel { display: none; }
.ian-nav-scrim {
  display: none; position: fixed; inset: 0;
  background: rgba(23, 25, 35, 0.4); z-index: 1100;
  border: 0; padding: 0; margin: 0; cursor: pointer;
}
.ian-nav-scrim.is-open { display: block; }

html.ian-nav-open,
html.ian-nav-open body { overflow: hidden; overscroll-behavior: none; }
html.ian-nav-open body { touch-action: none; }
html.ian-nav-open .ian-nav-panel { touch-action: pan-y; }
html.ian-nav-open { padding-right: var(--ian-scrollbar-gap, 0); scroll-behavior: auto; }

.admin-bar .ian-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .ian-header { top: 46px; }
}

/* Buttons & search */
.ian-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: var(--ian-radius-pill);
  font-weight: 700; font-size: 0.9rem; border: 1px solid transparent;
  font-family: inherit; cursor: pointer; appearance: none; -webkit-appearance: none;
  text-decoration: none; box-sizing: border-box;
}
.ian-btn-primary { background: var(--ian-brand); color: #fff; }
.ian-btn-primary:hover { background: #2f4fc4; color: #fff; }
.ian-btn-ghost { background: var(--ian-surface); border-color: var(--ian-line); color: var(--ian-ink); }
.ian-btn-ghost:hover { border-color: var(--ian-brand); color: var(--ian-brand); }
.ian-btn-block { width: 100%; }

.ian-search {
  display: flex; width: 100%; align-items: stretch;
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius-pill);
  overflow: hidden;
}
.ian-search--full { width: 100%; max-width: 100%; }
.ian-search input[type="search"] {
  flex: 1; border: 0; padding: 11px 14px; font: inherit;
  background: transparent; color: var(--ian-ink); min-width: 0;
  height: 44px;
}
.ian-search input[type="search"]:focus { outline: none; }
.ian-search button {
  border: 0; background: var(--ian-brand); color: #fff;
  padding: 0 16px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.ian-search--icon .ian-search-icon-btn {
  width: 44px; min-width: 44px; padding: 0;
  display: grid; place-items: center; flex: 0 0 44px;
}
.ian-search-icon {
  width: 18px; height: 18px; position: relative; display: block;
}
.ian-search-icon::before {
  content: ""; position: absolute; left: 1px; top: 1px;
  width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%;
  box-sizing: border-box;
}
.ian-search-icon::after {
  content: ""; position: absolute; right: 1px; bottom: 1px;
  width: 7px; height: 2px; background: #fff; border-radius: 1px;
  transform: rotate(45deg); transform-origin: left center;
}

.ian-pill {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: var(--ian-radius-pill);
  background: var(--ian-brand-soft); color: var(--ian-brand);
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}

.ian-mf-link {
  font-size: 0.84rem; font-weight: 700; color: var(--ian-brand); white-space: nowrap;
}

/* Home */
.ian-mf-search-wrap { padding: 12px 0 4px; }
.ian-mf-search-note {
  margin: 8px 0 0; font-size: 0.78rem; color: var(--ian-muted);
}

.ian-mf-cats { padding: 8px 0 4px; }

.ian-chip-scroll-wrap {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}
.ian-chip-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(247, 248, 250, 0), var(--ian-bg) 85%);
}
.ian-chip-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  max-width: 100%;
}
.ian-chip-scroll::-webkit-scrollbar { display: none; }
.ian-chip-scroll--pad { margin: 10px 0; }

.ian-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  padding: 8px 14px; border-radius: var(--ian-radius-pill);
  border: 1px solid var(--ian-line); background: var(--ian-surface);
  color: var(--ian-ink-soft); font-size: 0.84rem; font-weight: 650;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
button.ian-chip { margin: 0; }
.ian-chip.is-active,
.ian-chip:hover {
  background: var(--ian-brand); border-color: var(--ian-brand); color: #fff;
}

.ian-home [data-ian-home-explore].is-loading [data-ian-home-list] {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ian-mf-section { padding: 14px 0; }
.ian-mf-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.ian-mf-section-head h2 { margin: 0; }
.ian-mf-more { margin: 12px 0 0; }

/* App rows */
.ian-app-list {
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius);
  overflow: hidden;
}

.ian-app-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  height: 76px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--ian-line);
  color: inherit;
}
.ian-app-row:last-child { border-bottom: 0; }
.ian-app-row:active { background: #f3f5f9; }

.ian-app-row-icon .ian-app-icon,
.ian-app-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ian-bg);
  border: 1px solid var(--ian-line);
}

.ian-app-icon--placeholder {
  display: grid; place-items: center;
  font-weight: 800; color: var(--ian-brand); background: var(--ian-brand-soft);
}

.ian-app-row-body { min-width: 0; display: grid; gap: 4px; }
.ian-app-row-title {
  font-weight: 700; color: var(--ian-ink); font-size: 0.95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.25;
}
.ian-app-row-meta,
.ian-app-row-status {
  font-size: 0.76rem; color: var(--ian-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.25;
}
.ian-app-row-chevron { color: #c5ccd6; font-size: 1.15rem; line-height: 1; opacity: 0.7; }

/* Guides */
.ian-guide-list {
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius);
  overflow: hidden;
}
.ian-guide-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px; border-bottom: 1px solid var(--ian-line); color: inherit;
}
.ian-guide-row:last-child { border-bottom: 0; }
.ian-guide-row-copy { display: grid; gap: 2px; min-width: 0; }
.ian-guide-row-copy strong {
  color: var(--ian-ink); font-size: 0.92rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ian-guide-row-copy small { color: var(--ian-muted); font-size: 0.74rem; }
.ian-guide-row-arrow { color: var(--ian-brand); font-weight: 700; }

.ian-mf-note { padding-top: 6px; padding-bottom: 8px; }
.ian-note-card {
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius);
  padding: 12px 14px;
}
.ian-note-card p { margin: 0; }
.ian-note-age {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #c23b3b;
}
.ian-note-body {
  font-size: 0.82rem;
  color: var(--ian-muted);
  line-height: 1.45;
}

.ian-app-detail .ian-detail-age-note {
  margin: 4px 0 8px;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Detail */
.ian-page-shell { padding: 12px 0 20px; }

.ian-breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 0.76rem; color: var(--ian-muted); margin-bottom: 12px;
}
.ian-breadcrumbs a { color: var(--ian-ink-soft); }
.ian-bc-sep { opacity: 0.5; }

/* ——— App detail (mobile-first, desktop overrides later) ——— */
.ian-app-detail .ian-page-shell {
  padding: 10px 0 28px;
}

.ian-app-detail .ian-breadcrumbs {
  margin-bottom: 10px;
}

.ian-app-detail .ian-detail-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 10px;
  align-items: start;
}

.ian-app-detail .ian-detail-icon .ian-app-icon {
  width: 86px;
  height: 86px;
  border-radius: 18px;
}

.ian-app-detail .ian-detail-hero-copy {
  min-width: 0;
}

.ian-app-detail .ian-pill {
  padding: 2px 7px;
  font-size: 0.62rem;
}

.ian-app-detail .ian-detail-hero h1 {
  margin: 4px 0 6px;
  font-size: 1.32rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ian-app-detail .ian-detail-lead {
  margin: 0 0 8px;
}

.ian-app-detail .ian-detail-lead-text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ian-muted);
  line-height: 1.45;
}

.ian-app-detail .ian-detail-lead.is-clamped .ian-detail-lead-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.ian-app-detail .ian-detail-lead.is-expanded .ian-detail-lead-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.ian-app-detail .ian-lead-toggle {
  margin-top: 5px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ian-brand);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.ian-app-detail .ian-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ian-app-detail .ian-detail-actions .ian-btn {
  min-height: 40px;
}

.ian-app-detail .ian-btn-download {
  gap: 8px;
  padding-inline: 18px;
}

.ian-app-detail .ian-download-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.ian-app-detail .ian-detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
  align-items: stretch;
}

.ian-app-detail .ian-fact {
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius-sm);
  padding: 8px 10px;
  min-width: 0;
  min-height: 56px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
}

.ian-app-detail .ian-fact-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--ian-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.ian-app-detail .ian-fact-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ian-ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
}

/* Dossier accordion */
.ian-app-detail .ian-accordion {
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius);
  overflow: hidden;
  margin: 0 0 12px;
}

.ian-app-detail .ian-acc {
  border-bottom: 1px solid var(--ian-line);
}

.ian-app-detail .ian-acc:last-child {
  border-bottom: 0;
}

.ian-app-detail .ian-acc > summary {
  list-style: none;
  cursor: pointer;
  min-height: 54px;
  padding: 0 36px 0 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ian-ink);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.ian-app-detail .ian-acc > summary::-webkit-details-marker {
  display: none;
}

.ian-app-detail .ian-acc > summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ian-brand);
  border-bottom: 2px solid var(--ian-brand);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.2s ease;
}

.ian-app-detail .ian-acc[open] > summary::after {
  transform: translateY(-20%) rotate(-135deg);
}

.ian-app-detail .ian-acc-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ian-brand-soft);
  position: relative;
  flex-shrink: 0;
}

.ian-app-detail .ian-acc-ico::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid var(--ian-brand);
  border-radius: 3px;
}

.ian-app-detail .ian-acc-ico--feat::before {
  border-radius: 50%;
  inset: 6px;
}

.ian-app-detail .ian-acc-ico--install::before {
  border: 0;
  inset: 5px 7px;
  background: var(--ian-brand);
  border-radius: 2px;
}

.ian-app-detail .ian-acc-ico--faq::before {
  border: 0;
  left: 8px;
  right: 8px;
  top: 6px;
  bottom: 6px;
  background: transparent;
  border-left: 2px solid var(--ian-brand);
  border-right: 2px solid var(--ian-brand);
}

.ian-app-detail .ian-acc-body {
  padding: 0 14px 14px;
  font-size: 0.9rem;
  color: var(--ian-ink-soft);
  line-height: 1.55;
  animation: ian-acc-in 0.2s ease;
}

.ian-app-detail .ian-acc-body > *:last-child {
  margin-bottom: 0;
}

@keyframes ian-acc-in {
  from { opacity: 0.35; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ian-app-detail .ian-acc-body h2 {
  margin: 16px 0 8px;
  font-size: 1rem;
  line-height: 1.3;
}

.ian-app-detail .ian-acc-body h2:first-child {
  margin-top: 0;
}

.ian-app-detail .ian-acc-body p,
.ian-app-detail .ian-acc-body li,
.ian-app-detail .ian-acc-body dd {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ian-ink-soft);
}

.ian-app-detail .ian-acc-body .ian-section-subtitle,
.ian-app-detail .ian-acc-body .ian-testing-note {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--ian-muted);
  line-height: 1.45;
}

.ian-app-detail .ian-acc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 0.82rem;
}

.ian-app-detail .ian-acc-body th,
.ian-app-detail .ian-acc-body td {
  border: 1px solid var(--ian-line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.ian-app-detail .ian-acc-body th {
  background: #f3f5f9;
  color: var(--ian-ink);
  font-weight: 700;
}

.ian-app-detail .ian-feature-list,
.ian-app-detail .ian-acc-body ul {
  margin: 0;
  padding-left: 1.15em;
}

.ian-app-detail .ian-feature-list li,
.ian-app-detail .ian-acc-body ul li {
  margin-bottom: 6px;
}

.ian-app-detail .ian-acc-body .ian-test-facts,
.ian-app-detail .ian-test-facts {
  margin: 0;
  display: grid;
  gap: 8px;
}

.ian-app-detail .ian-test-facts > div {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--ian-line);
}

.ian-app-detail .ian-test-facts > div:first-child { border-top: 0; padding-top: 0; }

.ian-app-detail .ian-test-facts dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ian-muted);
}

.ian-app-detail .ian-test-facts dd {
  margin: 0;
  font-weight: 650;
  color: var(--ian-ink);
  overflow-wrap: anywhere;
}

.ian-app-detail .ian-test-steps {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.ian-app-detail .ian-test-steps > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius-sm);
  background: #fafbfd;
}

.ian-app-detail .ian-test-steps > div > span:first-child {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ian-brand-soft);
  color: var(--ian-brand);
  font-weight: 800;
  font-size: 0.8rem;
}

.ian-app-detail .ian-test-steps strong {
  color: var(--ian-ink);
  font-size: 0.88rem;
}

.ian-app-detail .ian-test-steps small {
  color: var(--ian-muted);
  font-size: 0.78rem;
}

.ian-app-detail .ian-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ian-app-detail .ian-tested-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ian-brand-soft);
  color: var(--ian-brand);
  font-size: 0.72rem;
  font-weight: 700;
}

.ian-app-detail .ian-screenshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.ian-app-detail .ian-shot,
.ian-app-detail .ian-screenshots figure {
  margin: 0;
  border-radius: var(--ian-radius-sm);
  overflow: hidden;
  border: 1px solid var(--ian-line);
  background: #f3f5f9;
}

.ian-app-detail .ian-shot img,
.ian-app-detail .ian-screenshots img {
  width: 100%;
  height: auto;
  display: block;
}

.ian-app-detail .ian-faq-list {
  display: grid;
  gap: 0;
}

.ian-app-detail .ian-faq-item {
  border-top: 1px solid var(--ian-line);
  padding: 8px 0;
}

.ian-app-detail .ian-faq-item:first-child { border-top: 0; }

.ian-app-detail .ian-faq-item > summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ian-ink);
  list-style: none;
}

.ian-app-detail .ian-faq-item > summary::-webkit-details-marker { display: none; }

.ian-app-detail .ian-faq-answer {
  margin-top: 8px;
}

.ian-app-detail .ian-faq-answer p {
  margin: 0;
  color: var(--ian-muted);
  font-size: 0.86rem;
}

.ian-app-detail .ian-view-all {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.86rem;
}

.ian-app-detail .ian-comparison-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius-sm);
  overflow: hidden;
  margin: 0 0 10px;
}

.ian-app-detail .ian-comparison-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--ian-line);
  font-size: 0.8rem;
}

.ian-app-detail .ian-comparison-row:first-child,
.ian-app-detail .ian-comparison-head {
  border-top: 0;
  background: #f3f5f9;
  font-weight: 700;
}

@media (max-width: 520px) {
  .ian-app-detail .ian-screenshots {
    grid-template-columns: 1fr 1fr;
  }
  .ian-app-detail .ian-comparison-row {
    grid-template-columns: 1fr;
  }
}

.ian-app-detail .ian-detail-notice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #eef1f6;
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius-sm);
}

.ian-app-detail .ian-detail-notice-ico {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: #d9e2f5;
  position: relative;
  flex-shrink: 0;
}

.ian-app-detail .ian-detail-notice-ico::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 4px;
  bottom: 5px;
  border: 2px solid var(--ian-brand);
  border-radius: 40% 40% 45% 45%;
  box-sizing: border-box;
}

.ian-app-detail .ian-detail-notice-ico::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  width: 2px;
  height: 7px;
  background: var(--ian-brand);
  border-radius: 1px;
  box-shadow: 0 8px 0 -0.5px var(--ian-brand);
}

.ian-app-detail .ian-detail-notice-copy strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ian-ink);
  margin-bottom: 2px;
}

.ian-app-detail .ian-detail-notice-copy p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--ian-muted);
}

/* Related Apps — mobile: 3 rows × 4 cols (12 apps) */
.ian-app-detail .ian-related-strip {
  margin: 0 0 12px;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 6px;
}

.ian-app-detail .ian-related-strip .ian-mf-section-head {
  margin-bottom: 8px;
}

.ian-app-detail .ian-h-scroll {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 8px;
  padding: 0 0 4px;
  max-width: 100%;
  overflow: hidden;
}

.ian-app-detail .ian-h-card {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: start;
  text-align: center;
  color: inherit;
  min-width: 0;
  box-sizing: border-box;
}

.ian-app-detail .ian-h-card-icon {
  width: 58px;
  height: 58px;
}

.ian-app-detail .ian-h-card-icon .ian-app-icon {
  width: 58px;
  height: 58px;
  border-radius: 13px;
}

.ian-app-detail .ian-h-card-title {
  width: 100%;
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--ian-ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Extra clearance above fixed tab bar on app detail only */
body.single-app {
  padding-bottom: calc(var(--ian-tabbar-h) + var(--ian-safe-bottom) + 36px);
}

/*
 * Mobile page shells: .ian-page-shell shorthand clears .ian-container padding-inline.
 * Restore horizontal inset to align with header logo (All Apps + App detail only).
 */
@media (max-width: 959px) {
  body.post-type-archive-app .ian-index-page > .ian-container.ian-page-shell,
  body.tax-app_category .ian-index-page > .ian-container.ian-page-shell,
  body.single-app .ian-app-detail > .ian-container.ian-page-shell {
    padding-left: clamp(14px, 4vw, 16px);
    padding-right: clamp(14px, 4vw, 16px);
    box-sizing: border-box;
  }
}

/* Index */
.ian-index-header { margin-bottom: 8px; }
.ian-index-lead { margin: 0 0 10px; color: var(--ian-muted); font-size: 0.84rem; }

.ian-filter-panel {
  margin: 0 0 12px;
  background: var(--ian-surface);
  border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius-sm);
}
.ian-filter-toggle {
  list-style: none; cursor: pointer; padding: 11px 12px;
  font-weight: 700; font-size: 0.88rem; color: var(--ian-ink);
}
.ian-filter-toggle::-webkit-details-marker { display: none; }
.ian-filter-body { padding: 0 10px 10px; }

.ian-letter-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.ian-letter {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border-radius: 8px; border: 1px solid var(--ian-line);
  background: var(--ian-bg); color: var(--ian-ink-soft);
  font-size: 0.78rem; font-weight: 700;
}
.ian-letter.is-active,
.ian-letter:hover { background: var(--ian-brand); border-color: var(--ian-brand); color: #fff; }

.ian-empty {
  padding: 20px; text-align: center; color: var(--ian-muted);
  background: var(--ian-surface); border: 1px dashed var(--ian-line); border-radius: var(--ian-radius);
}

.ian-pagination { margin-top: 14px; }
.ian-pagination .page-numbers {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0; margin: 0; justify-content: center;
}
.ian-pagination a,
.ian-pagination span {
  display: inline-flex; min-width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--ian-line);
  background: var(--ian-surface); color: var(--ian-ink); font-weight: 650; font-size: 0.84rem;
}
.ian-pagination .current { background: var(--ian-brand); border-color: var(--ian-brand); color: #fff; }

/* Content pages */
.ian-content-card,
.ian-page-header + .entry-content {
  background: var(--ian-surface); border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius); padding: 14px;
}
.ian-page-header { margin-bottom: 12px; }
.ian-page-header p { color: var(--ian-muted); }

.ian-post-grid { display: grid; gap: 10px; }
.ian-post-card {
  background: var(--ian-surface); border: 1px solid var(--ian-line);
  border-radius: var(--ian-radius); overflow: hidden;
}
.ian-post-card-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ian-post-card-body { padding: 12px; }
.ian-post-card-title a { color: var(--ian-ink); font-weight: 700; }
.ian-post-card-meta { margin: 0 0 4px; color: var(--ian-muted); font-size: 0.74rem; }

/* Footer compact on mobile (~15% shorter) */
.ian-footer { margin-top: 4px; padding: 0 0 6px; }
.ian-footer-card {
  background: #1b2030; color: #d7dbe5;
  border-radius: var(--ian-radius); padding: 12px 14px;
}
.ian-footer a { color: #fff; }
.ian-footer a:hover { color: #9db4ff; }
.ian-footer-main { display: grid; gap: 12px; }
.ian-footer .ian-brand-name { color: #fff; }
.ian-footer .ian-brand {
  max-width: 100%;
}
.ian-footer .ian-brand-logo {
  height: 36px;
  max-width: min(220px, 70vw);
}
.ian-footer-intro {
  margin: 8px 0 0;
  max-width: 36em;
  font-size: 0.8rem;
  color: #a8b0bf;
  line-height: 1.5;
}
.ian-footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ian-footer-heading {
  margin: 0 0 6px; font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: #9db4ff; font-weight: 800;
}
.ian-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ian-footer-links a { font-size: 0.82rem; line-height: 1.3; }
.ian-footer-bottom {
  display: grid; gap: 2px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.ian-footer-copy,
.ian-footer-note { margin: 0; font-size: 0.72rem; color: #8e97a8; }
.ian-footer-brand-actions { display: none; }
.ian-footer-headline { display: none; }

/* Mobile drawer */
.ian-nav-panel {
  --ian-drawer-w: min(82vw, 300px);
  display: block; position: fixed; top: 0; right: calc(-1 * var(--ian-drawer-w));
  width: var(--ian-drawer-w); height: 100%; max-height: 100dvh;
  background: #fff; border-left: 1px solid var(--ian-line); padding: 14px;
  z-index: 1200; overflow: auto; visibility: hidden; pointer-events: none;
  transition: right 0.2s ease, visibility 0.2s ease; box-sizing: border-box;
}
.ian-nav-panel.is-open { right: 0; visibility: visible; pointer-events: auto; }
.ian-nav-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ian-line);
}
.ian-nav-panel .ian-menu { display: flex; flex-direction: column; gap: 2px; }
.ian-nav-panel .ian-menu a {
  display: block; padding: 12px 10px; border-radius: 8px; color: var(--ian-ink); font-weight: 650;
}
body.ian-nav-open .ian-header { z-index: 1150; }
body.ian-nav-open .ian-nav-toggle { visibility: hidden; pointer-events: none; }

/* Mobile tab bar */
.ian-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--ian-tabbar-h) + var(--ian-safe-bottom));
  padding-bottom: var(--ian-safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--ian-line);
}
.ian-tabbar-item {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  color: var(--ian-muted); font-size: 0.68rem; font-weight: 650; padding-top: 6px;
}
.ian-tabbar-item.is-active { color: var(--ian-brand); }
.ian-tabbar-icon {
  width: 22px; height: 22px; position: relative; display: block;
}
.ian-tabbar-icon::before,
.ian-tabbar-icon::after {
  content: ""; position: absolute; background: currentColor;
}
/* home */
.ian-tabbar-icon--home::before {
  inset: 4px 3px 3px; border: 2px solid currentColor; background: transparent;
  clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}
.ian-tabbar-icon--home::after { display: none; }
/* apps grid */
.ian-tabbar-icon--apps::before {
  width: 8px; height: 8px; left: 2px; top: 3px; border-radius: 2px;
  box-shadow: 10px 0 0 currentColor, 0 10px 0 currentColor, 10px 10px 0 currentColor;
}
.ian-tabbar-icon--apps::after { display: none; }
/* guides */
.ian-tabbar-icon--guides::before {
  left: 5px; top: 3px; width: 12px; height: 16px; border: 2px solid currentColor;
  background: transparent; border-radius: 2px;
}
.ian-tabbar-icon--guides::after {
  left: 8px; top: 8px; width: 6px; height: 2px;
  box-shadow: 0 3px 0 currentColor, 0 6px 0 currentColor;
}
/* more */
.ian-tabbar-icon--more::before {
  left: 4px; top: 10px; width: 4px; height: 4px; border-radius: 50%;
  box-shadow: 7px 0 0 currentColor, 14px 0 0 currentColor;
}
.ian-tabbar-icon--more::after { display: none; }

/* Desktop */
@media (min-width: 960px) {
  body { padding-bottom: 0; font-size: 16px; }

  .ian-tabbar { display: none; }

  .ian-nav-toggle { display: none; }
  .ian-primary-nav--desktop { display: block; }
  .ian-menu {
    display: flex; align-items: center; gap: 2px;
  }
  .ian-menu a {
    display: block; padding: 8px 12px; border-radius: var(--ian-radius-pill);
    color: var(--ian-ink-soft); font-weight: 650; font-size: 0.9rem;
  }
  .ian-menu a:hover,
  .ian-menu .current-menu-item > a {
    background: var(--ian-brand-soft); color: var(--ian-brand);
  }

  .ian-nav-panel,
  .ian-nav-scrim { display: none !important; }

  .ian-header-inner { min-height: 64px; }
  .ian-brand-logo {
    height: 44px;
    max-width: 280px;
  }
  .ian-footer .ian-brand-logo {
    height: 40px;
    max-width: 260px;
  }

  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.25rem; }

  .ian-mf-search-wrap .ian-search { max-width: 520px; }
  .ian-chip-scroll-wrap::after { display: none; }
  .ian-chip-scroll { flex-wrap: wrap; overflow: visible; }

  .ian-app-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ian-app-row { border-right: 1px solid var(--ian-line); }
  .ian-app-row:nth-child(2n) { border-right: 0; }

  .ian-home .ian-app-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ian-guide-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ian-guide-row { border-right: 1px solid var(--ian-line); }
  .ian-guide-row:nth-child(3n) { border-right: 0; }

  body.single-app { padding-bottom: 0; }

  .ian-app-detail .ian-page-shell { padding: 20px 0 40px; }

  .ian-app-detail .ian-detail-hero {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px;
    background: var(--ian-surface);
    border: 1px solid var(--ian-line);
    border-radius: var(--ian-radius);
  }
  .ian-app-detail .ian-detail-icon .ian-app-icon { width: 96px; height: 96px; }
  .ian-app-detail .ian-detail-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
  .ian-app-detail .ian-detail-lead.is-clamped .ian-detail-lead-text {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
  .ian-app-detail .ian-lead-toggle { display: none !important; }
  .ian-app-detail .ian-accordion { margin-bottom: 16px; }
  .ian-app-detail .ian-detail-notice { margin-bottom: 18px; }
  .ian-app-detail .ian-related-strip { margin-bottom: 0; }
  .ian-app-detail .ian-h-scroll {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .ian-app-detail .ian-h-card-icon,
  .ian-app-detail .ian-h-card-icon .ian-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
  .ian-app-detail .ian-h-card-title {
    font-size: 0.75rem;
  }

  .ian-page-shell { padding: 20px 0 40px; }
  .ian-footer-card { padding: 22px 24px; }
  .ian-footer-main {
    grid-template-columns: 1.2fr 1fr; gap: 32px;
  }
  .ian-footer-bottom {
    display: flex; justify-content: space-between; align-items: baseline;
  }
  .ian-footer-note { text-align: right; }

  .ian-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .ian-home .ian-app-list,
  .ian-index-page .ian-app-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ian-app-row:nth-child(2n) { border-right: 1px solid var(--ian-line); }
  .ian-app-row:nth-child(3n) { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ian-nav-panel { transition: none; }
}
