.subpage-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; gap: 4px; color: var(--c-sub); font-size: 14px; line-height: 22px; flex: none; }
/* Optical vertical centering for the 24px single angle quotation mark chevron next to 14px CJK text. */
.back-link span { display: inline-flex; align-items: center; font-size: 24px; line-height: 1; transform: translateY(-1px); }
.rules-content h2 { font-size: 18px; line-height: 26px; font-weight: 600; color: var(--c-ink); margin: 24px 0 8px; }
.rules-content h2:first-child { margin-top: 0; }
.rules-content p { font-size: 16px; line-height: 26px; color: var(--c-sub); margin: 0 0 12px; }
.info-list > .menu-row:first-child { border-top: 0; }
.info-list > .menu-row { min-height: 48px; }

.help-shell {
  position: fixed;
  inset: 0;
  z-index: 11;
  background: var(--c-bg);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  bottom: auto;
  padding: 0 16px;
  overflow: hidden;
}
.help-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  margin: 0;
  border-bottom: 1px solid var(--c-line);
}
.help-header h1 { font-size: 18px; line-height: 26px; font-weight: 600; color: var(--c-ink); }
.help-header p { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--c-sub); }
.help-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px 0 20px;
  scrollbar-width: thin;
}
.help-message { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; }
.help-message.is-user { flex-direction: row-reverse; }
.help-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--c-card);
  border: 1px solid var(--c-line);
}
.help-avatar-user {
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  background: var(--c-action-soft);
  color: var(--c-action-text);
  border-color: var(--c-action-border);
}
.help-bubble {
  max-width: 85%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--c-line);
  border-radius: 4px 12px 12px 12px;
  background: var(--c-card);
  font-size: 16px;
  line-height: 24px;
  color: var(--c-ink);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.is-user .help-bubble {
  background: var(--c-action-soft);
  border-color: var(--c-action-border);
  border-radius: 12px 4px 12px 12px;
  color: var(--c-ink);
}
.help-bubble.is-waiting { color: var(--c-sub); }
.help-composer {
  flex: none;
  border-top: 1px solid var(--c-line);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: var(--c-bg);
}
.help-input {
  display: block;
  width: 100%;
  height: 76px;
  min-height: 60px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-card);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--c-ink);
}
.help-input:focus-visible { outline: 2px solid var(--c-action); outline-offset: 2px; }
.help-input::placeholder { color: var(--c-faint); }
.help-status {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 18px;
  color: var(--c-sub);
  min-height: 30px;
  padding: 6px 2px;
}
.help-feedback { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.help-feedback.is-error { color: var(--c-danger); font-size: 14px; line-height: 22px; }
.help-counter { flex: none; color: var(--c-faint); font-variant-numeric: tabular-nums; }
.help-actions { display: flex; gap: 10px; }
.help-voice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--c-action);
  color: #FFFFFF;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  transition: background-color 100ms ease-out;
}
.help-voice:active:not(:disabled) { background: var(--c-action-deep); }
.help-voice:disabled { background: var(--c-disabled-bg); color: var(--c-disabled); opacity: 1; }
.help-voice svg { width: 20px; height: 20px; flex: none; }
.help-send {
  flex: none;
  min-width: 84px;
  min-height: 48px;
  border: 1px solid var(--c-action);
  border-radius: 8px;
  background: var(--c-card);
  color: var(--c-action-text);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  padding: 8px 16px;
  transition: background-color 100ms ease-out, border-color 100ms ease-out, color 100ms ease-out;
}
.help-send:active:not(:disabled) { background: var(--c-action-soft); }
.help-send:disabled { border-color: var(--c-line); background: var(--c-disabled-bg); color: var(--c-disabled); opacity: 1; }
.help-voice.is-recording { background: var(--c-action-deep); }
.help-stop { width: 12px; height: 12px; background: currentColor; border-radius: 2px; }
.help-shell .state { margin: auto; width: 100%; }
.help-shell[hidden], .tabbar[hidden] { display: none !important; }

@media (max-width: 360px) {
  .help-shell { padding: 0 12px; }
  .help-bubble { padding: 10px 12px; }
  .help-send { min-width: 72px; padding-left: 12px; padding-right: 12px; }
  .help-message { gap: 8px; }
}
