/* 潜水笔记 · 网页试用版 */

:root {
  --bg:   #061f36;
  --bg2:  #072a45;
  --bg3:  #07243c;
  --card: linear-gradient(180deg, #0b3050, #0e3c62);
  --line: #155a80;
  --line2:#123a58;
  --tx:   #eaf6ff;
  --tx2:  #d6e9f7;
  --tx3:  #a9cde5;
  --dim:  #7fa8c4;
  --dim2: #6f9dbb;
  --acc:  #3fc8ff;
  --acc2: #7dffb8;
  --warn: #ffd166;
  --err:  #ff8fa8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* ── 顶栏 ── */
#hd {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center;
  height: 50px;
  padding: 0 8px;
  background: rgba(6, 31, 54, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line2);
}
#hd #title {
  position: absolute; left: 0; right: 0;
  text-align: center;
  font-size: 17px; font-weight: 600;
  pointer-events: none;
}
#hd .back {
  position: relative; z-index: 1;
  width: 40px; height: 40px;
  border: 0; background: none;
  color: var(--tx); font-size: 30px; line-height: 1;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .12s;
}
#hd .back.on { opacity: 1; pointer-events: auto; }

/* ── 主体 ── */
#app { padding: 16px 16px 40px; max-width: 720px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}
.card.flat { background: none; border: 0; padding: 0; }

.ct { font-size: 18px; font-weight: 700; color: var(--acc); margin-bottom: 12px; }
.p  { font-size: 15px; color: var(--tx2); margin-bottom: 12px; }
.p:last-child { margin-bottom: 0; }
.p .hl { color: var(--acc2); font-weight: 700; }

.note {
  font-size: 13.5px; color: var(--dim);
  background: rgba(63,200,255,.06);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px; margin-top: 10px;
}
.warn {
  font-size: 13.5px; line-height: 1.7;
  color: #e8d9a8;
  background: rgba(255,209,102,.07);
  border: 1px solid rgba(255,209,102,.22);
  border-radius: 12px;
  padding: 14px; margin: 16px 0;
}

/* ── 首页入口 ── */
.grid { display: flex; flex-wrap: wrap; justify-content: space-between; }
.mc {
  width: 48%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform .1s, border-color .1s;
}
.mc:active { transform: scale(.97); border-color: var(--acc); }
.mci { font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.mct { font-size: 17px; font-weight: 700; color: var(--tx); margin-bottom: 5px; }
.mcd { font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.mc.wide { width: 100%; display: flex; align-items: center; }
.mc.wide .mci { margin: 0 14px 0 0; }
.mc.wide .mct { margin-bottom: 2px; }

/* ── 折叠 ── */
.fold { border-top: 1px solid var(--line2); }
.fold:first-of-type { border-top: 0; }
.fh {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  padding: 16px 0; cursor: pointer;
}
.fh .ft1 { font-size: 16px; font-weight: 600; color: var(--tx); flex: 1; }
.fh .ft2 { display: block; font-size: 12.5px; color: var(--dim); font-weight: 400; margin-top: 3px; }
.fh .fs { font-size: 22px; color: var(--acc); width: 24px; text-align: center; flex: none; }
.fb { padding: 0 0 16px; }
.fb > *:last-child { margin-bottom: 0; }

.pt { font-size: 14.5px; color: var(--tx3); line-height: 1.7; margin-bottom: 8px; }
.pt:last-child { margin-bottom: 0; }

/* 技巧：怎么做 / 为什么 */
.blk { margin-bottom: 14px; padding-left: 12px; border-left: 3px solid #1c4f73; }
.blk.why { border-left-color: var(--acc2); }
.blk-t { font-size: 12px; letter-spacing: 1.5px; color: var(--dim2); margin-bottom: 5px; }
.blk.why .blk-t { color: var(--acc2); }
.blk-c { font-size: 15px; color: var(--tx2); line-height: 1.75; }

.num {
  font-size: 11px; color: var(--acc); background: #0f3f63;
  border-radius: 5px; padding: 2px 7px; margin-right: 9px;
  font-variant-numeric: tabular-nums;
}
.ttl { display: flex; align-items: center; }

/* 装备选择 */
.gi { border-top: 1px solid var(--line2); padding-top: 14px; margin-top: 14px; }
.gik { font-size: 15px; font-weight: 600; color: #7fd8ff; margin-bottom: 6px; }
.giv { font-size: 14.5px; color: var(--tx3); line-height: 1.8; white-space: pre-wrap; }

/* 勾选 */
.ck {
  display: flex; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line2);
  cursor: pointer;
}
.ck:last-of-type { border-bottom: 0; }
.ck .box {
  width: 22px; height: 22px; min-width: 22px;
  border: 2px solid #2f7ba6; border-radius: 6px;
  margin-right: 11px; margin-top: 2px;
  text-align: center; line-height: 19px;
  font-size: 14px; color: #03202f;
  transition: background .12s;
}
.ck.on .box { background: var(--acc); border-color: var(--acc); font-weight: 700; }
.ck .bd { flex: 1; }
.ck .tt { font-size: 15.5px; font-weight: 600; color: var(--tx); }
.ck.on .tt { color: #7fd8ff; }
.ck .kk {
  display: inline-block; width: 22px; height: 22px; line-height: 22px;
  text-align: center; background: #0f4d76; color: #7fd8ff;
  border-radius: 6px; font-size: 13px; margin-right: 6px;
}
.ck .en { font-size: 11.5px; color: var(--dim2); margin-left: 5px; }
.ck .ds { font-size: 13.5px; color: var(--tx3); margin-top: 4px; line-height: 1.6; }
.ck.sm { padding: 9px 0; }
.ck.sm .tt { font-size: 15px; font-weight: 400; color: var(--tx2); }
.ck.sm.on .tt { color: #7fd8ff; }

/* 输入 */
.fld { margin-top: 16px; }
.fld .lb { font-size: 13.5px; color: var(--dim); display: block; margin-bottom: 6px; }
.fld input {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 13px; font-size: 17px; color: var(--tx);
  font-family: inherit;
}
.fld input:focus { outline: none; border-color: var(--acc); }
.err { color: var(--err); font-size: 13.5px; margin-top: 12px; }

.btn {
  display: block; width: 100%;
  margin-top: 18px; padding: 13px;
  border: 0; border-radius: 12px;
  background: var(--acc); color: #03202f;
  font-size: 16px; font-weight: 700; font-family: inherit;
  cursor: pointer;
}
.btn:active { opacity: .85; }
.btn.ghost {
  background: none; border: 1px solid var(--line);
  color: var(--dim);
}
.btn.ghost:active { background: rgba(63,200,255,.08); }

/* 结果 */
.res {
  margin-top: 18px; padding: 20px;
  background: var(--bg2); border: 1px solid #2f7ba6;
  border-radius: 14px; text-align: center;
}
.res .rv { font-size: 42px; font-weight: 800; color: var(--acc); line-height: 1.15; }
.res .ru { font-size: 14px; color: var(--dim); margin-left: 7px; font-weight: 400; }
.res .rd { font-size: 14px; color: var(--tx3); margin-top: 6px; }
.res .rr { font-size: 12.5px; color: var(--dim); margin-top: 8px; }

/* ── 手势 ── */
.modes {
  display: flex; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 4px; margin-bottom: 16px;
}
.mode {
  flex: 1; text-align: center; padding: 9px 0;
  font-size: 14.5px; color: var(--dim);
  border-radius: 9px; cursor: pointer;
}
.mode.on { background: var(--acc); color: #03202f; font-weight: 700; }

.search {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; font-size: 16px; color: var(--tx);
  font-family: inherit; margin-bottom: 14px;
}
.search:focus { outline: none; border-color: var(--acc); }

.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qb {
  padding: 7px 13px; font-size: 13.5px;
  background: rgba(63,200,255,.1); color: #7fd8ff;
  border: 1px solid rgba(63,200,255,.25); border-radius: 999px;
  cursor: pointer;
}
.qb:active { background: rgba(63,200,255,.22); }

.sg {
  display: flex; gap: 13px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px; margin-bottom: 11px;
}
.sg .sgimg {
  width: 84px; height: 84px; min-width: 84px;
  background: #eaf6ff; border-radius: 10px;
  overflow: hidden; cursor: zoom-in;
  display: flex; align-items: center; justify-content: center;
}
.sg .sgimg img { width: 100%; height: 100%; object-fit: contain; }
.sg .sgimg .no {
  font-size: 11px; color: #6f9dbb; text-align: center; padding: 6px; line-height: 1.3;
}
.sg .sgb { flex: 1; min-width: 0; }
.sg .sgtag {
  display: inline-block; font-size: 11px; padding: 1px 7px;
  border-radius: 5px; margin-bottom: 5px;
  background: #0f3f63; color: #7fd8ff;
}
.sg .sgtag.em { background: rgba(255,143,168,.16); color: var(--err); }
.sg .sgn { font-size: 16px; font-weight: 700; color: var(--tx); margin-bottom: 5px; }
.sg .sgd { font-size: 13.5px; color: var(--tx3); line-height: 1.6; }
.sg .sgu { font-size: 13px; color: var(--dim); line-height: 1.6; margin-top: 5px; }

.cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.cat {
  padding: 6px 13px; font-size: 13.5px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 999px; color: var(--dim); cursor: pointer;
}
.cat.on { background: var(--acc); color: #03202f; border-color: var(--acc); font-weight: 700; }

.empty {
  text-align: center; padding: 40px 20px;
  color: var(--dim); font-size: 14.5px;
}

/* 放大图 */
#lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2,12,22,.94);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
#lb.on { display: flex; }
#lb img { max-width: 100%; max-height: 82vh; border-radius: 12px; background: #eaf6ff; }

/* ── 页脚 ── */
.ft {
  max-width: 720px; margin: 0 auto;
  padding: 20px 16px 40px;
  border-top: 1px solid var(--line2);
  text-align: center;
}
.ftc { font-size: 13.5px; color: var(--dim); margin: 0 0 6px; }
.ftn { font-size: 12px; color: #5d7f97; margin: 0; line-height: 1.6; }

/* ── 提意见 ── */
.fbbtn {
  display: block; width: 100%; max-width: 320px; margin: 0 auto 18px;
  padding: 12px; border-radius: 12px;
  background: rgba(63,200,255,.12); color: #7fd8ff;
  border: 1px solid rgba(63,200,255,.3);
  font-size: 15px; font-family: inherit; font-weight: 600; cursor: pointer;
}
.fbbtn:active { background: rgba(63,200,255,.24); }

#fbwrap {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(2,12,22,.86);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#fbwrap.on { display: flex; }
.fbcard {
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, #0b3050, #0e3c62);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.fbt { font-size: 19px; font-weight: 700; color: var(--acc); margin-bottom: 8px; }
.fbs { font-size: 13.5px; color: var(--tx3); line-height: 1.7; margin-bottom: 16px; }
.fbcard textarea,
.fbcard input[type=text] {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 13px; font-size: 15px; color: var(--tx);
  font-family: inherit; resize: vertical;
}
.fbcard textarea { min-height: 130px; line-height: 1.65; margin-bottom: 11px; }
.fbcard textarea:focus,
.fbcard input[type=text]:focus { outline: none; border-color: var(--acc); }
.fbcard textarea::placeholder,
.fbcard input::placeholder { color: #5d7f97; }
.fbpg { font-size: 12.5px; color: var(--dim2); margin: 10px 0 0; }
.fberr {
  display: none;
  color: var(--err); font-size: 13.5px; margin-top: 12px;
}
.fberr.on { display: block; }
.fbok { color: var(--acc2); font-size: 14.5px; text-align: center; padding: 22px 0; line-height: 1.8; }

/* ── 应急救援 ── */
.estep {
  display: flex; gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line2);
}
.estep:last-child { border-bottom: 0; padding-bottom: 0; }
.esn {
  width: 28px; height: 28px; min-width: 28px;
  border-radius: 50%;
  background: var(--acc); color: #03202f;
  font-size: 15px; font-weight: 800;
  text-align: center; line-height: 28px;
  margin-top: 2px;
}
.esb { flex: 1; min-width: 0; }
.est { font-size: 16.5px; font-weight: 700; color: var(--tx); margin-bottom: 5px; }
.esd { font-size: 14.5px; color: var(--tx3); margin-bottom: 8px; }
.estag {
  display: inline-block;
  font-size: 11px; font-weight: 400;
  padding: 1px 7px; margin-left: 6px;
  border-radius: 5px;
  background: rgba(63,200,255,.14); color: #7fd8ff;
}

/* 电话行 */
.numsec { font-size: 12px; color: var(--dim2); letter-spacing: 1.5px; margin-bottom: 8px; }
.numrow { padding: 11px 0; border-bottom: 1px solid var(--line2); }
.numrow:last-child { border-bottom: 0; }
.numk { font-size: 14px; color: var(--tx3); margin-bottom: 3px; }
.numv { font-size: 20px; font-weight: 700; color: var(--acc); letter-spacing: .5px; }
.numv a { color: var(--acc); text-decoration: none; }
.numv .numq { color: #4a6b83; font-weight: 400; font-size: 16px; }
.numn { font-size: 12px; color: var(--dim); margin-top: 3px; line-height: 1.5; }
.todo {
  display: inline-block; font-size: 10.5px;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(255,209,102,.16); color: var(--warn);
}
