/* NMSeawise intranet: look and sizes taken from the NMSeawise app (src/theme.ts and the component styles). */
:root {
  --bg: #0A1628; --card: rgba(24,43,74,.78); --card-pressed: rgba(40,66,106,.92); --line: rgba(110,150,210,.28);
  --text: #EEF2F7; --silver: #C9D2DE; --muted: #A3B3C8; --blue: #4A8EE0; --link: #72AAF0;
  --tab-bg: #0A1526; --tab-active: #1C3354; --input: rgba(8,20,38,.85); --danger: #E88A8A; --ok: #5FD39A;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: #0C1D36 linear-gradient(#08131F 0%, #0C1D36 55%, #1A3862 100%) fixed; color: var(--text);
  font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow: hidden;
}
#sky { position: fixed; inset: 0; pointer-events: none; }
#sky i { position: absolute; border-radius: 50%; background: #fff; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 6px; }

.app { position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: 100vh; height: 100dvh; height: var(--app-h, 100dvh); display: flex; max-width: 100%; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; outline: none; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); display: flex; flex-direction: column; overflow-wrap: anywhere; }
.screen { scroll-padding-block: 16px; }
.sched-wrap { overflow-wrap: normal; }
body.sub .screen, body.auth .screen { padding-bottom: env(safe-area-inset-bottom); }
.screen > * { flex-shrink: 0; }
.body { padding: 16px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }
.side { display: none; }

.ico { width: 24px; height: 24px; fill: currentColor; flex: none; display: inline-block; vertical-align: middle; }

/* header of sub screens */
.hdr { display: flex; align-items: center; padding: 8px 12px; }
.hdr .side-slot { min-width: 44px; min-height: 44px; display: flex; align-items: center; color: var(--text); }
.hdr .side-slot.r { justify-content: flex-end; }
.hdr h1 { flex: 1; text-align: center; font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr.big { padding: 12px 20px 8px; } .hdr.big h1 { text-align: left; font-size: 26px; font-weight: 700; }

/* tab bar */
.tabs { display: flex; background: var(--tab-bg); padding: 8px env(safe-area-inset-right) calc(6px + env(safe-area-inset-bottom)) env(safe-area-inset-left); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--silver); font-size: 12px; }
.tabs .pill { width: 64px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; }
.tabs a[aria-current="page"] { color: var(--blue); font-weight: 600; } .tabs a[aria-current="page"] .pill { background: var(--tab-active); }
body.sub .tabs { display: none; }

/* cards, text, form parts */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: block; color: inherit; text-decoration: none; text-align: left; }
[data-go] { cursor: pointer; } .card[data-go]:active, .row-item:active, .note-item:active { background: var(--card-pressed); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card-title { font-size: 19px; font-weight: 700; } .card-text { color: var(--silver); font-size: 14px; line-height: 20px; }
.link-text { color: var(--link); font-size: 14px; } .divider { height: 1px; background: var(--line); }
.muted { color: var(--muted); } .silver { color: var(--silver); }
.label { color: var(--muted); font-size: 13px; display: block; margin-bottom: 8px; }
.field { display: block; }
.input { width: 100%; min-height: 50px; background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 16px; color: var(--text); outline: none; }
.input:focus { border-color: var(--blue); } .input::placeholder { color: var(--muted); }
textarea.input { padding: 12px 14px; resize: none; }
.btn { min-height: 56px; width: 100%; border-radius: 16px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font-size: 17px; font-weight: 600; padding: 0 18px; }
.btn.dim, .btn:disabled { opacity: .45; } .btn.secondary { background: rgba(22,44,82,.9); border-color: rgba(90,140,210,.45); }
.btn:active:not(:disabled) { opacity: .85; }
.err { color: var(--danger); font-size: 14px; line-height: 20px; } .hint { color: var(--muted); font-size: 13px; line-height: 18px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 12px; color: var(--silver); font-size: 14px; }
.sw { position: relative; width: 52px; height: 32px; flex: none; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw span { position: absolute; inset: 4px 0; border-radius: 12px; background: var(--line); transition: .12s; }
.sw span::after { content: ""; position: absolute; top: -3px; left: -1px; width: 26px; height: 26px; border-radius: 50%; background: #E3E9F1; transition: .12s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.sw input:checked + span { background: var(--blue); } .sw input:checked + span::after { left: 27px; background: #79CDB4; }
.sw input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 3px; }
.sw input:disabled { cursor: default; } .sw input:disabled + span { opacity: .5; }
.datefield { position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; flex: 1; font-size: 16px; cursor: pointer; }
.datefield:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px var(--link); }
.datefield input { flex: 1; min-width: 0; min-height: 48px; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; cursor: pointer; color-scheme: dark; }
.datefield.ph input { color: var(--muted); }
.datefield input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.datefield .ico { color: var(--silver); }
.row { display: flex; align-items: center; gap: 8px; } .row.between { justify-content: space-between; }
.x-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.section { font-size: 18px; font-weight: 700; margin-top: 8px; }
.empty-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; flex: 1 1 auto; margin-bottom: 8vh; }
.empty-center h2 { font-size: 18px; font-weight: 600; } .empty-center p { color: var(--muted); font-size: 14px; line-height: 20px; max-width: 300px; }
.empty-center .ico { color: var(--silver); width: 44px; height: 44px; } .empty-center.big .ico { width: 56px; height: 56px; }
.empty-text { color: var(--muted); font-size: 14px; text-align: center; margin-top: 32px; }

/* avatar */
.avatar { border-radius: 50%; border: 2px solid var(--silver); background: rgba(60,72,92,.9); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--text); flex: none; position: relative; font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-wrap { position: relative; display: inline-block; flex: none; }
.cam { display: none; position: absolute; right: -2px; bottom: -2px; width: 33px; height: 33px; border-radius: 50%; background: var(--blue); border: 2px solid #0C1D36; display: flex; align-items: center; justify-content: center; color: #fff; }
.cam .ico { width: 18px; height: 18px; }

/* home */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 0; }
.home-head .slot { width: 72px; display: flex; justify-content: flex-end; }
.greeting { font-size: clamp(21px, 5.7vw, 26px); font-weight: 700; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 0 18px; min-height: 44px; border-radius: 22px; border: 1px solid var(--line); background: rgba(12,26,48,.7); color: var(--link); font-size: 15px; text-decoration: none; }
.chip .ico { width: 18px; height: 18px; color: var(--silver); }
.saved { display: flex; align-items: center; gap: 10px; color: var(--silver); font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.quick { display: flex; padding: 10px 4px; }
.quick button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; border-radius: 14px; color: var(--silver); } .quick button:active { background: var(--card-pressed); }
.quick .ico { width: 26px; height: 26px; } .quick span { color: var(--text); font-size: 12px; white-space: nowrap; }
.cols { display: flex; gap: 14px; align-items: flex-start; } .cols > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card.gap { display: flex; flex-direction: column; gap: 10px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); } /* seven equal columns that always fit the card (a narrow card at 320 px used to push Sunday out) */
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; } .wd small { color: var(--muted); font-size: 11px; }
.wd b { width: min(22px, 100%); aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.wd b.today { background: var(--blue); } .wd i { width: 4px; height: 4px; border-radius: 2px; } .wd i.on { background: var(--silver); }
.next-title { font-size: 15px; font-weight: 600; }
.map-ico { color: #3FA7C9; } .map-ico .ico { width: 40px; height: 40px; }

/* my space */
.head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 16px; }
.head .name { font-size: 24px; font-weight: 700; margin-top: 8px; } .head .rank { color: var(--link); font-size: 16px; font-weight: 600; }
.head .details { color: var(--silver); font-size: 14px; } .head .add-photo { color: var(--link); font-size: 14px; margin-top: 4px; }
.list-card { padding: 0; overflow: hidden; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 0 18px; min-height: 58px; width: 100%; text-decoration: none; color: var(--text); font-size: 16px; text-align: left; }
.row-item + .row-item { border-top: 1px solid var(--line); } .row-item .t { flex: 1; } .row-item .ico { color: var(--silver); } .row-item .ico:last-child { color: var(--muted); }
.lang-row { display: flex; align-items: center; justify-content: space-between; }
.seg { display: flex; background: rgba(20,34,58,.9); border-radius: 14px; padding: 4px; }
.seg button { padding: 0 18px; min-height: 40px; border-radius: 11px; color: var(--silver); font-size: 15px; font-weight: 500; } .seg button[aria-checked="true"] { background: var(--blue); color: #fff; font-weight: 600; }
.change { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 14px; align-self: flex-start; } .change .ico { width: 18px; height: 18px; }
.footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 0 16px; }
.footer .links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; }
.footer a, .footer button { min-height: 44px; display: inline-flex; align-items: center; color: var(--silver); text-decoration: none; font-size: 14px; } .footer .report { color: var(--link); display: inline-flex; align-items: center; gap: 4px; } .footer .report .ico { width: 14px; height: 14px; }
.footer .sep, .footer .copy { color: var(--muted); } .footer .copy { font-size: 12px; }

/* lists */
.task { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; min-height: 56px; }
.task .check { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 0; text-align: left; min-width: 0; }
.task .tt { flex: 1; font-size: 16px; overflow-wrap: anywhere; } .task.done .tt { color: var(--muted); text-decoration: line-through; }
.task .ico { color: var(--silver); } .task .flag.on { color: var(--danger); } .task .flag { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.add-row { display: flex; gap: 10px; padding: 16px; } .add-row .input { flex: 1; } .add-btn { width: 50px; height: 50px; border-radius: 12px; background: var(--blue); display: flex; align-items: center; justify-content: center; color: #fff; flex: none; } .add-btn .ico { width: 30px; height: 30px; }
.note-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; text-decoration: none; color: inherit; }
.note-item b { font-size: 17px; font-weight: 600; } .note-item span { color: var(--silver); font-size: 14px; line-height: 20px; } .note-item small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.note-edit { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.note-edit input { background: none; border: 0; outline: none; font-size: 22px; font-weight: 600; padding: 8px 0; color: var(--text); width: 100%; }
.note-edit textarea { background: none; border: 0; outline: none; font-size: 16px; line-height: 24px; color: var(--text); flex: 1; min-height: 50vh; resize: none; width: 100%; }
.note-edit input::placeholder, .note-edit textarea::placeholder { color: var(--muted); }

/* calendar */
.month-row { display: flex; align-items: center; justify-content: space-between; }
.month-row button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text); } .month-row h2 { font-size: 19px; font-weight: 700; }
.days { display: flex; gap: 4px; }
.days button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 14px; border: 1px solid transparent; color: var(--text); }
.days button.sel { background: var(--card); border-color: var(--line); } .days small { color: var(--muted); font-size: 12px; }
.days b { width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; } .days b.today { background: var(--blue); }
.days i { width: 5px; height: 5px; border-radius: 3px; } .days i.on { background: var(--silver); }
.event { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.event .tm { color: var(--link); font-size: 15px; font-weight: 600; width: 50px; } .event .main { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; } .event small { display: block; color: var(--muted); font-size: 12px; }
.form-card { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; } .form-card h3 { font-size: 16px; font-weight: 600; }
.cert { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.cert .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .cert b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; } .cert span { color: var(--silver); font-size: 13px; } .cert .st { font-weight: 600; }

/* demo data tag: compact */
.demo { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px dashed #F0B35A; color: #F0B35A; font-size: 12px; background: rgba(240,179,90,.1); }
.person { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; } .person .main { flex: 1; min-width: 0; } .person b { font-weight: 600; } .person small { display: block; color: var(--silver); font-size: 13px; }
.bar { height: 8px; border-radius: 4px; background: var(--input); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--silver); } .badge.Active { color: var(--ok); border-color: var(--ok); } .badge.Planning { color: #F0B35A; border-color: #F0B35A; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sched-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
table.sched { border-collapse: collapse; width: 100%; min-width: 520px; } .sched th, .sched td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.sched th:first-child, .sched td:first-child { text-align: left; padding-left: 14px; position: sticky; left: 0; background: #17305a; min-width: 110px; } .sched th small { display: block; color: var(--muted); font-weight: 400; }
.shift { display: inline-block; min-width: 32px; padding: 3px 0; border-radius: 8px; font-weight: 600; font-size: 13px; } .shift.D { background: rgba(74,142,224,.28); } .shift.N { background: rgba(150,110,220,.3); } .shift.O { color: var(--muted); } .shift.L { background: rgba(240,179,90,.22); color: #F0B35A; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* sheet (photo / rank pickers) */
.overlay { position: fixed; inset: 0; background: rgba(4,10,20,.7); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet { width: 100%; max-width: 480px; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overflow-wrap: anywhere; background: #12284a; border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sheet h3 { font-size: 19px; } .sheet p { color: var(--silver); font-size: 14px; line-height: 20px; }
.sheet .opt { min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); font-size: 16px; text-align: left; padding: 0 14px; width: 100%; } .sheet .opt.on { border-color: var(--blue); }
.sheet .opt.danger { color: var(--danger); } .sheet .grp { color: var(--muted); font-size: 13px; margin-top: 6px; }
.toast { overflow-wrap: anywhere; position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #16294a; border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; z-index: 30; max-width: 90%; text-align: center; font-size: 14px; }

/* wide screens: same look, sidebar with the three app tabs, content centred */
@media (min-width: 900px) {
  .tabs { display: none; } body.sub .tabs { display: none; }
  .side { display: flex; flex-direction: column; gap: 6px; width: 240px; flex: none; padding: 22px 14px; background: var(--tab-bg); border-right: 1px solid var(--line); }
  .side .logo { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 18px; } .side .logo img { width: 96px; height: auto; } .side .logo b { font-size: 18px; font-weight: 400; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 48px; border-radius: 24px; text-decoration: none; color: var(--silver); font-size: 16px; }
  .side a[aria-current="page"] { background: var(--tab-active); color: var(--blue); font-weight: 600; }
  .screen > * { max-width: 760px; margin-left: auto; margin-right: auto; width: 100%; }
  .body { padding: 24px; }
  .hdr { padding: 16px 24px 8px; } .hdr.big { padding: 20px 24px 8px; }
  .home-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .screen.wide > * { max-width: 980px; }
}

/* signed out (login, sign up, password reset) and loading screens */
body.auth .side, body.auth .tabs { display: none; }
.auth-body { width: 100%; max-width: 440px; margin: 0 auto; padding: 20px 24px 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--link); min-height: 44px; font-size: 15px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0; }
.auth-brand .app-name { color: var(--silver); font-size: 24px; font-weight: 400; letter-spacing: 1.5px; margin-top: 6px; } .auth-brand .tag { color: var(--muted); font-size: 15px; text-align: center; }
.title { font-size: 26px; font-weight: 700; } .title.center { text-align: center; margin-top: 12px; } .step { color: var(--muted); font-size: 13px; }
.body-text { color: var(--silver); font-size: 15px; line-height: 22px; } .q { font-size: 16px; font-weight: 600; margin-top: 4px; }
.err { color: var(--danger); font-size: 14px; line-height: 20px; } .err:empty { display: none; }
.ok-text { color: var(--ok); font-size: 14px; line-height: 20px; text-align: center; } .ok-text:empty { display: none; }
.center-link { color: var(--link); text-align: center; min-height: 44px; font-size: 15px; width: 100%; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pw { position: relative; } .pw .input { padding-right: 52px; } .pw button { position: absolute; right: 2px; top: 1px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--silver); }
.input.code { font-size: 24px; letter-spacing: 6px; text-align: center; min-height: 56px; }
.two { display: flex; gap: 12px; } .two > * { flex: 1; min-width: 0; }
.linkbtn { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; font-size: 15px; }
.chipbtn { padding: 0 18px; min-height: 46px; border-radius: 23px; border: 1px solid var(--line); background: rgba(20,34,58,.8); color: var(--silver); font-size: 15px; }
.chipbtn.on { border-color: var(--blue); background: rgba(74,142,224,.25); color: #fff; font-weight: 600; }
.check-row { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 22px; } .check-row input { width: 26px; height: 26px; margin: 0; flex: none; accent-color: var(--blue); } .check-row a { color: var(--link); }
.dept { display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 100px; padding: 16px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); width: 100%; }
.dept b { font-size: 19px; } .dept span { color: var(--silver); font-size: 14px; line-height: 20px; } .dept.on { border-color: var(--blue); background: rgba(40,80,130,.55); }
.rank-opt { display: flex; align-items: center; min-height: 56px; padding: 0 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 17px; width: 100%; text-align: left; } .rank-opt.on { border-color: var(--blue); }
.row-item.danger { color: var(--danger); } .row-item.danger .ico { color: var(--danger); }
.offline-bar { background: rgba(240,179,90,.14); color: #F0B35A; text-align: center; font-size: 13px; padding: 6px 12px; }
@media (min-width: 900px) { body.auth .screen > * { max-width: 460px; } }

/* "Install NMSeawise" bar: sits between the content and the tab bar in the page flow, so it never covers navigation */
.install { flex: none; padding: 8px calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); background: var(--tab-bg); border-top: 1px solid var(--line); }
.install[hidden] { display: none; }
.install-in { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; }
.install-in img { border-radius: 10px; flex: none; }
.install-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 18px; color: var(--silver); } .install-txt b { color: var(--text); font-size: 15px; }
.install-txt .share { display: inline-block; vertical-align: -4px; color: var(--link); }
.install-go { flex: none; min-height: 44px; padding: 0 18px; border-radius: 22px; background: var(--blue); color: #fff; font-weight: 600; font-size: 15px; }
.install-x { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
body.auth .install { background: transparent; border-top: 0; }

/* mouse: hover states (touch devices have none) */
@media (hover: hover) {
  .card[data-go]:hover, .row-item:hover, .note-item:hover, .quick button:hover { background: var(--card-pressed); }
  .btn:hover:not(:disabled) { filter: brightness(1.1); } .chipbtn:hover, .seg button:hover:not([aria-checked="true"]) { color: #fff; }
  .side a:hover:not([aria-current="page"]), .tabs a:hover .pill { background: rgba(28,51,84,.55); }
  .back-link:hover, .link-text:hover, .center-link:hover, .footer a:hover, .footer button:hover { text-decoration: underline; }
}

/* phones: while a field is being typed in, the on-screen keyboard takes the space, so the tab bar steps aside */
@media (pointer: coarse) and (max-width: 899px) { body:has(.screen input:focus, .screen textarea:focus) :is(.tabs, .install) { display: none; } }

/* My ship */
.shipmap { position: relative; height: 280px; border-radius: 16px; overflow: hidden; background: #C9D6E3; border: 1px solid var(--line); isolation: isolate; }
.shipmap img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.shipmap .pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); pointer-events: none; }
.shipmap .zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.shipmap .zoom button { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.92); color: #0A1526; font-size: 24px; font-weight: 600; line-height: 1; }
.shipmap .zoom button:disabled { opacity: .4; cursor: default; }
.shipmap .credit { position: absolute; left: 0; bottom: 0; background: rgba(255,255,255,.8); color: #222; font-size: 11px; padding: 2px 6px; }
.shipres { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.shipres .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .shipres b { font-size: 18px; } .shipres small { color: var(--silver); font-size: 13px; }
.notset { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; } .notset .ico { color: var(--silver); width: 32px; height: 32px; } .notset h2 { font-size: 18px; font-weight: 600; }
.ais { font-size: 15px; font-weight: 600; }
.add-btn:disabled { opacity: .45; cursor: default; }

/* "Install NMSeawise" card (login page, My Space) */
.getapp { display: flex; flex-direction: column; gap: 10px; }
.getapp-head { display: flex; align-items: center; gap: 12px; } .getapp-head img { border-radius: 10px; flex: none; } .getapp h2 { font-size: 19px; font-weight: 700; } .getapp h3 { font-size: 15px; font-weight: 600; }
.getapp .share { display: inline-block; vertical-align: -4px; color: var(--link); }
.getapp .apk { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
/* the install bar sits at the very bottom when there is no tab bar: keep clear of the home indicator, without doubling the space below the screen */
body.sub .install, body.auth .install { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
body.sub:has(.install:not([hidden])) .screen, body.auth:has(.install:not([hidden])) .screen { padding-bottom: 0; }

/* deadlines */
.due { color: var(--silver); font-size: 13px; } .due.red, .cert .red, .red { color: var(--danger); font-weight: 600; }
.task .tt .due { display: inline-block; margin-top: 2px; }
.task .x-btn.edit, .cert .x-btn.edit { text-decoration: none; color: var(--silver); }
.addtask { flex-wrap: wrap; } .addtask .due-pick { flex: 1 1 100%; }
.tasks-card .task-mini { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); padding: 8px 0; border-top: 1px solid var(--line); min-height: 44px; justify-content: center; } .tasks-card .task-mini .tt { font-size: 15px; overflow-wrap: anywhere; }
.tasks-card .task-mini:first-of-type { border-top: 0; }
/* My ship web link card */
.shiplink { display: flex; flex-direction: column; gap: 12px; }
.shiplink-form { display: flex; flex-direction: column; gap: 12px; }
.shiplink-url { overflow-wrap: anywhere; word-break: break-all; color: var(--text, inherit); }
a.btn { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
/* Home button of sub-pages: logo + home icon (the wide layout has the logo and Home in the sidebar) */
.hdr .side-slot { gap: 2px; }
.side a.logo { display: flex; flex-direction: column; align-items: center; color: var(--text); text-decoration: none; min-height: 0; border-radius: 16px; }


/* Logo and Home are two separate links (never one combined button); nothing is laid over them */
.logobtn, .hdr .homebtn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 22px; color: var(--silver); text-decoration: none; position: relative; z-index: 1; }
.logobtn img { object-fit: contain; display: block; } .hdr .homebtn .ico { width: 24px; height: 24px; }
.logobtn.big { min-width: 0; min-height: 0; border-radius: 12px; }
.hdr .side-slot { min-width: 132px; } .hdr.big .logobtn { margin-right: 6px; }
.hdr .iconbtn, .hdr-right a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--text); text-decoration: none; }
.hdr-right { display: flex; align-items: center; margin-left: auto; }
.space-top { padding-bottom: 0; }
@media (min-width: 900px) { .hdr .homebtn, .hdr .logobtn, .space-top, .hdr.big .logobtn { display: none; } .hdr .side-slot { min-width: 44px; } }

/* unread number (friend requests + message requests) */
.badge-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; display: inline-block; }
.pill, .iconbtn { position: relative; } .pill .badge-n, .iconbtn .badge-n { position: absolute; top: 0; right: 8px; }
.side a { position: relative; } .side a .badge-n { margin-left: auto; }

/* messages list, people, requests */
.conv { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; text-decoration: none; color: var(--text); min-height: 64px; }
.conv:hover, .person-row:hover { background: rgba(40,66,106,.45); } .conv.req { background: rgba(74,142,224,.14); }
.conv .main, .person-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conv .top { display: flex; justify-content: space-between; gap: 8px; } .conv .top b, .person-row b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv small, .person-row small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .prev { color: var(--silver); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-blue { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex: none; }
.avatar.sm { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tab-active); color: var(--text); font-weight: 700; flex: none; overflow: hidden; }
.sect { font-size: 14px; font-weight: 600; color: var(--muted); margin: 10px 4px 2px; text-transform: none; }
.banner-row, .newgroup-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; }
.banner-row .t, .newgroup-row .t { flex: 1; font-weight: 600; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 16px; flex-wrap: wrap; }
.person-row .who { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; text-decoration: none; color: var(--text); }
.person-row .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: rgba(20,34,58,.8); color: var(--silver); font-size: 14px; }
.chip.primary { background: var(--blue); border-color: var(--blue); color: #fff; } .chip .ico { width: 18px; height: 18px; }
.searchbox { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 14px; border-radius: 14px; background: var(--input); border: 1px solid var(--line); }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; min-height: 48px; color: var(--text); } .searchbox:focus-within { border-color: var(--blue); }
.person-page { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; } .person-page .pname { font-size: 24px; } .person-page .prank { color: var(--link); }
.person-page .card { width: 100%; text-align: left; }
.empty-center .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }

/* chat */
body.chatpage .screen { overflow: hidden; }
.chat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; width: 100%; }
.chat-rank { text-align: center; color: var(--link); font-size: 13px; margin-top: -4px; padding-bottom: 4px; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px; display: flex; flex-direction: column; gap: 8px; outline: none; }
.msg { display: flex; } .msg.mine { justify-content: flex-end; } .msg .bub { max-width: min(78%, 520px); padding: 8px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.msg.mine .bub { background: var(--blue); border-color: var(--blue); color: #fff; } .msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 21px; }
.msg .tm { font-size: 11px; opacity: .8; align-self: flex-end; }
.msg .att { display: flex; align-items: center; gap: 8px; text-align: left; color: inherit; padding: 6px 0; } .msg .att .n { font-weight: 600; overflow-wrap: anywhere; } .msg .att small { display: block; opacity: .8; }
.outrow { display: flex; gap: 12px; font-size: 13px; text-decoration: underline; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--tab-bg); }
.composer textarea { direction: ltr; text-align: start; unicode-bidi: plaintext; flex: 1; min-width: 0; resize: none; max-height: 140px; min-height: 44px; padding: 10px 14px; border-radius: 22px; background: var(--input); border: 1px solid var(--line); outline: none; font-size: 16px; line-height: 21px; color: var(--text); } .composer textarea:focus { border-color: var(--blue); }
.composer .send { touch-action: manipulation; -webkit-tap-highlight-color: transparent; width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.req-banner { margin: 8px 12px; padding: 14px; border-radius: 18px; background: rgba(74,142,224,.16); border: 1px solid var(--blue); display: flex; flex-direction: column; gap: 8px; } .req-banner .hint { color: var(--silver); font-size: 14px; }
.chat-note { text-align: center; color: var(--silver); font-size: 14px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
.hdr .side-slot.r { min-width: 44px; }
.searchbox input:focus-visible, .composer textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* presence: Online / Last online / At sea */
.presline { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: inherit; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pres { display: inline-flex; align-items: center; gap: 6px; } .pres i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pres.on { color: var(--ok); } .pres.on i { background: var(--ok); }
.seabadge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px 1px 6px; border-radius: 12px; background: rgba(74,142,224,.22); border: 1px solid rgba(74,142,224,.6); color: var(--link); font-size: 12px; font-weight: 600; } .seabadge .ico { width: 14px; height: 14px; }
.person-page .presline, .chat + .presline, .head .presline { justify-content: center; }
.person-row .main .presline { margin-top: 1px; }
.sea-card .hint { margin-top: 6px; color: var(--silver); font-size: 13px; }
.row.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 52px; height: 30px; border-radius: 15px; background: var(--line); border: 1px solid var(--line); flex: none; transition: background .15s; min-width: 52px; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--blue); } .switch[aria-checked="true"] i { transform: translateX(22px); } .switch:disabled { opacity: .45; }
/* notifications (bell) */
.notif { display: flex; flex-direction: column; gap: 10px; } .notif .who { display: flex; align-items: center; gap: 12px; } .notif .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif .quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--blue); background: rgba(8,20,38,.5); border-radius: 8px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; }
.notif .hint { color: var(--silver); font-size: 13px; } .notif .btn { min-height: 46px; font-size: 16px; }
.home-head .slot .bell { color: var(--text); }
.home-head .slot:first-child { justify-content: flex-start; }
.iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--text); text-decoration: none; }

/* My ship: home card mini map and the details list */
.shipmap.mini { height: 160px; } .shipmap.mini .zoom { display: none; } .shipmap.mini .pin { width: 32px; height: 32px; }
.shipdl { margin: 0; display: flex; flex-direction: column; } .shipdl .r { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); } .shipdl .r:first-child { border-top: 0; }
.shipdl dt { color: var(--muted); font-size: 14px; flex: none; } .shipdl dd { margin: 0; text-align: right; font-size: 15px; overflow-wrap: anywhere; }

/* sync status: Saved to device / Sync pending / Synced */
.sync-line { display: inline-flex; align-items: center; gap: 8px; color: var(--silver); font-size: 13px; padding: 6px 16px 0; align-self: flex-start; }
.sync-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync-line[data-sync="synced"] i { background: #5FD39A; } .sync-line[data-sync="pending"] i { background: #F0B35A; } .sync-line[data-sync="local"] i { background: var(--muted); }
.home-head + .greeting + .chip + .sync-line, .body > .sync-line { padding-left: 0; }

/* group chats: friend picker, sender name in a group bubble */
.group-photo-card{display:flex;flex-direction:column;align-items:center;gap:12px}.group-photo-image,.group-photo-placeholder{width:112px;height:112px;border-radius:50%;border:2px solid var(--line);object-fit:cover;overflow:hidden}.group-photo-placeholder{display:flex;align-items:center;justify-content:center;background:var(--input);color:var(--silver)}.group-photo-card .btn{max-width:460px}

.pick { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; min-height: 52px; cursor: pointer; }
.pick-row:hover { background: rgba(40,66,106,.45); }
.pick-row input { width: 22px; height: 22px; flex: none; accent-color: var(--link); }
.pick-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-row b, .pick-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row small { color: var(--muted); font-size: 13px; }
.msg .sender { display: block; font-size: 12px; color: var(--link); margin-bottom: 2px; font-weight: 600; }
.sbtn.danger, .btn.danger { color: #ff8f8f; }
.attachbtn { flex: none; width: 46px; height: 46px; border-radius: 23px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--silver); cursor: pointer; }
.attachbtn:hover { background: rgba(40,66,106,.45); }
.side .side-sep { height: 1px; background: var(--line); margin: 6px 10px; }
/* pull to refresh (Home, touch) */
#ptr { position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 50%; z-index: 30; transform: translate(-50%, calc(var(--pull, 0) * 1px - 56px)); opacity: 0; pointer-events: none; transition: opacity .15s; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 22px; background: rgba(20,34,58,.96); border: 1px solid var(--line); color: var(--text); font-size: 14px; max-width: calc(100vw - 32px); text-align: center; }
#ptr.on { opacity: 1; }
#ptr.spin::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--silver); border-top-color: transparent; animation: ptr-spin .8s linear infinite; flex: none; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #ptr.spin::before { animation: none; } }
.avatar.sm img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.photo-note { text-align: center; max-width: 300px; } .linkbtn-s { color: var(--link); font-weight: 600; min-height: 44px; padding: 0 8px; }
.unread-n { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--danger); color: #0A1628; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.conv { position: relative; } .conv .dot-green { position: absolute; left: 44px; top: 46px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg, #0A1526); }
.conv .seen-at { color: var(--muted); font-size: 12px; } .conv .seen-at.on { color: var(--ok); }
/* chat pictures */
.att-img { display: block; position: relative; width: 220px; max-width: 100%; aspect-ratio: 11 / 8; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.25); padding: 0; border: 0; cursor: zoom-in; }
.att-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; } .att-img.ready img { opacity: 1; }
.att-img .fail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; font-size: 12px; text-align: center; color: var(--silver); } .att-img .fail[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(4,10,20,.94); display: flex; align-items: center; justify-content: center; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .lb-close { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: calc(env(safe-area-inset-right) + 8px); width: 48px; height: 48px; border-radius: 24px; background: rgba(20,34,58,.92); color: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lightbox .lb-fail { color: var(--silver); } .lightbox .lb-fail[hidden] { display: none; }
/* voice messages */
.voice { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 100%; padding: 2px 0; }
.voice .vplay { flex: none; width: 44px; height: 44px; border-radius: 22px; background: rgba(255,255,255,.92); color: #0A1526; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; position: relative; }
.voice .vp, .voice .vs { display: none; } .voice.playing .vi { display: none; } .voice.playing .vp { display: inline-flex; }
.voice.loading .vi, .voice.loading .vp { display: none; } .voice.loading .vs { display: block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #0A1526; border-top-color: transparent; animation: ptr-spin .8s linear infinite; }
.voice .vbar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; min-width: 60px; } .voice .vbar i { display: block; height: 100%; width: 0; background: #fff; }
.voice .vtime { font-size: 12px; color: rgba(255,255,255,.8); white-space: nowrap; }
.voice .vfail { display: none; font-size: 12px; color: #FFE0E0; } .voice.failed .vfail { display: block; } .voice.failed .vbar, .voice.failed .vtime { display: none; }
.composer.voice-rec { align-items: center; gap: 10px; } .voice-rec b { font-weight: 600; } .voice-rec .rec-clock { font-variant-numeric: tabular-nums; color: var(--silver); flex: 1; }
.voice-rec .rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #E85B5B; animation: rec-pulse 1.2s ease-in-out infinite; flex: none; } @keyframes rec-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .voice-rec .rec-dot, .voice.loading .vs { animation: none; } }
.voice-rec.review audio { flex: 1; min-width: 0; height: 40px; } .voice-rec .send[disabled], .voice-rec .attachbtn[disabled] { opacity: .45; }
/* Knowledge (Mereviki) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kw-tabs { align-self: stretch; } .kw-tabs button { flex: 1; padding: 0 10px; }
.kw-list { display: flex; flex-direction: column; gap: 2px; }
.kw-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 56px; border-radius: 16px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); margin-bottom: 6px; }
.kw-row:hover { background: rgba(40,66,106,.45); } .kw-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kw-row b { font-size: 16px; overflow-wrap: anywhere; } .kw-row small { color: var(--muted); font-size: 13px; } .kw-row .ext { color: var(--muted); flex: none; }
.kw-crumbs { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; } .kw-crumbs a { color: var(--link); }
.kw-scope { gap: 8px; flex-wrap: wrap; } .chip-scope { padding: 4px 12px; border-radius: 14px; background: rgba(74,142,224,.22); border: 1px solid rgba(74,142,224,.6); font-size: 13px; overflow-wrap: anywhere; }
.kw-source { margin-top: 6px; } .kw-source a { color: var(--link); }
/* Knowledge: article inside the app */
.art { display: flex; flex-direction: column; gap: 10px; } .art-title { font-size: 24px; line-height: 1.25; margin: 0 0 4px; overflow-wrap: anywhere; }
.art-h { margin: 14px 0 2px; font-size: 19px; overflow-wrap: anywhere; } h3.art-h, h4.art-h { font-size: 17px; }
.art-p, .art-li, .art-q { margin: 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; } .art-li { position: relative; } .art-mark { color: var(--muted); display: inline-block; min-width: 1.2em; margin-left: -1.2em; }
.art-q { border-left: 3px solid var(--blue); padding-left: 12px; color: var(--silver); } .art a { color: var(--link); } .art-note { font-style: italic; }
.art-source { display: flex; flex-direction: column; gap: 4px; font-size: 14px; } .art-source p { margin: 0; overflow-wrap: anywhere; } .art-source a { color: var(--link); }
.art-nav { display: flex; }
.art-source { margin-top: 14px; font-size: 14px; }
.art-src-link { display: inline-block; cursor: pointer; color: var(--link, #7db4f2); font-weight: 600; min-height: 32px; line-height: 32px; text-decoration: underline; }
.art-src-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.art-src-body { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.15)); border-radius: 12px; overflow-wrap: anywhere; }
.art-src-body p { margin: 0 0 6px; }
.art-src-body p:last-child { margin: 0; }

.mtembed { margin: 12px 0; } .mtembed iframe { display: block; width: 100%; height: 460px; border: 1px solid var(--line, #2a3b4f); border-radius: 12px; background: #0b1722; }
.card[data-go] .mtembed iframe { pointer-events: none; } /* on Home a tap anywhere opens My ship; the map is usable there */

.mtembed { position: relative; } .mtembed .mtring { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 3px solid #E5484D; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px rgba(255,255,255,.7); } /* marks the ship: the map is centred on it */
.mtframe { position: relative; }
.mtembed.compact .shipmap { height: 150px; } .mtopen { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 16px; cursor: zoom-in; }
.mtopen:focus-visible { outline: 3px solid #8CC4FF; outline-offset: 2px; } .mtopen .shipmap { pointer-events: none; }
.sheet.big { max-width: 720px; max-height: 92vh; max-height: 92dvh; } .sheet .mtbig .shipmap { height: 300px; } .sheet .mtframe iframe { display: block; width: 100%; height: 440px; border: 1px solid var(--line); border-radius: 12px; background: #0b1722; }

.homechats { display: flex; flex-direction: column; gap: 2px; } .homechats .conv { padding: 8px 0; border-bottom: 1px solid var(--line); } .homechats .conv:last-child { border-bottom: 0; }
.shipmap .pin.ship { transform: translate(-50%, -50%); } /* a ship badge centred on the position (it was a map pin whose tip marked the spot) */

.voice .vspeed { min-width: 40px; height: 28px; border-radius: 14px; border: 0; background: rgba(255,255,255,.22); color: inherit; font-size: 12px; font-weight: 700; padding: 0 8px; margin-left: 6px; cursor: pointer; } .voice .vspeed:focus-visible { outline: 3px solid #8CC4FF; outline-offset: 2px; }

.ai-msg .bub .txt { white-space: pre-wrap; overflow-wrap: anywhere; } .ai-dots { display: inline-flex; gap: 5px; align-items: center; min-height: 20px; } .ai-dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .35; animation: aidot 1s infinite ease-in-out; } .ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } } @media (prefers-reduced-motion: reduce) { .ai-dots i { animation: none; opacity: .6; } }
.ai-err { color: #ffb4b4; }

/* messenger: list search, chat header, grouped bubbles, reactions, replies, info panel, three panes on wide screens */
.list-search, .chat-search { margin: 4px 16px 8px; }
.chat-hdr { gap: 6px; border-bottom: 1px solid var(--line); background: var(--tab-bg); flex: none; }
.chat-hdr .who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.chat-hdr .wn { display: flex; flex-direction: column; min-width: 0; } .chat-hdr .wn h1 { flex: none; text-align: left; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-hdr .typing { color: var(--link); font-size: 12px; } .chat-hdr .avatar.group, .info-hero .avatar.group { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tab-active); color: var(--silver); }
.day-sep { display: flex; justify-content: center; margin: 10px 0 2px; } .day-sep span { font-size: 12px; color: var(--muted); background: rgba(40,66,106,.45); padding: 3px 10px; border-radius: 12px; }
.chat-list { gap: 2px; } .msg.g-first { margin-top: 8px; }
.msg { position: relative; align-items: flex-end; } .msg .bub { position: relative; user-select: text; -webkit-touch-callout: none; touch-action: pan-y; }
.msg.mine .bub { background: var(--mine, var(--blue)); border-color: var(--mine, var(--blue)); }
.msg.mine:not(.g-first) .bub { border-top-right-radius: 6px; } .msg.mine:not(.g-last) .bub { border-bottom-right-radius: 6px; }
.msg.other:not(.g-first) .bub { border-top-left-radius: 6px; } .msg.other:not(.g-last) .bub { border-bottom-left-radius: 6px; }
.msg:not(.g-last) .tm { display: none; }
.msg .more { opacity: 0; min-width: 32px; min-height: 32px; align-self: center; color: var(--muted); } .msg:hover .more, .msg .more:focus-visible { opacity: 1; }
.msg.mine { flex-direction: row-reverse; justify-content: flex-start; } .msg.mine .bub { margin-left: auto; }
.msg.mine { justify-content: flex-start; }
.msg .pin-mark { position: absolute; top: -6px; right: -4px; color: var(--link); }
.msg.flash .bub { box-shadow: 0 0 0 2px var(--link); }
.quote { display: flex; flex-direction: column; text-align: left; gap: 1px; padding: 4px 8px; border-left: 3px solid var(--link); border-radius: 6px; background: rgba(255,255,255,.1); color: inherit; font-size: 13px; max-width: 100%; }
.quote span { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Named read receipts and reaction identities. Stable sizes; no public photo URLs. */
.msg.g-last.mine .tm{min-height:0;display:block}
.seen-people{display:inline-flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:5px;max-width:100%;min-height:32px;padding:2px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:right;cursor:pointer}
.seen-people>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.message-avatars{display:inline-flex;align-items:center;flex-shrink:0;isolation:isolate}
.message-avatars .avatar{display:inline-flex;border-radius:50%;border:1px solid var(--line);flex-shrink:0;margin-left:-4px;box-sizing:border-box;overflow:hidden}
.message-avatars .avatar:first-child{margin-left:0}
.message-avatars .avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.avatar-more{padding-left:3px}
.reaction-group{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:22px;background:var(--card);overflow:hidden}
.reaction-group .react{border:0;border-radius:0;background:transparent;min-width:36px;min-height:36px;justify-content:center}
.reaction-group .react.mine{background:var(--tab-active)}
.reaction-people{display:inline-flex;align-items:center;justify-content:center;min-height:36px;min-width:36px;padding:3px 8px 3px 4px;border:0;background:transparent;color:var(--text);cursor:pointer}
.seen-people:focus-visible,.reaction-people:focus-visible{outline:2px solid var(--link);outline-offset:-2px}
.sheet:has(.message-people){background:var(--tab-bg);max-height:80dvh;overflow-y:auto;overscroll-behavior:contain}
.message-people h3{margin:4px 0 16px}
.message-people-list{display:flex;flex-direction:column;gap:4px}
.message-person{display:flex;align-items:center;gap:12px;padding:10px 0;min-width:0}
.message-person>.avatar{flex-shrink:0;border-radius:50%;overflow:hidden}
.message-person .person-detail{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;overflow-wrap:anywhere}
.message-person small{color:var(--muted)}
.person-emoji{font-size:22px;flex-shrink:0}
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.react { display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 0 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 13px; } .react.mine { border-color: var(--link); background: var(--tab-active); }
.react-row { display: flex; justify-content: space-around; gap: 4px; padding: 6px 0; } .react-row button { min-width: 44px; min-height: 44px; font-size: 26px; border-radius: 22px; } .react-row button.on { background: var(--tab-active); }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-top: 1px solid var(--line); background: var(--tab-bg); }
.reply-bar .rb { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 3px solid var(--link); padding-left: 8px; font-size: 13px; } .reply-bar .rb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.reply-bar button { min-width: 44px; min-height: 44px; color: var(--silver); }
.pin-bar { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; text-align: left; border-top: 1px solid var(--line); background: var(--tab-bg); color: var(--silver); font-size: 13px; } .pin-bar span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-mark { color: var(--muted); display: inline-flex; margin-left: 4px; }
.nm-sml-panel { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--line); background: var(--tab-bg); max-height: 200px; overflow-y: auto; }
.nm-sbl { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 2px; border-radius: 6px; background: none; border: none; cursor: pointer; color: inherit; }
.nm-sbl:hover, .nm-sbl:focus-visible { background: var(--line); outline: none; }
.nm-sbl svg { width: 28px; height: 28px; display: block; }
.nm-sml { display: inline-flex; align-items: center; vertical-align: middle; margin: 0 1px; }
.nm-sml svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
/* float-chat smiley button */
.nm-fsml-btn { background: none; border: none; cursor: pointer; padding: 4px; min-width: 32px; min-height: 32px; font-size: 18px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.nm-fsml-btn:hover { color: var(--text); }
/* float panel smiley picker – floats above the form */
.nm-sml-panel.nm-sml-mini { position: absolute; bottom: 44px; right: 0; left: 0; border-top: 1px solid var(--line); border-bottom: none; z-index: 10; }

.info-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 4px; text-align: center; } .info-hero h2 { font-size: 22px; }
.info-quick { display: flex; justify-content: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.info-quick .qa { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; min-height: 44px; color: var(--text); text-decoration: none; font-size: 13px; }
.info-quick .qa span { display: inline-flex; width: 48px; height: 48px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); align-items: center; justify-content: center; }
.info-tabs { display: flex; gap: 6px; margin: 4px 0 8px; } .info-tabs button { flex: 1; min-height: 40px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); color: var(--silver); font-weight: 600; } .info-tabs button.on { background: var(--tab-active); color: var(--blue); border-color: var(--blue); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; } .media-grid .att-img { aspect-ratio: 1; overflow: hidden; border-radius: 8px; padding: 0; } .media-grid img { width: 100%; height: 100%; object-fit: cover; }
.rowbtn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; text-align: left; color: var(--text); text-decoration: none; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.rowbtn:last-child { border-bottom: 0; } .rowbtn .t { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; } .rowbtn small, .link-row small, .file-row small { color: var(--muted); font-size: 12px; }
.rowbtn.danger, .rowbtn.danger .t { color: var(--danger); } .rowbtn.static { cursor: default; } .rowbtn:focus-visible, .info-quick .qa:focus-visible, .react:focus-visible, .pin-bar:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.onoff { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: var(--card); color: var(--muted); border: 1px solid var(--line); } .onoff.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.pin-row { display: flex; align-items: center; } .pin-row .rowbtn { flex: 1; } .file-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.theme-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 8px 0; } .theme-row button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; } .theme-row button.on { border-color: var(--text); }
.link-btn { color: var(--link); text-decoration: underline; min-height: 32px; } .results { padding: 0 16px; }

.msgr3 { display: block; }
@media (min-width: 1100px) {
  .screen.wide > .msgr3 { max-width: none; }
  .msgr3 { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; min-height: 0; } .msgr3.with-info { grid-template-columns: 340px minmax(0, 1fr) 340px; }
  .msgr-list, .msgr-info { overflow-y: auto; min-height: 0; border-right: 1px solid var(--line); } .msgr-info { border-right: 0; border-left: 1px solid var(--line); padding: 8px 14px 24px; }
  .msgr-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; } .msgr-empty { margin: auto; }
}

/* My ship: status, port / area, destination and ETA directly below the map (compact, same card as Calendar and Chats) */
.shipfacts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; padding: 8px 0 2px; font-size: 14px; line-height: 20px; }
.shipfacts .r { display: contents; } .shipfacts dt { color: var(--muted); } .shipfacts dd { margin: 0; color: var(--text); text-align: right; overflow-wrap: anywhere; min-width: 0; }
.shipfacts .st { font-weight: 700; } .shipfacts .st-inport { color: var(--ok); } .shipfacts .st-anchor { color: #E9C46A; } .shipfacts .st-underway { color: var(--link); } .shipfacts .st-unknown { color: var(--silver); }
/* the ship card takes the width of its column (like Calendar and Chats): map in proportion, nothing clipped; phones stack the cards at full width */
.cols > div > .card { width: 100%; min-width: 0; box-sizing: border-box; }
.shipmap.mini, .mtembed.compact .shipmap { height: auto; aspect-ratio: 16 / 10; min-height: 120px; max-height: 220px; width: 100%; }
.card .mtembed { margin: 0; max-width: 100%; } .card .mtembed iframe { max-width: 100%; height: auto; aspect-ratio: 4 / 3; }
@media (max-width: 640px) { .cols { flex-direction: column; align-items: stretch; } .cols > div { width: 100%; flex: none; } }

.info-close { position: sticky; top: 8px; z-index: 5; float: right; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 -44px auto; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.info-close:focus-visible, .chat-hdr .iconbtn.on { outline: 2px solid var(--link); outline-offset: 2px; } .chat-hdr .iconbtn.on { color: var(--link); border-radius: 50%; }
.info-body, .msgr-info { position: relative; }

.diag { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 19px; color: var(--silver); background: var(--input); border-radius: 12px; padding: 10px 12px; max-height: 50vh; overflow: auto; }
.ai-starters { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px; } .ai-starters .chipbtn { min-height: 44px; height: auto; text-align: left; padding: 8px 14px; line-height: 20px; white-space: normal; }
.ai-hrow { display: flex; align-items: center; border-bottom: 1px solid var(--line); } .ai-hrow:last-child { border-bottom: 0; } .ai-hrow .rowbtn { flex: 1; border-bottom: 0; } .ai-hrow .iconbtn { min-width: 44px; min-height: 44px; color: var(--danger); display: inline-flex; align-items: center; justify-content: center; }
.ai-priv { color: var(--muted); font-size: 12px; line-height: 17px; padding: 0 16px 6px; }

@media (max-width: 340px) { .quick { padding: 10px 2px; } .quick span { font-size: 11px; letter-spacing: -.1px; } } /* 320 px phones: five labels (Knowledge / Teadmised) fit their buttons */

/* two-row composer: attachments / camera / gallery / voice / emoji on top, a wide text field with the send button below. The field takes the whole width and grows (JS) up to 140 px. */
.composer.two { flex-direction: column; align-items: stretch; gap: 2px; padding: 4px 10px calc(6px + env(safe-area-inset-bottom)); flex: none; }
.composer.two .cbar { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; } .composer.two .cbar::-webkit-scrollbar { display: none; }
.composer.two .attachbtn { width: 44px; height: 40px; border-radius: 20px; }
.composer.two .cin { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.composer.two textarea { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 44px; max-height: 140px; font-size: 16px; /* 16px: iOS Safari does not zoom the page when the field is focused */ }
/* keyboard open: no safe-area gap under the field, the bar sits right on the keyboard */
html.kb-open .composer.two { padding-bottom: 6px; } /* keyboard up: no home-indicator strip under the composer (decided by the visual viewport, in the same frame as the resize, not by focus) */
/* the header carries the name, rank and activity line (they used to be separate rows that sank onto the first messages) */
.chat-hdr .wn { gap: 0; min-width: 0; } .chat-hdr .wn h1 { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-hdr .hsub, .chat-hdr .presline, .chat-hdr .typing { display: block; margin: 0; padding: 0; font-size: 12px; line-height: 16px; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; }
.chat-hdr .presline { display: flex; flex-wrap: nowrap; gap: 0 8px; } .chat-hdr .presline > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chat-hdr { flex: none; position: relative; z-index: 2; }
.chat { position: relative; z-index: 1; }
.info-x { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.info-body.page .info-close { display: none; } /* the phone's info page has its X in the fixed header instead */
/* the phone's chat info page: its header (with the X) stays on screen while the page scrolls */
.screen:has(.info-body.page) > .hdr { position: sticky; top: 0; z-index: 6; background: var(--tab-bg); border-bottom: 1px solid var(--line); }

/* customize: bubble colours / gradients / backgrounds (variables are set per chat from chatlook.js); times and read states keep readable contrast on every choice */
.chat.has-look .chat-list { background: var(--chat-bg, transparent); }
.chat.has-look .msg.mine .bub { background: var(--mine-bg, var(--blue)); color: var(--mine-fg, #fff); border-color: transparent; }
.chat.has-look .msg.mine .tm, .chat.has-look .msg.mine .tm * { color: var(--mine-meta, rgba(255,255,255,.86)); opacity: 1; }
.chat.has-look .msg.mine .quote { background: rgba(0,0,0,.14); }
.chat.has-look .msg.other .bub { background: var(--other-bg, var(--card)); color: var(--text); }
.look-sheet { display: flex; flex-direction: column; gap: 10px; max-height: 80vh; max-height: 80dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; } .look-sheet h4 { font-size: 14px; color: var(--muted); margin-top: 4px; }
.look-prev.chat { flex: none; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); } .look-prev .chat-list { padding: 12px; overflow: hidden; min-height: 0; pointer-events: none; }
.look-row { display: flex; flex-wrap: wrap; gap: 8px; } .look-row .chipbtn { min-width: 44px; min-height: 40px; }
.look-stops { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .look-stop { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--silver); } .look-stop input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: none; }
.look-bgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .look-bg { position: relative; min-height: 64px; border-radius: 12px; border: 2px solid var(--line); background: var(--chat-bg, var(--card)); color: #fff; display: flex; align-items: flex-end; padding: 4px 6px; text-align: left; font-size: 12px; line-height: 15px; } .look-bg span { background: rgba(0,0,0,.45); border-radius: 6px; padding: 1px 5px; } .look-bg.on { border-color: var(--blue); }
.look-actions { display: flex; flex-direction: column; gap: 8px; } .look-bg:focus-visible, .swatch:focus-visible, .look-stop input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; } .swatch.on { border-color: var(--text); }
@media (max-width: 380px) { .look-bgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Home dashboard: masonry columns. Cards flow top to bottom in each column (no empty gaps beside a tall neighbour), reading order = DOM order (Calendar, My ship, Chats, Tasks, Certificates). One column on phones. */
.masonry { column-count: 1; column-gap: 14px; }
.masonry > * { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; margin: 0 0 14px; width: 100%; box-sizing: border-box; min-width: 0; }
@media (min-width: 700px) { .masonry { column-count: 2; } }
@media (min-width: 900px) { .screen > .body:has(.masonry) { max-width: 1000px; } }

.photo-state { font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; max-width: 320px; } .photo-state.saved { color: var(--ok); } .photo-state.failed { color: var(--danger); }

/* compact chat header: back, 38 px picture, name (17 px) with rank / title under it and ONE activity line (typing replaces it in the same place), more + info at the right; 44 x 44 touch areas; fixed, messages start under it */
.hdr.chat-hdr { display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 2px; min-height: 56px; background: var(--tab-bg); border-bottom: 1px solid var(--line); flex: none; }
.chat-hdr .hb { flex: none; width: 44px; height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); border-radius: 22px; text-decoration: none; }
.chat-hdr .hbs { display: flex; flex: none; } .chat-hdr .hb.on { color: var(--link); }
.chat-hdr .who { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; min-height: 44px; text-decoration: none; color: var(--text); }
.chat-hdr .wn { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 0; }
.chat-hdr .wn h1 { flex: none; font-size: 17px; line-height: 21px; font-weight: 600; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-hdr .hsub, .chat-hdr .hact, .chat-hdr .typing { display: block; font-size: 12px; line-height: 15px; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; padding: 0; }
.chat-hdr .hact.on::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.chat-hdr .typing { color: var(--link); display: none; } .chat-hdr .wn.is-typing .typing { display: block; } .chat-hdr .wn.is-typing .hact { display: none; }
@media (min-width: 900px) { .hdr.chat-hdr { padding-left: 8px; } }

.look-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .look-theme { min-height: 48px; border-radius: 12px; border: 2px solid transparent; color: #fff; font-weight: 600; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.55); padding: 6px 8px; text-align: left; } .look-theme.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--blue); } .look-theme:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.look-sheet h5 { font-size: 12px; color: var(--muted); margin: 4px 0 0; font-weight: 600; }

.msg .bub.deleted { background: transparent !important; border: 1px dashed var(--line) !important; color: var(--muted) !important; } .msg .bub.deleted .txt, .msg .bub.deleted .tm { color: var(--muted) !important; }

/* videos in chat: upload bubble (preview, progress, cancel / retry), the card in the message list and the player */
.lightbox video.lb-video { max-width: 100%; max-height: 100%; background: #000; border-radius: 8px; }
.bub.vup { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.vprev { display: block; width: 220px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: rgba(255,255,255,.08); }
.vprev.ph { display: flex; align-items: center; justify-content: center; color: var(--silver); }
.vprog { height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; } .vprog i { display: block; height: 100%; width: 0; background: #fff; transition: width .15s linear; }
.att.att-video { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; } .att-video .vplaybig { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; }
.att-video .n { overflow-wrap: anywhere; min-width: 0; } .att-video small { display: block; opacity: .8; }

/* COMPACT chat header (Messenger style): one row of 60 px: back, 38 px picture with the online dot, name + ONE status line, more, info. Typing replaces the status line in the same place. */
.hdr.chat-hdr { min-height: 60px; box-sizing: border-box; padding: 0 4px 0 0; gap: 0; } /* min-height, not a fixed height: larger system text makes the header taller instead of clipping it */
.chat-hdr .who { gap: 10px; min-height: 44px; align-self: stretch; align-items: center; }
.chat-hdr .wn { justify-content: center; min-height: 36px; }
.chat-hdr .wn h1 { font-size: 17px; line-height: 20px; }
.chat-hdr .hsub, .chat-hdr .hact, .chat-hdr .typing { font-size: 13px; line-height: 1.25; min-height: 16px; }
.chat-hdr .hact.on::before { display: none; } .chat-hdr .hact.on { color: var(--ok); }
.chat-hdr .av-wrap { position: relative; flex: none; display: inline-flex; width: 38px; height: 38px; }
.chat-hdr .onl-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--tab-bg); box-sizing: border-box; }
.chat-hdr .wn.is-typing .typing { display: block; } .chat-hdr .wn.is-typing .hact, .chat-hdr .wn.is-typing .hsub { display: none; }

/* feed: compact cards in the NMSeawise style */
.feed { gap: 10px; }
.fcompose { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.fcompose textarea, .fedit textarea { width: 100%; min-height: 56px; resize: vertical; box-sizing: border-box; padding: 10px 12px; border-radius: 14px; background: var(--input); border: 1px solid var(--line); font-size: 16px; line-height: 21px; color: var(--text); outline: none; }
.fcompose textarea:focus, .fedit textarea:focus { border-color: var(--blue); }
.fcompose .frow { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .fcompose .feedpost { width: auto; min-width: 96px; min-height: 44px; padding: 0 18px; }
.fup { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; } .fup .fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .fup .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.fthumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.08); flex: none; display: flex; align-items: center; justify-content: center; color: var(--silver); }
.post { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.post .phead { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .post .ptime { color: var(--muted); font-size: 12px; white-space: nowrap; }
.fauthor { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); min-height: 44px; } .fauthor .main { display: flex; flex-direction: column; min-width: 0; } .fauthor b, .fauthor small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fauthor small { color: var(--muted); font-size: 12px; }
.fbody { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 22px; }
.fmedia { display: grid; gap: 4px; grid-template-columns: 1fr; border-radius: 12px; overflow: hidden; } .fmedia.n2, .fmedia.n3, .fmedia.n4 { grid-template-columns: 1fr 1fr; }
.fm { position: relative; display: block; width: 100%; background: rgba(255,255,255,.06); border-radius: 10px; overflow: hidden; min-height: 120px; aspect-ratio: 4 / 3; padding: 0; color: var(--text); }
.fm img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; } .fm.ready img { opacity: 1; } .fm .fail { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; color: var(--silver); font-size: 13px; } .fm.failed .fail { display: flex; }
.fm.vid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 8px; } .fm.vid .fmn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pact { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .pact .sbtn { min-height: 44px; min-width: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; } .pact .sbtn.on { color: #ff6b81; } .pact .pown { margin-left: auto; display: flex; gap: 4px; }
.pact .linkbtn-s { min-height: 44px; padding: 0 10px; } .pact .danger { color: var(--danger, #ff8a8a); }
.fcomments { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; } .fcomment .chead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .fcomment small { color: var(--muted); font-size: 12px; } .fcomment p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.fcform { display: flex; gap: 8px; } .fcform input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 22px; background: var(--input); border: 1px solid var(--line); font-size: 16px; color: var(--text); outline: none; }
.offline-note { font-size: 13px; color: #F0B35A; margin: 0; } .feedempty { gap: 10px; text-align: center; }

/* New chat actions share button/link geometry, including wrapped accessibility text. */
.sheet:has(.new-chat-sheet) { background: #0c2038; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
.new-chat-sheet { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.new-chat-sheet h3 { margin: 0 0 6px; }
.sheet .new-chat-sheet .opt { display: flex; align-items: center; gap: 12px; box-sizing: border-box; min-height: 56px; padding: 14px 16px; line-height: 1.4; text-decoration: none; color: #ecf3fc; background: #132e4a; border-color: #294969; white-space: normal; }
.new-chat-sheet .opt svg { flex: 0 0 22px; color: #70b7ff; }
.new-chat-sheet .opt:hover { background: #1b3b5c; }
.new-chat-sheet .opt:focus-visible { outline: 2px solid #70b7ff; outline-offset: 2px; }
.chat.has-look .msg .bub { padding: var(--bubble-pad,10px 14px); border-radius: var(--bubble-radius,20px); }
.chat.has-look .msg .txt { font-family: var(--bubble-font,inherit); }

/* Verification badge */
.verification-slot:not(:empty){display:inline-flex;vertical-align:-2px;margin-left:5px;line-height:1;flex-shrink:0}
.verification-slot svg{display:block;width:17px;height:17px}
.verification-code{overflow-wrap:anywhere;user-select:text;color:#73bfff}
.sheet:has([data-vform]){background:#081b2c;max-height:85dvh;overflow-y:auto;overscroll-behavior:contain}
.sheet [data-vform] input{width:100%;box-sizing:border-box;margin:8px 0}

/* Incoming typing bubble: layout stays in the message list, without rebuilding it. */
.typing-bubble { display:flex;align-items:center;gap:10px;max-width:85%;margin:8px 0 10px;color:var(--muted); }
.typing-bubble small { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
.typing-dots { display:inline-flex;flex-shrink:0;align-items:center;gap:5px;min-height:34px;padding:8px 13px;border:1px solid var(--line);border-radius:18px;background:var(--card); }
.typing-dots i { width:6px;height:6px;border-radius:50%;background:currentColor;animation:nm-typing 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay:.15s; } .typing-dots i:nth-child(3) { animation-delay:.3s; }
@keyframes nm-typing { 0%,60%,100% { opacity:.35;transform:translateY(0); } 30% { opacity:1;transform:translateY(-3px); } }
@media (prefers-reduced-motion:reduce) { .typing-dots i { animation:none;opacity:.75; } }
.inapp-camera { display:flex;flex-direction:column;gap:12px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 48px);overflow:auto; }
.inapp-camera h3,.inapp-camera p { margin:0; }.inapp-camera video,.inapp-camera img { width:100%;height:min(55dvh,480px);object-fit:contain;background:#050c17;border-radius:14px; }
.inapp-camera [hidden] { display:none!important; }.camera-actions { display:flex;flex-wrap:wrap;gap:8px; }.camera-actions .opt { flex:1 1 130px;min-height:44px;text-align:center; }

.home-head{display:grid;grid-template-columns:72px minmax(44px,1fr) 72px;align-items:center;min-height:64px}.home-head .home-brand{justify-self:center;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:14px}.home-head .home-brand img{width:42px;height:42px;object-fit:contain}.home-head .home-brand:focus-visible{outline:2px solid var(--link);outline-offset:2px}
.harbor-select-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.harbor-select-row .btn{min-height:44px;white-space:nowrap}.harbor-port-card{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--card)}.harbor-port-card>header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-items:center}.harbor-port-card h2{margin:0;font-size:17px;overflow-wrap:anywhere}.harbor-port-card>header>small{color:var(--muted)}.harbor-port-actions{grid-column:1/-1;display:flex;gap:16px;align-items:center}.harbor-port-actions button{min-height:36px}.harbor-preview{border-style:dashed}.harbor-preview h2{font-size:16px;margin:0}

/* Bubble width follows content. Receipt/reaction footer never widens the bubble. */
.msg { display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:2px 4px;align-items:end; }
.msg.mine { display:grid;grid-template-columns:32px minmax(0,1fr); }
.msg .message-content { grid-row:1;grid-column:1;display:flex;min-width:0; }
.msg.mine .message-content { grid-column:2;justify-content:flex-end; }
.msg .message-content .bub { width:fit-content;min-width:0;max-width:min(88%,520px);box-sizing:border-box; }
.msg .message-content .txt { margin:0;min-width:0; }
.msg .message-under { grid-row:2;grid-column:1;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:4px;max-width:100%;min-width:0;overflow:hidden; }
.msg.mine .message-under { grid-column:2;align-items:flex-end;justify-content:flex-start; }
.msg .msg-more { grid-row:1;grid-column:2;align-self:center; }.msg.mine .msg-more { grid-column:1; }
.msg .seen-people { max-width:100%;flex-shrink:1;min-height:28px; }.msg .seen-people .message-avatars { max-width:100%; }
.msg .reaction-group { max-width:100%;flex-shrink:1; }.msg .reacts { display:flex;flex-wrap:wrap;max-width:100%;min-width:0; }
.react-row { display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:4px; }.react-row button { min-width:44px;width:100%;font-size:25px;padding:4px; }
.reaction-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:6px; }.reaction-grid button { min-width:0;min-height:44px;font-size:26px;border-radius:14px; }.reaction-grid button.on { background:var(--tab-active); }

.profile-contacts{width:100%;min-width:0;overflow-wrap:anywhere}.profile-contacts input,.profile-contacts select,[data-contact-row] input,[data-contact-row] select{max-width:100%;min-width:0}.contact-kind{display:inline-block;border:1px solid #58718e;border-radius:6px;padding:2px 6px;font-size:.8em}[data-contact-row]{display:grid;gap:8px;margin:12px 0;padding-bottom:12px;border-bottom:1px solid #58718e}[data-contact-form]{display:grid;gap:12px}[data-contact-form] label{display:grid;gap:6px}

/* Message time sits below a content-sized bubble; only the final message in a run shows its time. */
.msg .message-content{grid-row:1;grid-column:1;display:flex;flex-direction:column;align-items:flex-start;width:100%;min-width:0}
.msg.mine .message-content{grid-column:2;align-items:flex-end}
.msg .message-content>.bub{align-self:auto;width:fit-content;min-width:0;max-width:min(88%,520px);box-sizing:border-box}
.msg .message-content>.tm{display:block;visibility:visible;opacity:1;color:var(--muted);font-size:11px;line-height:1.2;margin-top:0;min-height:0}
.msg .message-content .bub>.tm{display:none!important}
.chat.has-look .msg.mine .message-content>.tm{color:var(--muted)!important}

.fcompose label:has(#feed-audience){display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,220px);gap:12px;align-items:center;color:var(--text);font-weight:600;line-height:1.35}.fcompose #feed-audience{width:100%;min-width:0;min-height:44px;box-sizing:border-box;color:var(--text);background:var(--input);border:1px solid var(--line);border-radius:10px;padding:0 12px;font:inherit}.fcompose #feed-audience option{color:var(--text);background:var(--card)}@media(max-width:480px){.fcompose label:has(#feed-audience){grid-template-columns:1fr;gap:8px}}

/* NMSeawise logo stays on one row */
@media (min-width: 900px) { .side a.logo { flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 10px; white-space: nowrap; } .side a.logo img { width: 50px; height: 50px; flex: 0 0 50px; object-fit: contain; } .side a.logo b { white-space: nowrap; } }

/* NM web menu select and contact links update */
@media (min-width: 900px){.side{position:sticky;top:0;align-self:flex-start;height:100vh;height:100dvh;overflow-y:auto;width:296px;flex:0 0 296px}.side a.logo{flex-direction:row;flex-wrap:nowrap;justify-content:center;gap:10px;white-space:nowrap}.side a.logo img{width:52px;height:52px;flex:0 0 52px;object-fit:contain}.side a.logo b{white-space:nowrap}}
select,select option{color:#000;background-color:#fff}
[data-contact-form] input:not([type=checkbox]),[data-contact-form] select,[data-contact-row] input,[data-contact-row] select{color:#000;background-color:#fff}
.profile-contacts [data-contact-body] a{color:#72aaf0;text-decoration:underline;font-weight:600;cursor:pointer}

/* 0.29.8: stable chat-look preview and inline group mention suggestions */
.look-prev.chat{display:block;width:100%;min-width:0;box-sizing:border-box}.look-prev .chat-list{width:100%;box-sizing:border-box}.look-prev .msg,.look-prev .msg.mine{display:flex!important;grid-template-columns:none!important;align-items:flex-end;gap:0;width:100%;min-width:0}.look-prev .msg .message-content{width:100%;align-items:flex-start}.look-prev .msg.mine .message-content{align-items:flex-end}.look-prev .msg .bub{display:flex;flex-direction:column;width:fit-content;max-width:88%;min-width:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}.look-prev .msg .tm{display:block!important;color:var(--muted);margin-top:3px}.look-prev .msg .bub>.tm{display:none!important}
.composer.two .cin{position:relative}.mention-suggest{position:absolute;z-index:12;left:0;right:52px;bottom:calc(100% + 8px);max-height:240px;overflow:auto;padding:6px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.35)}.mention-suggest[hidden]{display:none}.mention-option{display:block;width:100%;min-height:42px;padding:8px 10px;text-align:left;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit}.mention-option:hover,.mention-option:focus-visible{background:var(--tab-active);outline:0}.mention-option small{color:var(--muted)}
.harbor-label{display:block;margin:6px 0;font-weight:650;color:var(--text)}#harbor-port{width:100%;min-height:46px;color:var(--text);background:var(--input);border:1px solid var(--line);border-radius:10px;padding:8px 12px;font:inherit}.harbor-results{display:grid;gap:8px;margin:12px 0}.harbor-ship{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.harbor-ship b{overflow-wrap:anywhere}.harbor-ship span{color:var(--muted);font-variant-numeric:tabular-nums}.harbor-ship small{grid-column:1/-1;color:var(--muted)}

/* NMSeawise profile posts and inline videos 0.29.10 */
.profile-posts{display:flex;flex-direction:column;align-items:stretch;gap:10px;width:100%;min-width:0;text-align:left}.profile-posts>.sect{margin:12px 0 0}.fvideo{padding:0;position:relative;background:#07101b}.fvideo video.feed-video{display:block;width:100%;height:100%;min-height:120px;object-fit:contain;background:#07101b}.fvideo .fvideo-retry{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);min-height:44px;padding:10px 16px;border-radius:24px;background:rgba(12,28,47,.9);border:1px solid var(--line);color:#fff;display:inline-flex;align-items:center;gap:8px;max-width:90%}.fvideo .fvideo-error{position:absolute;left:12px;right:12px;top:10px;padding:8px;margin:0;font-size:13px;line-height:1.4;background:rgba(7,16,27,.95);color:#fff}.fvideo .fvideo-download{position:absolute;left:12px;bottom:52px;min-height:36px;padding:8px 12px;border-radius:12px;background:rgba(7,16,27,.95);color:#9bccff;text-decoration:underline}.fvideo [hidden]{display:none!important}.fvideo .fvideo-retry:focus-visible,.fvideo .fvideo-download:focus-visible{outline:2px solid var(--link);outline-offset:2px}

/* NMSeawise Content Creator 0.30.0 */
.creator-profile-toggle>span:first-child{display:grid;gap:3px;min-width:0}.creator-profile-toggle small{color:var(--muted);font-size:12px;line-height:1.35;font-weight:400}.top-creator{display:inline-flex;align-items:center;vertical-align:middle;margin-left:5px;padding:3px 7px;border:1px solid #c9a84f;border-radius:999px;background:linear-gradient(135deg,#5b4515,#b28a27);color:#fff5cf;font-size:10px;line-height:1;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}.creator-store{display:grid;gap:12px;width:100%;min-width:0;margin-top:8px;text-align:left}.creator-store-head{padding:4px 2px}.creator-store-head h2,.creator-section-head h2{margin:0}.creator-store-head p{margin:5px 0 0;color:var(--silver)}.creator-item-card{display:grid;grid-template-columns:132px minmax(0,1fr);min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--card)}.creator-cover{width:132px;height:100%;min-height:150px;object-fit:cover;background:var(--input)}.creator-item-copy{display:grid;align-content:start;gap:6px;min-width:0;padding:16px}.creator-item-copy small,.creator-kind{color:var(--link);font-weight:700}.creator-item-copy h3{margin:0;font-size:18px;overflow-wrap:anywhere}.creator-item-copy p{margin:0;color:var(--silver);line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.creator-item-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}.creator-item-foot .sbtn{margin-left:auto}.creator-dashboard{gap:16px}.creator-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.creator-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.creator-metric{display:grid;gap:4px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--card)}.creator-metric span,.creator-metric small{color:var(--muted);font-size:12px}.creator-metric b{font-size:21px}.creator-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 2px 10px}.creator-section-head a{color:var(--link)}.creator-onboard{display:grid;gap:12px}.creator-onboard h2,.creator-onboard p{margin:0}.creator-onboard form{display:grid;gap:12px}.creator-sale-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}.creator-detail{gap:14px}.creator-detail h1{margin:0}.creator-detail-cover{width:100%;max-height:420px;object-fit:cover;border-radius:20px;border:1px solid var(--line)}.creator-buy,.creator-unlocked{display:grid;gap:12px}.creator-buy>b{font-size:26px}.creator-buy p{margin:0;color:var(--silver)}.creator-unlocked{display:grid;gap:12px;padding:18px;border:1px solid var(--line);border-radius:20px;background:var(--card)}.creator-unlocked h2{margin:0}.creator-content-body{line-height:1.6;white-space:normal;overflow-wrap:anywhere}.creator-paid-image,.creator-paid-video{display:block;width:100%;max-height:70vh;object-fit:contain;border-radius:14px;background:#07101b}.creator-form small{color:var(--muted)}.creator-purchase{display:flex;align-items:center;justify-content:space-between;gap:12px;text-decoration:none;color:var(--text)}.creator-purchase span{display:grid;gap:4px;min-width:0}.creator-purchase small{color:var(--muted)}
@media(max-width:560px){.creator-item-card{grid-template-columns:1fr}.creator-cover{width:100%;height:190px}.creator-metrics{grid-template-columns:1fr 1fr}.creator-actions{grid-template-columns:1fr}.creator-item-foot .sbtn{margin-left:0}.creator-item-copy{padding:14px}}

/* Worldwide harbor timetable links (0.30.1). */
.harbor-timetable{max-width:1120px;margin:0 auto;gap:18px}.harbor-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(135deg,rgba(38,85,139,.34),rgba(16,39,70,.72))}.harbor-intro>div{display:flex;align-items:flex-start;gap:14px;min-width:0}.harbor-intro h1{font-size:24px;margin:0 0 6px}.harbor-intro p{margin:0;color:var(--muted);line-height:1.45}.harbor-intro .btn{width:auto;white-space:nowrap}
.harbor-source-form{display:flex;flex-direction:column;gap:14px;padding:20px}.harbor-source-form h2{margin:0}.harbor-source-form .hint{margin:0}.harbor-form-row{display:grid;grid-template-columns:minmax(150px,.45fr) minmax(220px,1fr);gap:12px}.harbor-form-actions{display:flex;gap:10px}.harbor-form-actions .btn{width:auto;min-width:160px}.harbor-source-list{display:flex;flex-direction:column;gap:18px}.harbor-source-card{border:1px solid var(--line);border-radius:24px;background:rgba(28,57,96,.72);padding:20px;overflow:hidden}.harbor-source-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.harbor-source-card h2{margin:0 0 3px;font-size:22px}.harbor-source-card header p{margin:0;color:var(--muted);font-size:13px}.harbor-source-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 9px}.harbor-source-actions .sbtn{display:inline-flex;align-items:center;gap:6px}.harbor-source-actions .danger{color:#ff9aa6}.harbor-source-meta{font-size:12px;color:var(--muted);margin:0 0 5px}.harbor-source-link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--blue);font-size:13px}
.harbor-source-status{display:inline-flex;align-items:center;min-height:28px;border:1px solid var(--line);border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700;white-space:nowrap;color:var(--muted)}.harbor-source-status.active{color:#74e9bd;border-color:rgba(116,233,189,.38);background:rgba(28,112,87,.18)}.harbor-source-status.error{color:#ff9aa6;border-color:rgba(255,93,113,.38);background:rgba(125,35,47,.18)}.harbor-source-status.checking,.harbor-source-status.pending{color:#8fc5ff;border-color:rgba(87,164,244,.4)}.harbor-date-list{margin-top:20px;display:flex;flex-direction:column;gap:20px}.harbor-date-group{border-top:1px solid var(--line);padding-top:14px}.harbor-date-group h3{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px;font-size:17px}.harbor-date-group h3 time{text-transform:capitalize}.harbor-date-group h3 span{font-size:12px;color:var(--muted);font-weight:600}
.harbor-call{display:grid;grid-template-columns:minmax(90px,.65fr) minmax(160px,1.8fr) minmax(100px,.8fr);align-items:center;gap:14px;padding:12px 4px;border-top:1px solid rgba(132,171,214,.16)}.harbor-call:first-of-type{border-top:0}.harbor-call-time{display:flex;flex-direction:column;gap:3px}.harbor-call-time small{text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-size:10px}.harbor-call-time b{font-size:15px}.harbor-call-time.leaves{text-align:right}.harbor-call-time.leaves b{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}.harbor-call-time.leaves b span{color:var(--muted);font-size:12px;align-self:center}.harbor-call-ship{display:flex;flex-direction:column;min-width:0}.harbor-call-ship b{font-size:16px;overflow-wrap:anywhere}.harbor-call-ship small{color:var(--muted)}.harbor-call-ship span{font-size:12px;color:#8fc5ff;margin-top:2px}.harbor-source-note{padding:18px}.harbor-source-note h2{margin-top:0;font-size:18px}.harbor-source-note p{color:var(--muted);line-height:1.5;margin-bottom:0}
@media(max-width:640px){.harbor-intro{align-items:stretch;flex-direction:column;padding:18px;border-radius:20px}.harbor-intro .btn{width:100%}.harbor-form-row{grid-template-columns:1fr}.harbor-form-actions{flex-direction:column}.harbor-form-actions .btn{width:100%}.harbor-source-card{padding:16px;border-radius:20px}.harbor-source-card>header{align-items:flex-start}.harbor-call{grid-template-columns:74px minmax(0,1fr) 86px;gap:9px}.harbor-call-time b{font-size:13px}.harbor-call-ship b{font-size:15px}.harbor-date-group h3{font-size:15px}.harbor-source-actions .sbtn{font-size:13px;padding:8px 10px}}

/* Explore, public posts and hashtag topics (0.30.3). */
.explore-feed{max-width:860px;margin:0 auto;gap:14px}.explore-head{display:grid;gap:12px;padding:18px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,rgba(32,68,111,.72),rgba(18,38,65,.9))}.explore-head>p{margin:0;color:var(--silver);line-height:1.5}.explore-head h2{margin:3px 0 0;font-size:14px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.explore-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 1px 5px;scrollbar-width:thin}.explore-chip{flex:0 0 auto;min-height:38px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:rgba(12,27,48,.72);color:var(--silver);font:inherit;font-weight:650;cursor:pointer}.explore-chip:hover,.explore-chip:focus-visible{border-color:var(--blue);color:var(--text);outline:0}.explore-chip.active{border-color:#72aaf0;background:#244a78;color:#fff}.explore-chip.hashtag{font-weight:600}.explore-chip.hashtag span{margin-left:4px;color:var(--muted);font-size:11px}.explore-post{border-radius:20px}.explore-post .phead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}.explore-post .ptime{grid-column:1/-1;margin-left:50px}.explore-follow{min-height:36px;padding:7px 13px;border:1px solid #72aaf0;border-radius:999px;background:#2c609d;color:#fff;font:inherit;font-size:13px;font-weight:750;cursor:pointer}.explore-follow.following{background:transparent;color:#9fcaff}.creator-label{color:#d6b966;margin-left:5px}.feed-tag-inline{display:inline;padding:0;border:0;background:transparent;color:#77b9ff;font:inherit;font-weight:700;cursor:pointer}.feed-tag-inline:hover,.feed-tag-inline:focus-visible{text-decoration:underline;outline:0}.audience-label{margin:0}.feed-more{min-height:64px;display:flex;align-items:center;justify-content:center}.feed-more .btn{max-width:300px}
@media(max-width:899px){.tabs .pill{width:min(58px,18vw)}.tabs a{min-width:0;font-size:11px}.explore-head{border-radius:16px;padding:14px}.explore-post .phead{grid-template-columns:minmax(0,1fr) auto}.explore-follow{padding:6px 10px}}

/* 0.30.4 public wall and social feed; Home and private My Space keep their styles. */
.body.feed{width:100%;max-width:760px;margin-inline:auto;gap:18px}.body.feed>.post{padding:16px;border-radius:20px;gap:12px;background:var(--card);border-color:var(--line)}.body.feed .fmedia.n1 .fm{min-height:0;aspect-ratio:auto;max-height:720px}.body.feed .fmedia.n1 img,.body.feed .fmedia.n1 video{width:100%;height:auto;max-height:680px;object-fit:contain}.body.feed .phead .fauthor{min-width:0;flex:1}.body.feed .phead .main{min-width:0}.body.feed .pact>.sbtn{border:0;background:transparent;padding:4px 7px;min-width:36px}.body.feed .pact>.sbtn.on{color:#ff708b}.body.feed .post-share{margin-left:2px}.body.feed .audience-label{font-size:12px;color:var(--muted)}.body.feed .fcompose{margin-bottom:0}.feed-creators{border-bottom:1px solid var(--line);padding:0 0 16px}.feed-creators h2{font-size:13px;letter-spacing:.03em;color:var(--muted);margin-bottom:12px}.creator-strip{display:flex;gap:16px;overflow:auto}.creator-strip>a{display:flex;flex-direction:column;gap:6px;align-items:center;min-width:76px;max-width:92px;text-decoration:none;text-align:center;font-size:12px}.creator-strip .avatar{border:2px solid var(--blue);outline:2px solid var(--line);outline-offset:3px}.creator-strip>a>span:not(.avatar){width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.creator-strip small{color:#d6b966}.explore-tag-search{display:flex;gap:8px}.explore-tag-search .input{min-width:0}.hashtag-list{flex-wrap:wrap;max-height:230px;overflow:auto}.hashtag-list .explore-chip{max-width:100%;overflow-wrap:anywhere;white-space:normal}.feed-tag-inline{overflow-wrap:anywhere}
.public-profile{width:100%;max-width:900px;margin-inline:auto;gap:20px}.public-profile-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px 22px;padding:16px 4px}.public-profile-info{min-width:0}.public-profile-info h1{font-size:clamp(23px,4vw,32px);line-height:1.2;margin-bottom:7px}.profile-handle{color:var(--silver);font-size:16px}.profile-role{color:var(--link);font-size:13px;margin-top:7px}.profile-bio{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:16px;line-height:1.5}.public-profile-link{display:flex;align-items:center;gap:7px;color:var(--link);margin-top:10px;overflow-wrap:anywhere}.public-profile-avatar .avatar{border:2px solid var(--silver);max-width:100%}.public-profile-counts{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:10px 0;text-align:center}.public-profile-counts div{display:flex;flex-direction:column;gap:4px}.public-profile-counts b{font-size:26px}.public-profile-counts span{color:var(--silver);font-size:14px}.public-profile-actions{grid-column:1/-1;display:flex;gap:10px}.public-profile-actions>.btn{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:8px;max-width:none}.profile-friend-actions,.public-wall-note{grid-column:1/-1}.profile-friend-actions summary{color:var(--muted);cursor:pointer}.public-profile-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line)}.public-profile-tabs button{min-height:52px;color:var(--muted);font-weight:650;border-bottom:2px solid transparent}.public-profile-tabs button[aria-pressed=true]{border-color:var(--blue);color:var(--text)}.profile-media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.profile-tile{aspect-ratio:1;position:relative;min-width:0;overflow:hidden;background:var(--card);border-radius:3px}.profile-tile>img,.profile-tile>video{width:100%;height:100%;object-fit:cover}.profile-text-tile{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;padding:12px;font-size:14px;line-height:1.4;overflow-wrap:anywhere;text-align:left}.tile-video,.tile-count{position:absolute;top:8px;right:8px;background:rgba(5,16,30,.7);padding:4px;border-radius:5px}.profile-back-grid{margin-bottom:12px}.public-profile .profile-posts>.sect{display:none}.harbor-picker{display:flex;flex-direction:column;gap:12px}.harbor-picker h2{font-size:20px}.harbor-port-results{display:flex;flex-direction:column;gap:4px;max-height:360px;overflow:auto}.harbor-port-result{display:flex;align-items:center;gap:12px;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0}.harbor-port-result>span{display:flex;flex-direction:column;min-width:0}.harbor-port-result small{color:var(--muted)}.harbor-port-result .sbtn{flex-shrink:0}.harbor-in-port{margin-top:16px;padding:14px;border:1px solid rgba(95,211,154,.4);border-radius:12px}.harbor-in-port h3{font-size:15px;color:var(--ok);margin-bottom:8px}.harbor-data-note{line-height:1.5}
@media(max-width:480px){.public-profile-hero{gap:12px}.public-profile-avatar .avatar{width:82px!important;height:82px!important}.public-profile-info h1{font-size:23px}.public-profile-actions>.btn{font-size:14px;padding:12px 8px}.public-profile-counts b{font-size:23px}.public-profile-counts span{font-size:12px}.body.feed{padding:12px;gap:12px}.body.feed>.post{padding:12px;border-radius:16px}.profile-text-tile{font-size:12px;padding:8px;-webkit-line-clamp:4}.harbor-port-result{gap:6px}.harbor-port-result .sbtn{font-size:12px;padding:8px}.harbor-call{grid-template-columns:70px minmax(0,1fr) 78px}}
.feed-local-nav{display:flex;gap:8px;padding:8px 16px;max-width:760px;width:100%;margin-inline:auto}.feed-local-nav a{text-decoration:none;padding:9px 14px;border-radius:999px;color:var(--silver);border:1px solid var(--line);font-size:14px}.feed-local-nav a[aria-current=page]{color:var(--text);background:var(--tab-active);border-color:var(--blue)}

/* ---------- Floating Messenger (float-chat.js): desktop window bottom-right, phone = banner only ---------- */
.nm-float { position: fixed; right: 16px; bottom: 16px; z-index: 900; font-size: 14px; line-height: 1.35; }
.nm-fdock { display: flex; gap: 10px; align-items: flex-end; justify-content: flex-end; }
.nm-fw { width: 320px; max-width: calc(100vw - 32px); height: 420px; max-height: 70vh; display: flex; flex-direction: column; background: var(--card-pressed, #1C3354); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.45); overflow: hidden; animation: nmFloatIn .22s ease-out; }
.nm-fhdr { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border-bottom: 1px solid var(--line); background: var(--tab-bg, #0A1526); }
.nm-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-fbtn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--silver); font-size: 18px; cursor: pointer; }
.nm-fbtn:hover, .nm-fbtn:focus-visible { background: rgba(110,150,210,.18); outline: 2px solid var(--link); outline-offset: 1px; }
.nm-flist { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.nm-fm { display: flex; } .nm-fm .nm-fbub { max-width: 80%; padding: 7px 10px; border-radius: 12px; background: var(--input, rgba(8,20,38,.85)); word-break: break-word; white-space: pre-wrap; }
.nm-fm.mine { justify-content: flex-end; } .nm-fm.mine .nm-fbub { background: var(--blue, #4A8EE0); color: #fff; }
.nm-fempty { margin: auto; color: var(--muted); text-align: center; }
.nm-fform { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); align-items: flex-end; }
.nm-fform textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 120px; resize: none; overflow-y: auto; line-height: 20px; direction: ltr; text-align: start; unicode-bidi: plaintext; font-size: 16px; /* 16px: iOS does not zoom */ padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); color: var(--text); }
.nm-fsend { width: 40px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; }
.nm-fmin, .nm-flaunch { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-pressed, #1C3354); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.4); cursor: pointer; display: grid; place-items: center; padding: 0; }
.nm-fmin:focus-visible, .nm-flaunch:focus-visible, .nm-fsend:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.nm-fbadge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E0584B; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
/* in-app notification banner: always below the status bar and the Dynamic Island. env() can read 0 on some iPhones (home-screen web app, black-translucent status bar),
   so an iPhone home-screen app gets a minimum top of 62px; the hidden position is far above the screen so no edge shows */
.nm-fbanner { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 950; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--card-pressed, #1C3354); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.45); text-decoration: none; transform: translateY(calc(-100% - 120px)); transition: transform .25s ease-out; }
@media (display-mode: standalone) and (pointer: coarse) { .nm-fbanner { top: max(calc(env(safe-area-inset-top, 0px) + 12px), 62px); } }
.nm-fbanner.show { transform: translateY(0); }
.nm-fbanner span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes nmFloatIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nm-fw, .nm-fbanner { animation: none; transition: none; } }
@media (max-width: 700px) { .nm-float { display: none !important; } }

/* ---------- Owner-only platform statistics next to the account-type choices (creator.js) ---------- */
.acct-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.acct-row > .account-options { flex: 1 1 260px; min-width: 0; }
.acct-stats { flex: 0 1 260px; min-width: 220px; padding: 12px 14px; border-radius: 14px; background: var(--input, rgba(8,20,38,.85)); border: 1px solid var(--line); }
.acct-stats h3 { margin: 0 0 8px; font-size: 14px; color: var(--silver); }
.acct-stats dl { margin: 0 0 6px; display: grid; gap: 6px; }
.acct-stats dl > div { display: flex; justify-content: space-between; gap: 10px; }
.acct-stats dt { color: var(--muted); }
.acct-stats dd { margin: 0; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.acct-stats .acct-total { border-top: 1px solid var(--line); padding-top: 6px; }
.acct-stats .hint { margin: 6px 0 8px; font-size: 12px; }
@media (max-width: 700px) { .acct-row > .acct-stats { flex: 1 1 100%; min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .acct-stats * { transition: none; } }

/* ---------- permanent Messenger launcher + popup (float-chat.js). Desktop: compact popup bottom-right. Phone: sheet above the tab bar. ---------- */
.nm-launch { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 880; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: var(--blue); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); cursor: pointer; display: grid; place-items: center; padding: 0; font-size: 24px; }
.nm-launch[hidden] { display: none; }
.nm-launch:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.nm-launch .nm-fbadge { position: absolute; top: -3px; right: -3px; }
.nm-launch-ic { line-height: 1; }
.nm-panel { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 879; width: 340px; max-width: calc(100vw - 32px); max-height: min(560px, 70vh); display: flex; flex-direction: column; background: var(--card-pressed, #1C3354); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.45); overflow: hidden; }
.nm-panel[hidden] { display: none; }
.nm-panel.min { max-height: none; width: 260px; }
.nm-panel-hdr { justify-content: space-between; }
.nm-psearch { padding: 8px; border-bottom: 1px solid var(--line); }
.nm-psearch input { width: 100%; box-sizing: border-box; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); color: var(--text); }
.nm-plist, .nm-pfound { overflow-y: auto; flex: 1; min-height: 0; }
.nm-prow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; position: relative; }
.nm-prow small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nm-prow .nm-fbadge { position: absolute; right: 10px; top: 10px; }
.nm-plist-msgs { flex: 1; min-height: 120px; max-height: 340px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.nm-panel-reply { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); align-items: flex-end; }
.nm-panel-reply textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 120px; resize: none; overflow-y: auto; font-size: 16px; line-height: 20px; direction: ltr; text-align: start; unicode-bidi: plaintext; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); color: var(--text); }
.nm-panel-reply .nm-fsend { width: 40px; height: 36px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; }
@media (max-width: 899px) {
  .nm-launch { right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .nm-panel { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(146px + env(safe-area-inset-bottom)); max-height: 60vh; }
  .nm-panel.min { left: auto; right: 8px; width: 240px; }
}

/* Feed carousel (2-10 mixed photos and videos): one swipeable row, saved order, works with touch, mouse and keyboard */
.fcarousel { position: relative; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.04); }
.fcar-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; }
.fcar-track::-webkit-scrollbar { display: none; }
.fcar-track:focus-visible { outline: 2px solid var(--accent, #6fa8ff); outline-offset: 2px; }
.fcar-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.fcar-slide .fm { border-radius: 0; }
.fcar-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.fcar-btn:disabled { opacity: .35; cursor: default; }
.fcar-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fcar-prev { left: 8px; } .fcar-next { right: 8px; }
.fcar-count { position: absolute; right: 10px; top: 10px; z-index: 2; padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; }
.fup { flex-wrap: wrap; }
.fmove { display: inline-flex; gap: 4px; }
.fmove button:disabled { opacity: .35; }
.fpos { font-weight: 700; min-width: 1.5em; text-align: center; }
@media (max-width: 600px) { .fcar-btn { width: 44px; height: 44px; } }

/* 0.30.14 public profile: large cover, avatar over the cover, counts, tabs (purchased looks from shop.css still apply) */
.public-profile-hero.pp-v2 { display: block; padding: 0 0 14px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card, rgba(255,255,255,.02)); }
.pp-v2 .pp-cover { height: clamp(140px, 26vw, 240px); background: linear-gradient(135deg, #0A1E3A 0%, #123E6B 45%, #1AA6A6 100%); position: relative; }
.pp-v2 .pp-cover::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.28)); }
/* Shop cover: the original 851x315 image, shown at native size (never enlarged), full image, no mask, overlay or colour extension */
.pp-v2 .pp-cover.pp-cover-shop { background: var(--shop-banner) center top / 100% 100% no-repeat transparent; }
.public-profile > .pp-v2 .pp-cover.pp-cover-shop { width: 100%; height: auto; aspect-ratio: 851 / 315; }
/* seam-free: the cover fades into the solid colour of the info area (no black band, no double-translucent layer) */
.pp-v2 .pp-cover.pp-cover-shop::after { display: none; }
.pp-v2.nm-shop-banner { padding-top: 0; } .pp-v2.nm-shop-banner::before { display: none; }
.public-profile-hero.pp-v2.nm-shop-theme { padding: 0 0 14px; background: var(--shop-bg); }
.pp-v2 .pp-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 18px; align-items: end; padding: 0 20px; margin-top: -56px; position: relative; }
.pp-v2 .pp-avatar .avatar { width: 120px !important; height: 120px !important; border: 4px solid var(--bg, #0A1628); box-sizing: content-box; }
.pp-v2 .public-profile-info { padding-top: 60px; min-width: 0; } .pp-v2 .public-profile-info h1 { margin: 0; overflow-wrap: anywhere; }
.pp-v2 .public-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pp-v2 .public-profile-actions .btn { width: auto; min-height: 44px; }
.pp-v2 .public-profile-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 20px 0; padding: 12px 0 0; border-top: 1px solid var(--line); text-align: center; }
.pp-v2 .public-profile-counts b { display: block; font-size: 20px; } .pp-v2 .public-profile-counts span { font-size: 13px; opacity: .85; }
.pp-v2 .profile-friend-actions, .pp-v2 .public-wall-note { margin: 10px 20px 0; }
.public-profile-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.public-profile-tabs button { min-height: 44px; padding: 0 16px; border-bottom: 3px solid transparent; background: none; color: inherit; flex: 0 0 auto; }
.public-profile-tabs button[aria-pressed="true"] { border-bottom-color: var(--blue, #4A8EE0); font-weight: 600; }
.public-profile-tabs button:focus-visible { outline: 2px solid var(--blue, #4A8EE0); outline-offset: -2px; }
.pp-look-slot { margin: 10px 0; } .pp-look-slot h3 { font-size: 15px; margin: 0 0 6px; }
.pp-look-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .pp-v2 .pp-main { grid-template-columns: 1fr; justify-items: start; margin-top: -48px; padding: 0 16px; }
  .pp-v2 .pp-avatar .avatar { width: 96px !important; height: 96px !important; }
  .pp-v2 .public-profile-info { padding-top: 0; }
  .pp-v2 .public-profile-actions { justify-content: flex-start; width: 100%; } .pp-v2 .public-profile-actions .btn { flex: 1 1 140px; }
  .pp-v2 .public-profile-counts { margin: 12px 16px 0; }
}

/* 0.30.14 Explore (design-refs/explore-target.png): maritime header, search, category cards, Trending Topics, Recommended for You */
.explore-feed { --ex-sky1: #0F2A4D; --ex-sky2: #173E6E; --ex-ink: #EEF2F7; --ex-soft: #9FB4D0; --ex-card: rgba(255,255,255,.06); --ex-line: rgba(255,255,255,.12); --ex-accent: #8EC5E8; }
@media (prefers-color-scheme: light) { .explore-feed { --ex-sky1: #EAF3FC; --ex-sky2: #CFE3F7; --ex-ink: #0B1F3A; --ex-soft: #3E5878; --ex-card: #FFFFFF; --ex-line: #D6E4F2; --ex-accent: #1C5FA8; } }
.explore-hero { position: relative; border-radius: 22px; padding: 22px 20px 18px; background: linear-gradient(180deg, var(--ex-sky1), var(--ex-sky2)); color: var(--ex-ink); overflow: hidden; }
.explore-hero h1 { font-size: clamp(30px, 6vw, 44px); margin: 0; letter-spacing: -.02em; }
.explore-hero p { margin: 6px 0 0; color: var(--ex-soft); max-width: 34ch; line-height: 1.4; }
.explore-hero-text { position: relative; z-index: 1; padding-right: 96px; }
.explore-lighthouse { position: absolute; right: 0; top: 34px; width: 140px; height: 105px; color: var(--ex-accent); pointer-events: none; }
.explore-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: 18px; background: var(--ex-card); border: 1px solid var(--ex-line); border-radius: 16px; padding: 0 12px; color: var(--ex-soft); }
.explore-search .input { border: 0; background: transparent; color: var(--ex-ink); min-height: 48px; flex: 1; min-width: 0; padding: 0; }
.explore-search:focus-within { outline: 2px solid var(--ex-accent); outline-offset: 2px; }
.explore-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; }
.explore-cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 10px 6px; border-radius: 16px; border: 1px solid var(--ex-line); background: var(--ex-card); color: var(--ex-ink); font-size: 13px; text-align: center; }
.explore-cat .ico { color: var(--ex-accent); }
.explore-cat.active, .explore-cat:hover { border-color: var(--ex-accent); }
.explore-cat:focus-visible { outline: 2px solid var(--ex-accent); outline-offset: 2px; }
.explore-sect-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.explore-trending h2, .explore-rec h2, .explore-people h2 { font-size: 20px; margin: 14px 0 8px; color: var(--ex-ink); }
.explore-rec-row, .explore-people-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; max-width: 100%; }
.explore-rec-card { flex: 0 0 min(72vw, 240px); scroll-snap-align: start; border-radius: 16px; overflow: hidden; border: 1px solid var(--ex-line); background: var(--ex-card); color: var(--ex-ink); text-decoration: none; }
.explore-rec-img { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--ex-sky2); }
.explore-rec-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.explore-rec-img b { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-size: 17px; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.explore-rec-meta { display: flex; align-items: center; gap: 6px; padding: 10px 12px; font-size: 14px; color: var(--ex-soft); }
.explore-person { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; text-align: center; color: var(--ex-ink); text-decoration: none; }
.explore-person b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } .explore-person small { color: var(--ex-soft); }
.explore-filters { margin-top: 14px; }
@media (max-width: 520px) { .explore-cats { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); overflow-x: visible; } .explore-hero-text { padding-right: 70px; } .explore-lighthouse { width: 100px; height: 75px; } }
@media (min-width: 1000px) { .explore-rec-card { flex-basis: 220px; } }

/* 0.30.20 compact full-width profiles (My Profile and public profiles): no centred 900px card, balanced banner, compact controls. */
.screen > .body.public-profile { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 0 32px; gap: 14px; min-width: 0; align-self: stretch; }
.public-profile > .public-profile-hero.pp-v2 { width: 100%; max-width: none; margin: 0; padding: 0 0 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
/* 0.30.21: a purchased, applied profile theme keeps its background on the public profile hero (only themed heroes; untouched heroes stay transparent) */
.public-profile > .public-profile-hero.pp-v2.nm-shop-theme { background: var(--shop-bg); }
.public-profile > .pp-v2 .pp-cover { width: 100%; height: clamp(150px, 27vw, 260px); border-radius: 0; }
.pp-v2 .public-profile-actions .btn { min-height: 40px; padding-block: 8px; }
.public-profile > .pp-v2 .public-profile-actions { margin-top: 16px; }
.public-profile > .public-profile-tabs { padding-inline: 20px; }
.public-profile > .profile-posts, .public-profile > .profile-media-grid, .public-profile > .creator-store, .public-profile > .empty-text { width: 100%; min-width: 0; }
.public-profile > .profile-posts { padding: 12px 20px; }
.public-profile > .creator-store { padding: 14px 20px; }
.pp-v2 .public-profile-counts .pp-stat-button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 100%; min-height: 52px; padding: 4px 2px;
  border-radius: 10px; color: inherit; font: inherit; cursor: pointer;
}
.pp-v2 .public-profile-counts .pp-stat-button:hover,
.pp-v2 .public-profile-counts .pp-stat-button:focus-visible {
  background: rgba(125, 169, 228, .11); outline-offset: 1px;
}
.pp-v2 .public-profile-counts .pp-stat-button span { color: var(--silver); }
.pp-connection-list { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow-y: auto; }
.pp-connection-person { display: flex; align-items: center; gap: 12px; padding: 10px 3px; text-decoration: none; border-bottom: 1px solid var(--line); }
.pp-connection-person:hover, .pp-connection-person:focus-visible { background: rgba(125, 169, 228, .10); }
.pp-connection-person .avatar { flex: none; }
.pp-connection-details { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.pp-connection-details b, .pp-connection-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-connection-details small { color: var(--silver); }
@media (max-width: 640px) {
  .public-profile > .pp-v2 .pp-cover { height: clamp(150px, 40vw, 200px); }
  .public-profile > .public-profile-tabs { padding-inline: 16px; }
  .public-profile > .profile-posts { padding-inline: 16px; }
}

/* 0.30.20 refinement: compact desktop action buttons and a tighter identity block (mobile unchanged: buttons wrap full width) */
@media (min-width: 641px) {
  .pp-v2 .public-profile-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .pp-v2 .public-profile-actions .btn { flex: 0 0 auto; width: auto; min-width: 156px; min-height: 40px; padding: 0 22px; }
  .pp-v2 .public-profile-info h1 { margin: 0 0 2px; }
  .pp-v2 .profile-handle { margin: 0; }
  .pp-v2 .profile-role { margin-top: 4px; }
}

/* Global top navigation (0.30.21): primary destinations on the left, Menu / Messenger / Notifications / My Profile avatar on the right */
.gtop { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 56px; padding: calc(6px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left)); background: var(--tab-bg); border-bottom: 1px solid var(--line); }
.gtop[hidden] { display: none; }
.gtop-brand { display: flex; align-items: center; flex: 0 0 auto; }
.gtop-brand img { width: 34px; height: 34px; display: block; }
.gtop-nav { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gtop-nav::-webkit-scrollbar { display: none; }
.gtop-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; color: var(--silver); text-decoration: none; font-size: 13px; white-space: nowrap; flex: 0 0 auto; }
.gtop-nav a[aria-current="page"] { color: var(--blue); background: var(--tab-active); font-weight: 600; }
.gtop-icons { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.gtop-icons > a { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text); text-decoration: none; }
.gtop-icons > a[aria-current="page"] { background: var(--tab-active); color: var(--blue); }
.gtop-icons .badge-n { position: absolute; top: 2px; right: 0; }
.gtop-icons .gtop-av { width: 36px; height: 36px; padding: 0; margin-left: 4px; overflow: hidden; }
.gtop-icons .gtop-av .avatar { width: 36px !important; height: 36px !important; }
.gtop a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 899px) { .gtop-brand { display: none; } .gtop { padding-left: max(10px, env(safe-area-inset-left)); } .gtop-nav a span { font-size: 12px; } }
@media (min-width: 900px) { .gtop { padding-top: 8px; padding-bottom: 8px; } }


/* NMSeawise Updates for ordinary members: read-only, no reactions */
.chat-list[data-ro="1"] .reaction-group, .chat-list[data-ro="1"] .react { display: none; }

/* 0.30.21 Feed: three columns on desktop (profile summary | feed | community). Phones keep the single column. */
.feed-3col { display: contents; }
.feed-side { display: none; }
.feed-centre { display: contents; min-width: 0; }
@media (min-width: 1100px) {
  .feed-3col { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 20px; max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 20px; align-items: start; box-sizing: border-box; }
  .feed-centre { display: block; min-width: 0; }
  .feed-side { display: block; position: sticky; top: 12px; }
  .feed-me { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--card, rgba(255,255,255,.06)); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
  .feed-me b { display: block; font-size: 15px; }
  .feed-me small { display: block; color: var(--silver); font-size: 12px; }
  .feed-me-av { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tab-active); color: var(--blue); font-weight: 700; flex: 0 0 44px; }
  .feed-community { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
  .feed-community a { color: var(--blue); text-decoration: none; font-size: 14px; }
  .feed-local-nav { display: none; }
}
.feed-me-av-wrap { display: flex; flex: 0 0 44px; width: 44px; height: 44px; }
.feed-news { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.feed-news small { color: var(--silver); }
.feed-news p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-news-empty { font-size: 13px; margin: 0; }

/* 0.30.21 navigation cleanup: Search sits in the top bar; the sidebar keeps only what the top bar does not show (Home, My Space, Business Network, Creator). */
.gtop-search { display: flex; align-items: center; gap: 6px; flex: 0 1 230px; min-width: 120px; height: 36px; box-sizing: border-box; padding: 0 12px; border-radius: 18px; background: var(--card, rgba(255,255,255,.07)); border: 1px solid var(--line); color: var(--silver); margin: 0; }
.gtop-search:focus-within { border-color: var(--blue); }
.gtop-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 0; }
.gtop-search input::placeholder { color: var(--silver); opacity: .85; }
.gtop-search-btn { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; color: var(--text); flex: 0 0 auto; }
.gtop-search-btn[aria-current="page"] { background: var(--tab-active); color: var(--blue); }
@media (max-width: 899px) { .gtop-search { display: none; } .gtop-search-btn { display: flex; } }
@media (min-width: 900px) { .side { width: 232px; flex: 0 0 232px; } }

/* 0.30.21 Explore: the page header already says "Explore", so the hero repeats no heading; the hero and category cards are more compact, so more categories and topics fit above the fold. */
.explore-hero h1 { display: none; }
.explore-hero { padding: 14px 18px 12px; }
@media (min-width: 900px) {
  .explore-cats { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
  .explore-cat { padding: 10px 8px; }
  .explore-rec-card { flex-basis: 190px; }
}

/* 0.30.21 application shell: the global top bar spans the whole viewport; the sidebar and the page sit BELOW it, side by side. */
.app { flex-direction: column; }
.gtop { flex: 0 0 auto; position: relative; z-index: 30; width: 100%; box-sizing: border-box; }
.app-body { display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; width: 100%; }
.app-body > .col { min-height: 0; }
@media (min-width: 900px) {
  .app-body > .side { display: flex; flex-direction: column; position: relative; top: auto; align-self: stretch; height: auto; min-height: 0; overflow-y: auto; width: 232px; flex: 0 0 232px; }
}
/* sidebar: compact profile card on top, then Ships in Harbor, Shop, Business Network, Content Creator */
.side-me { display: flex; align-items: center; gap: 10px; margin: 8px 8px 10px; padding: 10px; border-radius: 14px; background: var(--card, rgba(255,255,255,.06)); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.side-me b { display: block; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { display: block; color: var(--silver); font-size: 12px; }
.side-me .avatar { flex: 0 0 36px; }
@media (max-width: 899px) { .side-me { display: none; } }

/* 0.30.21 de-duplication: the sidebar carries the profile card, so the Feed has no second profile card; search gets room for its placeholder */
@media (min-width: 1100px) { .feed-3col { grid-template-columns: minmax(0, 1fr) 260px; } .feed-side-l { display: none; } }
.gtop-search { flex: 0 1 280px; }

/* 0.30.21 notifications dropdown: opens under the bell (desktop and phone); read rows stay listed */
.notif-drop { position: fixed; top: 60px; right: 8px; z-index: 90; width: min(360px, calc(100vw - 16px)); max-height: min(70vh, 520px); display: flex; flex-direction: column; box-sizing: border-box; background: var(--card-solid, #0F2440); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); overflow: hidden; }
.notif-drop-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.notif-drop-list { overflow-y: auto; overflow-x: hidden; padding: 6px; min-height: 0; }
.notif-drop-row { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.notif-drop-row:hover, .notif-drop-row:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.notif-drop-row.unread .nd-text { font-weight: 600; }
.notif-drop-row small { color: var(--silver); font-size: 12px; }
.notif-drop-empty { padding: 16px 12px; margin: 0; color: var(--silver); font-size: 14px; }

/* 0.30.22 navigation groups: subtle labels and dividers in the sidebar; the top-bar main links move to the More menu on phones */
.side-group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--line); }
.side-group:first-of-type { border-top: 0; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--silver); padding: 8px 14px 4px; opacity: .85; }
@media (max-width: 899px) { .gtop-nav { display: none; } }


/* 0.30.23 phone bottom bar: seven tabs fit on one line (no wrapped labels, no tall bar); the floating Messenger launcher stays above the bar, never over a tab */
@media (max-width: 899px) {
  .tabs { padding-top: 6px; }
  .tabs a { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; gap: 2px; }
  .tabs .pill { width: 44px; height: 30px; }
  .tabs .pill .ico { width: 20px; height: 20px; }
  .nm-launch { bottom: calc(76px + env(safe-area-inset-bottom)); }
}


/* 0.30.26 mobile global header: the icon group takes the remaining width and spreads its items; search stays left, the profile avatar sits at the far right (desktop unchanged) */
@media (max-width: 899px) { .gtop-icons { flex: 1 1 auto; justify-content: space-between; min-width: 0; } }

/* 0.30.28: while a sheet opened with hideLaunch is open the floating Messenger launcher is hidden (restored on close) */
body.sheet-hide-launch .nm-launch { display: none !important; }

/* 0.30.29 Messenger header: the full title "Messenger" is never truncated on phones; Friends and Search move into the More menu there (desktop keeps every icon) */
@media (max-width: 899px) { .hdr-right > .iconbtn.msg-desk-only { display: none; } }
@media (min-width: 900px) { .msg-more-wrap { display: none; } }
.msg-more-wrap { position: relative; flex: 0 0 auto; }
.msg-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 170px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--card-solid, #0F2440); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
.msg-more-menu[hidden] { display: none; }
.msg-more-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; white-space: nowrap; }
.msg-more-menu a:hover, .msg-more-menu a:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
@media (max-width: 899px) {
  .hdr.big .msg-title { font-size: 22px; white-space: nowrap; overflow: visible; text-overflow: clip; flex: 1 1 auto; min-width: 0; }
}
@media (min-width: 900px) { .hdr.big .msg-title { font-size: 22px; } }
@media (max-width: 360px) { .hdr.big .msg-title { font-size: 20px; } .hdr.msg-hdr { padding-left: 12px; padding-right: 12px; } }

/* NMSeawise Updates entry on the Seafarers Forum page (0.30.31): dark maritime card, explicit colours so the text is always readable (contrast 4.5:1 or more) */
.upd-entry{display:flex;align-items:center;gap:12px;margin:12px 16px;padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#0b2a4a 0%,#14406b 100%);border:1px solid rgba(126,200,255,.35);color:#f2f8ff;text-decoration:none}
.upd-entry:hover{border-color:rgba(126,200,255,.7)}
.upd-entry:focus-visible{outline:3px solid #7ec8ff;outline-offset:2px}
.upd-ico img{width:40px;height:40px;border-radius:50%;display:block;background:#fff;padding:2px;box-sizing:border-box}
.upd-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.upd-txt b{color:#ffffff;font-size:15px;line-height:20px}
.upd-txt small{color:#c9dff2;font-size:13px;line-height:18px}
.upd-go{font-size:22px;color:#9fd2f5}
