/* Copyright (C) 2026 Amira Labs, Inc. All rights reserved.
   Orby Messenger: the glossy, sky-blue plastic of the 2000s messengers,
   carried to 2026. */
:root {
  --sky1: #f4f9ff;
  --sky2: #dbeaf9;
  --sky3: #b9d5f2;
  --edge: #7ea6d3;
  --edge-dark: #4f7fb8;
  --ink: #0f2a4a;
  --ink2: #3b5878;
  --dim: #6f86a0;
  --link: #0b56b3;
  --sel: #cfe6ff;
  --hover: #e8f3ff;
  --font: "Segoe UI", Tahoma, "Lucida Grande", -apple-system, Verdana, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); font-size: 12px; color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; overflow: hidden; }
body { background: linear-gradient(180deg, var(--sky2) 0, var(--sky1) 120px, #fff 60%); display: flex; flex-direction: column; border: 1px solid var(--edge-dark); border-radius: 8px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; user-select: text; }
a { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: linear-gradient(90deg, #eef4fb, #f8fbff); border-left: 1px solid #d6e3f2; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #dcebfb, #b9d3f0); border: 1px solid #8fb0d8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #e9f3ff, #c9e0f9); }

/* ---------- title bar: blue glass ---------- */
.titlebar { -webkit-app-region: drag; height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 4px 0 8px; flex: none;
  background: linear-gradient(180deg, #4f8fd6 0%, #2f6fc4 48%, #245fb3 52%, #3a7fd0 100%); color: #fff; border-radius: 7px 7px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.18); text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.titlebar .tb-title { flex: 1; font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-logo { display: flex; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.tb-btns { display: flex; gap: 2px; -webkit-app-region: no-drag; }
.tb-btn { width: 26px; height: 20px; border-radius: 4px; border: 1px solid rgba(15,40,90,.55); color: #fff; display: grid; place-items: center; padding: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.12) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,.18)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.tb-btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.3) 50%, rgba(170,220,255,.3) 51%, rgba(170,230,255,.6)); }
.tb-close { width: 40px; background: linear-gradient(180deg, #f5a28f, #dd5a3f 50%, #c63a1e 51%, #e2664a); border-color: #7a1c0c; }
.tb-close:hover { background: linear-gradient(180deg, #ffc0ae, #f06a4c 50%, #dc4322 51%, #ff8a6c); }

/* ---------- in-window menu bar ---------- */
.menubar { display: flex; gap: 0; padding: 1px 4px; background: linear-gradient(180deg, #f6faff, #e4eefa); border-bottom: 1px solid #c3d5ea; flex: none; }
.menubar .mb { padding: 3px 8px; border-radius: 3px; cursor: default; }
.menubar .mb:hover, .menubar .mb.on { background: linear-gradient(180deg, #e9f4ff, #c9e2fb); box-shadow: inset 0 0 0 1px #8fb6e3; }
.popmenu { position: fixed; z-index: 1000; min-width: 190px; background: #fbfdff; border: 1px solid #8ea9c8; box-shadow: 2px 3px 8px rgba(30,60,100,.35); padding: 2px; border-radius: 3px;
  background-image: linear-gradient(90deg, #eaf2fb 0, #eaf2fb 26px, #c9d9ec 26px, #c9d9ec 27px, transparent 27px); }
.pm-item { display: flex; align-items: center; gap: 8px; padding: 4px 18px 4px 4px; border-radius: 3px; cursor: default; white-space: nowrap; }
.pm-item i { margin-left: auto; padding-left: 20px; color: var(--dim); font-style: normal; }
.pm-item:hover { background: linear-gradient(180deg, #eaf5ff, #cde5fd); box-shadow: inset 0 0 0 1px #84b2e6; }
.pm-item.dis { color: #9aa8b8; }
.pm-item.chk .pm-ic::after { content: "✓"; font-weight: 700; color: var(--ink); }
.pm-ic, .pm-item > svg { width: 18px; height: 16px; display: inline-grid; place-items: center; flex: none; }
.pm-sep { height: 1px; background: #c9d9ec; margin: 3px 2px 3px 30px; }

/* ---------- glossy buttons ---------- */
.btn { min-width: 76px; height: 24px; padding: 0 12px; border-radius: 3px; border: 1px solid #6f8fb5; color: var(--ink);
  background: linear-gradient(180deg, #fefefe 0, #eef3f9 48%, #dce6f2 50%, #e8eef6 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.btn:hover { border-color: #3c7fb1; background: linear-gradient(180deg, #f2faff 0, #dff1fd 48%, #bde3fb 50%, #a8d9f8 100%); }
.btn:active { background: linear-gradient(180deg, #d5ecfa, #b5ddf6 50%, #8fc8ee 51%, #a6d4f2); }
.btn.primary { font-weight: 600; border-color: #2c628b; }
.btn:disabled { color: #9aa8b8; border-color: #b6c3d2; background: #f1f4f8; }
.btn-big { height: 30px; min-width: 110px; font-size: 13px; }

input[type=text], input[type=password], textarea.field, .field-in { height: 23px; border: 1px solid #a5bcd8; border-radius: 2px; padding: 2px 6px; background: #fff; outline: none;
  box-shadow: inset 0 1px 2px rgba(60,90,130,.15); }
input[type=text]:focus, .field-in:focus { border-color: #3d7bc6; box-shadow: 0 0 0 2px rgba(110,170,240,.35); }
label.chk { display: flex; align-items: center; gap: 6px; cursor: pointer; }
label.chk input { margin: 0; }

/* ---------- display picture frame: glossy, lit by the status ---------- */
.frame { --s: 96px; width: calc(var(--s) + 12px); height: calc(var(--s) + 12px); padding: 5px; border-radius: 9px; position: relative; flex: none;
  background: linear-gradient(180deg, #ffffff, #e6eef7); border: 1px solid #8fa8c6; box-shadow: 0 1px 3px rgba(20,50,90,.25), inset 0 0 0 1px #fff; }
.frame-in { width: var(--s); height: var(--s); border-radius: 5px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.frame-in img, .frame-in svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame-gloss { position: absolute; inset: 5px 5px auto 5px; height: 45%; border-radius: 5px 5px 40% 40% / 5px 5px 18% 18%; background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0)); pointer-events: none; }
.frame.st-online { border-color: #4caf3a; box-shadow: 0 0 0 2px rgba(92,200,70,.35), 0 1px 3px rgba(20,50,90,.25); background: linear-gradient(180deg, #f3fff0, #c9f0bd); }
.frame.st-busy, .frame.st-phone { border-color: #d3332f; box-shadow: 0 0 0 2px rgba(230,70,60,.3), 0 1px 3px rgba(20,50,90,.25); background: linear-gradient(180deg, #fff2f1, #f6c3bf); }
.frame.st-away, .frame.st-brb, .frame.st-lunch { border-color: #e48f12; box-shadow: 0 0 0 2px rgba(250,170,40,.32), 0 1px 3px rgba(20,50,90,.25); background: linear-gradient(180deg, #fffaf0, #fbe0b2); }
.frame.st-offline, .frame.st-invisible { border-color: #9aa6b4; background: linear-gradient(180deg, #fbfcfd, #dfe4ea); }
.frame.st-offline .frame-in, .frame.st-invisible .frame-in { filter: saturate(.25); opacity: .85; }

.wordmark { display: inline-flex; align-items: baseline; gap: 6px; color: #1a4f97; letter-spacing: -.01em; }
.wordmark b { font-weight: 800; font-style: italic; font-size: 1.15em; color: #0c5cc0; text-shadow: 0 1px 0 #fff; }
.wordmark span { font-weight: 400; color: #2c5d9c; }

.emo-img { vertical-align: -4px; }
.orb { flex: none; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 30px 0 0 0; background: rgba(20,45,80,.25); display: grid; place-items: center; z-index: 500; border-radius: 0 0 8px 8px; }
.modal { background: linear-gradient(180deg, #f4f9ff, #fff 40%); border: 1px solid var(--edge-dark); border-radius: 6px; box-shadow: 0 8px 30px rgba(10,30,60,.4); padding: 14px 16px; max-width: calc(100vw - 20px); }
.modal h3 { margin: 0 0 6px; font-size: 14px; color: #12437f; display: flex; align-items: center; gap: 8px; }
.modal p { margin: 4px 0 10px; color: var(--ink2); line-height: 1.45; }
.modal .row { display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.codebox { font-family: Consolas, Menlo, monospace; font-size: 11.5px; background: #fff; border: 1px solid #a5bcd8; padding: 8px; border-radius: 3px; word-break: break-all; user-select: text; color: #0b3a75; }

.wink-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 900; }
[hidden] { display: none !important; }
