/* YukiSocial classic/elegant presentation layer. No behavior or state selectors. */
:root {
  --yuki-ui-radius-sm: 9px;
  --yuki-ui-radius-md: 14px;
  --yuki-ui-radius-lg: 18px;
  --yuki-ui-shadow-soft: 0 3px 12px rgba(23, 43, 69, .055), 0 1px 2px rgba(23, 43, 69, .035);
  --yuki-ui-shadow-raised: 0 12px 32px rgba(23, 43, 69, .11);
  --yuki-ui-focus: 0 0 0 3px rgba(52, 120, 201, .22);
}

html body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body :is(h1, h2, h3, h4) {
  letter-spacing: -.018em;
}

body :is(button, input, textarea, select) {
  font-family: inherit;
}

body button,
body [role="button"] {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
    box-shadow .16s ease, transform .16s ease;
}

body :is(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 0;
  box-shadow: var(--yuki-ui-focus);
}

body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select) {
  border-radius: var(--yuki-ui-radius-sm);
  border-color: var(--ys-line, #dce5f0);
  background-color: var(--ys-input, #fff);
  color: var(--ys-ink, #172b45);
}

body :is(input, textarea, select)::placeholder {
  color: var(--ys-muted, #64748b);
  opacity: .82;
}

body :is(.card, .post, .composer, .profile-card, .settings-card, .settings-section,
  .notification-card, .owner-card, .login-card, .register-card, .security-card) {
  border-color: var(--ys-line, #dce5f0);
  border-radius: var(--yuki-ui-radius-md);
  box-shadow: var(--yuki-ui-shadow-soft);
}

body :is(.top, .topbar, .header, .sidebar-header, .settings-header, .owner-header) {
  border-color: var(--ys-line, #dce5f0);
}

body :is(.dropdown, .dropdown-menu, .post-more-menu, .action-overflow-panel,
  .search-results, .mention-suggestions, .notification-panel, .popover) {
  border-color: var(--ys-line, #dce5f0);
  border-radius: var(--yuki-ui-radius-md);
  box-shadow: var(--yuki-ui-shadow-raised);
}

body :is(.modal, .dialog, .modal-content, .dialog-content, .settings-modal,
  .yuki-dialog, .reaction-viewer-box, .profile-comment-box, .yedio-comments-sheet) {
  border-color: var(--ys-line, #dce5f0);
  border-radius: var(--yuki-ui-radius-lg);
  box-shadow: var(--yuki-ui-shadow-raised);
}

body :is(.feed-categories, .tabs, .settings-tabs, .profile-tabs) {
  gap: 6px;
}

body :is(.feed-category, .tab, .settings-tab, .profile-tab) {
  border-radius: var(--yuki-ui-radius-sm);
}

body :is(.post-actions button, .profile-post-actions button, .actions button,
  .call-control, .home-call-actions button) {
  border-radius: 11px;
}

/* Replace emoji call glyphs with restrained monochrome line icons, while keeping
   the original buttons, labels, IDs, handlers, and accessible names intact. */
body :is(#muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn, .call-control.end,
  .home-call-actions button[title="Voice call"], .home-call-actions button[title="Video call"]) {
  position: relative;
  display: inline-grid;
  place-items: center;
  font-size: 0 !important;
}

body :is(#muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn, .call-control.end,
  .home-call-actions button[title="Voice call"], .home-call-actions button[title="Video call"])::before {
  content: "";
  width: 21px;
  height: 21px;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body :is(#muteCallBtn, #homeMuteBtn)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='12' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3m-4 0h8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='12' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3m-4 0h8'/%3E%3C/svg%3E");
}

body :is(#muteCallBtn, #homeMuteBtn)[aria-label="Unmute microphone"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18M9 9v6a3 3 0 0 0 5.1 2.1M15 9V6a3 3 0 0 0-5.8-1M5 11a7 7 0 0 0 12 5M19 11a7 7 0 0 1-.4 2.3M12 18v3m-4 0h8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18M9 9v6a3 3 0 0 0 5.1 2.1M15 9V6a3 3 0 0 0-5.8-1M5 11a7 7 0 0 0 12 5M19 11a7 7 0 0 1-.4 2.3M12 18v3m-4 0h8'/%3E%3C/svg%3E");
}

body :is(#cameraCallBtn, #homeCameraBtn)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3z'/%3E%3C/svg%3E");
}

body :is(#cameraCallBtn, #homeCameraBtn)[aria-label="Turn camera on"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18M10 6h4a2 2 0 0 1 2 2v2l5-3v10l-3-1.8M16 16v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 1-1.7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18M10 6h4a2 2 0 0 1 2 2v2l5-3v10l-3-1.8M16 16v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 1-1.7'/%3E%3C/svg%3E");
}

body .call-control.end::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14c5-5 13-5 18 0l-3 4-4-2v-2a5 5 0 0 0-4 0v2l-4 2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14c5-5 13-5 18 0l-3 4-4-2v-2a5 5 0 0 0-4 0v2l-4 2z'/%3E%3C/svg%3E");
}

body .home-call-actions button[title="Voice call"]::before {
  content: ""; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-3 2a15 15 0 0 0 6 6l2-3 5 2v4c0 1-1 2-2 2C10 21 3 14 3 5c0-1 1-2 2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-3 2a15 15 0 0 0 6 6l2-3 5 2v4c0 1-1 2-2 2C10 21 3 14 3 5c0-1 1-2 2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

body .home-call-actions button[title="Video call"]::before {
  content: ""; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

body :is(.call-btn[title="Voice Call"], .call-btn[title="Video Call"],
  #notificationBtn, .group-call-toolbar button, .welcome-icon) {
  position: relative;
  font-size: 0 !important;
}

body :is(.call-btn[title="Voice Call"], .call-btn[title="Video Call"],
  #notificationBtn, .group-call-toolbar button, .welcome-icon)::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body .call-btn[title="Voice Call"]::before,
body .group-call-toolbar button[aria-label="Start group voice call"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-3 2a15 15 0 0 0 6 6l2-3 5 2v4c0 1-1 2-2 2C10 21 3 14 3 5c0-1 1-2 2-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-3 2a15 15 0 0 0 6 6l2-3 5 2v4c0 1-1 2-2 2C10 21 3 14 3 5c0-1 1-2 2-2z'/%3E%3C/svg%3E");
}

body .call-btn[title="Video Call"]::before,
body .group-call-toolbar button[aria-label="Start group video call"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3z'/%3E%3C/svg%3E");
}

body .group-call-toolbar button::after { content: attr(aria-label); font-size: 13px; margin-left: 7px; }

body #notificationBtn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4'/%3E%3C/svg%3E");
}

body .welcome-icon::before {
  width: 38px;
  height: 38px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 11.5a8.2 8.2 0 0 1-8.5 8 9 9 0 0 1-3.6-.7L3 20l1.3-4A7.5 7.5 0 0 1 3.5 12a8.2 8.2 0 0 1 8.5-8 8.2 8.2 0 0 1 8.5 7.5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 11.5a8.2 8.2 0 0 1-8.5 8 9 9 0 0 1-3.6-.7L3 20l1.3-4A7.5 7.5 0 0 1 3.5 12a8.2 8.2 0 0 1 8.5-8 8.2 8.2 0 0 1 8.5 7.5Z'/%3E%3C/svg%3E");
}

body .icon { filter: grayscale(1); }
body .icon.owner-dashboard-icon { filter: none; }

@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Keep call-control colors above the theme's important button reset. */
html[data-yuki-theme] body :is(
  #muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn,
  .call-control.end, #endGroupCallAllBtn
) {
  background-color: #7952B3 !important;
  border-color: #62408F !important;
  color: #fff !important;
  box-shadow: 0 3px 10px #24154d55;
  transition: background-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
html[data-yuki-theme] body :is(.call-control.end, #endGroupCallAllBtn) {
  background-color: #DC3545 !important;
  border-color: #B52A38 !important;
  color: #fff !important;
}
html[data-yuki-theme] body :is(
  #muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn,
  .call-control.end, #endGroupCallAllBtn
):hover:not(:disabled) {
  background-color: #7952B3 !important;
  box-shadow: 0 5px 14px #24154d66;
}
html[data-yuki-theme] body :is(.call-control.end, #endGroupCallAllBtn):hover:not(:disabled) {
  background-color: #DC3545 !important;
  box-shadow: 0 5px 14px #4d111a77;
}
html[data-yuki-theme] body :is(
  #muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn,
  .call-control.end, #endGroupCallAllBtn
):active { transform: scale(.96); }
html[data-yuki-theme] body :is(
  #muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn,
  .call-control.end, #endGroupCallAllBtn
):focus-visible { outline: 3px solid #9b87ed; outline-offset: 3px; }
html[data-yuki-theme] body :is(
  #muteCallBtn, #homeMuteBtn, #cameraCallBtn, #homeCameraBtn,
  .call-control.end, #endGroupCallAllBtn
):disabled { cursor: not-allowed; box-shadow: none; transform: none; }
