:root {
  --canvas: #f4f1eb;
  --paper: #fbfaf7;
  --paper-deep: #f0eee8;
  --ink: #202721;
  --ink-soft: #526057;
  --muted: #7e877f;
  --line: #deded6;
  --line-strong: #cecec4;
  --olive: #526555;
  --olive-dark: #293b30;
  --gold: #a98456;
  --error: #a04f48;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { height: 100%; min-width: 320px; overflow: hidden; background: var(--canvas); }

body { height: 100%; min-width: 320px; min-height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: var(--canvas); }

button, textarea { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

button:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.hidden { display: none !important; }

.app-shell { height: 100%; min-height: 0; overflow: hidden; }

html.page-scrollable { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
body.page-scrollable { height: auto; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: auto; }
.app-shell.page-scrollable { height: auto; min-height: 100dvh; overflow: visible; }

/* Sign in */
.login-view {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px);
  background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, .78), transparent 43%);
}

.login-story {
  display: none;
}

.story-topline, .story-foot { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .15em; }

.story-rule { width: 34px; height: 1px; background: var(--gold); }

.story-title { max-width: 700px; margin: auto 0 28px; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: clamp(52px, 7.3vw, 104px); font-weight: 400; letter-spacing: -.065em; line-height: .93; }

.story-title em { color: var(--gold); font-style: italic; }

.story-copy { max-width: 390px; margin: 0 0 48px; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }

.story-foot { width: min(100%, 520px); color: var(--muted); font-size: 9px; }

.story-foot > span:first-child { color: var(--gold); }

.story-foot-line { flex: 1; height: 1px; background: var(--line); }

.login-panel { width: 100%; max-width: 470px; justify-self: center; }

.login-view--callback { grid-template-columns: 1fr; place-items: center; }

.login-view--callback .login-panel { justify-self: center; }

.login-card { padding: clamp(32px, 5vw, 58px); border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: 0 22px 55px rgba(40, 44, 35, .08); text-align: center; }

.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 15px; background: var(--ink); color: #d4ad73; }

.login-card > .brand-mark { margin-inline: auto; }

.brand-logo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; border-radius: inherit; }

.brand-home-link { color: inherit; text-decoration: none; }
.brand-home-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 12px; }
.brand-name-link { color: inherit; text-decoration: none; }
.brand-name-link .eyebrow { transition: color .2s ease; }
.brand-name-link:hover .eyebrow { color: var(--olive); }

.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; }

.eyebrow { margin: 31px 0 16px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .18em; }

.login-card h1 { margin: 0; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: clamp(42px, 5vw, 64px); font-weight: 400; letter-spacing: -.06em; line-height: .94; }

.login-card h1 span { color: var(--muted); font-style: italic; }

.login-copy { max-width: 340px; margin: 24px auto 30px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }

.google-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 15px 16px; border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; text-align: center; cursor: pointer; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }

.google-button:hover { background: var(--olive-dark); box-shadow: 0 10px 20px rgba(41, 59, 48, .16); transform: translateY(-1px); }

.google-button:disabled { cursor: wait; opacity: .65; transform: none; }

.google-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); color: #3975e7; font-size: 15px; font-weight: 850; }

.button-arrow { width: 19px; height: 19px; color: #c7a26b; }

.form-error { min-height: 20px; margin: 12px 0 0; color: var(--error); font-size: 12px; }

.login-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 28px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: left; }

.login-legal-links { display: flex; justify-content: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 10px; }

.login-legal-links a { color: var(--olive); font-weight: 700; text-decoration: none; }

.login-legal-links a:hover { color: var(--olive-dark); text-decoration: underline; }

.privacy-mark { color: var(--gold); font-size: 18px; line-height: 0; }

/* Chat shell */
.chat-view { display: grid; grid-template-columns: 318px minmax(0, 1fr); gap: 16px; width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; overflow: hidden; padding: 18px; background: var(--canvas); }

.mobile-chat-back { display: none; }

.sidebar, .chat-panel, .browser-panel { height: 100%; min-height: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }

.sidebar { display: flex; flex-direction: column; overflow: hidden; padding: 22px 16px 16px; }

.sidebar-top, .brand-lockup, .chat-contact, .profile-card { display: flex; align-items: center; }

.sidebar-top { justify-content: space-between; padding: 0 8px 25px; }

.sidebar-actions { display: none; }

.workspace-tabs { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-deep); }

.workspace-tab-indicator { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 28px) / 5); border-radius: 9px; background: var(--paper); box-shadow: 0 3px 10px rgba(32, 39, 33, .08); pointer-events: none; transform: translateX(calc(var(--workspace-tab-index, 0) * (100% + 5px))); transition: transform .34s cubic-bezier(.2, .8, .2, 1); will-change: transform; }

.workspace-tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 57px; padding: 8px 4px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 9px; font-weight: 800; letter-spacing: .01em; line-height: 1.1; cursor: pointer; transition: color .2s ease; }

.workspace-tab[data-workspace-tab="conversations"] { order: 1; }

.workspace-tab[data-workspace-tab="friends"] { order: 2; }

.workspace-tab[data-workspace-tab="shop"] { order: 3; }

.workspace-tab[data-workspace-tab="browser"] { order: 4; }

.workspace-tab[data-workspace-tab="settings"] { order: 5; }

.workspace-tab svg { width: 18px; height: 18px; flex: 0 0 auto; }

.workspace-tab:hover { color: var(--ink-soft); }

.workspace-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.workspace-tab.active { background: transparent; color: var(--olive-dark); }

.workspace-tab-panel { min-height: 0; overflow: hidden; }

.workspace-tab-panel[data-workspace-panel="conversations"] { display: flex; flex: 1 1 auto; flex-direction: column; }

.workspace-tab-panel[data-workspace-panel="friends"] { flex: 1 1 auto; overflow-y: auto; padding-right: 2px; }

.workspace-tab-panel[data-workspace-panel="shop"] { flex: 1 1 auto; overflow-y: auto; padding: 12px 2px 2px; }

.shop-launch-card { margin: 0 2px; padding: 22px 16px 18px; border: 1px solid rgba(218, 183, 119, .42); border-radius: 16px; background: linear-gradient(145deg, #273027, #141914); box-shadow: 0 16px 30px rgba(24, 29, 25, .18); color: #f5f0e7; }

.shop-launch-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(218, 183, 119, .55); border-radius: 12px; background: rgba(218, 183, 119, .1); color: #e2c389; }

.shop-launch-icon svg { width: 23px; height: 23px; }

.shop-launch-kicker { margin: 18px 0 8px; color: #d8b675; font-size: 8px; font-weight: 850; letter-spacing: .18em; }

.shop-launch-card h3 { margin: 0; color: #fbf7ee; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 24px; font-weight: 600; letter-spacing: -.03em; }

.shop-launch-copy { margin: 10px 0 22px; color: rgba(245, 240, 231, .72); font-size: 11px; line-height: 1.6; }

.shop-progress-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: rgba(245, 240, 231, .58); font-size: 8px; font-weight: 800; letter-spacing: .12em; }

.shop-progress-meta strong { color: #e2c389; font-size: 12px; letter-spacing: 0; }

.shop-progress-track { height: 7px; overflow: hidden; border: 1px solid rgba(226, 195, 137, .22); border-radius: 999px; background: rgba(255, 255, 255, .1); }

.shop-progress-bar { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8e6c3d, #e2c389); box-shadow: 0 0 14px rgba(226, 195, 137, .45); transition: width .06s linear; }

.shop-progress-caption { min-height: 14px; margin: 11px 0 0; color: rgba(245, 240, 231, .56); font-size: 9px; line-height: 1.5; }

.workspace-tab-panel .contacts-tools { margin-top: 0; }

.workspace-tab-panel .conversation-list { flex: 1 1 auto; overflow-y: auto; }

.brand-lockup { gap: 10px; }

.brand-lockup strong, .brand-lockup span { display: block; }

.brand-lockup strong { color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }

.brand-lockup span { margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }

.icon-button svg { width: 17px; height: 17px; }

.icon-button:hover { border-color: var(--line-strong); background: var(--paper-deep); color: var(--ink); }

.profile-card { gap: 10px; padding: 13px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.avatar { display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: var(--olive); color: var(--paper); font-weight: 800; }

.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.avatar.large { width: 41px; height: 41px; }

.avatar.large[src] { object-fit: cover; }

.avatar.mini { width: 34px; height: 34px; background: var(--paper-deep); color: var(--olive); font-size: 12px; }

.profile-info { min-width: 0; flex: 1; }

.profile-info strong, .profile-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-info strong { color: var(--ink); font-size: 12px; }

.profile-info span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.role-badge { padding: 4px 6px; border: 1px solid #d4ddcf; border-radius: 5px; color: var(--olive); font-size: 8px; font-weight: 800; letter-spacing: .08em; }

.contacts-tools { margin-top: 18px; }
.contact-search-form label, .contacts-mini-heading { display: block; margin: 0 10px 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.contact-search-row { display: flex; gap: 6px; margin: 0 8px; }
.contact-search-row input { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 11px; outline: none; }
.contact-search-row input:focus { border-color: var(--line-strong); }
.contact-search-row button { width: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); cursor: pointer; }
.friend-requests, .contact-search-results { max-height: 150px; overflow-y: auto; margin-top: 10px; }
.friend-request-item, .contact-result-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; }
.friend-request-item:hover, .contact-result-item:hover { background: var(--paper-deep); }
.friend-request-copy, .contact-result-copy { min-width: 0; flex: 1; }
.friend-request-copy strong, .friend-request-copy small, .contact-result-copy strong, .contact-result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-request-copy strong, .contact-result-copy strong { font-size: 11px; }
.friend-request-copy small, .contact-result-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.friend-request-actions { display: flex; gap: 3px; }
.friend-request-actions button, .contact-result-action { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font: inherit; font-size: 9px; cursor: pointer; }
.friend-request-actions button { width: 22px; height: 22px; }
.friend-request-actions button:first-child { color: var(--olive-dark); }
.contact-result-action { padding: 5px 7px; white-space: nowrap; }
.contact-result-action:disabled { cursor: default; opacity: .55; }
.contacts-pending-note { margin: 9px 10px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.section-label { display: flex; justify-content: space-between; margin: 28px 10px 11px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; }

.conversation-list { min-height: 0; overflow: hidden; }
.ai-conversation-hidden .ai-conversation-item { display: none !important; }

.conversation-item { display: flex; align-items: center; gap: 11px; width: 100%; margin-bottom: 3px; padding: 10px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; touch-action: pan-y; transition: border-color .2s, background .2s; }

.conversation-item:hover { background: var(--paper-deep); }

.conversation-item.active { border-color: #d6dfd2; background: #edf2eb; }

.conversation-copy { min-width: 0; flex: 1; }

.conversation-copy strong, .conversation-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.conversation-copy strong { font-size: 12px; font-weight: 700; }

.conversation-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.conversation-meta { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; min-width: 13px; }

.conversation-presence { display: block; width: 7px; height: 7px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--line); transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }

.conversation-presence.online { border-color: #6e9c78; background: #6e9c78; box-shadow: 0 0 0 3px rgba(110, 156, 120, .13); }

.unread-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--button-accent); border-radius: 999px; background: var(--button-accent); color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }

.conversation-item.has-unread .conversation-copy strong { color: var(--olive-dark); }

.sidebar-footer { margin-top: auto; padding: 17px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--olive); vertical-align: 1px; }

.sidebar-footer.about-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #cbdacf; border-radius: 10px; background: var(--button-soft); color: var(--button-primary-hover); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease; }

.sidebar-footer.about-link:hover { border-color: #b8cdbd; background: var(--button-soft-hover); color: var(--olive-dark); transform: translateY(-1px); }

.about-link-label { display: inline-flex; align-items: center; gap: 8px; }

.about-mark { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 11px; font-style: italic; line-height: 1; text-transform: lowercase; }

.about-link > svg { width: 16px; height: 16px; color: var(--gold); }

.chat-panel { display: flex; flex-direction: column; overflow: hidden; }

.browser-panel { grid-column: 2; display: flex; flex-direction: column; overflow: hidden; }
.browser-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper-deep); }
.browser-tabs-button { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.browser-tabs-button:hover { border-color: var(--gold); color: var(--ink); }
.browser-tabs-button span { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.browser-controls { display: flex; gap: 4px; }
.browser-controls button, .browser-external, .browser-address-form button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font: inherit; font-size: 14px; cursor: pointer; }
.browser-controls button:hover, .browser-external:hover, .browser-address-form button:hover { border-color: var(--gold); color: var(--ink); }
.browser-address-form { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; gap: 7px; padding: 3px 4px 3px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); }
.browser-address-label { color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.browser-address-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; }
.browser-address-form button { min-width: 28px; height: 26px; border: 0; background: var(--button-soft); color: var(--olive); }
.browser-external { flex: 0 0 auto; font-size: 10px; font-weight: 800; }
.browser-meta { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.browser-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-panel iframe { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #fff; }
.browser-blocked { display: grid; place-items: center; align-content: center; gap: 10px; flex: 1 1 auto; padding: 30px; background: radial-gradient(circle at 50% 35%, rgba(169, 132, 86, .12), transparent 40%), var(--paper); text-align: center; }
.browser-blocked-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 25px; }
.browser-blocked h2 { margin: 0; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 22px; }
.browser-blocked p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.browser-blocked button { margin-top: 5px; padding: 10px 14px; border: 1px solid var(--olive); border-radius: 8px; background: var(--olive); color: #fff; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.browser-blocked button:hover { background: var(--olive-dark); }

:root[data-theme="dark"] .browser-toolbar, :root[data-theme="dark"] .browser-address-form { background: var(--paper-deep); }
:root[data-theme="dark"] .browser-panel iframe { background: #fff; }

.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 25px 32px 22px; border-bottom: 1px solid var(--line); }

.chat-contact { gap: 12px; min-width: 0; }

.contact-avatar { width: 42px; height: 42px; background: var(--ink); color: #d6b076; }

.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }

.chat-overline { margin: 0 0 5px; color: var(--gold); font-size: 8px !important; font-weight: 800; letter-spacing: .16em; }

.chat-contact h2 { margin: 0; overflow: hidden; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 20px; font-weight: 600; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }

.chat-contact p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.chat-contact p.online { color: var(--olive); }

.chat-contact p.offline { color: var(--muted); }

.typing-status { min-height: 14px; color: var(--gold) !important; font-size: 10px !important; font-style: italic; }

.typing-status:empty { display: none; }

.composer-typing { margin: 0 38px 5px; }

.header-chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; }

.chat-banner { margin: 18px 32px 0; padding: 10px 13px; border-left: 2px solid var(--gold); background: var(--paper-deep); color: var(--ink-soft); font-size: 11px; line-height: 1.55; }

.message-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 28px 32px; overscroll-behavior: contain; scroll-behavior: smooth; }

.message-list::-webkit-scrollbar, .conversation-list::-webkit-scrollbar { width: 5px; }

.message-list::-webkit-scrollbar-thumb, .conversation-list::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--line-strong); }

.empty-state { display: grid; place-items: center; align-content: center; min-height: 100%; color: var(--muted); text-align: center; }

.empty-state h3 { margin: 16px 0 6px; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.025em; }

.empty-state p { margin: 0; font-size: 11px; }

.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); }

.empty-icon svg { width: 28px; height: 28px; }

.date-divider { display: flex; align-items: center; gap: 12px; width: min(100%, 320px); margin: 3px auto 22px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-align: center; }

.date-divider::before, .date-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }

.message-row { display: flex; margin: 9px 0; }

.message-row { position: relative; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; }

.message-row.long-pressing .message-bubble { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169, 132, 86, .14); }

.message-row.mine { justify-content: flex-end; }

.message-bubble { max-width: min(70%, 520px); padding: 11px 14px; border: 1px solid var(--line); border-radius: 4px 15px 15px 15px; background: var(--paper); color: var(--ink); box-shadow: 0 4px 12px rgba(40, 44, 35, .035); }

.mine .message-bubble { border-color: var(--olive-dark); border-radius: 15px 4px 15px 15px; background: var(--olive-dark); color: var(--paper); box-shadow: none; }

.message-bubble p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }

.message-link { position: relative; z-index: 2; color: #2d70b3; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; cursor: pointer; }
.message-link:hover { color: #1c4f83; }
.message-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.mine .message-link { color: #b9d9ee; }
.mine .message-link:hover { color: #e0f1ff; }

.message-reference { margin: 0 0 8px; padding: 6px 8px; border-left: 2px solid var(--gold); background: rgba(255, 255, 255, .16); color: inherit; opacity: .82; font-size: 10px; line-height: 1.35; }
.message-reference strong, .message-reference span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-reference strong { font-size: 9px; }
.message-attachment { display: block; max-width: min(100%, 330px); margin-bottom: 8px; overflow: hidden; border-radius: 9px; }
.message-attachment img, .message-attachment video { display: block; width: 100%; max-height: 280px; object-fit: cover; }
.message-attachment.image { background: rgba(32, 39, 33, .06); }
.message-attachment.image img { width: auto; height: auto; max-width: 100%; max-height: min(420px, 55vh); object-fit: contain; }
.message-attachment-fallback { display: block; padding: 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.message-attachment.image.is-broken { border: 1px solid var(--line); background: var(--paper-deep); }
.message-attachment.file { padding: 9px 10px; background: rgba(255, 255, 255, .13); color: inherit; font-size: 11px; text-decoration: none; }
.message-attachment.file:hover { text-decoration: underline; }

.message-bubble time { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }

.mine .message-bubble time { color: #b7c5b8; }

.composer-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 32px 6px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-deep); }
.composer-preview div { min-width: 0; }
.composer-preview span, .composer-preview strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-preview span { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.composer-preview strong { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.composer-preview button, .modal-close { flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.composer { display: flex; align-items: flex-end; gap: 10px; margin: 0 32px 7px; padding: 9px 9px 9px 10px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }

.composer:focus-within { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(82, 101, 85, .09); }

.attachment-button { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border: 0; border-radius: 8px; background: var(--button-soft); color: var(--olive); cursor: pointer; }
.attachment-button:hover { background: var(--button-soft-hover); }
.attachment-button svg { width: 17px; height: 17px; }
.attachment-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.composer textarea { flex: 1; max-height: 130px; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.5; }

.composer textarea::placeholder { color: #a2a8a0; }

.composer-actions { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; }

.send-button { display: grid; place-items: center; width: 37px; height: 37px; border: 0; border-radius: 9px; background: var(--olive-dark); color: #d4ad73; cursor: pointer; transition: background .2s, transform .2s; }

.send-button svg { width: 20px; height: 20px; }

.send-button:hover { background: var(--olive); transform: translateY(-1px); }

.send-button:disabled, .composer textarea:disabled { cursor: not-allowed; opacity: .45; }

.chat-error { min-height: 17px; margin: 0 38px 7px; color: var(--error); font-size: 10px; }

.chat-error:empty { display: none; }

.message-actions { position: fixed; right: 28px; bottom: 78px; z-index: 40; display: grid; min-width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(251, 250, 247, .98); box-shadow: 0 18px 45px rgba(32, 39, 33, .17); }
.message-actions button { padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.message-actions button:hover { background: var(--paper-deep); color: var(--ink); }
.message-actions .danger-action { color: var(--error); }
.conversation-actions { position: fixed; z-index: 45; display: grid; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(251, 250, 247, .98); box-shadow: 0 18px 45px rgba(32, 39, 33, .17); }
.conversation-actions button { min-height: 44px; padding: 10px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.conversation-actions button:hover, .conversation-actions button:focus-visible { background: var(--paper-deep); color: var(--ink); }
.conversation-actions .danger-action { color: var(--error); }
.conversation-pin { display: none; flex: 0 0 auto; width: 14px; height: 14px; color: var(--gold); }
.conversation-item[data-pinned="true"] .conversation-pin { display: block; }
.conversation-item.long-pressing { border-color: var(--gold); background: var(--paper-deep); }
.conversation-confirm-dialog { width: min(100%, 460px); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 26px 70px rgba(32, 39, 33, .22); }
.conversation-confirm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.conversation-confirm-top .eyebrow { margin: 0 0 7px; }
.conversation-confirm-top h2 { margin: 0; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 23px; font-weight: 600; letter-spacing: -.025em; }
.conversation-confirm-description { margin: 18px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.conversation-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.conversation-confirm-actions button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 9px; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.conversation-confirm-actions button:disabled { cursor: wait; opacity: .55; }
.modal-secondary { background: var(--paper); color: var(--ink-soft); }
.modal-secondary:hover { border-color: var(--gold); color: var(--ink); }
.modal-primary { border-color: var(--button-primary); background: var(--button-primary); color: #fff; }
.modal-primary:hover { border-color: var(--button-primary-hover); background: var(--button-primary-hover); }
.modal-primary.danger-action { border-color: var(--button-danger); background: var(--button-danger); }
.modal-primary.danger-action:hover { border-color: var(--error); background: var(--error); }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(32, 39, 33, .28); }
.forward-dialog { width: min(100%, 420px); max-height: min(80dvh, 560px); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 26px 70px rgba(32, 39, 33, .22); }
.forward-dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 15px; border-bottom: 1px solid var(--line); }
.forward-dialog-top .eyebrow { margin: 0 0 7px; }
.forward-dialog-top h2 { margin: 0; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 21px; font-weight: 600; }
.forward-list { max-height: 430px; overflow-y: auto; padding: 10px; }
.forward-target { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.forward-target:hover { background: var(--paper-deep); }
.forward-target .avatar { flex: 0 0 34px; }
.forward-target strong, .forward-target small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forward-target strong { font-size: 11px; }
.forward-target small { margin-top: 3px; color: var(--muted); font-size: 9px; }

/* Settings */
.settings-view { min-height: 100dvh; padding: 18px; background: var(--canvas); }

.settings-shell { min-height: calc(100dvh - 36px); border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }

.settings-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; }

.back-button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: 0; cursor: pointer; }

.back-button svg { width: 18px; height: 18px; color: var(--gold); }

.back-button:hover { color: var(--ink); }

.settings-content { width: min(100%, 640px); margin: 0 auto; padding: clamp(48px, 9vw, 96px) 24px 60px; }

.settings-account-actions { display: flex; justify-content: flex-end; margin: 0 0 24px; }

.settings-logout-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease; }

.settings-logout-button svg { width: 16px; height: 16px; color: var(--gold); }

.settings-logout-button:hover { border-color: var(--gold); background: var(--paper-deep); color: var(--ink); }

.settings-content .eyebrow { margin-top: 0; }

.settings-content h1 { margin: 0; color: var(--ink); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: clamp(48px, 7vw, 76px); font-weight: 400; letter-spacing: -.06em; line-height: .9; }

.settings-content h1 em { color: var(--gold); font-style: italic; }

.settings-intro { max-width: 430px; margin: 25px 0 34px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

.settings-card { padding: clamp(24px, 5vw, 38px); border: 1px solid var(--line); border-radius: 18px; background: #f8f7f3; }

.settings-identity { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }

.settings-identity strong, .settings-identity span { display: block; }

.settings-identity strong { color: var(--ink); font-size: 13px; }

.settings-identity span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.settings-identity-copy { min-width: 0; flex: 1; }

.settings-identity-copy small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }

.avatar-settings-actions { display: flex; align-items: center; flex: 0 0 auto; }

.avatar-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }

.avatar-change-button { padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font-size: 10px; font-weight: 800; cursor: pointer; }

.avatar-change-button:hover { border-color: var(--gold); color: var(--ink); }

.avatar-change-button:disabled { cursor: wait; opacity: .6; }

.settings-status { min-height: 15px; margin: 12px 0 0; color: var(--olive-dark); font-size: 10px; }

.settings-status:empty { display: none; }

.displayname-form { margin-top: 27px; }

.displayname-form label { display: block; margin-bottom: 9px; color: var(--ink); font-size: 11px; font-weight: 800; }

.displayname-form input { width: 100%; padding: 14px 15px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: var(--paper); color: var(--ink); font-size: 14px; transition: border-color .2s, box-shadow .2s; }

.displayname-form input:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(82, 101, 85, .09); }

.field-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 9px; }

.settings-save { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 17px; padding: 14px 16px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 750; cursor: pointer; transition: background .2s, transform .2s; }

.settings-save svg { width: 18px; height: 18px; color: #d4ad73; }

.settings-save:hover { background: var(--olive-dark); transform: translateY(-1px); }

.settings-save:disabled { cursor: wait; opacity: .65; transform: none; }

.settings-note { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .login-view { gap: 50px; padding: 48px; }
  .story-title { font-size: clamp(48px, 7vw, 76px); }
  .chat-view { grid-template-columns: 275px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .login-view { display: block; padding: 28px 20px; }
  .login-story { display: none; }
  .login-panel { display: grid; place-items: center; min-height: calc(100dvh - 56px); max-width: none; }
  .login-card { width: min(100%, 460px); padding: 34px 28px; }
  .chat-view { position: relative; display: flex; flex-direction: column; gap: 0; height: 100dvh; min-height: 0; max-height: 100dvh; padding: 0; }
  .chat-view.mobile-conversation-open .chat-panel { height: 100dvh; }
  .mobile-chat-back { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--ink-soft); cursor: pointer; }
  .mobile-chat-back svg { width: 18px; height: 18px; }
  .mobile-chat-back:hover, .mobile-chat-back:active { background: var(--paper-deep); color: var(--olive-dark); }
  .sidebar, .chat-panel, .browser-panel { border-radius: 0; }
  .sidebar { position: absolute; inset: 0 auto 0 0; z-index: 20; width: min(88vw, 340px); height: 100%; max-height: none; padding: 18px 14px 12px; border-width: 0 1px 0 0; border-radius: 0 18px 18px 0; box-shadow: 18px 0 40px rgba(32, 39, 33, .12); transform: translateX(-105%); transition: transform .25s ease; }
  .chat-view.mobile-sidebar-open .sidebar { transform: translateX(0); }
  .chat-view.mobile-chat-lobby .sidebar { inset: 0; width: 100%; height: auto; border-width: 0; border-radius: 0; box-shadow: none; transform: translateX(0); }
  .chat-view.mobile-chat-lobby .chat-panel { display: none; }
  .sidebar-top { padding-bottom: 15px; }
  .section-label { margin-top: 16px; }
  .conversation-list { display: block; overflow-y: auto; }
  .conversation-item { margin: 0 0 3px; }
  .sidebar-footer { display: block; }
  .chat-panel { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; height: calc(100dvh - 58px); border-width: 0; }
  .browser-panel { position: relative; z-index: 1; flex: 1 1 auto; width: 100%; height: 100dvh; border-width: 0; }
  .browser-toolbar { flex-wrap: wrap; padding: 9px 12px; }
  .browser-address-form { order: 3; flex-basis: 100%; }
  .browser-meta { display: none; }
  .chat-header { justify-content: flex-start; gap: 10px; padding: 18px 17px; }
  .chat-header .chat-contact { flex: 1 1 auto; min-width: 0; }
  .header-chip { display: none; }
  .chat-banner { display: none; }
  .message-list { padding: 19px 17px; }
  .message-bubble { max-width: 84%; }
  .composer-typing { margin: 0 23px 5px; }
  .composer-preview { margin-inline: 17px; }
  .composer { margin: 0 17px 6px; }
  .message-actions { right: 17px; bottom: 72px; left: 17px; padding: 8px; border-radius: 16px; }
  .message-actions button { min-height: 42px; padding: 11px 13px; font-size: 12px; }
  .forward-dialog { width: 100%; }
  .settings-view { padding: 0; }
  .settings-shell { min-height: 100dvh; border-radius: 0; border-width: 0; }
  .settings-top { padding: 18px 17px; }
  .settings-top > span { display: none; }
  .settings-content { padding: 50px 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .shop-progress-bar { transition: none; }
  .workspace-tab-indicator { transition: none; }
}

@media (max-width: 720px) {
  .conversation-actions { right: 17px; bottom: 72px; left: 17px; min-width: 0; padding: 8px; border-radius: 17px; }
  .conversation-actions button { min-height: 46px; padding: 11px 13px; font-size: 12px; }
  .conversation-confirm-dialog { width: 100%; margin-top: auto; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
  .conversation-confirm-actions { justify-content: stretch; }
  .conversation-confirm-actions button { flex: 1 1 0; }
}

/* Button color system */
:root {
  --button-primary: #3f6b5a;
  --button-primary-hover: #2f5044;
  --button-soft: #e8f0eb;
  --button-soft-hover: #d7e5dc;
  --button-accent: #c08a45;
  --button-danger-soft: #f8e8e4;
  --button-danger: #a04f48;
}

button { font-family: inherit; }

button:focus-visible {
  outline: 3px solid rgba(192, 138, 69, .42);
  outline-offset: 2px;
}

.google-button, .settings-save {
  border-color: var(--button-primary);
  background: var(--button-primary);
  color: #fff;
}

.google-button:hover, .settings-save:hover {
  border-color: var(--button-primary-hover);
  background: var(--button-primary-hover);
}

.icon-button {
  border-color: #cbdacf;
  background: var(--button-soft);
  color: var(--button-primary-hover);
}

.icon-button:hover {
  border-color: #b8cdbd;
  background: var(--button-soft-hover);
  color: var(--button-primary-hover);
}

.contact-search-row button {
  border-color: var(--button-primary);
  background: var(--button-primary);
  color: #fff;
  transition: background .2s, border-color .2s, transform .2s;
}

.contact-search-row button:hover {
  border-color: var(--button-primary-hover);
  background: var(--button-primary-hover);
  transform: translateY(-1px);
}

.friend-request-actions button, .contact-result-action {
  border-color: #cbdacf;
  background: var(--button-soft);
  color: var(--button-primary-hover);
  transition: background .2s, border-color .2s, color .2s;
}

.friend-request-actions button:hover, .contact-result-action:hover:not(:disabled) {
  border-color: #b8cdbd;
  background: var(--button-soft-hover);
}

.friend-request-actions button:last-child {
  border-color: #efd0c9;
  background: var(--button-danger-soft);
  color: var(--button-danger);
}

.friend-request-actions button:last-child:hover {
  border-color: #e4b7ae;
  background: #f3d9d3;
}

.contact-result-action {
  border-color: #d3a765;
  background: var(--button-accent);
  color: #fff;
  font-weight: 700;
}

.contact-result-action:hover:not(:disabled) {
  border-color: #a87537;
  background: #a87537;
}

.conversation-item {
  background: #f7f9f6;
}

.conversation-item:hover {
  background: var(--button-soft);
}

.send-button {
  border: 1px solid var(--button-primary);
  background: var(--button-primary);
  color: #fff;
}

.send-button:hover {
  border-color: var(--button-primary-hover);
  background: var(--button-primary-hover);
}

.back-button {
  border: 1px solid #cbdacf;
  padding: 7px 10px;
  border-radius: 999px;
  border-color: #cbdacf;
  background: var(--button-soft);
  color: var(--button-primary-hover);
}

.back-button:hover {
  background: var(--button-soft-hover);
  color: var(--button-primary-hover);
}

.avatar-change-button {
  border-color: #d3a765;
  background: #f5e6d0;
  color: #805b2e;
}

.avatar-change-button:hover {
  border-color: var(--button-accent);
  background: #ecd5b3;
  color: #65461f;
}


/* ==========================================================================
   ARCHITECTURE MODAL & TECH BADGES (10 MULTI-STACK TECH ECOSYSTEM)
   ========================================================================== */
.arch-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.arch-modal-card {
  background: #0f121d;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 28px;
  max-width: 860px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 32px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(212, 175, 55, 0.08);
  position: relative;
}

.arch-header {
  position: relative;
  margin-bottom: 24px;
}

.arch-badge {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--gold, #a98456);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.arch-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
}

.arch-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #888;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arch-close-btn:hover {
  color: #fff;
  border-color: var(--gold, #a98456);
  background: rgba(255, 255, 255, 0.1);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.arch-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.arch-item:hover {
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.tech-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-tag.next { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tech-tag.nuxt { background: rgba(0, 220, 130, 0.15); color: #00dc82; }
.tech-tag.node { background: rgba(104, 160, 99, 0.15); color: #68a063; }
.tech-tag.wp { background: rgba(33, 117, 155, 0.2); color: #3898ec; }
.tech-tag.php { background: rgba(136, 146, 191, 0.2); color: #a4aff5; }
.tech-tag.rust { background: rgba(222, 90, 48, 0.2); color: #f28b66; }
.tech-tag.cpp { background: rgba(0, 89, 156, 0.2); color: #4da6ff; }
.tech-tag.python { background: rgba(255, 212, 59, 0.2); color: #ffd43b; }
.tech-tag.react { background: rgba(97, 218, 251, 0.15); color: #61dafb; }
.tech-tag.vue { background: rgba(66, 184, 131, 0.15); color: #42b883; }

.arch-item h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-top: 4px;
}

.arch-item p {
  font-size: 12px;
  color: #aaa;
}

.arch-item code {
  font-size: 11px;
  color: var(--gold, #a98456);
  background: rgba(212, 175, 55, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.status-pill.online {
  font-size: 11px;
  color: #3dd68c;
  font-weight: 600;
  margin-top: auto;
}

/* ==========================================================================
   Realtime Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(18, 20, 28, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.fade-out {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
}

.toast-success {
  border-color: rgba(61, 214, 140, 0.6);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(61, 214, 140, 0.18);
}

.toast-info {
  border-color: rgba(212, 175, 55, 0.6);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}