﻿:root {
  --bg: #fafafa;
  --panel: #ffffff;
  --panel-soft: #f4f4f5;
  --board-bg: #ffffff;
  --board-border: rgba(17,17,17,.09);
  --text: #111111;
  --text-soft: #3f3f46;
  --muted: #71717a;
  --line: rgba(17,17,17,.09);
  --line-strong: rgba(17,17,17,.18);
  --dot: transparent;
  --rail-w: 60px;
  --radius: 16px;
  --content-w: 1200px;
  --control-h: 34px;
  --toolbar-icon-size: 18px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --sticky-topbar-h: 90px;
  --font-main: "Microsoft YaHei Light", "Microsoft YaHei UI Light", "Microsoft YaHei", "PingFang SC", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-number: Bahnschrift, "DIN Alternate", "Arial Narrow", var(--font-main);
  font-family: var(--font-main);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

:root[data-theme="dark"] {
  --bg: #101010;
  --panel: #161616;
  --panel-soft: #202020;
  --board-bg: #f3f4f6;
  --board-border: rgba(255,255,255,.72);
  --text: #f5f5f5;
  --text-soft: #d4d4d4;
  --muted: #8a8a8a;
  --line: rgba(245,245,245,.10);
  --line-strong: rgba(245,245,245,.20);
  --dot: transparent;
  color-scheme: dark;
}

* { box-sizing: border-box; }
*:not(input):not(textarea) {
  user-select: none;
  -webkit-user-select: none;
}
html[data-loading="true"] .app {
  opacity: 0;
}
html[data-loading="true"] .artboard-card {
  animation: none;
}
html, body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-main);
  overflow: hidden;
}
body::after {
  content: "鏉惧紑浠ュ鍏ュ浘鐗?;
  position: fixed;
  inset: 16px;
  z-index: 80;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  background: var(--panel);
  backdrop-filter: none;
  opacity: 0;
  transform: scale(.995);
  pointer-events: none;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
body.is-dragging::after {
  opacity: 1;
  transform: scale(1);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.artboard-number,
.board-size,
.filter-chip,
.specs dd,
.dpi-item strong,
#detailSize,
#detailRatio,
#detailDpi,
#detailRatioText,
input {
  font-family: var(--font-number);
}
::selection {
  color: inherit;
  background: transparent;
}

.app {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
}

.platform-button {
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  text-decoration: none;
  opacity: var(--edge-opacity, 1);
  transform: scale(var(--edge-scale, 1));
  transform-origin: center center;
  user-select: none;
}

.platform-nav {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  height: 58px;
  width: max-content;
  padding: 0 10px;
  transition: transform .32s var(--ease);
  will-change: transform;
}
.platform-nav.no-transition {
  transition: none;
}
.header-marquee {
  cursor: grab;
  touch-action: pan-y;
}
.header-marquee.is-drag-ready,
.header-marquee.is-dragging {
  cursor: grabbing;
}
.header-marquee.is-dragging .platform-nav {
  transition: none;
}

.platform-button {
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  cursor: inherit;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s cubic-bezier(.2,.9,.2,1), opacity .16s var(--ease);
}
.platform-button:hover {
  background: transparent;
  border-color: transparent;
  transform: scale(var(--edge-scale, 1));
  box-shadow: none;
}
.image-file-input {
  display: none;
}
.image-action,
.theme-action,
.language-action {
  display: grid;
  place-items: center;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  line-height: 1;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.image-action,
.theme-action,
.language-action {
  width: 34px;
  padding: 0;
}
.image-action svg,
.theme-action svg,
.language-action svg {
  width: var(--toolbar-icon-size);
  height: var(--toolbar-icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.image-action:hover,
.theme-action:hover,
.language-action:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-soft);
}
.platform-button.is-active {
  z-index: 4;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.platform-button.is-active::before {
  content: none;
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  opacity: .72;
  transform: scale(.88);
  animation: activeIconGlow .42s var(--ease);
  pointer-events: none;
}
.icon-badge,
.source-icon,
.detail-logo {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1;
}
.icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  opacity: .58;
  filter: saturate(.72);
  transition: opacity .18s var(--ease), filter .18s var(--ease), transform .24s var(--ease), background .16s var(--ease);
}
.platform-button:hover .icon-badge,
.platform-button:focus-visible .icon-badge {
  opacity: .86;
  filter: saturate(.92);
}
.platform-button.is-active .icon-badge {
  width: 32px;
  height: 32px;
  opacity: 1;
  filter: saturate(1.06);
  transform: scale(1.6);
  animation: activeIconPop .34s var(--ease);
}
.platform-icon {
  overflow: visible;
}
.platform-icon.official-icon {
  color: var(--text);
  background: transparent;
}
.platform-icon.official-icon.svg-data-icon {
  background: transparent;
}
.platform-icon.official-icon:empty,
.platform-icon.official-icon.icon-fallback {
  color: #fff;
  background: var(--fallback-color, #111113);
}
.platform-icon svg {
  width: 23px;
  height: 23px;
  display: block;
  fill: currentColor;
}
.icon-badge.platform-icon svg {
  width: 22px;
  height: 22px;
}
.platform-icon img,
.detail-logo img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
}
.icon-badge.platform-icon img {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}
.platform-button.is-active .platform-icon img {
  width: 24px;
  height: 24px;
}
.detail-logo img {
  width: 26px;
  height: 26px;
}
.platform-icon--instagram:not(.official-icon) {
  background: radial-gradient(circle at 32% 108%, #feda75 0 28%, #fa7e1e 43%, #d62976 60%, #962fbf 78%, #4f5bd5 100%) !important;
}
.platform-icon--tiktok svg {
  width: 22px;
  height: 22px;
}
.platform-icon--tiktok .tiktok-cyan { fill: #25f4ee; transform: translate(-1px, 1px); }
.platform-icon--tiktok .tiktok-red { fill: #fe2c55; transform: translate(1px, -1px); }
.platform-icon--tiktok path:last-child { fill: #fff; }
@keyframes activeIconPop {
  0% { transform: scale(1); }
  68% { transform: scale(1.72); }
  100% { transform: scale(1.6); }
}
@keyframes activeIconGlow {
  0% { opacity: 0; transform: scale(.68); }
  70% { opacity: .82; transform: scale(.96); }
  100% { opacity: .72; transform: scale(.88); }
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 220;
  view-transition-name: sizekit-topbar;
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 78px;
  padding: 16px 32px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px);
  overflow: visible;
}
.header-platforms {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, var(--content-w));
  align-items: center;
  column-gap: 0;
  width: min(var(--content-w), 100%);
  min-width: 0;
  height: 58px;
  margin: 0 auto;
}
.platform-fixed {
  display: none;
}
.header-marquee {
  --icon-step: 62px;
  position: relative;
  z-index: 81;
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 58px;
  overflow: hidden;
  align-self: auto;
}
.header-marquee::before,
.header-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 48px;
  pointer-events: none;
}
.header-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.header-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.platform-hover-title {
  position: absolute;
  left: 50%;
  bottom: -18px;
  z-index: 120;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 0;
  border-radius: 0;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 680;
  transition: opacity .14s var(--ease);
}
.platform-hover-title.show {
  opacity: 1;
}
.header-main {
  position: relative;
  top: auto;
  right: auto;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  margin: 0;
}
.header-actions {
  position: relative;
  z-index: 52;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  width: 116px;
  height: var(--control-h);
  white-space: nowrap;
  flex-wrap: nowrap;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 740;
  letter-spacing: 0;
  line-height: 1.05;
}
.platform-select {
  position: relative;
  flex: 0 0 auto;
}
.platform-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h);
  min-width: 138px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}
.platform-select-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: .68;
}
.platform-select:hover .platform-select-trigger::after,
.platform-select[open] .platform-select-trigger::after {
  transform: rotate(225deg) translate(-1px, -1px);
}
.platform-select-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 5px;
  color: #fff;
  overflow: hidden;
}
.platform-select-icon.platform-icon--all {
  color: var(--text);
  background: transparent;
}
.platform-select-icon img,
.platform-select-icon svg {
  width: var(--toolbar-icon-size);
  height: var(--toolbar-icon-size);
  display: block;
}
.platform-select-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.platform-select-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(3, minmax(132px, 1fr));
  gap: 4px;
  width: min(520px, calc(100vw - 48px));
  max-height: min(430px, calc(100vh - 150px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s var(--ease);
  pointer-events: none;
}
.platform-select-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}
.platform-select:hover .platform-select-panel,
.platform-select[open] .platform-select-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
@media (hover: none) {
  .platform-select:hover:not([open]) .platform-select-trigger::after {
    transform: rotate(45deg) translate(-1px, -1px);
  }
  .platform-select:hover:not([open]) .platform-select-panel {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
  }
}
.platform-select-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}
.platform-select-option:hover,
.platform-select-option.is-active {
  color: var(--text);
  background: var(--panel-soft);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 150px;
  height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: none;
}
.search-box span {
  display: grid;
  place-items: center;
  width: var(--toolbar-icon-size);
  height: var(--toolbar-icon-size);
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0;
  line-height: 1;
}
.search-box span svg {
  width: var(--toolbar-icon-size);
  height: var(--toolbar-icon-size);
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
}
.search-box input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }

.toolbar {
  position: sticky;
  top: var(--sticky-topbar-h);
  z-index: 210;
  view-transition-name: sizekit-toolbar;
  min-height: 46px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6px 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.toolbar-inner {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 14px;
  width: min(var(--content-w), 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
}
.toolbar .header-actions {
  position: relative;
  top: auto;
  right: auto;
  transform: none;
  justify-self: end;
}
.filter-strip {
  position: relative;
  z-index: 51;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}
.filter-strip::-webkit-scrollbar { display: none; }
.filter-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h);
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 640;
  line-height: 1;
  letter-spacing: -.01em;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.filter-chip:hover { border-color: var(--line); background: var(--panel-soft); color: var(--text); }
.filter-chip.is-active { color: var(--text); border-color: var(--line-strong); background: var(--panel); }
.filter-menu {
  position: relative;
  margin-left: 8px;
}
.filter-menu summary,
.image-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h);
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 640;
  line-height: 1;
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.filter-menu summary {
  gap: 8px;
  padding: 0 12px;
  list-style: none;
  cursor: pointer;
}
.filter-menu summary::-webkit-details-marker { display: none; }
.filter-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: .7;
}
.filter-menu[open] summary,
.filter-menu summary:hover,
.image-toggle:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-soft);
}
.filter-menu[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}
.filter-menu-panel {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 3px;
  min-width: 128px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
  transform: translateX(-50%);
}
.ratio-menu .filter-menu-panel {
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 8px;
  min-width: 216px;
  padding: 10px;
}
.filter-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  height: var(--control-h);
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 640;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}
.filter-option:hover,
.filter-option.is-active {
  color: var(--text);
  background: var(--panel-soft);
}
.ratio-option {
  min-width: 0;
  height: 72px;
  justify-content: center;
  padding: 8px;
}
.ratio-swatch {
  display: grid;
  place-items: center;
  width: var(--ratio-w, 20px);
  height: var(--ratio-h, 20px);
  border: 1px solid color-mix(in srgb, var(--muted) 42%, transparent);
  border-radius: 3px;
  color: color-mix(in srgb, var(--text-soft) 78%, transparent);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: 13px;
  font-weight: 520;
  line-height: 1;
  white-space: nowrap;
}
.ratio-option:hover .ratio-swatch,
.ratio-option.is-active .ratio-swatch {
  border-color: color-mix(in srgb, var(--text) 58%, transparent);
  color: var(--text);
  background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}
.image-toggle {
  gap: 7px;
  margin-left: 2px;
  padding: 0 10px;
  cursor: pointer;
}
.ratio-menu + .image-toggle {
  margin-left: 8px;
}
.image-toggle input {
  appearance: none;
  position: relative;
  width: 13px;
  height: 13px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--muted) 58%, transparent);
  border-radius: 4px;
  background: transparent;
  display: grid;
  place-items: center;
  opacity: 1;
  pointer-events: auto;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.image-toggle input:checked {
  border-color: var(--text);
  background: transparent;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 8%, transparent);
}
.image-toggle input:checked::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 1.5px solid var(--text);
  border-bottom: 1.5px solid var(--text);
  transform: rotate(-45deg) translate(.5px, -1px);
}
.toggle-icon,
.control-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 6px;
  color: currentColor;
  transition: color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease), opacity .16s var(--ease);
}
.toggle-icon svg,
.control-icon svg {
  width: var(--toolbar-icon-size);
  height: var(--toolbar-icon-size);
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.image-toggle .toggle-icon {
  display: none;
}
.image-toggle input:not(:checked) + .toggle-icon {
  opacity: .45;
}
.image-toggle input:checked + .toggle-icon {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 16%, transparent);
}
.image-toggle:hover input {
  border-color: color-mix(in srgb, var(--text) 72%, transparent);
}

.primary-button,
.secondary-button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.secondary-button:hover { background: var(--panel-soft); color: var(--text); }

.canvas {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 32px 34px 42px;
  background: var(--bg);
}
.artboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 34px 30px;
  align-items: start;
  width: min(var(--content-w), 100%);
  margin: 0 auto;
}
.load-error {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
.artboard-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  transform-origin: center top;
  translate: 0 0;
  animation: cardEnter .38s cubic-bezier(.22, .61, .36, 1) both;
  animation-delay: 0s;
  transition: opacity .34s cubic-bezier(.22, .61, .36, 1), filter .28s var(--ease), transform .2s var(--ease), translate .2s var(--ease);
}
.artboard-grid.is-card-hovering .artboard-card:not(.is-card-hovered) {
  opacity: .5;
  filter: saturate(.72) brightness(.92);
  transition-delay: .03s;
}
.artboard-card:hover,
.artboard-card.is-card-hovered {
  z-index: 8;
  opacity: 1;
  filter: none;
  transition-delay: 0s;
}
.artboard-card:hover .artboard,
.artboard-card.is-card-hovered .artboard {
  background: var(--board-bg);
  border-color: color-mix(in srgb, var(--board-border) 78%, var(--line-strong));
  box-shadow: 0 18px 34px rgba(17,17,17,.14);
}
.artboard-card:hover .artboard.has-preview,
.artboard-card.is-card-hovered .artboard.has-preview {
  border-color: transparent;
}
:root[data-theme="dark"] .artboard-card:hover .artboard,
:root[data-theme="dark"] .artboard-card.is-card-hovered .artboard {
  box-shadow: 0 18px 34px rgba(0,0,0,.42);
}
@keyframes cardEnter {
  from {
    translate: 0 10px;
  }
  to {
    translate: 0 0;
  }
}
::view-transition-group(*) {
  z-index: 1;
  animation-duration: .42s;
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}
::view-transition-group(sizekit-topbar),
::view-transition-group(sizekit-toolbar) {
  z-index: 100;
}
::view-transition-old(sizekit-topbar),
::view-transition-new(sizekit-topbar),
::view-transition-old(sizekit-toolbar),
::view-transition-new(sizekit-toolbar) {
  animation-duration: .18s;
  animation-timing-function: var(--ease);
}
::view-transition-old(*) {
  animation-duration: .22s;
  animation-timing-function: cubic-bezier(.55, .06, .68, .19);
}
::view-transition-new(*) {
  animation-duration: .38s;
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}
.artboard-stage {
  position: relative;
  display: grid;
  min-height: 176px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform-origin: center top;
  transition: transform .2s var(--ease);
}
.artboard-card:hover .artboard-stage,
.artboard-card.is-card-hovered .artboard-stage {
  transform: translateY(-3px) scale(1.08);
}
.source-icon,
.title-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  font-size: 11px;
  flex: 0 0 auto;
}
.title-icon img,
.title-icon svg {
  width: 14px;
  height: 14px;
}
.title-icon,
.title-icon.official-icon,
.title-icon.official-icon.icon-fallback {
  color: var(--text);
  background: transparent;
}
.title-icon img {
  border-radius: 0;
}
.artboard {
  --board-w: 140px;
  --board-h: 140px;
  position: relative;
  display: grid;
  width: var(--board-w);
  height: var(--board-h);
  place-items: center;
  border: 0;
  border-radius: 0;
  color: var(--text-soft);
  border: 1px solid var(--board-border);
  background: var(--board-bg);
  box-shadow: none;
  overflow: visible;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.artboard.has-preview {
  border-color: transparent;
  overflow: hidden;
}
.artboard::before {
  content: none;
}
.artboard::after {
  content: none;
  position: absolute;
  right: 7px;
  bottom: 6px;
  z-index: 4;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  font-size: 14px;
  font-weight: 720;
}
.artboard-number {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 0 10px;
  color: color-mix(in srgb, var(--text-soft) 46%, transparent);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -.015em;
  text-align: center;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
.artboard-number strong {
  font-family: var(--font-number);
  font-size: var(--size-font, 18px);
  font-weight: 560;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}
.artboard-number small {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-size: 14px;
  font-weight: 520;
  line-height: 1;
}
:root[data-theme="dark"] .artboard-number strong {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}
.has-preview .artboard-number {
  padding: 0 10px;
  color: #fff;
  background: transparent;
  backdrop-filter: none;
  text-shadow: 0 1px 6px rgba(0,0,0,.46);
}
.has-preview .artboard-number small {
  color: rgba(255,255,255,.82);
}
.preview-clip {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.preview-clip {
  z-index: 2;
  overflow: hidden;
}
.preview-clip img {
  position: absolute;
  left: var(--preview-x);
  top: var(--preview-y);
  width: var(--preview-w);
  height: var(--preview-h);
  max-width: none;
  object-fit: cover;
  user-select: none;
}
.preview-clip img {
  opacity: .96;
}
.board-info {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 0 2px;
  text-align: center;
  justify-items: center;
}
.board-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  line-height: 1;
}
.board-info strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(50% + var(--tooltip-offset, 78px));
  z-index: 10;
  max-width: min(260px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-soft);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .14s var(--ease), visibility .14s var(--ease);
}
.artboard-card:hover .board-tooltip {
  opacity: 1;
  visibility: visible;
}

.detail-dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  border-radius: 24px;
  color: var(--text);
  background: transparent;
}
.detail-dialog::backdrop { background: rgba(0,0,0,.34); backdrop-filter: blur(8px); }
.detail-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: none;
}
.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  line-height: 1;
}
.detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-right: 44px;
}
.detail-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
}
.detail-head p { margin: 0 0 4px; color: var(--muted); font-size: 14px; font-weight: 650; }
.detail-head h2 { margin: 0 0 7px; font-size: 14px; font-weight: 760; letter-spacing: -.055em; }
.detail-head span { color: var(--muted); font-size: 14px; }
.detail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 22px;
}
.detail-preview-wrap {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
}
.detail-preview {
  --board-w: 160px;
  --board-h: 160px;
  display: grid;
  width: var(--board-w);
  height: var(--board-h);
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: #1e1d1a;
  background: #fffdfa;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  font-size: 14px;
  font-weight: 760;
}
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}
.specs div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}
.specs dt { color: var(--muted); font-size: 14px; }
.specs dd { margin: 5px 0 0; font-size: 14px; font-weight: 720; line-height: 1.42; }
.note {
  margin: 16px 0 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 14px;
  line-height: 1.7;
}
.dpi-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}
.dpi-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dpi-title strong { font-size: 14px; }
.dpi-title span { color: var(--muted); font-size: 14px; }
.dpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dpi-item { padding: 10px; border-radius: 12px; background: var(--bg); }
.dpi-item small { display: block; color: var(--muted); margin-bottom: 4px; font-size: 14px; }
.dpi-item strong { font-size: 14px; }
.dialog-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 16px; }
.primary-button,
.secondary-button { height: 34px; padding: 0 14px; font-size: 14px; font-weight: 680; }
.primary-button { color: var(--bg); background: var(--text); border-color: var(--text); }
.primary-button:hover { filter: brightness(.98); }

.toast {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 30;
  transform: translateY(12px);
  opacity: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  font-size: 14px;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  :root {
    --sticky-topbar-h: 84px;
    --sticky-toolbar-h: 94px;
    --compact-top-h: 58px;
    --toolbar-icon-size: 22px;
  }
  body { overflow: auto; }
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: visible; }
  .workspace {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding-top: calc(var(--sticky-topbar-h) + var(--sticky-toolbar-h));
    transition: padding-top .28s var(--ease);
  }
  .workspace-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 84px;
    padding: 14px 16px 6px;
    transition: min-height .28s var(--ease), padding .28s var(--ease), background .28s var(--ease), backdrop-filter .28s var(--ease);
  }
  .header-platforms {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    width: 100%;
    height: 48px;
    transition: padding-left .28s var(--ease), height .28s var(--ease);
  }
  .platform-fixed {
    display: none;
  }
  .platform-button {
    width: 40px;
    height: 40px;
  }
  .platform-icon {
    width: 28px;
    height: 28px;
  }
  .platform-select-icon {
    width: var(--toolbar-icon-size);
    height: var(--toolbar-icon-size);
  }
  .header-marquee {
    --icon-step: 48px;
    width: 100%;
    transition: height .28s var(--ease);
  }
  .platform-nav {
    height: 100%;
  }
  .platform-hover-title {
    display: none;
  }
  .header-main { top: 18px; right: 18px; }
  .header-actions { width: 108px; height: var(--control-h); gap: 6px; justify-content: flex-end; }
  .image-action,
  .theme-action,
  .language-action {
    width: 32px;
    height: 32px;
  }
  .toolbar {
    position: fixed;
    top: var(--sticky-topbar-h);
    left: 0;
    right: 0;
    min-height: 0;
    padding: 4px 16px 10px;
    transition: top .28s var(--ease), padding .28s var(--ease), min-height .28s var(--ease), background .28s var(--ease);
  }
  .toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 0;
  }
  .toolbar .header-actions {
    position: absolute;
    top: 4px;
    right: 16px;
    transform: none;
  }
  .platform-select {
    width: calc(100% - 118px);
    transition: width .28s var(--ease);
  }
  .platform-select-trigger { width: 100%; }
  .platform-select-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100vw - 32px);
    max-height: min(360px, calc(100vh - 170px));
  }
  .search-box {
    flex: 1 1 0;
    width: auto;
    min-width: 128px;
    transition: opacity .2s var(--ease), transform .28s var(--ease);
  }
  .filter-strip {
    position: relative;
    justify-content: flex-start;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 3px;
    width: auto;
    max-width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0 2px 4px;
    transition: opacity .2s var(--ease), transform .28s var(--ease);
  }
  .filter-menu { margin-left: 0; }
  .filter-menu summary,
  .image-toggle {
    height: 32px;
    font-size: 13px;
    scroll-snap-align: start;
  }
  .filter-menu summary {
    width: auto;
    padding: 0 12px;
  }
  .image-toggle,
  .sort-menu summary {
    width: 34px;
    height: var(--control-h);
    padding: 0;
    border-color: transparent;
    background: transparent;
  }
  .filter-menu summary { gap: 8px; }
  .sort-menu summary { gap: 0; }
  .image-toggle {
    margin-left: 0;
  }
  .ratio-menu + .image-toggle {
    margin-left: 0;
  }
  .image-toggle .control-text,
  .sort-menu .control-text {
    display: none;
  }
  .image-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
  }
  .image-toggle input::after {
    content: none;
  }
  .image-toggle .toggle-icon {
    display: inline-grid;
  }
  .toggle-icon,
  .control-icon,
  .toggle-icon svg,
  .control-icon svg {
    width: var(--toolbar-icon-size);
    height: var(--toolbar-icon-size);
  }
  .toggle-icon,
  .control-icon {
    color: color-mix(in srgb, var(--text) 74%, transparent);
  }
  .image-toggle input:checked + .toggle-icon {
    color: var(--text);
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
  }
  .sort-menu summary::after {
    content: none;
  }
  .sort-menu summary {
    color: color-mix(in srgb, var(--text) 74%, transparent);
    background: transparent;
  }
  .sort-menu[open] summary,
  .sort-menu summary:hover,
  .image-toggle:hover {
    border-color: transparent;
    background: transparent;
  }
  .filter-menu-panel {
    left: 0;
    z-index: 120;
    transform: none;
  }
  .sort-menu .filter-menu-panel {
    left: auto;
    right: 0;
  }
  body.is-mobile-compact-top .workspace {
    padding-top: var(--compact-top-h);
  }
  body.is-mobile-compact-top .workspace-topbar {
    min-height: var(--compact-top-h);
    padding: 6px 10px 6px 154px;
    z-index: 220;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
  }
  body.is-mobile-compact-top .header-platforms {
    height: 46px;
  }
  body.is-mobile-compact-top .header-marquee {
    height: 46px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  body.is-mobile-compact-top .toolbar {
    top: 0;
    z-index: 230;
    display: flex;
    align-items: center;
    height: var(--compact-top-h);
    max-height: var(--compact-top-h);
    min-height: var(--compact-top-h);
    padding: 0 10px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }
  body.is-mobile-compact-top .toolbar-inner {
    align-items: center;
    flex-wrap: nowrap;
    height: 100%;
  }
  body.is-mobile-compact-top .platform-select {
    width: 136px;
    pointer-events: auto;
  }
  body.is-mobile-compact-top .platform-select-trigger {
    height: 34px;
  }
  body.is-mobile-compact-top .platform-select-panel {
    width: calc(100vw - 20px);
  }
  body.is-mobile-compact-top .search-box,
  body.is-mobile-compact-top .filter-strip,
  body.is-mobile-compact-top .toolbar .header-actions {
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
  }
  .artboard-grid.is-card-hovering .artboard-card:not(.is-card-hovered) {
    opacity: 1;
    filter: none;
  }
  .canvas { padding: 16px 16px 96px; }
  .artboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
    width: 100%;
  }
  .artboard-stage {
    height: 170px;
    min-height: 170px;
    align-items: end;
  }
  .artboard-card:hover .board-tooltip {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  .board-info strong { font-size: 13px; }
  .detail-layout { grid-template-columns: 1fr; }
  .dpi-grid, .specs { grid-template-columns: 1fr; }
  .toast { left: 18px; right: 18px; text-align: center; }
}
