/* html.app 上的这几条照抄 QuPhone 的 base.css：整页不滚、禁橡皮筋、禁选字、禁长按菜单。
 * 版本 G 打开时会把 html 上的 .app 摘掉，看这些全局样式有没有影响 */
:root {
  --bg: #f4f4f5; --card: #fff; --ink: #18181b; --muted: #71717a; --line: #e4e4e7;
  --ok: #15803d; --bad: #b91c1c; --mid: #b45309; --accent: #18181b;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0b0c; --card: #18181b; --ink: #f4f4f5; --muted: #a1a1aa; --line: #27272a;
          --ok: #4ade80; --bad: #f87171; --mid: #fbbf24; --accent: #f4f4f5; }
}

html.app *, html.app *::before, html.app *::after {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
html.app { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.app body {
  overflow: hidden; overscroll-behavior: none; display: flex; justify-content: center;
  user-select: none; -webkit-user-select: none;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
             font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { min-height: 100vh; }

#app { position: relative; width: 100%; height: 100vh; height: 100dvh; }

/* 首页自己滚：和 App 一样，滚的是里面的盒子，不是整页 */
.home { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
        padding: calc(16px + var(--sat)) 16px calc(32px + var(--sab)); }
h1 { font-size: 22px; margin: 4px 0 8px; }
.lead { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 0 16px; }
.lead b { color: var(--ink); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item, .inline-box, .out { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.inline-box, .out { margin-top: 10px; }
.item-head, .inline-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.item-head b, .inline-head b { font-size: 15px; }
.item-head span, .inline-head span { font-size: 13px; color: var(--muted); line-height: 1.5; }

.go { width: 100%; min-height: 44px; border: 0; border-radius: 10px; background: var(--accent); color: var(--bg);
      font-size: 15px; font-family: inherit; }
.go:active { opacity: .8; }

.res { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.res.ok { color: var(--ok); } .res.bad { color: var(--bad); } .res.mid { color: var(--mid); }

.inline-wrap iframe { display: block; width: 100%; height: 320px; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }

#out-text { width: 100%; margin-top: 10px; font-size: 12px; font-family: ui-monospace, monospace;
            border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--bg); color: var(--ink); }
.ua { font-size: 11px; color: var(--muted); word-break: break-all; margin: 10px 0 0; }

/* ===== 全屏层：逐值照抄 QuPhone 的 .th-view / .th-frame / .th-cap ===== */
.tv { position: absolute; inset: 0; z-index: 15; background: #fff;
      transform: translateY(100%); transition: transform .32s cubic-bezier(.32,.72,0,1); }
.tv.show { transform: translateY(0); }
.tv[hidden] { display: none; }
/* 版本 B：不用位移样式，直接出现 */
.tv.no-tf, .tv.no-tf.show { transform: none; transition: none; }

.tf { display: block; width: 100%; height: 100%; border: 0; background: transparent; }

.cap { position: absolute; top: calc(6px + var(--sat)); right: 10px; z-index: 2; display: flex;
       width: 44px; height: 32px; border-radius: 16px; background: rgba(255,255,255,.86);
       box-shadow: 0 0 0 .5px rgba(0,0,0,.14); color: #111; }
.cap-btn { flex: 1; display: flex; align-items: center; justify-content: center; border: 0; padding: 0;
           background: transparent; color: inherit; border-radius: 16px; }
