/* 16px editable text prevents iOS focus zoom. Pinch zoom remains available. */
body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button:active {
  transform: none;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  font-size: 16px !important;
}
.chart-scroll {
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.chart-scroll,
.chart-scroll * {
  user-select: none;
  -webkit-user-select: none;
}
.chart-scroll.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.chart-scroll.is-dragging * {
  cursor: grabbing;
}
.chart-scroll::-webkit-scrollbar {
  height: 7px;
}
.chart-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 9px;
}
.chart-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
.zi-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 14px;
  text-align: left;
}
.zi-preview div {
  min-width: 0;
}
.zi-preview dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}
.zi-preview dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.feed-author {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 0;
  min-height: 44px;
}
.feed-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.day-master {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--bg);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.feed-content {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.feed-content p {
  margin: 0;
}
.message-unread {
  min-width: 19px;
  padding: 1px 5px;
  border-radius: 10px;
  background: #cf4438;
  color: white;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}
.nav button[data-page="messages"] {
  position: relative;
}
.nav .message-unread {
  position: absolute;
  top: 2px;
  left: calc(50% + 4px);
}
.dm-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 47dvh;
  overflow-y: auto;
  padding: 12px 0;
  overscroll-behavior: contain;
}
.dm-list .bubble {
  max-width: 90%;
}
.dm-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.dm-tools button {
  min-height: 44px;
}
.dm-card {
  white-space: normal;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 5px;
}
.dm-pillars {
  display: flex;
  gap: 10px;
  font-weight: 700;
}
.agreement-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  margin: 15px 0;
  font-size: 12px;
  line-height: 1.8;
}
.agreement-row label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.agreement-row input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--green);
}
.agreement-row .link {
  font-size: inherit;
  padding: 0 2px;
}
.legal-document {
  font-size: 14px;
  line-height: 1.9;
}
.legal-document section {
  margin: 20px 0;
}
.legal-document h3 {
  margin-bottom: 6px;
}
.legal-version {
  color: var(--muted);
  font-size: 12px;
}
.legal-document dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}
.legal-document dd {
  margin: 0;
}
.private-ai-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0;
}
.private-ai-note .link {
  font-size: inherit;
}
.segmented.pair-type-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  border-radius: 20px;
  padding: 6px;
  max-width: 100%;
}
.segmented.pair-type-options button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  line-height: 1.4;
  border-radius: 14px;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}
:root[lang="en"] .segmented.pair-type-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
:root[lang="en"] .segmented.pair-type-options button {
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 370px) {
  .segmented.pair-type-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
