/* Preserve the original design with a sidebar flush to the window edge. */
.sidebar {
  margin: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.about-modal {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.about-privacy {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius-soft);
  background: var(--surface-muted);
}
.about-privacy h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
  font-weight: 650;
}
.about-privacy p {
  margin: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.65;
}
.about-privacy p:last-child { margin-bottom: 0; }
@media (max-width: 840px), (max-width: 1024px) and (max-height: 600px) and (hover: none) and (pointer: coarse) {
  .sidebar {
    margin: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
}

.brand-row {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.brand-logo {
  display: block;
  width: 100%;
  max-width: 228px;
  height: auto;
}
.brand-tagline {
  margin: 0;
  width: 100%;
  max-width: 228px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}
@media (max-width: 840px), (max-width: 1024px) and (max-height: 600px) and (hover: none) and (pointer: coarse) {
  .sidebar { grid-template-rows: minmax(58px, auto) 30px; }
  .brand-row {
    top: 0;
    gap: 5px;
    min-width: 0;
    align-items: flex-start;
    padding: 0;
    margin-left: 0;
  }
  .brand-logo {
    width: 100%;
    max-width: 156px;
    height: auto;
  }
  .brand-tagline {
    max-width: 156px;
    text-align: left;
    font-size: 0.61rem;
    line-height: 1.35;
  }
  .language-panel { top: 130px; max-height: calc(100dvh - 146px); }
}

@media (max-width: 360px) {
  .brand-tagline { font-size: 0.58rem; }
}

/* Phone home-screen guide; native dialog keeps background controls inert. */
.install-guide {
  box-sizing: border-box;
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
}
.install-guide::backdrop { background: rgba(0, 0, 0, 0.45); }
.install-guide-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.7rem;
}
.install-guide-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 20px;
  background: var(--surface-muted);
}
.install-guide-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.install-guide-eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; }
.install-guide h2 { margin: 0; font-size: 1.8rem; line-height: 1.2; letter-spacing: -0.035em; }
/* The heading receives initial screen-reader focus; controls retain focus rings. */
#installGuideTitle:focus { outline: none; }
.install-guide-intro { margin: 12px 0 20px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.install-guide-platforms { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-muted); margin-bottom: 22px; }
.install-guide-platforms button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font: inherit; font-size: 0.85rem; }
.install-guide-platforms button[aria-pressed="true"] { color: var(--text); background: var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 600; }
.install-guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.install-guide-steps li { display: flex; align-items: flex-start; gap: 12px; }
.install-step-number { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 0.74rem; font-weight: 600; }
.install-guide-steps strong { display: block; font-size: 0.87rem; line-height: 1.5; font-weight: 600; }
.install-guide-steps p { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.install-inline-icon { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.install-guide-note { margin: 22px 0 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.74rem; line-height: 1.55; color: var(--muted); }
.install-guide-continue { width: 100%; min-height: 46px; border: 0; border-radius: 999px; color: var(--on-accent); background: var(--accent); font: inherit; font-size: 0.9rem; font-weight: 600; }
.install-guide button { cursor: pointer; }
.install-guide button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 360px), (max-height: 650px) {
  .install-guide { padding: 22px 18px 18px; }
  .install-guide-mark { display: none; }
  .install-guide-steps { gap: 14px; }
  .install-guide-platforms { margin-bottom: 16px; }
}

/* Pins each box's link to its bottom so the two links line up in every language. */
.about-modal .about-grid section { display: flex; flex-direction: column; }
.about-modal .about-architecture { margin: auto 0 0; padding-top: 10px; }
.about-architecture-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 6px 0;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}
.about-architecture-link span {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.about-architecture-link svg { flex: 0 0 14px; width: 14px; height: 14px; }
.about-architecture-link:hover span { text-decoration-color: currentColor; }
.about-architecture-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 3px; }
