/* ChunkIt · Help & feedback — shared by phone and tablet screens. Load after tablet/tablet.css (tokens + components). */

/* Type cards */
.fb-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fb-type {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 16px 44px 18px 16px; border-radius: var(--r-card); text-align: left;
  border: 1.5px solid var(--border); background: var(--surface); box-shadow: var(--shadow-1);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.fb-type:hover { border-color: color-mix(in oklch, var(--fg) 22%, var(--border)); }
.fb-type:active { transform: scale(0.99); }
.fb-type[aria-checked="true"] {
  border-color: var(--accent-strong); background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 16%, transparent);
}
.fb-type .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.fb-type .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico.bug { background: var(--coral); color: oklch(52% 0.16 27); }
.ico.idea { background: var(--butter); color: oklch(50% 0.11 80); }
.ico.content { background: var(--sky); color: oklch(48% 0.1 241); }
.fb-type b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.fb-type .zh { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.fb-type small { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.fb-type .tick {
  position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--border); background: var(--surface); color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fb-type .tick svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fb-type[aria-checked="true"] .tick { background: var(--accent-strong); border-color: transparent; color: var(--surface); }
body.android .fb-type { border-radius: 20px; }

/* Form */
.fb-form { display: grid; gap: 24px; min-width: 0; }
.fb-block { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.fb-label { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg); }
.fb-label .fb-opt { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.fb-label .zh { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.fb-sub { display: grid; gap: 10px; }
.fb-sub + .fb-sub { margin-top: 10px; }
.fb-chips .pill { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.fb-chips .pill .zh { margin-left: 4px; font-weight: 500; color: var(--muted); }
.fb-chips .pill.on .zh { color: inherit; }
.fb-text { min-height: 128px; resize: vertical; line-height: 1.5; display: block; }
.fb-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.fb-meta .mono { font-size: 12px; }

/* Screenshot */
.fb-shots { display: flex; gap: 12px; align-items: stretch; }
.fb-add {
  display: grid; place-items: center; gap: 4px; align-content: center;
  width: 150px; height: 100px; border-radius: 14px;
  border: 1.5px dashed color-mix(in oklch, var(--fg) 22%, var(--border));
  background: color-mix(in oklch, var(--fg) 2%, var(--surface));
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.fb-add:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--surface); }
.fb-add svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fb-add.busy { pointer-events: none; opacity: 0.6; }
.fb-shot { position: relative; width: 152px; height: 100px; margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--border), var(--shadow-2); animation: fb-pop 0.25s var(--ease); }
.fb-shot img { width: 100%; height: 100%; object-fit: cover; }
.fb-shot .x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: color-mix(in oklch, var(--fg) 74%, transparent); color: var(--surface);
}
.fb-shot .x::before { content: ""; position: absolute; inset: -8px; }
.fb-shot .x svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.fb-shot-note { align-self: center; font-size: 13px; line-height: 1.45; color: var(--muted); max-width: 30ch; }

/* Extras (device info + reply email) */
.fb-extras { gap: 0; }
.fb-extras .row { align-items: center; min-height: 64px; }
.fb-extras b { display: block; font-size: 15px; font-weight: 650; }
.fb-extras .sub { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.fb-email { padding: 0 18px 16px; }
.fb-err { margin-top: 6px; font-size: 13px; color: var(--danger); }
.input.bad { border-color: var(--danger); }

/* Send */
.fb-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fb-why { font-size: 13.5px; color: var(--muted); min-height: 18px; }
.btn.loading { pointer-events: none; }
.btn.loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in oklch, var(--surface) 40%, transparent); border-top-color: var(--surface);
  animation: fb-spin 0.7s linear infinite;
}

/* Sent */
.fb-done { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 24px; animation: fb-pop 0.35s var(--ease); }
.fb-done .badge { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; background: var(--accent-soft); color: var(--accent-strong); }
.fb-done .badge svg { width: 36px; height: 36px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fb-done h2 { font-size: 26px; font-weight: 780; letter-spacing: -0.02em; }
.fb-done .zh { font-size: 17px; color: var(--muted); }
.fb-done p { max-width: 44ch; font-size: 15px; line-height: 1.55; color: var(--muted); }
.fb-done .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

/* Live summary (tablet) */
.fb-preview { position: sticky; top: 8px; padding: 18px 20px; }
.fb-preview h2 { font-size: 16px; font-weight: 700; }
.fb-preview > p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.pv { margin-top: 12px; }
.pv-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.45; }
.pv-row > span:first-child { font-size: 12.5px; color: var(--muted); padding-top: 1px; }
.pv-row .none { color: color-mix(in oklch, var(--muted) 70%, var(--surface)); }
.pv-msg { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pv-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }

/* Quick report sheet (flag button) */
.rs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rs-head h2 { font-size: 20px; }
.rs-head p { font-size: 13.5px; color: var(--muted); }
.rs-flag { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--coral); color: oklch(52% 0.16 27); }
.rs-flag svg, .flag-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rs-ctx { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; border: 1px solid var(--border); background: color-mix(in oklch, var(--fg) 3%, var(--surface)); }
.rs-sentence { font-size: 17px; font-weight: 600; line-height: 1.45; letter-spacing: -0.005em; }
.rs-sentence b { color: var(--accent-strong); }
.rs-ctx .zh { font-size: 14px; color: var(--muted); }
.rs-body { display: grid; gap: 12px; }
.rs-body .input { min-height: 84px; resize: none; line-height: 1.45; }
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 0; }
.rs-row b { display: block; font-size: 15px; font-weight: 650; }
.rs-row span { display: block; font-size: 12.5px; color: var(--muted); }
.rs-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 4px; }
.rs-more { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.flag-btn:hover { color: oklch(52% 0.16 27); border-color: color-mix(in oklch, var(--danger) 30%, var(--border)); }

/* Phone shell */
body.phone { font-size: 15px; }
.ph-bar {
  flex: 0 0 auto; position: relative; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 48px; padding: 0 8px;
  background: color-mix(in oklch, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.ph-bar.scrolled { border-bottom-color: var(--border); }
.ph-bar > :last-child { justify-self: end; }
.ph-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px 0 2px; color: var(--accent-strong); font-size: 17px; }
.ph-back svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ph-back .i-and, body.android .ph-back .i-ios { display: none; }
body.android .ph-back .i-and { display: block; }
.ph-done { display: grid; align-content: center; }
body.phone .fb-done .actions { display: grid; width: 100%; max-width: 320px; }
.ph-title { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; opacity: 0; transition: opacity 0.2s ease; }
.ph-bar.scrolled .ph-title, .ph-title.always { opacity: 1; }
.ph-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 4px 20px 28px; }
.ph-scroll::-webkit-scrollbar { display: none; }
.ph-intro { margin-bottom: 20px; }
.ph-intro h1 { font-size: 32px; font-weight: 780; letter-spacing: -0.025em; line-height: 1.15; }
.ph-intro p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.ph-foot { flex: 0 0 auto; display: grid; gap: 8px; padding: 12px 20px 10px; background: var(--bg); border-top: 1px solid var(--border); }
.ph-foot .fb-why { text-align: center; font-size: 13px; }
body.phone .fb-types { grid-template-columns: 1fr; gap: 10px; }
body.phone .fb-type { flex-direction: row; align-items: center; gap: 14px; padding: 14px 48px 14px 14px; }
body.phone .fb-type .tick { top: 50%; transform: translateY(-50%); }
body.phone .fb-type small { margin-top: 3px; }
body.phone .fb-add, body.phone .fb-shot { width: 132px; height: 92px; }
body.phone .fb-extras .row { padding: 10px 16px; }
body.phone .fb-email { padding: 0 16px 14px; }

body.android .ph-bar { grid-template-columns: auto 1fr auto; min-height: 64px; padding: 0 4px; background: var(--bg); }
body.android .ph-back { width: 48px; height: 48px; justify-content: center; padding: 0; border-radius: 50%; color: var(--fg); }
body.android .ph-back span { display: none; }
body.android .ph-back:hover { background: color-mix(in oklch, var(--fg) 6%, transparent); }
body.android .ph-title { opacity: 1; padding-left: 4px; font-size: 22px; font-weight: 500; letter-spacing: 0; }
body.android .ph-intro h1 { display: none; }
body.android .ph-intro p { margin-top: 0; }

/* Phone bottom sheet */
body.phone .scrim { place-items: end stretch; }
body.phone .sheet { width: 100%; max-height: 92%; padding: 10px 20px 24px; border-radius: 24px 24px 0 0; transform: translateY(100%); }
body.phone .scrim.open .sheet { transform: none; }
body.phone .sheet::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--border); }
body.phone.android .sheet { border-radius: 28px 28px 0 0; }
body.phone .toast { bottom: 96px; }

@keyframes fb-spin { to { transform: rotate(360deg); } }
@keyframes fb-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
