:root {
  color-scheme: dark;
  --bg: #111016;
  --panel: #17161e;
  --panel-raised: #1e1c26;
  --panel-soft: #23212c;
  --line: rgba(255,255,255,.065);
  --text: #f4f0fb;
  --muted: #928d9d;
  --faint: #696474;
  --purple: #a58aff;
  --purple-deep: #8263ef;
  --mint: #8be1bd;
  --pink: #f1a0c8;
  --yellow: #ffd57d;
  --danger: #ff7e89;
  font-family: 'DM Sans', Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.hidden { display: none !important; }
.app-shell { display: grid; grid-template-columns: 76px 320px minmax(360px,1fr) 268px; grid-template-rows: minmax(0,1fr); height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: var(--bg); }
.rail { display: flex; align-items: center; flex-direction: column; padding: 22px 0 18px; background: #14131a; border-right: 1px solid var(--line); z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; letter-spacing: -.07em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; background: var(--purple); color: #211a32; font-size: 27px; line-height: 1; font-weight: 800; }
.brand-dot { color: var(--purple); }
.rail-brand { margin-bottom: 48px; }
.rail-nav, .rail-bottom { display: flex; align-items: center; flex-direction: column; gap: 15px; }
.rail-bottom { margin-top: auto; }
.rail-button { position: relative; width: 44px; height: 44px; border: 0; border-radius: 15px; display: grid; place-items: center; color: #827d8d; background: transparent; transition: .18s ease; }
.rail-button:hover { background: #211f29; color: #fff; }
.rail-button.active { color: #fff; background: linear-gradient(135deg,#a88eff,#866af0); box-shadow: 0 6px 20px #8b6cf146; }
.rail-button.active i { position: absolute; width: 4px; height: 20px; left: -17px; border-radius: 9px; background: var(--purple); }
.icon { position: relative; display: inline-block; width: 19px; height: 19px; color: currentColor; }
.icon-chat::before { content: ''; position: absolute; inset: 2px 1px 3px 1px; border: 1.7px solid currentColor; border-radius: 7px; }
.icon-chat::after { content: ''; position: absolute; bottom: 0; left: 4px; width: 5px; height: 5px; border-left: 1.7px solid currentColor; transform: skew(-25deg); }
.icon-users::before { content: '◉'; position: absolute; font-size: 15px; top: -2px; left: 1px; text-shadow: 8px 4px 0 currentColor; }
.icon-users::after { content: ''; position: absolute; left: 0; right: -3px; bottom: -1px; height: 8px; border: 1.7px solid currentColor; border-bottom: 0; border-radius: 10px 10px 2px 2px; }
.icon-spark::before { content: '✦'; position: absolute; font-size: 21px; top: -3px; left: -1px; }
.icon-shield::before { content: '⬡'; position: absolute; font-size: 24px; top: -5px; left: -2px; }
.icon-logout::before { content: '↗'; position: absolute; inset: -3px 0 0 0; font-size: 23px; transform: rotate(45deg); }
.icon-search { width: 16px; height: 16px; border: 1.6px solid currentColor; border-radius: 50%; transform: scale(.8); }
.icon-search::after { content: ''; position: absolute; width: 7px; height: 1.6px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(48deg); border-radius: 2px; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 15px; color: #251c35; background: linear-gradient(135deg,#c0a8ff,#ffd3b3); font-weight: 700; overflow: hidden; }
.avatar img, .avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-self { width: 37px; height: 37px; border-radius: 13px; background: linear-gradient(140deg,#8be1bd,#b6f0d8); color: #163226; }
.sidebar { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; background: var(--panel); border-right: 1px solid var(--line); }
.sidebar-header { padding: 29px 22px 16px; }
.sidebar-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.small-label, .eyebrow { color: var(--faint); font-size: 9px; letter-spacing: .17em; font-weight: 700; }
.sidebar h2 { margin: 5px 0 0; font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: -.04em; }
.round-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 13px; color: var(--purple); background: #24212e; font-size: 23px; transition: .18s; }
.round-button:hover { color: #221b31; background: var(--purple); }
.search-box { display: flex; align-items: center; gap: 11px; height: 41px; padding: 0 11px; border: 1px solid transparent; border-radius: 12px; color: #827d8c; background: #211f28; transition: .2s; }
.search-box:focus-within { border-color: #8263ef75; }
.search-box input { flex: 1; width: 10px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #716c79; }
kbd { padding: 3px 5px; border: 1px solid #393642; border-radius: 5px; color: #6f6a78; font-size: 8px; }
.sidebar-tabs { display: flex; gap: 4px; padding: 0 18px 11px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }
.tab.active { color: #d6caff; background: #30273d; }
.tab span:empty { display: none; }
.sidebar-content { flex: 1; overflow: auto; padding: 10px 11px; scrollbar-color: #36323f transparent; scrollbar-width: thin; }
.list-heading { padding: 14px 11px 8px; color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.friend-row { position: relative; display: flex; width: 100%; align-items: center; gap: 11px; padding: 10px 10px; border: 0; border-radius: 13px; color: var(--text); text-align: left; background: transparent; transition: .16s; }
.friend-row:hover { background: #211f28; }
.friend-row.selected { background: #292534; }
.friend-row.selected::before { position: absolute; left: -11px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: var(--purple); content: ''; }
.friend-avatar { position: relative; }
.presence { position: absolute; right: -1px; bottom: 0; width: 10px; height: 10px; border: 2px solid var(--panel); border-radius: 50%; background: #65616d; }
.presence.online, .online-dot { background: #77d8a9; box-shadow: 0 0 0 3px #77d8a91a; }
.friend-summary { min-width: 0; flex: 1; }
.friend-name-line, .friend-preview-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.friend-name { overflow: hidden; color: #e8e4ee; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.friend-time { flex-shrink: 0; color: #74707e; font-size: 9px; }
.friend-preview { overflow: hidden; margin-top: 5px; color: #837e8d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.unread-badge { display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 5px; border-radius: 8px; color: #251b38; background: var(--purple); font-size: 9px; font-weight: 700; }
.empty-sidebar { padding: 25px 15px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.sidebar-bottom-card { display: flex; flex-direction: column; gap: 5px; padding: 13px 18px 17px; border-top: 1px solid var(--line); color: #706b79; font-size: 9px; }
.mini-status { color: #c3bdcb; font-size: 10px; }
.online-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; }
.main-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; background: #14131a; }
.topbar { display: flex; min-height: 77px; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--line); }
.topbar-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-user-name { font-size: 13px; font-weight: 700; }
.topbar-user-sub { margin-top: 3px; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-action { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: #a39dac; background: #1c1a23; }
.icon-action:hover { color: var(--purple); border-color: #a58aff66; }
.icon-action:disabled { opacity: .35; cursor: not-allowed; }
.main-content { position: relative; display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.welcome { position: relative; display: grid; flex: 1; place-items: center; overflow: hidden; padding: 30px; }
.welcome::before, .welcome::after { position: absolute; width: 470px; height: 470px; border-radius: 50%; content: ''; filter: blur(75px); opacity: .13; pointer-events: none; }
.welcome::before { top: 6%; left: 15%; background: #896bfa; }
.welcome::after { right: 4%; bottom: 4%; width: 360px; height: 360px; background: #d77ab3; opacity: .08; }
.welcome-card { position: relative; z-index: 1; max-width: 470px; text-align: center; }
.welcome-symbol { display: grid; width: 88px; height: 88px; place-items: center; margin: 0 auto 26px; border: 1px solid #c4a9ff30; border-radius: 30px; color: #251d36; background: linear-gradient(135deg,#bba6ff,#8f72fc); box-shadow: 0 15px 55px #8768fa35; font-family: Manrope,sans-serif; font-size: 60px; font-weight: 800; transform: rotate(-6deg); }
.welcome-card .eyebrow { color: var(--purple); }
.welcome-card h1 { margin: 13px 0 11px; font-family: Manrope,sans-serif; font-size: clamp(30px,4vw,45px); letter-spacing: -.055em; }
.welcome-card p { max-width: 360px; margin: auto; color: #9d98a6; font-size: 13px; line-height: 1.7; }
.welcome-cards { display: flex; justify-content: center; gap: 9px; margin-top: 28px; }
.welcome-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; color: #b4adbf; background: #201e27; font-size: 10px; }
.welcome-cta { margin-top: 25px; }
.message-view { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.messages-scroll { display: flex; min-height: 0; flex: 1 1 0%; flex-direction: column; gap: 11px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 22px 28px; scrollbar-width: thin; scrollbar-color: #50495e transparent; }
.date-divider { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; margin: 8px 0 13px; color: #736e7d; font-size: 9px; }
.date-divider::before, .date-divider::after { height: 1px; flex: 1; background: var(--line); content: ''; }
.message-row { display: flex; flex: 0 0 auto; align-items: flex-end; gap: 9px; max-width: 78%; }
.message-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.message-bubble-wrap { min-width: 0; }
.message-author { margin: 0 0 5px 8px; color: #96909f; font-size: 9px; }
.message-bubble { padding: 11px 14px; border: 1px solid #ffffff08; border-radius: 5px 16px 16px 16px; color: #e8e4ed; background: #22202a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.mine .message-bubble { border-radius: 16px 5px 16px 16px; background: linear-gradient(135deg,#4a3d71,#3b3159); }
.message-meta { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin: 5px 4px 0; color: #7d7787; font-size: 8px; }
.message-photo { display: block; width: min(280px, 100%); max-height: 320px; margin-bottom: 5px; border-radius: 10px; object-fit: cover; cursor: zoom-in; }
.message-reactions { display: flex; gap: 5px; margin: 6px 0 0; }
.reaction { padding: 3px 7px; border: 1px solid #ffffff17; border-radius: 99px; background: #292633; font-size: 11px; }
.reaction.mine-reaction { border-color: #ab90ff; background: #463a66; }
.reaction-menu-wrap { position: relative; }
.reaction-picker-trigger { width: 27px; height: 24px; padding: 0; border: 1px solid #ffffff17; border-radius: 99px; color: #a8a1b1; background: #292633; font-size: 13px; }
.reaction-picker-trigger:hover { border-color: #ab90ff88; color: #d8caff; }
.reaction-picker { position: absolute; z-index: 9; left: 0; bottom: calc(100% + 7px); display: flex; width: 190px; flex-wrap: wrap; gap: 3px; padding: 7px; border: 1px solid #ffffff18; border-radius: 12px; background: #211e2b; box-shadow: 0 12px 30px #0008; }
.reaction-option { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 8px; background: transparent; font-size: 16px; }
.reaction-option:hover { background: #373144; transform: scale(1.12); }
.composer-wrap { padding: 12px 24px 20px; }
.composer { position: relative; display: flex; align-items: flex-end; gap: 10px; padding: 11px 11px 11px 13px; border: 1px solid #393540; border-radius: 16px; background: #1c1a23; transition: .2s; }
.composer:focus-within { border-color: #9273eb99; box-shadow: 0 0 0 3px #9273eb13; }
.composer textarea { max-height: 140px; min-height: 22px; flex: 1; resize: none; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; line-height: 1.6; }
.composer textarea::placeholder { color: #777280; }
.composer-tools { display: flex; align-items: center; gap: 5px; }
.emoji-picker { position: absolute; z-index: 8; right: 47px; bottom: calc(100% + 9px); display: grid; grid-template-columns: repeat(6, 36px); gap: 4px; width: max-content; max-width: calc(100vw - 32px); padding: 9px; border: 1px solid #ffffff18; border-radius: 14px; background: #211e2b; box-shadow: 0 14px 35px #0008; }
.emoji-choice { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 10px; background: transparent; font-size: 19px; transition: .15s; }
.emoji-choice:hover { background: #373144; transform: scale(1.12); }
.tool-button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 10px; color: #8e8997; background: transparent; font-size: 18px; }
.tool-button:hover { color: var(--purple); background: #302b3b; }
.send-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; padding: 0 15px; border: 0; border-radius: 11px; color: #241c34; background: linear-gradient(135deg,#b69fff,#9679f9); font-size: 11px; font-weight: 700; box-shadow: 0 4px 15px #9a7cf32b; transition: .16s; }
.send-button:hover, .primary-button:hover { filter: brightness(1.09); transform: translateY(-1px); }
.send-button { width: 37px; min-height: 37px; padding: 0; font-size: 16px; }
.send-button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.typing-note { min-height: 18px; padding: 0 8px 3px; color: #a891e9; font-size: 9px; }
.detail-panel { display: flex; min-height: 0; flex-direction: column; gap: 22px; overflow-y: auto; padding: 28px 19px; border-left: 1px solid var(--line); background: #17161d; }
.detail-title { display: flex; align-items: center; justify-content: space-between; color: #e0dce7; font-size: 11px; font-weight: 700; }
.detail-profile { display: flex; align-items: center; flex-direction: column; padding: 12px 0 5px; text-align: center; }
.detail-profile .avatar { width: 78px; height: 78px; border-radius: 25px; font-size: 24px; }
.detail-profile-name { margin-top: 13px; font-family: Manrope,sans-serif; font-size: 16px; font-weight: 700; }
.detail-profile-handle { margin-top: 4px; color: #817b8a; font-size: 10px; }
.detail-profile-about { max-width: 195px; margin-top: 11px; color: #a8a2b1; font-size: 10px; line-height: 1.6; }
.detail-section { padding-top: 16px; border-top: 1px solid var(--line); }
.detail-section .detail-title { margin-bottom: 12px; }
.detail-info-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; color: #a39eaa; font-size: 10px; }
.detail-info-row span:last-child { color: #e2dde9; }
.shared-photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.shared-photo-grid img { width: 100%; aspect-ratio: 1; border-radius: 7px; background: #272430; object-fit: cover; cursor: pointer; }
.detail-empty { display: grid; flex: 1; place-items: center; color: #777280; font-size: 10px; text-align: center; }
.view-content { min-height: 0; flex: 1; overflow-y: auto; padding: 30px; scrollbar-width: thin; scrollbar-color: #36323f transparent; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 3px 0 25px; }
.page-heading h1 { margin: 5px 0 0; font-family: Manrope,sans-serif; font-size: 30px; letter-spacing: -.05em; }
.page-heading p { margin: 9px 0 0; color: #9c97a5; font-size: 11px; line-height: 1.6; }
.eyebrow { color: var(--purple); }
.content-card { margin-bottom: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #1b1922; }
.content-card-title { margin: 0 0 12px; font-size: 12px; font-weight: 700; }
.request-card, .member-card, .invite-card { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.request-card:last-child, .member-card:last-child, .invite-card:last-child { border-bottom: 0; }
.request-info, .member-info, .invite-info { min-width: 0; flex: 1; }
.request-info strong, .member-info strong, .invite-info strong { display: block; font-size: 11px; }
.request-info span, .member-info span, .invite-info span { display: block; margin-top: 4px; color: #86818f; font-size: 9px; }
.request-actions { display: flex; gap: 5px; }
.small-action { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #bfb8cb; background: #26232e; }
.small-action.accept { color: var(--mint); }
.small-action.reject, .danger-button { color: var(--danger); }
.small-action:hover, .danger-button:hover { background: #302c39; }
.secondary-button, .danger-button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: #c4becd; background: #27242e; font-size: 10px; font-weight: 600; }
.secondary-button:hover { border-color: #a58aff66; color: var(--purple); }
.field { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; }
.field label { color: #a7a1ae; font-size: 10px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border: 1px solid #383541; border-radius: 10px; outline: 0; color: var(--text); background: #17151d; font-size: 11px; }
.field input:focus, .field textarea:focus { border-color: #9b7afc; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field-hint { color: #777280; font-size: 9px; line-height: 1.5; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; }
.inline-form .field { flex: 1; }
.member-search { width: 100%; }
.updates-list { display: flex; flex-direction: column; gap: 12px; }
.update-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #1c1a23; }
.update-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.update-version { padding: 5px 8px; border-radius: 7px; color: #cbbaff; background: #302741; font-size: 9px; font-weight: 700; }
.update-card h3 { margin: 8px 0; font-family: Manrope,sans-serif; font-size: 17px; letter-spacing: -.03em; }
.update-content { color: #b0aab7; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.update-date { margin-top: 13px; color: #777280; font-size: 9px; }
.update-attachment { display: inline-flex; align-items: center; gap: 8px; margin-top: 13px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: #d8d0eb; background: #26232e; font-size: 10px; text-decoration: none; }
.update-cover { width: 100%; max-height: 260px; margin: 13px 0 2px; border-radius: 12px; object-fit: cover; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.member-filter { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: #938aa3; background: #17151d; }
.member-filter:focus-within { border-color: #9b7afc88; box-shadow: 0 0 0 3px #9273eb13; }
.member-filter input { width: 100%; min-width: 0; height: 39px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 10px; }
.member-filter input::placeholder { color: #777280; }
.member-count { color: #a59dae; font-size: 9px; white-space: nowrap; }
.member-list { max-height: 430px; }
.member-card { min-height: 67px; }
.member-card-disabled { opacity: .72; }
.member-state { color: #a19baa !important; font-weight: 600; }
.member-state-online { color: var(--mint) !important; }
.member-state-disabled { color: var(--danger) !important; }
.admin-protected { padding: 6px 9px; border: 1px solid #a58aff26; border-radius: 9px; color: #c8b9ff; background: #302741; font-size: 9px; white-space: nowrap; }
.member-action { flex: 0 0 auto; min-height: 32px; padding: 0 10px; border: 1px solid #ff7e8933; border-radius: 9px; color: #ff9ca4; background: #39232c; font-size: 9px; font-weight: 700; transition: .15s; }
.member-action:hover { border-color: #ff7e8977; background: #4a2934; }
.member-action-enable { border-color: #8be1bd30; color: #9ce8c8; background: #20352e; }
.member-action-enable:hover { border-color: #8be1bd80; background: #294438; }
.admin-empty { padding: 20px 8px; color: #8f8998; font-size: 10px; text-align: center; }
.admin-shortcuts, .admin-member-actions { display: flex; align-items: center; gap: 7px; }
.admin-member-actions { flex: 0 0 auto; }
.admin-overview { margin-bottom: 13px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.admin-stat { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #17151d; }
.admin-stat strong { display: block; color: #e9e2f5; font-family: Manrope,sans-serif; font-size: 20px; }
.admin-stat span { display: block; margin-top: 4px; color: #928b9b; font-size: 9px; }
.admin-activity-heading { margin: 20px 0 8px; }
.admin-activity-list { display: flex; max-height: 440px; flex-direction: column; overflow-y: auto; }
.admin-activity-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.admin-activity-copy { min-width: 0; flex: 1; }
.admin-activity-copy > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.admin-activity-copy strong { color: #ded8e7; font-size: 10px; }
.admin-activity-space, .admin-activity-copy time { color: #817a8a; font-size: 9px; }
.admin-activity-space { padding: 3px 6px; border-radius: 6px; background: #292531; }
.admin-activity-copy p { margin: 5px 0 0; color: #b5aebb; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.admin-activity-row > .small-action { flex: 0 0 auto; }
.message-delete { align-self: center; padding: 0 5px; border: 0; color: #8e8795; background: transparent; font-size: 14px; }
.message-delete:hover { color: var(--danger); }
.channel-readonly-note { padding: 17px 18px max(17px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #aaa3b2; background: #18161e; text-align: center; font-size: 10px; }
.invite-code { color: #d7c7ff !important; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; }
.copy-button { display: flex; align-items: center; gap: 5px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--purple); background: #322a41; font-size: 9px; }
.table-list { max-height: 370px; overflow-y: auto; }
.search-result { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.search-result:last-child { border: 0; }
.search-result-info { min-width: 0; flex: 1; }
.search-result-info strong { display: block; font-size: 11px; }
.search-result-info span { display: block; margin-top: 4px; color: #87818e; font-size: 9px; }
.result-status { color: #77d8a9 !important; }
.toast { position: fixed; z-index: 20; top: 20px; left: 50%; max-width: calc(100vw - 32px); padding: 11px 17px; border: 1px solid #a58aff42; border-radius: 12px; color: #f4eeff; background: #292435; box-shadow: 0 12px 40px #0007; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%,-10px); transition: .22s; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(400px,1.08fr) minmax(430px,.92fr); }
.auth-showcase { position: relative; display: flex; min-height: 100vh; flex-direction: column; overflow: hidden; padding: 40px 8vw 28px; background: #1a1722; }
.auth-showcase::before { position: absolute; inset: 0; background: radial-gradient(ellipse at 16% 86%,#9d72e726 0,transparent 48%),radial-gradient(ellipse at 70% 20%,#57407b26 0,transparent 52%); content: ''; pointer-events: none; }
.auth-showcase > * { position: relative; z-index: 1; }
.showcase-copy { margin-top: auto; margin-bottom: auto; padding: 58px 0 32px; }
.showcase-copy .eyebrow { display: flex; align-items: center; gap: 8px; color: #b6a3ed; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px #8be1bd20; }
.showcase-copy h1 { margin: 23px 0 16px; font-family: Manrope,sans-serif; font-size: clamp(58px,7vw,96px); line-height: .99; letter-spacing: -.075em; }
.showcase-copy h1 em { color: var(--purple); font-style: normal; }
.showcase-copy p { max-width: 390px; color: #9b95a6; font-size: 14px; line-height: 1.7; }
.showcase-people { position: absolute; right: 6%; bottom: 13%; width: 300px; height: 190px; opacity: .85; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid #a58aff20; border-radius: 50%; transform: translate(-50%,-50%) rotate(-24deg); }
.orbit-one { width: 265px; height: 120px; }
.orbit-two { width: 220px; height: 180px; transform: translate(-50%,-50%) rotate(54deg); }
.person-chip { position: absolute; display: flex; align-items: center; gap: 8px; padding: 7px 11px 7px 7px; border: 1px solid #ffffff1c; border-radius: 30px; color: #e9e2f2; background: #282432cf; font-size: 10px; box-shadow: 0 8px 22px #0004; backdrop-filter: blur(8px); }
.person-chip i { color: var(--mint); font-size: 6px; font-style: normal; }
.chip-a { top: 18px; left: 25px; }.chip-b { top: 75px; right: 7px; }.chip-c { bottom: 12px; left: 72px; }
.face { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; font-weight: 700; }.face-1 { background: #f1a0c8; color: #492838; }.face-2 { background: #88c9df; color: #1e3b48; }.face-3 { background: #ffd57d; color: #4b3b17; }
.floating-spark { position: absolute; color: #bba6ff; }.spark-one { top: 25px; right: 61px; font-size: 22px; }.spark-two { bottom: 27px; right: 32px; color: #f2aaad; font-size: 16px; }
.auth-footer { display: flex; justify-content: space-between; color: #777181; font-size: 9px; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: #131219; }
.auth-card { width: min(100%, 390px); }
.mobile-brand { display: none; margin-bottom: 36px; }
.auth-kicker { color: var(--purple); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.auth-card h2 { margin: 9px 0 8px; font-family: Manrope,sans-serif; font-size: 29px; letter-spacing: -.055em; }
.auth-subtitle { margin: 0 0 23px; color: #9993a2; font-size: 11px; line-height: 1.65; }
.auth-card .field { margin: 14px 0; }
.auth-card .field input { padding: 13px; }
.auth-submit { width: 100%; margin-top: 8px; min-height: 43px; }
.auth-switch { margin: 18px 0 0; color: #9892a0; text-align: center; font-size: 10px; }
.auth-switch button { padding: 0; border: 0; color: #baa7ff; background: transparent; font-size: inherit; font-weight: 700; }
.auth-legal { margin-top: 30px; color: #686372; text-align: center; font-size: 9px; }
.auth-error { margin: 11px 0; padding: 10px; border: 1px solid #ff7e8935; border-radius: 9px; color: #ffa2aa; background: #3a2028; font-size: 10px; }
.admin-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 8px; border-radius: 7px; color: #c8b9ff; background: #332a45; font-size: 9px; }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 18px; background: #08070dbb; backdrop-filter: blur(8px); }
.modal { width: min(100%,460px); max-height: min(88vh,750px); overflow: auto; padding: 22px; border: 1px solid #ffffff16; border-radius: 19px; background: #1b1922; box-shadow: 0 25px 90px #0008; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-header h2 { margin: 4px 0 0; font-family: Manrope,sans-serif; font-size: 20px; letter-spacing: -.04em; }
.close-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #9c96a4; background: #25232d; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.photo-preview { display: block; max-width: 100%; max-height: 55vh; margin: auto; border-radius: 10px; object-fit: contain; }
.call-modal { position: fixed; z-index: 35; inset: 0; display: grid; place-items: center; overflow: hidden; padding: 20px; background: radial-gradient(ellipse at 50% 25%,#4c376b,#131119 65%); }
.call-card { position: relative; display: flex; width: min(100%,600px); min-height: 430px; align-items: center; flex-direction: column; justify-content: center; overflow: hidden; border: 1px solid #ffffff1c; border-radius: 25px; background: #17141dc9; box-shadow: 0 20px 80px #0009; }
.call-avatar { display: grid; width: 104px; height: 104px; place-items: center; border-radius: 35px; background: linear-gradient(135deg,#c1aaff,#f1a0c8); color: #2c203c; font-size: 35px; font-weight: 700; box-shadow: 0 0 0 18px #ffffff08; }
.call-name { margin-top: 25px; font-family: Manrope,sans-serif; font-size: 22px; font-weight: 700; }
.call-state { margin-top: 7px; color: #aaa3b2; font-size: 11px; }
.call-controls { position: absolute; right: 0; bottom: 26px; left: 0; display: flex; justify-content: center; gap: 12px; }
.call-control { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #ffffff20; border-radius: 17px; color: #ede7f4; background: #34303d; font-size: 19px; }
.call-control.end { color: #fff; background: #db5e6f; transform: rotate(135deg); }
.call-control.accept { background: #50aa7b; }
.call-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #100e15; object-fit: cover; }
.call-video.local { top: 14px; right: 14px; bottom: auto; left: auto; width: 125px; height: 170px; border: 1px solid #ffffff30; border-radius: 13px; box-shadow: 0 8px 28px #0008; }
.call-card.video .call-avatar, .call-card.video .call-name, .call-card.video .call-state { position: relative; z-index: 1; text-shadow: 0 2px 8px #000; }
.call-card.video .call-controls { z-index: 2; }
.call-pill { margin-left: auto; padding: 5px 8px; border: 1px solid #8be1bd40; border-radius: 8px; color: var(--mint); background: #294336; font-size: 9px; }
.photo-preview-row { display: flex; align-items: center; gap: 10px; margin: 7px 0 0; color: #a8a2b0; font-size: 10px; }
.photo-preview-row img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.remove-photo { border: 0; color: var(--danger); background: transparent; font-size: 10px; }
.update-empty { padding: 30px 20px; border: 1px dashed #3a3544; border-radius: 14px; color: #898391; text-align: center; font-size: 11px; line-height: 1.7; }
.shake { animation: shake .25s linear 2; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 68px 285px minmax(300px,1fr); }
  .detail-panel { display: none; }
  .rail-button.active i { left: -13px; }
}
@media (max-width: 760px) {
  .app-shell { position: relative; grid-template-columns: 58px minmax(0,1fr); }
  .rail { padding-top: 15px; }
  .rail-brand { margin-bottom: 34px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 12px; font-size: 24px; }
  .rail-button { width: 40px; height: 40px; }
  .rail-button.active i { left: -9px; }
  .sidebar { grid-column: 2; grid-row: 1; }
  .main-panel { display: none; grid-column: 2; grid-row: 1; }
  .app-shell.chat-open .sidebar { display: none; }
  .app-shell.chat-open .main-panel { display: flex; }
  .sidebar-header { padding: 19px 15px 12px; }
  .sidebar h2 { font-size: 21px; }
  .sidebar-tabs { padding-right: 10px; padding-left: 10px; }
  .sidebar-content { padding-right: 6px; padding-left: 7px; }
  .sidebar-bottom-card { padding: 11px 14px 14px; }
  .topbar { min-height: 67px; padding: 0 13px; }
  .topbar-user-name { font-size: 12px; }
  .icon-action { width: 32px; height: 32px; }
  .messages-scroll { padding: 18px 13px; }
  .message-row { max-width: 92%; }
  .composer-wrap { padding: 9px 10px 12px; }
  .send-label { display: none; }
  .view-content { padding: 22px 15px; }
  .admin-grid { grid-template-columns: 1fr; }
  .member-card { align-items: flex-start; flex-wrap: wrap; }
  .member-info { flex: 1 1 calc(100% - 60px); }
  .member-action, .admin-protected { margin-left: auto; }
  .admin-shortcuts { flex-wrap: wrap; }
  .admin-stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-stat:last-child { grid-column: span 2; }
  .admin-member-actions { width: 100%; justify-content: flex-end; }
  .auth-shell { display: block; min-height: 100vh; }
  .auth-showcase { display: none; }
  .auth-panel { min-height: 100vh; padding: 24px; }
  .mobile-brand { display: inline-flex; }
  .auth-card { max-width: 420px; }
  .auth-card h2 { font-size: 27px; }
  .call-card { min-height: min(75vh,560px); }
  .welcome-cards { flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .rail { padding-left: 0; padding-right: 0; }
  .auth-panel { padding: 20px; }
  .composer { gap: 4px; padding: 8px; }
  .tool-button { width: 29px; }
  .send-button { width: 32px; min-height: 32px; }
  .inline-form { align-items: stretch; flex-direction: column; }
}

/* Media, group chats and small-screen touch controls */
.group-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; color: #d7c9ff; background: linear-gradient(135deg,#453764,#2a2634); }
.group-member { padding: 8px 0; border-bottom: 1px solid var(--line); }
.group-pick-title { margin: 18px 0 8px; }
.group-pick-list { display: flex; max-height: 300px; flex-direction: column; overflow: auto; }
.group-pick-row { display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 12px; }
.group-pick-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.group-pick-row input { width: 17px; height: 17px; margin-left: auto; accent-color: #a58aff; }
.message-video { display: block; width: min(360px, 100%); max-height: 380px; margin-bottom: 5px; border-radius: 13px; background: #0c0b10; object-fit: contain; }
.message-video.video-note { width: min(245px, 68vw); aspect-ratio: 1; max-height: none; border-radius: 50%; object-fit: cover; }
.photo-preview-row video { width: 52px; height: 52px; border-radius: 9px; background: #09080d; object-fit: cover; }
.video-note-modal { display: flex; max-height: min(90dvh, 760px); flex-direction: column; align-items: stretch; }
.video-note-preview { display: block; width: min(330px, 72vw); aspect-ratio: 1; align-self: center; border: 1px solid #ffffff1c; border-radius: 50%; background: #09080d; object-fit: cover; }
.video-note-preview.live { transform: scaleX(-1); }
.recording-caption { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 13px; color: #c1bacb; font-size: 11px; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef6375; box-shadow: 0 0 0 4px #ef637526; animation: recording-pulse 1.2s infinite; }
.call-control.is-off { color: #ffe6e8; border-color: #ff7e8955; background: #632c39; }
.call-control { touch-action: manipulation; }
@keyframes recording-pulse { 50% { opacity: .45; transform: scale(.85); } }
@media (max-width: 760px) {
  .call-modal { min-height: 100vh; min-height: 100dvh; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .call-card { width: 100%; min-height: min(78dvh, 680px); border-radius: 20px; }
  .call-controls { bottom: max(20px, env(safe-area-inset-bottom)); gap: 10px; }
  .call-control { width: 50px; height: 50px; border-radius: 17px; }
  .composer { gap: 3px; }
  .composer .tool-button { flex: 0 0 30px; }
  .message-video.video-note { width: min(225px, 64vw); }
}

/* Video call controls stay at the edges so the center of the picture stays clear. */
.call-card.video {
  width: min(100%, 1100px);
  height: min(82dvh, 820px);
  min-height: 420px;
  background: #09080d;
}
.call-card.video.expanded {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
}
.call-modal.video-call-modal.call-expanded { padding: 0; }
.call-card.video .call-video { z-index: 0; }
.call-card.video::after {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 150px;
  background: linear-gradient(transparent, #09080dbb);
  content: "";
  pointer-events: none;
}
.call-card.video .call-video.local { z-index: 2; top: 18px; right: 18px; width: clamp(92px, 16vw, 190px); height: clamp(126px, 24vh, 230px); }
.call-card.video .call-video.local.self-hidden { display: none; }
.call-video-header {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  display: flex;
  max-width: calc(100% - 230px);
  align-items: center;
  gap: 10px;
  padding: 9px 13px 9px 9px;
  border: 1px solid #ffffff20;
  border-radius: 16px;
  background: #15131bcc;
  box-shadow: 0 8px 26px #0005;
  backdrop-filter: blur(14px);
}
.call-video-header .call-avatar.compact {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
  box-shadow: none;
  font-size: 15px;
}
.call-video-title { min-width: 0; }
.call-video-header .call-name { overflow: hidden; margin: 0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.call-video-header .call-state { overflow: hidden; margin: 3px 0 0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.call-duration { flex: 0 0 auto; margin-left: 4px; padding: 5px 7px; border-radius: 8px; color: #f4f0fa; background: #ffffff14; font-variant-numeric: tabular-nums; font-size: 10px; }
.call-card.video .call-controls { z-index: 4; bottom: max(24px, env(safe-area-inset-bottom)); }
.call-card.video .call-control { border-color: #ffffff2b; background: #282530e8; box-shadow: 0 8px 24px #0005; backdrop-filter: blur(12px); }
.call-card.video .call-control.end { background: #db5e6f; }
.call-card.video .call-control.is-off { background: #632c39; }
@media (max-width: 760px) {
  .call-modal.video-call-modal { padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .call-card.video { height: min(84dvh, 760px); min-height: 0; border-radius: 20px; }
  .call-card.video.expanded { width: 100%; height: 100dvh; border-radius: 0; }
  .call-video-header { top: 12px; left: 12px; max-width: calc(100% - 145px); gap: 7px; padding: 7px 9px 7px 7px; }
  .call-video-header .call-avatar.compact { width: 32px; height: 32px; flex-basis: 32px; border-radius: 11px; font-size: 13px; }
  .call-video-header .call-name { font-size: 11px; }
  .call-video-header .call-state { font-size: 9px; }
  .call-duration { padding: 4px 6px; font-size: 9px; }
  .call-card.video .call-video.local { top: 12px; right: 12px; width: 82px; height: 116px; border-radius: 12px; }
  .call-card.video .call-controls { bottom: max(14px, env(safe-area-inset-bottom)); gap: 7px; }
  .call-card.video .call-control { width: 44px; height: 44px; border-radius: 15px; font-size: 17px; }
}

.group-owner-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 11px; border: 1px solid #a58aff24; border-radius: 12px; background: #a58aff0a; }
.group-owner-tools > span { color: var(--muted); font-size: 10px; }
.group-owner-tools .secondary-button { min-height: 36px; color: #d4c5ff; }
.group-owner-tools .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.group-pick-row > span { min-width: 0; flex: 1; }
.member-remove-button { flex: 0 0 auto; min-height: 30px; padding: 0 9px; border: 1px solid #ff84902a; border-radius: 9px; color: #ff9ba5; background: #ff84900d; font-size: 10px; font-weight: 600; }
.member-remove-button:hover { border-color: #ff849060; background: #ff849018; }
.group-dissolve { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 13px 0 0; border-top: 1px solid var(--line); }
.group-dissolve > div { display: grid; gap: 4px; }
.group-dissolve strong { color: #e8dfe8; font-size: 11px; }
.group-dissolve span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.group-dissolve .danger-button { min-height: 36px; border-color: #ff849033; white-space: nowrap; }
@media (max-width: 480px) {
  .group-owner-tools { align-items: flex-start; flex-direction: column; }
  .group-dissolve { align-items: flex-start; }
}

/* Gifts and private DeepSeek chat */
.sidebar-actions { display: flex; align-items: center; gap: 7px; }
.gift-shop-launch { color: #f3d089; background: linear-gradient(145deg,#302734,#251f2e); font-size: 17px; }
.gift-shop-launch:hover { color: #fff1bc; border-color: #f1c77477; background: #49364b; }
.ai-avatar { color: #fff; background: radial-gradient(circle at 27% 22%,#f6c4ff,#9879ff 50%,#3f56a3); box-shadow: 0 0 24px #9f80ff35; }
.ai-chat-row { border: 1px solid #a88cff16; background: linear-gradient(105deg,#251f31,#211e28 70%); }
.ai-chat-row:hover, .ai-chat-row.selected { background: linear-gradient(105deg,#302741,#292532); }
.ai-online-pill, .ai-model-pill { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #a88cff28; border-radius: 99px; color: #c8b6ff; background: #a88cff10; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.ai-model-pill { align-self: center; }
.ai-welcome-avatar { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 25px; font-size: 37px; }
.ai-welcome .welcome-card { max-width: 500px; }
.ai-disclaimer, .ai-footnote { color: #777280; font-size: 9px; line-height: 1.5; }
.ai-chat-view .composer-wrap { padding-top: 10px; }
.ai-composer { align-items: flex-end; }
.ai-composer textarea { min-height: 22px; }
.ai-footnote { padding: 7px 8px 0; text-align: center; }
.ai-typing-note:not(:empty) { min-height: 21px; color: #c1aaff; }
.ai-message-bubble { min-width: 76px; border-color: #a58aff20; background: linear-gradient(145deg,#262331,#211f29); }
.ai-message-row:not(.mine) .message-author { color: #c4aaff; }
.ai-message-row:not(.mine) .message-meta { justify-content: flex-start; }
.ai-dots { display: inline-flex; align-items: center; gap: 5px; min-height: 14px; }
.ai-dots i { width: 5px; height: 5px; border-radius: 50%; background: #bea8ff; animation: ai-dot-bounce .85s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .12s; }.ai-dots i:nth-child(3) { animation-delay: .24s; }
@keyframes ai-dot-bounce { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.gift-message-card { position: relative; display: flex; min-width: 225px; align-items: center; gap: 11px; overflow: hidden; margin: 0 0 7px; padding: 13px 11px; border: 1px solid #ffffff1c; border-radius: 13px; background: radial-gradient(ellipse at 18% 20%,#ffffff1f,transparent 50%),linear-gradient(125deg,#393047,#30273b); animation: gift-arrive .55s cubic-bezier(.18,.8,.28,1.2) both; }
.gift-message-card::after { position: absolute; right: 36px; bottom: -35px; width: 95px; height: 95px; border: 1px solid #ffffff15; border-radius: 50%; content: ''; }
.gift-message-spark { position: absolute; top: 5px; right: 8px; color: #fff3c3; font-size: 11px; animation: gift-sparkle 1.8s ease-in-out infinite; }
.gift-message-emoji { z-index: 1; display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border: 1px solid #ffffff24; border-radius: 17px; background: #ffffff12; font-size: 31px; filter: drop-shadow(0 5px 10px #0004); }
.gift-message-copy { z-index: 1; display: grid; gap: 4px; }
.gift-message-copy strong { color: #fff7ff; font-size: 13px; }
.gift-message-copy small { color: #d1c5dd; font-size: 9px; }
.gift-rarity-tag { z-index: 1; margin-left: auto; color: #d5c1ff; font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.gift-rarity-rare { border-color: #7fc5ff40; background-color: #1d3345; }
.gift-rarity-epic { border-color: #c598ff4a; background-color: #382644; }
.gift-rarity-legendary { border-color: #ffdb8b5c; background-color: #44352a; }
@keyframes gift-arrive { from { opacity: 0; transform: translateY(12px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes gift-sparkle { 0%,100% { opacity: .35; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.25) rotate(25deg); } }
.detail-send-gift { margin-top: 12px; color: #f0d089; }
.gift-collection-link { padding: 3px 0; border: 0; color: #b9a2ff; background: transparent; font-size: 9px; }
.gift-shop-link { width: 100%; margin-top: 9px; padding: 8px 10px; border: 1px solid #e2bd6d2a; border-radius: 9px; color: #efcf8a; background: #e2bd6d0b; font-size: 9px; font-weight: 700; }
.gift-shop-link:hover { background: #e2bd6d19; }
.profile-gifts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; max-height: 390px; overflow-y: auto; }
.profile-gifts-grid.compact { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.profile-gift-item { display: flex; min-width: 0; align-items: flex-start; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #ffffff14; border-radius: 12px; background: linear-gradient(145deg,#282430,#211e27); }
.profile-gift-item > span { font-size: 26px; filter: drop-shadow(0 4px 7px #0005); }
.profile-gift-item strong { font-size: 10px; }
.profile-gift-item small { color: var(--muted); font-size: 8px; }
.profile-gift-item p { margin: 0; color: #bcb4c5; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.profile-gift-item.gift-rarity-rare { background: linear-gradient(145deg,#253344,#211f2a); }
.profile-gift-item.gift-rarity-epic { background: linear-gradient(145deg,#382843,#211e2a); }
.profile-gift-item.gift-rarity-legendary { background: linear-gradient(145deg,#46342a,#241f28); }
.profile-gifts-grid.compact .profile-gift-item { align-items: center; padding: 7px 3px; }
.profile-gifts-grid.compact .profile-gift-item > span { font-size: 23px; }
.profile-gifts-grid.compact .profile-gift-item strong { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.gift-store-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; max-height: min(44vh,390px); overflow-y: auto; padding: 2px; }
.gift-store-item { position: relative; display: flex; min-width: 0; min-height: 126px; align-items: flex-start; flex-direction: column; gap: 5px; overflow: hidden; padding: 11px; border: 1px solid #ffffff17; border-radius: 13px; background: radial-gradient(ellipse at 20% 0%,#a58aff14,transparent 62%),#24212b; cursor: pointer; transition: .18s; }
.gift-store-item:hover { transform: translateY(-2px); border-color: #a58aff70; }
.gift-store-item:has(input:checked) { border-color: #b7a0ff; background: radial-gradient(ellipse at 20% 0%,#a58aff30,transparent 62%),#2d273a; box-shadow: 0 0 0 2px #a58aff22; }
.gift-store-item input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gift-store-item input:focus-visible + .gift-store-emoji { outline: 2px solid #c2adff; outline-offset: 3px; }
.gift-store-emoji { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid #ffffff1a; border-radius: 14px; background: #ffffff0b; font-size: 27px; }
.gift-store-item strong { color: #f1edf6; font-size: 11px; }
.gift-store-item small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.gift-store-item em { margin-top: auto; color: #c9b4ff; font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .1em; }
.gift-store-item.gift-rarity-rare { background: radial-gradient(ellipse at 20% 0%,#80caff1c,transparent 62%),#202832; }
.gift-store-item.gift-rarity-epic { background: radial-gradient(ellipse at 20% 0%,#c598ff22,transparent 62%),#2b2232; }
.gift-store-item.gift-rarity-legendary { background: radial-gradient(ellipse at 20% 0%,#ffd78228,transparent 62%),#30271f; }
.gift-caption-field { margin-top: 10px; }
.gift-caption-field textarea { min-height: 72px; }
.gift-free-note { margin-top: 10px; text-align: right; }
.profile-own-gifts { margin-top: 18px; }
.profile-own-gifts .field-hint { padding: 4px 0; }
@media (max-width: 480px) {
  .gift-store-grid { gap: 6px; }
  .gift-store-item { min-height: 120px; padding: 8px; }
  .gift-message-card { min-width: 195px; }
  .ai-message-row { max-width: 95%; }
}
