/* === Portfolio CSS === */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f7;
  --bg-tint: #fafafa;
  --text: #0a0a0a;
  --text-muted: #6b6b6b;
  --text-subtle: #a3a3a3;
  --border: #ececec;
  --border-strong: #d9d9d9;
  --accent: #5B6CFF;
  --accent-hover: #4451DB;
  --accent-soft: #EEF1FF;
  --danger: #E14B4B;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(10, 10, 10, 0.04), 0 4px 16px rgba(10, 10, 10, 0.04);
  --shadow-2: 0 8px 32px rgba(10, 10, 10, 0.08);
  --shadow-3: 0 30px 80px rgba(10, 10, 10, 0.15);
  --max-w: 1320px;
  --gutter: 32px;
  --font-display: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "ss02", "cv11";
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

/* ============ Password Gate ============ */
.gate {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 50;
  padding: 32px;
}
.gate-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,10,10,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.gate-inner {
  position: relative;
  width: 100%;
  max-width: 960px;
  text-align: center;
}
.gate-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.gate-mark .dot {
  width: 6px; height: 6px; background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.gate-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 11vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}
.gate-title .char {
  display: inline-block;
  animation: charReveal 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes charReveal {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.gate-subtitle {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: -0.005em;
  opacity: 0;
  animation: fadeIn 0.7s ease 0.5s forwards;
}
.gate-form {
  margin: 36px auto 0;
  max-width: 560px;
  display: flex;
  gap: 8px;
  align-items: stretch;
  opacity: 0;
  animation: fadeIn 0.7s ease 0.7s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.gate-input {
  flex: 1;
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gate-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.gate-input.error {
  border-color: var(--danger);
  animation: shake 0.4s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.gate-btn {
  background: var(--text);
  color: #fff;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, transform 0.1s;
}
.gate-btn:hover { background: var(--accent); }
.gate-btn:active { transform: scale(0.97); }
.gate-error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-top: 14px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  min-height: 18px;
}
.gate-hint {
  margin-top: 60px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-subtle);
  opacity: 0;
  animation: fadeIn 0.7s ease 1s forwards;
}

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name { font-size: 14px; }
.brand-name small { color: var(--text-muted); font-weight: 500; margin-left: 4px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.lang-toggle button {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.lang-toggle button.active {
  background: var(--text);
  color: #fff;
}
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}
.admin-toggle:hover { border-color: var(--text); }
.admin-toggle.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.admin-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-subtle);
}
.admin-toggle.on .admin-dot {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter) 64px;
  position: relative;
  z-index: 1;
}

/* Floating gradient blobs background */
.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
  animation: blobFloat 22s ease-in-out infinite;
  mix-blend-mode: multiply;
}
.blob-1 {
  width: 520px; height: 520px;
  background:
    radial-gradient(circle at 30% 30%, #4DE3FF 0%, transparent 45%),
    radial-gradient(circle at 70% 65%, #B6FF6B 0%, transparent 45%),
    radial-gradient(circle, #4A6CF7 0%, #4A6CF7 50%, transparent 75%);
  top: -140px; left: -120px;
  animation-delay: 0s;
}
.blob-2 {
  width: 480px; height: 480px;
  background:
    radial-gradient(circle at 35% 35%, #6FD8FF 0%, transparent 50%),
    radial-gradient(circle, #7B2CFF 0%, #7B2CFF 45%, transparent 75%);
  top: 20px; right: -140px;
  animation-delay: -7s;
}
.blob-3 {
  width: 400px; height: 400px;
  background:
    radial-gradient(circle at 35% 40%, #6EE7B7 0%, transparent 45%),
    radial-gradient(circle, #00D4FF 0%, #4A6CF7 55%, transparent 78%);
  bottom: -120px; left: 25%;
  animation-delay: -14s;
  animation-duration: 26s;
}
.blob-4 {
  width: 360px; height: 360px;
  background:
    radial-gradient(circle at 40% 40%, #B388FF 0%, transparent 50%),
    radial-gradient(circle, #5B6CFF 0%, #5B6CFF 45%, transparent 75%);
  top: 40%; left: 60%;
  animation-delay: -10s;
  animation-duration: 30s;
  opacity: 0.5;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(60px, -50px) scale(1.08); }
  50%      { transform: translate(-40px, 40px) scale(0.94); }
  75%      { transform: translate(40px, 30px) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.hero-eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  margin: 0;
}
.hero-line {
  overflow: hidden;
  display: block;
  padding-bottom: 0.18em;
}
.hero-line > span {
  display: block;
  transform: translateY(110%);
  animation: lineRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-line.l1 > span { animation-delay: 0.05s; }
.hero-line.l2 > span { animation-delay: 0.18s; }
.hero-line.l3 > span { animation-delay: 0.32s; }
@keyframes lineRise {
  to { transform: translateY(0); }
}
.hero-accent { color: var(--accent); font-style: italic; font-weight: 500; }
.hero-tagline {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
}
.hero-tagline p {
  margin: 0;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.45;
  color: var(--text);
  max-width: 540px;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.6s forwards;
}
.hero-tagline p span { color: var(--text-muted); }

@media (max-width: 680px) {
  .hero-tagline {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }
  .hero-tagline p { max-width: none; }
}

.hero-stats {
  display: flex;
  gap: 36px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.8s forwards;
}
@media (max-width: 420px) {
  .hero-stats { gap: 22px; }
  .stat-num { font-size: 30px; }
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-num small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-subtle);
  margin-top: 6px;
  text-transform: uppercase;
}

.marquee {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  animation: fadeIn 0.8s ease 1s forwards;
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marqueeScroll 40s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 48px;
}
.marquee-track span::after {
  content: "✶";
  color: var(--accent);
  font-size: 10px;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ Works section ============ */
.works {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter) 32px;
}
.works-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.works-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 56px);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}
.works-head .sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 12px;
  letter-spacing: -0.005em;
}
.works-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.works-count b { color: var(--text); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  align-items: center;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-chip:hover { border-color: var(--text); color: var(--text); }
.filter-chip.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.filter-chip .count {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.7;
}

.add-btn-toolbar {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s, transform 0.1s;
}
.add-btn-toolbar:hover { background: var(--accent-hover); }
.add-btn-toolbar:active { transform: scale(0.97); }

/* === Grid === */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.grid.density-cozy { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.density-compact { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid.density-airy { grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (max-width: 960px) {
  .grid, .grid.density-cozy, .grid.density-compact, .grid.density-airy { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 560px) {
  .grid, .grid.density-cozy, .grid.density-compact, .grid.density-airy { grid-template-columns: 1fr; gap: 14px; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }
.card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
}
.card-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* SNS / Card-News: show full image, no cropping; card height matches image.
   Only drop the square aspect when an image is actually present, so
   no-thumbnail SNS cards keep a visible placeholder + admin controls. */
.card[data-cat="sns"] .card-thumb:has(img) {
  aspect-ratio: auto;
}
.card[data-cat="sns"] .card-thumb-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
}
.card:hover .card-thumb-img { transform: scale(1.04); }
.card[data-cat="sns"]:hover .card-thumb-img { transform: none; }

.card-thumb-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 16px;
}
.card-thumb-placeholder .ph-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(10,10,10,0.5);
  text-align: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  border-radius: 999px;
}
.card-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 40%, rgba(10,10,10,0.55) 100%);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px;
  color: #fff;
}
.card:hover .card-thumb-overlay { opacity: 1; }
.card-thumb-overlay .ov-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.85;
  text-transform: uppercase;
}
.card-thumb-overlay .ov-cta {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-cat-tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  color: var(--text);
}
.card-info {
  padding: 14px 4px 4px;
}
.card-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.card-meta .dot { color: var(--border-strong); }
.card-admin-controls {
  position: absolute;
  top: 12px; right: 12px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.card-admin-btn {
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(10,10,10,0.12);
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.card-admin-btn:hover { background: var(--text); color: #fff; }
.card-admin-btn:active { transform: scale(0.96); }
.card-admin-btn.danger { color: var(--danger); }
.card-admin-btn.danger:hover { background: var(--danger); color: #fff; }

.empty {
  border: 1px dashed var(--border-strong);
  padding: 80px 32px;
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-muted);
}
.empty h3 {
  font-size: 18px;
  color: var(--text);
  margin: 0 0 6px;
}

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: backdropIn 0.2s ease;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1080px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-3);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes modalIn {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal.detail {
  max-width: 1180px;
}
.modal-body {
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(10,10,10,0.06);
  display: grid; place-items: center;
  font-size: 16px;
  z-index: 5;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(10,10,10,0.12); }

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
}
@media (max-width: 880px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.detail-media {
  position: relative;
  background: var(--bg-alt);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-media-img {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: cover;
}
/* SNS / Card-News detail: keep 2-column, but scale image to fit (no crop) */
.modal.detail[data-cat="sns"] .detail-media-img {
  width: 100%;
  height: 100%;
  max-height: 85vh;
  object-fit: contain;
}
.detail-media-ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  padding: 32px;
}
.detail-media-ph .ph-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(10,10,10,0.5);
  text-transform: uppercase;
}
.detail-thumb-strip {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.detail-thumb {
  width: 64px; height: 64px;
  border-radius: 6px;
  background: var(--bg-alt);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.detail-thumb.active { border-color: var(--accent); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumb-ph {
  width: 100%; height: 100%;
}
.detail-nav-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: grid; place-items: center;
  box-shadow: var(--shadow-1);
  transition: transform 0.15s;
}
.detail-nav-btn.prev { left: 16px; }
.detail-nav-btn.next { right: 16px; }
.detail-nav-btn:hover { transform: translateY(-50%) scale(1.06); }
.detail-counter {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10,10,10,0.6);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.detail-info {
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  max-height: 90vh;
}
.detail-info .cat-tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.detail-info h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}
.detail-info .desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  letter-spacing: -0.005em;
}
.detail-info .desc.muted { color: var(--text-muted); }

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px 16px;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.kv .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding-top: 3px;
}
.kv .v { font-size: 14px; color: var(--text); }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: 12px;
  color: var(--text);
  letter-spacing: -0.005em;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  align-self: flex-start;
  transition: background 0.15s;
}
.detail-link:hover { background: var(--accent); }
.detail-link svg { width: 14px; height: 14px; }

/* ============ Editor form ============ */
.editor {
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.editor-head {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.editor-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.editor-body {
  padding: 28px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.field input[type="text"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 110px; }

.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-grid-2 { grid-template-columns: 1fr; } }

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: var(--bg-tint);
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone.has-image {
  padding: 0;
  border-style: solid;
  overflow: hidden;
  background: var(--bg-alt);
}
.dropzone-preview {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.focus-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 110px;
}
.focus-btn {
  aspect-ratio: 1;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  padding: 0;
}
.focus-btn:hover { border-color: var(--accent); }
.focus-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}
.focus-btn.active::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: #fff;
  border-radius: 50%;
}
.field-hint {
  color: var(--text-subtle);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.dropzone-text {
  font-size: 14px;
  color: var(--text-muted);
}
.dropzone-text small {
  display: block;
  margin-top: 4px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dropzone-replace {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(10,10,10,0.7);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.extras-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 600px) { .extras-list { grid-template-columns: repeat(3, 1fr); } }
.extra-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-alt);
  border-radius: 8px;
  overflow: hidden;
}
.extra-item img { width: 100%; height: 100%; object-fit: cover; }
.extra-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(10,10,10,0.7);
  color: #fff;
  font-size: 12px;
  display: grid; place-items: center;
  line-height: 1;
}
.extra-add {
  aspect-ratio: 1;
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-muted);
  font-size: 22px;
  transition: border-color 0.15s, color 0.15s;
}
.extra-add:hover { border-color: var(--accent); color: var(--accent); }

.editor-foot {
  border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  background: var(--bg);
}
.editor-status {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.editor-status-msg {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft, #f1f1f1);
  color: var(--text);
}
.editor-status-msg.error {
  background: #fde6e6;
  color: #b03030;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: rgba(225,75,75,0.08); }

/* ============ Footer ============ */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
  padding: 56px var(--gutter) 48px;
}
.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) { .site-footer-inner { grid-template-columns: 1fr; } }
.site-footer .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
}
.site-footer .contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.site-footer .contact-val {
  font-size: 14px;
  letter-spacing: -0.005em;
  display: block;
  margin-bottom: 4px;
}
.site-footer .copy {
  margin-top: 56px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ============ Tweaks fallback positioning ============ */
.tweaks-host { z-index: 70; }
