:root {
  --maskcat-ink: #17191e;
  --maskcat-muted: #626772;
  --maskcat-line: rgba(24, 27, 34, 0.12);
  --maskcat-blue: #496991;
  --maskcat-coral: #dc765f;
  --maskcat-panel: rgba(255, 255, 255, 0.78);
}

/* Fill the boot-icon box so the cat cutout has the original mark's visual weight. */
.splash-screen.s-p76cpd > svg { display: none !important; }
.splash-screen.s-p76cpd::before {
  content: '';
  flex: 0 0 132px;
  width: 132px;
  height: 132px;
  background: url('/maskcat/mask-cat-boot.png') center / auto 132px no-repeat;
  transform: translateY(-20px);
}

.background-cover.s-tdy7zv {
  background-image: linear-gradient(180deg, rgba(27, 29, 40, 0.03), rgba(24, 19, 20, 0.13)), url('/maskcat/mask-cat-wallpaper.webp') !important;
  background-position: center center !important;
  background-size: cover !important;
}

.maskcat-window[hidden],
.preview-window[hidden],
.photos-window[hidden], .chart-window[hidden] {
  display: none !important;
}

.maskcat-window,
.preview-window,
.photos-window, .chart-window {
  position: fixed;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 13px;
  box-shadow: 0 30px 90px rgba(19, 16, 24, 0.34), 0 8px 24px rgba(19, 16, 24, 0.2);
  font-family: var(--system-font-family);
  animation: mac-window-open 260ms cubic-bezier(.2, .78, .25, 1) both;
}

.maskcat-window.is-dragging,
.preview-window.is-dragging,
.photos-window.is-dragging, .chart-window.is-dragging {
  transition: none !important;
}

@keyframes mac-window-open {
  from { opacity: 0; scale: .985; }
  to { opacity: 1; scale: 1; }
}

.maskcat-window {
  top: 54px;
  left: 28px;
  z-index: 72;
  width: min(760px, calc(100vw - 580px));
  min-width: 620px;
  height: min(690px, calc(100vh - 126px));
  min-height: 540px;
  color: var(--maskcat-ink);
  background: rgba(246, 246, 247, 0.94);
  -webkit-backdrop-filter: blur(34px) saturate(1.25);
  backdrop-filter: blur(34px) saturate(1.25);
}

.maskcat-window.is-fullscreen,
.preview-window.is-fullscreen,
.photos-window.is-fullscreen, .chart-window.is-fullscreen {
  top: 34px !important;
  right: auto !important;
  left: 8px !important;
  width: calc(100vw - 16px) !important;
  height: calc(100vh - 44px) !important;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
}

.maskcat-titlebar,
.preview-titlebar,
.photos-titlebar, .chart-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  color: #34363b;
  background: linear-gradient(180deg, rgba(247, 247, 247, .98), rgba(218, 217, 218, .97));
  border-bottom: 1px solid rgba(54, 56, 62, .2);
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.is-dragging > .maskcat-drag-handle { cursor: grabbing; }

.maskcat-titlebar strong,
.preview-titlebar strong,
.photos-titlebar strong, .chart-titlebar strong {
  max-width: 58%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maskcat-traffic {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 8px;
}

.maskcat-traffic button {
  width: 13px;
  min-width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .34);
}

.maskcat-close { background: #ff5f57; }
.maskcat-minimize { background: #febc2e; }
.maskcat-maximize { background: #28c840; }

.docs-header { display:flex; align-items:center; gap:14px; height:76px; padding:12px 20px; background:#f9fbfd; color:#202124; }
.docs-icon { flex:none; width:29px; height:38px; }
.docs-file { flex:1; min-width:0; }
.docs-file > strong { font:400 19px/1.3 Arial,sans-serif; }
.docs-menus { display:flex; gap:15px; margin-top:7px; color:#444746; font:12px Arial,sans-serif; }
.docs-view-mode { padding:9px 13px; border-radius:18px; background:#e8f0fe; color:#395880; font-size:11px; }
.docs-avatar { width:30px; height:30px; object-fit:cover; border-radius:50%; }
.docs-formatbar { display:flex; align-items:center; gap:17px; height:40px; margin:0 12px; padding:0 15px; overflow:hidden; white-space:nowrap; border-radius:20px; background:#edf2fa; color:#41464d; font:12px Arial,sans-serif; }
.docs-formatbar i { flex:none; width:1px; height:20px; background:#d3dae4; }
.docs-font-size { padding:3px 6px; border:1px solid #b8c0cb; border-radius:3px; }
.docs-ruler { display:flex; justify-content:space-around; height:25px; margin:0 32px; align-items:center; background:repeating-linear-gradient(90deg, transparent 0 9px,#c4cad3 9px 10px) bottom/100% 4px no-repeat; color:#77808c; font:9px Arial,sans-serif; }
.maskcat-window { background:#f9fbfd; }
.maskcat-document { height:calc(100% - 179px); overflow:auto; padding:10px 28px 30px; background:#f0f3f7; }
.docs-paper { container-type:inline-size; min-height:100%; padding:48px 48px 72px; background:#fff; border:1px solid #dce0e5; box-shadow:0 2px 5px #21304708; color:#202124; font-family:Arial,sans-serif; }
.docs-paper h1 { margin:0 0 30px; font-size:min(56px,9cqw); white-space:nowrap; line-height:1.09; font-weight:700; letter-spacing:-.04em; }
.docs-paper p { margin:0; font-size:19px; line-height:1.8; color:#35383d; }
.maskcat-ascii { width:100%; margin:36px 0 0; padding:0; color:#202124; font:400 calc(100cqw / 56)/1 "Courier New",monospace; white-space:pre; letter-spacing:0; font-variant-ligatures:none; }

.contract-menu[hidden], .contract-notification[hidden] { display:none !important; }
.contract-menu { position:fixed; z-index:220; width:210px; max-width:calc(100vw - 16px); padding:5px; border:1px solid #ffffff90; border-radius:7px; background:#f3f1f0e8; backdrop-filter:blur(24px); box-shadow:0 8px 26px #0004,0 0 0 1px #0002; font-family:var(--system-font-family); }
.contract-menu button { display:block; width:100%; padding:6px 12px; border:0; border-radius:4px; text-align:left; color:#222; background:transparent; font-size:13px; line-height:18px; cursor:default; }
.contract-menu button:enabled:hover, .contract-menu button:focus-visible { outline:none; background:#2475e8; color:#fff; }
.contract-menu button:disabled { color:#999; }
.contract-menu-divider { height:1px; margin:5px 7px; background:#00000016; }
.contract-notification { position:fixed; z-index:210; top:42px; right:16px; display:flex; align-items:center; gap:12px; width:360px; max-width:calc(100vw - 24px); padding:17px 32px 17px 15px; border:1px solid #ffffffa0; border-radius:15px; background:#f4f2f0eb; backdrop-filter:blur(30px) saturate(1.3); box-shadow:0 10px 35px #0003; color:#242424; font-family:var(--system-font-family); }
.contract-notification.is-entering { animation:notification-slide-in 460ms cubic-bezier(.2,.85,.25,1) both; }
@keyframes notification-slide-in { from { opacity:0; transform:translateX(calc(100% + 24px)) scale(.97); } to { opacity:1; transform:translateX(0) scale(1); } }
.contract-notification > img { flex:none; width:40px; height:40px; object-fit:cover; border-radius:9px; }
.contract-notification > div { min-width:0; }
.contract-notification strong { display:block; margin-bottom:4px; font-size:13px; font-weight:650; }
.contract-notification p { margin:0; font-size:13px; line-height:1.4; overflow-wrap:anywhere; user-select:text; }
.contract-notification > button { position:absolute; top:8px; right:8px; width:20px; height:20px; border:0; border-radius:50%; color:#555; background:#0000000b; font-size:17px; line-height:18px; }

.preview-window {
  top: 86px;
  right: 28px;
  z-index: 68;
  width: min(500px, 36vw);
  min-width: 390px;
  color: #e8e8eb;
  background: rgba(29, 30, 34, .96);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
}
.preview-titlebar { color: #303238; background: linear-gradient(180deg, #f1f1f2, #cfcfd1); }
.preview-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 15px;
  height: 36px;
  padding: 0 14px;
  color: #d9d9de;
  background: #303136;
  border-bottom: 1px solid #101114;
  font-size: 13px;
}
.preview-player { margin: 0; padding: 12px 12px 10px; }
.preview-stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #090a0d; border-radius: 4px; }
.preview-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-mountain { animation: preview-mountain 14s ease-in-out infinite; }
.preview-cat { opacity: 0; object-position: 50% 28%; animation: preview-cat 14s ease-in-out infinite; }
.preview-stage::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(6, 8, 12, .68)); }
.preview-caption { position: absolute; z-index: 1; right: 18px; bottom: 17px; left: 18px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.65); }
.preview-caption small, .preview-caption strong, .preview-caption span { display: block; }
.preview-caption small { color: rgba(255,255,255,.7); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.preview-caption strong { margin-top: 5px; font-size: 20px; letter-spacing: -.02em; }
.preview-caption span { margin-top: 2px; font-size: 9px; }
@keyframes preview-mountain {
  0%, 44% { opacity: 1; transform: scale(1); }
  52%, 92% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes preview-cat {
  0%, 44% { opacity: 0; transform: scale(1.06); }
  52%, 92% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}
.preview-controls { display: grid; grid-template-columns: 28px 34px 1fr 34px 28px; align-items: center; gap: 7px; height: 38px; color: #b9bbc2; font-size: 9px; }
.preview-controls button { color: #e8e8ea; font-size: 10px; }
.preview-track { position: relative; overflow: hidden; height: 3px; background: #555860; border-radius: 999px; }
.preview-track i { display: block; width: 0; height: 100%; background: #f1f1f3; border-radius: inherit; animation: preview-progress 14s linear infinite; }
@keyframes preview-progress { to { width: 100%; } }
.preview-window.is-paused .preview-stage > img,
.preview-window.is-paused .preview-track i { animation-play-state: paused; }

.photos-window {
  top: 96px;
  right: 52px;
  z-index: 76;
  width: 600px;
  max-width: calc(100vw - 104px);
  color: #25272c;
  background: rgba(246, 246, 247, .96);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
}
.photos-toolbar { display: flex; align-items: baseline; justify-content: space-between; height: 46px; padding: 13px 18px; background: #f5f5f6; border-bottom: 1px solid var(--maskcat-line); }
.photos-toolbar strong { font-size: 18px; }
.photos-toolbar span { color: #888b93; font-size: 10px; }
.photos-grid { display: grid; grid-template-columns: 1.45fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 390px; padding: 12px; background: #e9e9eb; }
.photos-grid figure { position: relative; overflow: hidden; margin: 0; background: #202126; border-radius: 8px; }
.photos-grid img { width: 100%; height: 100%; object-fit: cover; }
.photos-grid figcaption { position: absolute; right: 8px; bottom: 8px; left: 8px; color: #fff; font-size: 9px; text-shadow: 0 1px 5px #000; }
.photos-wide { grid-row: 1 / span 2; }
.photos-mark img { padding: 22px; object-fit: contain; background: #151619; }

.dock-el.s-ynw7ed { gap: 4px; padding-right: .65rem; padding-left: .65rem; }
.dock-open-app-button.is-custom-open .dot.s-1i5c8xg { opacity: 1 !important; }

@media (min-width: 721px) and (max-width: 1100px) {
  .maskcat-window { left: 14px; width: calc(100vw - 412px); min-width: 0; }
  .preview-window { right: 14px; width: 370px; min-width: 0; }
  .maskcat-document { padding: 28px 26px 38px; }
  .maskcat-hero { grid-template-columns: 1fr 132px; gap: 18px; }
  .maskcat-explainer { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .dock-el.s-ynw7ed { gap: 0; padding-right: .3rem; padding-left: .3rem; }
  .dock-open-app-button.s-1i5c8xg > span { transform: none !important; }
  .dock-open-app-button.s-1i5c8xg img { width: calc((100vw - 36px) / 9) !important; }
  .maskcat-window,
  .maskcat-window.is-fullscreen,
  .preview-window,
  .preview-window.is-fullscreen,
  .photos-window,
  .photos-window.is-fullscreen {
    top: 34px !important;
    right: auto !important;
    left: 5px !important;
    width: calc(100vw - 10px) !important;
    height: calc(100vh - 108px) !important;
    min-width: 0;
    min-height: 0;
    border-radius: 11px;
  }
  .maskcat-titlebar, .preview-titlebar, .photos-titlebar { height: 36px; cursor: default; }
  .maskcat-tab-strip { height: 32px; }
  .maskcat-browser-tab { width: calc(100% - 32px); height: 27px; }
  .maskcat-toolbar { grid-template-columns: 48px minmax(0, 1fr) 24px; height: 40px; padding: 0 9px; gap: 7px; }
  .maskcat-toolbar-actions span:first-child { display: none; }
  .maskcat-address { padding: 0 8px; }
  .maskcat-address small { display: none; }
  .maskcat-document { height: calc(100% - 108px); padding: 24px 19px 30px; }
  .maskcat-hero { grid-template-columns: 1fr; }
  .maskcat-portrait { display: none; }
  .maskcat-hero h1 { font-size: 38px; }
  .maskcat-lede { font-size: 13px; }
  .maskcat-summary, .maskcat-explainer, .maskcat-bottom-grid, .maskcat-sources { grid-template-columns: 1fr; }
  .maskcat-summary article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--maskcat-line); }
  .maskcat-summary article:last-child { border-bottom: 0; }
  .maskcat-quote { grid-template-columns: 38px 1fr; padding: 18px 16px; }
  .maskcat-quote > span { font-size: 52px; }
  .maskcat-quote p { font-size: 16px; }
  .preview-window { z-index: 78; background: #232429; }
  .preview-player { padding: 10px; }
  .photos-window { z-index: 79; }
  .photos-grid { height: calc(100% - 82px); }
}

/* A casually arranged desktop: staggered heights, unequal insets, slight overlap. */
@media (min-width: 721px) {
  .maskcat-window { top:91px; left:3vw; width:calc(58vw - 42px); min-width:0; height:calc(100vh - 197px); min-height:0; }
  .preview-window { top:47px; right:24px; width:38vw; min-width:0; }
  .preview-toolbar { display:none; }
  .preview-player { padding:12px 12px 0; }
  .preview-stage { height:clamp(120px,25vh,240px); width:auto; max-width:100%; margin:auto; }
  .preview-controls { height:32px; }
  /* Explicit height lets dragging move both edges together instead of stretching to the bottom. */
  .chart-window { top:calc(157px + clamp(120px,25vh,240px)); right:58px; bottom:auto; width:41vw; height:calc(100vh - 240px - clamp(120px,25vh,240px)); }
  .docs-paper { padding:clamp(28px,3.5vw,48px); }
}
.chart-window { z-index:74; display:flex; flex-direction:column; background:#111318; color:#f5f5f5; }
.chart-titlebar { flex:none; }
.chart-identity { flex:none; display:flex; justify-content:space-between; align-items:center; height:48px; padding:0 14px; border-bottom:1px solid #ffffff15; }
.chart-identity strong { font-size:15px; }
.chart-identity strong span { color:#949aa6; font-size:11px; font-weight:400; }
.chart-identity > span { text-align:right; font-size:10px; color:#b4bcc9; }
.chart-identity small { display:block; margin-top:4px; color:#777f8e; font-size:9px; }
.chart-window iframe { display:block; flex:1; width:100%; min-height:0; border:0; background:#111318; }
@media (max-width:720px) {
  .docs-header { padding:10px 12px; gap:10px; height:72px; }
  .docs-file > strong { font-size:16px; }
  .docs-menus { gap:12px; font-size:11px; }
  .docs-menus span:nth-last-child(-n+3) { display:none; }
  .docs-view-mode { display:none; }
  .docs-formatbar { gap:14px; margin:0 8px; }
  .docs-ruler { margin:0 20px; }
  .maskcat-document { height:calc(100% - 173px); padding:8px 12px 24px; }
  .docs-paper { padding:32px 24px 48px; }
  .docs-paper h1 { margin-bottom:26px; }
  .docs-paper p { font-size:18px; line-height:1.75; }
  .chart-window { top:34px !important; right:auto !important; left:5px !important; bottom:108px; width:calc(100vw - 10px) !important; z-index:79; }
}
@media (prefers-reduced-motion: reduce) {
  .contract-notification.is-entering { animation:none; }
  .maskcat-window, .preview-window, .photos-window { animation: none; }
  .preview-stage > img, .preview-track i { animation: none; }
  .preview-cat { display: none; }
  .preview-track i { width: 52%; }
}
