:root {
  --bg: #0b0f14;
  --bg-elevated: #141a22;
  --ink: #f3f1ec;
  --muted: #9aa3ad;
  --line: rgba(243, 241, 236, 0.12);
  --accent: #ff5a3d;
  --accent-deep: #e0452c;
  --warm: #3dd6c3;
  --danger: #e07a6a;
  --radius: 4px;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --max: 1080px;
  --header-h: 72px;
  --section-y: clamp(64px, 10vw, 112px);
  --measure: 62ch;
  --section-head-gap: 28px;
  --row-y: clamp(22px, 3vw, 32px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(255, 90, 61, 0.20), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(61, 214, 195, 0.10), transparent 50%),
    linear-gradient(180deg, #0b0f14 0%, #121821 45%, #0b0f14 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(232, 238, 244, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 238, 244, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
  padding: 0 clamp(16px, 4vw, 40px);
  backdrop-filter: blur(16px);
  background: rgba(11, 15, 20, 0.82);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.75;
}

::selection {
  background: rgba(255, 90, 61, 0.40);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 12px;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 26, 34, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lang-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 90, 61, 0.95), var(--accent-deep));
  box-shadow: 0 4px 14px rgba(255, 90, 61, 0.28);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.lang-toggle[data-lang="en"] .lang-pill {
  transform: translateX(100%);
}

.lang-btn {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.22s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 26, 34, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

main {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding-bottom: var(--section-y);
}

.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 64px;
  animation: rise 0.8s ease both;
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #ffffff 10%, #ffd0c6 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 22px 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  animation: rise 0.9s ease 0.12s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  animation: rise 1s ease 0.22s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #1a0a07;
}

.btn-primary:hover { background: #ff7158; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover { border-color: rgba(255, 90, 61, 0.55); }

.btn-danger {
  background: transparent;
  border-color: rgba(224, 122, 106, 0.45);
  color: var(--danger);
}

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: var(--section-head-gap);
  max-width: var(--measure);
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: stretch;
}

.about-grid.has-video,
.about-grid.has-panel {
  grid-template-columns: 1.05fr 0.95fr;
}

.about-copy p {
  margin: 0 0 16px;
}

.about-text {
  max-width: var(--measure);
  margin-bottom: 8px;
}

.about-text p {
  margin: 0 0 1.1em;
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  line-height: 1.7;
  color: #d8d4cc;
}

.about-text p:last-child {
  margin-bottom: 0;
}

#aboutText {
  max-width: var(--measure);
}

.about-stack {
  margin: 18px 0 14px !important;
  max-width: var(--measure);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted) !important;
}

.about-location {
  color: var(--accent) !important;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.5;
}

.about-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(420px, 52vh);
  padding: clamp(8px, 2vw, 16px);
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  animation: rise 0.85s ease 0.1s both;
}

.about-panel[hidden] {
  display: none;
}

.about-panel__glow {
  position: absolute;
  inset: 12% 8%;
  background: radial-gradient(ellipse at center, rgba(255, 90, 61, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.about-panel__logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
  user-select: none;
  transform: translate(18px, -48px);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: fade 0.8s ease both;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-list,
.cert-list {
  display: grid;
  gap: 0;
}

.project-item,
.cert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  padding: var(--row-y) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  animation: rise 0.6s ease both;
  transition: background 0.25s ease, padding-left 0.25s ease;
}

.project-item:hover,
.cert-item:hover {
  background: linear-gradient(90deg, rgba(255, 90, 61, 0.08), transparent 70%);
  padding-left: 8px;
}

.project-item.is-open:hover {
  padding-left: 0;
}

.project-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.project-chevron {
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.project-item.is-open .project-chevron {
  transform: rotate(-135deg);
  margin-top: 12px;
}

.project-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 22px;
  padding: 8px 0 12px;
  animation: rise 0.35s ease both;
}

.project-detail-block h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
}

.project-docs {
  margin: 0;
  white-space: pre-wrap;
  color: #d8d4cc;
  line-height: 1.6;
}

.project-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.project-shot {
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.project-shot--qr {
  cursor: default;
}

.project-shot--qr,
.project-shot--qr:hover,
.project-shot--qr:focus,
.project-shot--qr:focus-visible {
  transform: none;
  opacity: 1;
  filter: none;
  outline: none;
}

.project-shot--qr img {
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  padding: 12px;
  transition: none;
  transform: none;
}

.project-shot--qr:hover img,
.project-shot--qr:focus img {
  transform: none;
  opacity: 1;
  filter: none;
}

.project-docs a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.project-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-item:first-child,
.cert-item:first-child { border-top: 1px solid var(--line); }

.project-title,
.cert-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.project-desc,
.cert-meta {
  margin: 0;
  color: var(--muted);
}

.project-tech {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.item-actions a,
.item-actions button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.project-thumb {
  grid-column: 1 / -1;
  width: min(100%, 420px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 4px;
}

.project-thumb--detail {
  width: min(100%, 320px);
  margin-top: 0;
  background: #fff;
}

.project-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
}

.cv-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: var(--measure);
}

.contact-row,
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 4px;
}

.social-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(20, 26, 34, 0.55);
  text-decoration: none;
  transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.social-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon:hover,
.social-icon:focus-visible {
  color: var(--accent);
  border-color: rgba(255, 90, 61, 0.55);
  background: rgba(255, 90, 61, 0.08);
  transform: scale(1.08);
}

.social-icon:active {
  transform: scale(0.96);
  color: var(--accent-deep);
}

.social-icon.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.social-icon.is-disabled:hover,
.social-icon.is-disabled:focus-visible {
  transform: scale(1.04);
}

.social-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 6px;
  background: #1c1412;
  border: 1px solid rgba(255, 90, 61, 0.35);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

.social-icon.is-disabled:hover .social-tip,
.social-icon.is-disabled:focus-visible .social-tip,
.social-icon.is-disabled.is-tip-open .social-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  color: var(--muted);
  margin: 0;
}

.site-footer {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: calc(var(--section-y) * 0.45) 0 var(--section-y);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 16px;
  }

  .brand {
    font-size: 0.9rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand::after {
    bottom: -5px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-toggle {
    height: 40px;
  }

  .lang-btn {
    min-width: 40px;
    padding: 0 11px;
    display: grid;
    place-items: center;
    font-size: 0.66rem;
  }

  .nav-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 16px 18px;
    background: rgba(11, 15, 20, 0.97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .nav.is-open { display: flex; }

  .nav a {
    padding: 15px 4px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a::after {
    left: 4px;
    right: auto;
    width: 24px;
    bottom: 12px;
  }

  .about-grid,
  .about-grid.has-video,
  .about-grid.has-panel {
    grid-template-columns: 1fr;
  }

  .about-panel {
    min-height: 240px;
  }

  .about-panel__logo {
    width: min(100%, 300px);
    transform: translate(8px, -16px);
  }

  .about-copy .btn,
  #videoLink {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-cta {
    width: 100%;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
    min-width: min(100%, 160px);
    justify-content: center;
    text-align: center;
  }

  .project-item,
  .cert-item {
    grid-template-columns: 1fr;
  }

  .item-actions { justify-content: flex-start; }
}

/* ——— Admin ——— */
.admin-body {
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(255, 90, 61, 0.14), transparent 50%),
    var(--bg);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.btn-block {
  width: 100%;
}

.pin-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.pin-card {
  width: min(100%, 400px);
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 26, 40, 0.9);
  animation: rise 0.55s ease both;
}

.pin-card h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.pin-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.pin-card input {
  width: 100%;
  min-height: 52px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0f14;
  color: var(--ink);
  font: 600 1.05rem/1 var(--font-body);
  letter-spacing: 0.12em;
  text-align: center;
}

.pin-card input::placeholder {
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.7;
}

.pin-error {
  min-height: 1.2em;
  margin: 0 0 10px;
  color: var(--danger);
  font-size: 0.9rem;
}

.pin-card-footer {
  margin-top: 18px;
}

.admin-app { display: none; }
.admin-app.is-open {
  display: block;
  animation: rise 0.45s ease both;
}
.pin-screen.is-hidden { display: none; }

.admin-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(14px);
}

.admin-top h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.admin-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-wrap {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 28px 0 80px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.88rem var(--font-body);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.admin-tab:hover {
  color: var(--ink);
}

.admin-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.admin-panel { display: none; }
.admin-panel.is-active {
  display: block;
  animation: adminFade 0.28s ease both;
}

@keyframes adminFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-form {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 26, 40, 0.55);
}

.admin-form h2,
.admin-list h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0f14;
  color: var(--ink);
  font: 500 0.95rem/1.4 var(--font-body);
  padding: 12px 12px;
}

.field textarea { min-height: 110px; resize: vertical; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 26, 40, 0.4);
}

.admin-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.admin-item-head strong {
  font-family: var(--font-display);
}

.admin-item-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-actions .btn {
  min-height: 48px;
}

.status-toast {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: min(90vw, 320px);
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #2a1612;
  border: 1px solid rgba(255, 90, 61, 0.40);
  color: var(--ink);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  z-index: 50;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden { display: none !important; }

@media (max-width: 700px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .admin-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .admin-top h1 {
    font-size: 1.15rem;
  }

  .admin-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .admin-top-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .admin-wrap {
    width: 100%;
    padding: 16px 16px 96px;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
  }

  .admin-tab {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .admin-form {
    padding: 16px;
    gap: 12px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-actions .btn {
    width: 100%;
  }

  .admin-item-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-item-head .form-actions {
    grid-template-columns: 1fr 1fr;
  }

  .admin-item-head .form-actions .btn:only-child,
  .admin-item-head .form-actions .btn:nth-child(3) {
    grid-column: 1 / -1;
  }

  .pin-card {
    padding: 28px 20px;
  }

  .pin-card input,
  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }

  .status-toast {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}
