:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --accent: #fbbf24;
  --danger: #dc2626;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  padding-top: 64px;
}

.feedback-x-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(340px, calc(100vw - 24px));
  padding: 8px 12px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, transform 0.15s;
}

.feedback-x-link:hover {
  background: #1a1a1a;
  color: #fff;
}

.feedback-x-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.feedback-x-link__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.feedback-x-link__icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.feedback-x-link__text {
  line-height: 1.35;
}

@media (max-width: 420px) {
  .feedback-x-link {
    font-size: 0.75rem;
    padding: 7px 10px;
    max-width: calc(100vw - 24px);
  }
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
  line-height: 1.3;
}

h2 {
  font-size: 1.125rem;
  margin: 24px 0 12px;
}

p {
  margin: 0 0 12px;
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
  box-sizing: border-box;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: #eff6ff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-danger {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.btn-group {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--surface);
}

textarea,
input[type='text'] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

textarea {
  min-height: 280px;
}

.progress-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.875rem;
  color: var(--primary);
  white-space: pre-wrap;
  max-height: 160px;
  overflow-y: auto;
}

.score-display {
  text-align: center;
  padding: 24px;
}

.score-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.score-label {
  color: var(--muted);
  margin-top: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-main {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.list-item-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.list-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.list-item-actions button {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.chat-log {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 12px;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.chat-bubble.user {
  background: #eff6ff;
  margin-left: 24px;
}

.chat-bubble.assistant {
  background: #f1f5f9;
  margin-right: 24px;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-back:hover {
  text-decoration: underline;
}

.article-content h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.article-content ul {
  padding-left: 1.2rem;
  margin: 0 0 12px;
}

.article-content li {
  margin-bottom: 6px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

ul.review-list {
  padding-left: 1.2rem;
  margin: 8px 0;
}

ul.review-list li {
  margin-bottom: 4px;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.header-bar img {
  width: 48px;
  height: 48px;
}

.top-page .header-bar {
  margin-bottom: 16px;
}

.top-page .header-bar h1 {
  font-size: 1.125rem;
  line-height: 1.45;
  margin-bottom: 4px;
}

.top-site-tagline {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--primary);
}

.top-eyebrow {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.top-hero {
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 55%, #f8fafc 100%);
  border-color: #dbeafe;
}

.top-intro {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

.top-intro-sub {
  margin: 0 0 24px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dbeafe;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.7;
  color: #1e3a8a;
}

.top-points-title {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.top-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.top-point-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(30, 64, 175, 0.05);
}

.top-point-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eff6ff;
  font-size: 1.125rem;
  line-height: 1;
}

.top-point-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  padding-top: 6px;
}

.top-actions {
  padding-top: 18px;
}

.exam-guide-panel {
  padding: 0;
  overflow: hidden;
  border-color: #bfdbfe;
  background: linear-gradient(165deg, #ffffff 0%, #f8fbff 100%);
}

.exam-guide-page {
  display: grid;
  gap: 16px;
}

.exam-guide-page-hero {
  padding: 0;
  overflow: hidden;
  border-color: #bfdbfe;
  background: linear-gradient(165deg, #ffffff 0%, #f8fbff 100%);
}

.exam-guide-page-card {
  padding: 0;
  overflow: hidden;
  border-color: #bfdbfe;
  background: linear-gradient(165deg, #ffffff 0%, #f8fbff 100%);
}

.exam-guide-summary--static {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  cursor: default;
}

.exam-guide-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}

.exam-guide-summary::-webkit-details-marker {
  display: none;
}

.exam-guide-panel[open] .exam-guide-summary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-bottom: 1px solid #bfdbfe;
}

.exam-guide-summary-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #1e40af;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.25);
}

.exam-guide-summary-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exam-guide-summary-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.exam-guide-summary-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.exam-guide-summary-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s;
}

.exam-guide-panel[open] .exam-guide-summary-chevron {
  transform: rotate(90deg);
}

.exam-guide-content {
  padding: 20px;
}

.exam-guide-header {
  margin-bottom: 8px;
}

.exam-guide-lead {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}

.exam-guide-section {
  margin-top: 28px;
  padding-top: 4px;
}

.exam-guide-section:first-child {
  margin-top: 0;
}

.exam-guide-section-title {
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1e3a8a;
}

.exam-guide-text {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text);
}

.exam-guide-text:last-child {
  margin-bottom: 0;
}

.exam-guide-subjects {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.exam-guide-subject {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
}

.exam-guide-subject-id {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.exam-guide-subject-name {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9375rem;
  color: var(--text);
}

.exam-guide-subject-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--muted);
}

.exam-guide-schedule {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.exam-guide-schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.exam-guide-schedule-item:last-child {
  border-bottom: none;
}

.exam-guide-schedule-label {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--primary);
}

.exam-guide-schedule-time {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: right;
}

.exam-guide-criteria {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  font-size: 0.9375rem;
  line-height: 1.7;
  font-weight: 600;
  color: #1e3a8a;
}

.exam-guide-criteria-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.exam-guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.exam-guide-step {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.04);
}

.exam-guide-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
}

.exam-guide-step-body {
  flex: 1;
  min-width: 0;
}

.exam-guide-step-title {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.exam-guide-step-body .exam-guide-text:last-child {
  margin-bottom: 0;
}

.exam-guide-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.exam-guide-link:hover {
  color: var(--primary-hover);
}

.exam-guide-note {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.exam-guide-note-title {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.exam-guide-resources {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.exam-guide-resource {
  margin: 0;
}

.exam-guide-resource .exam-guide-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
}

.exam-guide-resource .exam-guide-link:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.exam-guide-highlight {
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.exam-guide-highlight .exam-guide-text:last-child {
  margin-bottom: 0;
}

.top-install-guide h2 {
  margin-top: 0;
}

.top-status-badge {
  margin-bottom: 12px;
}

.top-status-alert {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.9375rem;
}

.top-key-prompt {
  margin-bottom: 8px;
}

.top-key-prompt .top-status-alert {
  margin-bottom: 6px;
}

.top-key-prompt-note {
  margin-bottom: 8px;
}

.api-usage-status {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: var(--text-muted, #475569);
}

.api-usage-status.limit-reached {
  color: #b91c1c;
  font-weight: 600;
}

.api-usage-note {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}

.review-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  overflow-x: auto;
}

.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.progress-box.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  margin: 0;
}

.modal h2 {
  margin: 0 0 8px;
}

.modal label {
  display: block;
  font-weight: 600;
  margin: 16px 0 8px;
}

.modal-status {
  min-height: 1.25rem;
  font-size: 0.875rem;
  margin: 8px 0 0;
  color: var(--muted);
}

.modal-status.success {
  color: #15803d;
}

.modal-status.error {
  color: var(--danger);
}

.setup-steps {
  padding-left: 1.2rem;
  margin: 0 0 16px;
}

.setup-steps li {
  margin-bottom: 6px;
}

.security-notes,
.security-notes-inline {
  margin-top: 16px;
}

.security-notes-subtitle {
  font-size: 0.95rem;
  margin: 12px 0 8px;
}

.security-notes-list {
  padding-left: 1.2rem;
  margin: 12px 0 0;
}

.security-notes-list li {
  margin-bottom: 6px;
}

input[type='password'] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.input-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.input-tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.input-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.input-panel {
  margin-bottom: 16px;
}

.answer-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}

.photo-preview-item {
  width: 120px;
  text-align: center;
}

.photo-preview-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.photo-preview-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

.ocr-status {
  min-height: 1.25rem;
  font-size: 0.875rem;
  margin: 8px 0;
  color: var(--muted);
}

.ocr-status.success {
  color: #15803d;
}

.ocr-status.error {
  color: var(--danger);
}

.question-result {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.question-result:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.question-result h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.question-result h4 {
  margin: 12px 0 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

.grade-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.criteria-text {
  font-size: 0.85rem;
  max-height: 320px;
  overflow-y: auto;
}

.answer-text {
  white-space: pre-wrap;
  margin: 0;
}

.review-prose {
  margin: 0 0 8px;
  line-height: 1.8;
  font-size: 0.95rem;
}

.comparison-result {
  margin-top: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 0.95rem;
}

.comparison-result.loading {
  color: var(--muted);
}

.comparison-result.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
}

.install-guide {
  display: grid;
  gap: 8px;
}

.install-guide-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #f8fafc;
}

.install-guide-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
}

.install-guide-item summary::-webkit-details-marker {
  display: none;
}

.install-guide-item ol {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.install-guide-browser {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.install-guide-browser:not(:first-child) {
  margin-top: 12px;
}

.install-guide-item li {
  margin-bottom: 6px;
}

.history-folder {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.history-folder-title {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 14px;
  background: #f8fafc;
  list-style: none;
}

.history-folder-title::-webkit-details-marker {
  display: none;
}

.history-folder .list-item {
  padding: 12px 14px;
}

.collapsible-card {
  padding: 0;
  overflow: hidden;
}

.collapsible-card summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.125rem;
  padding: 20px;
  list-style: none;
}

.collapsible-card summary::-webkit-details-marker {
  display: none;
}

.collapsible-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.answer-input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.photo-source-modal {
  max-width: 360px;
}

.setup-step-item {
  margin-bottom: 12px;
}

.setup-step-details {
  margin: 6px 0 0;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.setup-step-details li {
  margin-bottom: 4px;
}

.setup-step-details code {
  font-size: 0.8125rem;
  word-break: break-all;
}

.billing-notice-inline {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.6;
}

.billing-guide-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.billing-notice .billing-guide-links {
  margin-top: 10px;
}

.billing-guide-link {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.billing-guide-link:hover {
  text-decoration: underline;
}

#billing-guide .billing-guide-links {
  margin-top: 16px;
}

.usage-display {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 12px;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.usage-row:last-child {
  border-bottom: none;
}

.usage-label {
  font-weight: 600;
}

.usage-count {
  color: var(--muted);
  text-align: right;
}

.confirm-modal .usage-display {
  margin-top: 8px;
}

.site-seo {
  padding: 0 16px 32px;
}

.site-seo-inner {
  max-width: 720px;
  margin: 0 auto;
}

.site-seo-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.site-seo-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}

.site-seo-summary::-webkit-details-marker {
  display: none;
}

.site-seo-summary:hover {
  background: rgba(30, 64, 175, 0.03);
}

.site-seo-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.22);
  position: relative;
}

.site-seo-mark::after {
  content: '';
  position: absolute;
  inset: 11px 10px 10px 11px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 3px;
}

.site-seo-summary-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-seo-brand {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.site-seo-tagline {
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-seo-panel[open] .site-seo-summary {
  border-bottom: 1px solid var(--border);
}

.site-seo-panel[open] .site-seo-tagline {
  color: var(--primary);
}

.site-seo-body {
  padding: 18px 18px 20px;
}

.site-seo-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 10px;
}

.site-seo-lead {
  margin: 0 0 16px;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text);
}

.site-seo-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.site-seo-features li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-seo-note {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--muted);
}

.site-seo-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.site-seo-note a:hover {
  text-decoration: underline;
}

.sw-update-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  box-sizing: border-box;
  max-width: 100vw;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.18);
}

.sw-update-banner-message {
  margin: 0;
  min-width: 0;
  font-size: clamp(0.75rem, 3.2vw, 0.875rem);
  line-height: 1.5;
  writing-mode: horizontal-tb;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.sw-update-reload-btn {
  width: auto;
  min-width: 5.75rem;
  padding: 8px 12px;
  font-size: 0.8125rem;
  white-space: nowrap;
  background: #fff;
  color: var(--primary);
}

.sw-update-reload-btn:hover:not(:disabled) {
  background: #eff6ff;
}

body.has-sw-update-banner #app {
  padding-bottom: 68px;
}

body.has-sw-update-banner .site-seo {
  padding-bottom: 68px;
}
