* { box-sizing: border-box; }
body { margin: 0; background: #1b1d22; color: #ddd; font: 15px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
#app { display: flex; gap: 20px; padding: 20px; align-items: flex-start; justify-content: center; }

#phone { position: relative; width: 420px; height: calc(100vh - 40px); background: #0e0f12; border: 2px solid #353842; border-radius: 34px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 48px rgba(0,0,0,.55); }
#top { padding: 8px 16px 10px; border-bottom: 1px solid #262830; text-align: center; background: #15171c; }
#contact { font-weight: 600; }
#status { font-size: 12px; color: #8a8f99; min-height: 18px; }
#status.typing { color: #6fc27a; animation: blink 1.2s infinite; }
#clock { font-size: 11px; color: #5c616b; }
@keyframes blink { 50% { opacity: .35; } }

#log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
#log > * { flex-shrink: 0; }
.msg { display: flex; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 7px 12px; border-radius: 16px; word-break: break-all; }
.msg.her .bubble { background: #262a33; border-bottom-left-radius: 4px; }
.msg.me .bubble { background: #2f6f4f; color: #eaf6ee; border-bottom-right-radius: 4px; }
.sys { text-align: center; font-size: 12px; color: #6d727c; padding: 2px 10px; }
.sys.me-act { color: #5f9a76; }
.clock { text-align: center; font-size: 11px; color: #9aa0aa; margin: 10px 0 4px; letter-spacing: 1px; }

.find { align-self: stretch; background: #2b2718; border: 1px dashed #7a6a35; border-radius: 8px; padding: 8px 12px; margin: 4px 18px; color: #e9dfbd; }
.find-tag { font-size: 11px; color: #b39c55; }
.find-title { font-weight: 600; margin: 2px 0; }
.find-body { font-size: 13px; }

.video { align-self: flex-start; width: 82%; background: #000; border: 1px solid #3a3f4a; border-radius: 10px; overflow: hidden; }
.vhead { display: flex; gap: 8px; font-size: 11px; padding: 5px 10px; background: #1a1d24; color: #8d93a0; }
.vid { color: #d9b86b; font-weight: 600; }
.vdur { margin-left: auto; }
.vtitle { padding: 4px 10px 0; font-size: 13px; color: #cfd3da; }
.vscreen { min-height: 90px; margin: 6px 10px; background: repeating-linear-gradient(0deg, #0b0b0b 0 2px, #111 2px 4px); border-radius: 6px; display: flex; flex-direction: column; justify-content: center; padding: 10px; }
.vplay { align-self: center; background: #d9b86b; color: #111; border: 0; border-radius: 20px; padding: 7px 20px; font-weight: 600; cursor: pointer; }
.vplay:disabled { opacity: .6; cursor: default; }
.vbar { height: 3px; background: #222; margin: 0 10px 8px; }
.vbar i { display: block; height: 100%; width: 0; background: #d9b86b; }
.vlabel { font-size: 11px; color: #d9b86b; margin-bottom: 2px; }
.vtext { font-size: 13px; color: #c9cdd4; }
.vintent { margin: 0 10px 10px; padding: 8px 10px; border-left: 3px solid #d9b86b; background: #16181d; }

#choices { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #262830; min-height: 20px; }
.choice { background: #1f2a24; color: #cfeedd; border: 1px solid #3c6b52; border-radius: 18px; padding: 9px 14px; font-size: 14px; cursor: pointer; text-align: center; }
.choice:hover { background: #28392f; }

#gm { width: 380px; max-height: calc(100vh - 40px); overflow-y: auto; background: #15171c; border: 1px solid #333; border-radius: 12px; padding: 12px 14px; font-size: 13px; }
#gm h3 { margin: 0 0 10px; color: #e6a15a; }
#gm h4 { margin: 14px 0 6px; color: #b9bec8; }
.gm-sec { border: 1px solid #282d38; border-radius: 9px; margin-bottom: 8px; background: #191c23; overflow: hidden; }
.gm-sec > summary { padding: 7px 11px; font-weight: 600; color: #d6dce8; cursor: pointer; user-select: none; background: #1e222b; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.gm-sec > summary::-webkit-details-marker { display: none; }
.gm-sec > summary::after { content: '▸'; color: #8a93a6; transition: transform .18s; }
.gm-sec[open] > summary::after { transform: rotate(90deg); }
.gm-sec > summary:hover { background: #252a35; }
.gm-body { padding: 8px 11px 10px; border-top: 1px solid #262a34; }
.gm-sub { font-size: 11.5px; color: #9ab8a3; font-weight: 600; margin: 8px 0 4px; }
#gm .row { margin: 6px 0; }
#gm .btns { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
#gm button { background: #2a2e37; color: #ddd; border: 1px solid #444a56; border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
#gm button:hover { background: #353a45; }
#gm select { background: #20232a; color: #ddd; border: 1px solid #444a56; border-radius: 4px; padding: 4px 6px; max-width: 100%; font-size: 12px; }
#gm table td { padding: 2px 8px 2px 0; }
#gm-check div { margin: 3px 0; word-break: break-all; }
#gm-check .err { color: #ff7b7b; }
#gm-check .warn { color: #e8c267; }
#gm-check .ok { color: #7fd48b; }

#overlay { position: fixed; inset: 0; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; z-index: 10; }
#overlay[hidden] { display: none; }
.ov-box { text-align: center; max-width: 480px; padding: 20px; }
.ov-typing { font-size: 20px; color: #6fc27a; animation: blink 1s infinite; }
.ov-title { font-size: 30px; color: #eee; margin-bottom: 10px; }
.ov-sub { color: #9aa0aa; margin-bottom: 12px; }
.ov-detail[hidden] { display: none; }
.ov-reason { color: #c3c7ce; font-size: 14px; line-height: 1.65; margin-bottom: 12px; }
.ov-after { background: #16181e; border: 1px solid #2e323d; border-radius: 10px; padding: 10px 14px; margin: 10px 0 18px; color: #9ab8a3; font-size: 13px; line-height: 1.6; }
.ov-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ov-btns button { background: #2a2e37; color: #ddd; border: 1px solid #555; border-radius: 6px; padding: 8px 16px; cursor: pointer; }

.ov-note { margin-top: 22px; padding-top: 14px; border-top: 1px solid #333; font-size: 12px; line-height: 1.7; color: #8a8f99; white-space: pre-line; }

#picker { max-width: 520px; margin: 60px auto; padding: 0 20px; }
#picker[hidden], #app[hidden] { display: none; }
.picker-item { display: block; padding: 14px 16px; margin: 10px 0; background: #1f2a24; color: #cfeedd; border: 1px solid #3c6b52; border-radius: 12px; text-decoration: none; }
.picker-item:hover { background: #28392f; }
.picker-tip { color: #8a8f99; font-size: 13px; }
#gm-switch { float: right; font-size: 12px; font-weight: normal; color: #8ab4f8; }

#gm-toggle { display: none; }
@media (max-width: 820px) {
  #app { padding: 0; gap: 0; display: block; }
  #phone { width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  #gm { display: none; position: fixed; inset: 0; z-index: 9; overflow-y: auto; border-radius: 0; padding-top: 48px; }
  body.gm-open #gm { display: block; }
  #gm-toggle { display: block; position: fixed; top: 10px; right: 10px; z-index: 11; background: #2a2e37; color: #d9b86b; border: 1px solid #444a56; border-radius: 14px; padding: 4px 12px; font-size: 13px; }
  body.gm-open #gm-toggle { background: #d9b86b; color: #111; }
  .choice { padding: 12px 14px; font-size: 15px; }
  #choices { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------------- iOS 灵动岛与状态栏 ---------------- */
#ios-bar { position: relative; z-index: 6; display: flex; align-items: flex-start; justify-content: space-between; padding: 8px 16px 6px; background: #15171c; font-size: 12px; color: #b5bbc6; min-height: 40px; }
#ios-time { font-weight: 600; padding-top: 4px; width: 48px; }
#ios-sys-icons { font-weight: 600; padding-top: 4px; width: 48px; text-align: right; font-size: 11px; color: #b5bbc6; letter-spacing: 1px; }

#di { background: #000; border: 1px solid #2b2f3a; border-radius: 20px; padding: 4px 12px; min-width: 196px; max-width: 265px; cursor: pointer; transition: all .22s ease; box-shadow: 0 4px 14px rgba(0,0,0,.6); }
#di.waiting { border-color: #4b6b58; }
#di.offline { border-color: #5c6270; }
#di.ghost { border-color: #6fc27a; box-shadow: 0 0 12px rgba(111,194,122,.35); }
#di.crisis { border-color: #d97757; box-shadow: 0 0 12px rgba(217,119,87,.35); }
#di.minimal { min-width: 34px; max-width: 34px; width: 34px; height: 26px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#di.minimal #di-left, #di.minimal #di-right { display: none; }
#di.minimal #di-mini { display: inline !important; font-size: 13px; animation: blink 1.6s infinite; }
#di.expanded { min-width: 340px; max-width: 356px; border-radius: 22px; padding: 10px 14px; }
.di-compact-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; white-space: nowrap; }
#di-left { color: #e5ebf3; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
#di.ghost #di-left { color: #6fc27a; animation: blink 1s infinite; }
#di-right { color: #9aa3b2; font-size: 11px; font-variant-numeric: tabular-nums; }
#di-exp { margin-top: 8px; padding-top: 8px; border-top: 1px solid #222630; font-size: 12px; }
.di-exp-head { display: flex; justify-content: space-between; color: #8c95a6; font-size: 11px; margin-bottom: 4px; }
#di-exp-env, #ls-live-env { background: #141820; border: 1px solid #262c3a; border-radius: 6px; padding: 3px 7px; font-size: 11px; color: #8ab4f8; margin-bottom: 5px; font-family: ui-monospace, Consolas, monospace; }
#di.crisis #di-exp-env { color: #f0a47a; border-color: #4a3026; }
#di-exp-status { color: #f0f4f8; font-weight: 600; font-size: 13px; margin: 3px 0; }
#di-exp-last { color: #9ab8a3; font-size: 11.5px; margin-bottom: 6px; font-style: italic; }
.di-bar, .ls-live-bar { height: 5px; background: #232730; border-radius: 4px; overflow: hidden; margin: 6px 0; }
.di-bar i, .ls-live-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #4da872, #85d9a4); transition: width .3s; }
.di-bar.indeterminate i, .ls-live-bar.indeterminate i { width: 100% !important; background: repeating-linear-gradient(45deg, #333844 0 8px, #232730 8px 16px); }
.di-exp-foot, .ls-live-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: #8e96a4; }
.di-exp-btns, .ls-live-actions { display: flex; gap: 5px; }
.di-exp-btns button, .ls-live-actions button { background: #242933; color: #dce3ee; border: 1px solid #3d4454; border-radius: 10px; padding: 2px 7px; font-size: 11px; cursor: pointer; }
.di-exp-btns button:hover, .ls-live-actions button:hover { background: #323947; }
/* ---------------- 顶部推送通知横幅 & 锁屏界面 ---------------- */
#push-banner { position: absolute; top: 48px; left: 12px; right: 12px; z-index: 8; background: rgba(28, 32, 40, 0.96); border: 1px solid #4d6a59; border-radius: 18px; padding: 10px 13px; box-shadow: 0 12px 32px rgba(0,0,0,.75); backdrop-filter: blur(10px); animation: slideDown .22s ease; }
@keyframes slideDown { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.notif-card { background: rgba(30, 34, 44, 0.92); border: 1px solid #3c4354; border-radius: 16px; padding: 10px 13px; margin-bottom: 8px; cursor: pointer; transition: transform .15s; }
.notif-card:hover { transform: scale(1.01); border-color: #5b7867; }
.notif-card.mail { border-color: #8a733e; background: rgba(42, 36, 22, 0.94); }
.notif-card.net { border-color: #3f6a9c; background: rgba(20, 30, 44, 0.94); }
.notif-card.crisis { border-color: #a6563b; background: rgba(44, 24, 20, 0.94); }
.notif-card.nudge { border-color: #7c5b4f; }
.notif-head { display: flex; justify-content: space-between; font-size: 11px; color: #9aa3b2; margin-bottom: 4px; }
.notif-app { font-weight: 600; color: #8ad6a4; }
.notif-card.mail .notif-app { color: #e8c267; }
.notif-card.net .notif-app { color: #8ab4f8; }
.notif-card.crisis .notif-app { color: #f28b66; }
.notif-card.nudge .notif-app { color: #e89b7e; }
.notif-sub { font-size: 11.5px; color: #c7b078; font-weight: 600; margin-bottom: 3px; }
.notif-body-row { display: flex; gap: 10px; align-items: center; }
.notif-avatar { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2a527a, #132538); border: 1px solid #4878a8; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.notif-text { flex: 1; font-size: 13px; color: #eef2f7; line-height: 1.42; }
.notif-thumb { width: 54px; height: 46px; border-radius: 8px; background: radial-gradient(circle at 65% 40%, #443c24, #07080a 78%); border: 1px solid #63583a; color: #e8c267; font-size: 10px; display: flex; align-items: center; justify-content: center; text-align: center; flex-shrink: 0; padding: 3px; white-space: pre-line; line-height: 1.25; box-shadow: inset 0 0 8px rgba(0,0,0,.8); }
.notif-actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.08); }
.notif-actions button { flex: 1; background: rgba(47, 111, 79, 0.35); color: #d7f5e3; border: 1px solid #498566; border-radius: 12px; padding: 5px 8px; font-size: 12px; cursor: pointer; }
.notif-actions button:hover { background: rgba(47, 111, 79, 0.65); }

#lockscreen { position: absolute; inset: 40px 0 0 0; z-index: 7; background: linear-gradient(180deg, rgba(12,15,22,.96) 0%, rgba(18,24,32,.98) 100%); display: flex; flex-direction: column; padding: 18px 14px 16px; backdrop-filter: blur(14px); }
#lockscreen[hidden], #push-banner[hidden], #di-exp[hidden] { display: none !important; }
.ls-top { text-align: center; margin: 6px 0 14px; }
#ls-day { font-size: 13px; color: #9aa3b2; letter-spacing: 1px; }
#ls-clock { font-size: 52px; font-weight: 700; color: #f3f6fa; line-height: 1.05; font-variant-numeric: tabular-nums; }
#ls-notifs { flex: 1; overflow-y: auto; padding: 2px 2px 8px; }
.ls-empty { text-align: center; color: #677080; font-size: 12.5px; margin-top: 28px; }
#ls-live { background: rgba(16, 19, 25, 0.96); border: 1px solid #35424f; border-radius: 20px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.ls-live-head { display: flex; justify-content: space-between; font-size: 11px; color: #8792a3; margin-bottom: 4px; }
#ls-live-title { font-size: 14px; font-weight: 600; color: #edf2f8; margin-bottom: 3px; }
#ls-live-sub { font-size: 12px; color: #98b4a1; margin-bottom: 6px; }
#ls-unlock { padding: 10px 0 2px; cursor: pointer; display: flex; justify-content: center; }
.ls-home-bar { display: block; width: 134px; height: 5px; background: rgba(255,255,255,.65); border-radius: 3px; transition: background .15s; }
#ls-unlock:hover .ls-home-bar { background: #fff; }

/* ---------------- 长按标记待修改台词与汇总 ---------------- */
#top { position: relative; }
#top-mark-badge { position: absolute; right: 14px; top: 10px; background: #3b2d18; color: #f2c96d; border: 1px solid #967334; border-radius: 12px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
#top-mark-badge:hover { background: #4f3c20; }
.bubble, .choice, .find, .video, .sys { -webkit-touch-callout: none; user-select: none; position: relative; }
.marked-item { outline: 1.5px dashed #e6a94e !important; box-shadow: 0 0 0 3px rgba(230, 169, 78, 0.16); }
.mark-pin { display: inline-block; margin-left: 6px; font-size: 11px; color: #f2c96d; background: rgba(59, 45, 24, 0.9); border: 1px solid #8a6930; border-radius: 8px; padding: 0 5px; vertical-align: middle; cursor: pointer; }

#mark-modal { position: absolute; inset: 0; z-index: 12; background: rgba(0, 0, 0, 0.72); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
#mark-modal[hidden], #top-mark-badge[hidden], #mm-del[hidden] { display: none !important; }
.mm-box { width: 100%; max-width: 360px; background: #191d24; border: 1px solid #4d5668; border-radius: 16px; padding: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.75); }
.mm-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: #f2c96d; margin-bottom: 8px; }
#mm-loc { font-size: 11px; color: #8c96a8; font-weight: normal; font-family: ui-monospace, Consolas, monospace; }
#mm-quote { background: #111419; border-left: 3px solid #e6a94e; border-radius: 6px; padding: 7px 10px; font-size: 13px; color: #e5eaf2; margin-bottom: 10px; max-height: 84px; overflow-y: auto; word-break: break-all; }
.mm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mm-tags button { background: #232833; color: #b8c2d4; border: 1px solid #3c4456; border-radius: 12px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
.mm-tags button.active { background: #3f311b; color: #f7d279; border-color: #b88b3b; font-weight: 600; }
#mm-note { width: 100%; background: #111419; color: #eee; border: 1px solid #3c4456; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; outline: none; }
#mm-note:focus { border-color: #e6a94e; }
.mm-btns { display: flex; gap: 8px; }
.mm-btns button { flex: 1; background: #282d38; color: #dce2ec; border: 1px solid #454d5e; border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; }
.mm-btns button.mm-primary { background: #b57c2c; color: #fff; border-color: #d6983e; font-weight: 600; }
.mm-btns button.mm-danger { background: #4a2323; color: #ffb3b3; border-color: #7a3b3b; }

.gm-tip { font-size: 11.5px; color: #8e97a8; margin-bottom: 6px; line-height: 1.45; }
#gm-marks-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.gm-mark-card { background: #13161c; border: 1px solid #323846; border-left: 3px solid #e6a94e; border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.gm-mark-top { display: flex; justify-content: space-between; align-items: center; color: #9aa3b5; font-size: 11px; margin-bottom: 3px; }
.gm-mark-txt { color: #e8ecf2; word-break: break-all; margin-bottom: 3px; }
.gm-mark-note { color: #f2c96d; font-size: 11.5px; }
.gm-mark-acts { display: flex; gap: 5px; }
.gm-mark-acts button { padding: 1px 6px !important; font-size: 11px !important; }
