:root {
  --surface: #101014;
  --surface-2: #17161f;
  --line: #363246;
  --text: #f0ece3;
  --muted: #b5ab9a;
  --accent: #d26a2f;
  --accent-2: #f3b13f;
  --glow: rgba(242, 120, 44, 0.28);
  --heading-font: "Cinzel", "Times New Roman", serif;
  --body-font: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  --logo-tone-a: #f1b44a;
  --logo-tone-b: #ca5e2e;
  --logo-hue: -8deg;
  --logo-animation-duration: 14s;
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  position: relative;
  font-family: var(--body-font);
  color: var(--text);
  background: #0f1016;
  transition: background 260ms ease, color 260ms ease;
}

body.cyber-section {
  color: #d5f0ff;
  background:
    radial-gradient(circle at 86% 16%, rgba(255, 34, 73, 0.24), transparent 34%),
    radial-gradient(circle at 8% 90%, rgba(22, 217, 255, 0.16), transparent 36%),
    linear-gradient(165deg, #08090f, #0e1019 48%, #121116);
}

body.dnd-section {
  color: #3f2f22;
  background:
    radial-gradient(circle at 88% 14%, rgba(160, 62, 36, 0.16), transparent 30%),
    radial-gradient(circle at 8% 86%, rgba(182, 124, 58, 0.14), transparent 34%),
    linear-gradient(160deg, #e7d8bd, #dcc8a7 48%, #d2bb97);
}

body.dnd-section .panel:not(.dnd-workspace) {
  border-color: rgba(142, 47, 30, 0.36);
  background:
    linear-gradient(180deg, rgba(241, 227, 199, 0.95), rgba(231, 214, 182, 0.93));
}

body.dnd-section p,
body.dnd-section small {
  color: #5a4634;
}

body.dnd-section .tag {
  border-color: rgba(142, 47, 30, 0.38);
  color: #6b2319;
  background: rgba(193, 121, 66, 0.14);
}

body.dnd-section .btn-solid {
  background: linear-gradient(120deg, #8e2f1e, #b44b2d);
  border: 1px solid rgba(255, 233, 206, 0.45);
  color: #fff2dc;
}

body.dnd-section .btn-ghost {
  border-color: rgba(142, 47, 30, 0.45);
  color: #6e1f18;
  background: rgba(243, 224, 191, 0.3);
}

.topbar {
  position: relative;
  z-index: 60;
  width: min(1068px, calc(100% - 2rem));
  margin: 1.1rem auto 0;
  padding: 1.22rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(20, 19, 28, 0.93), rgba(15, 15, 22, 0.9));
  backdrop-filter: blur(9px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.15rem;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.82rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--heading-font);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.logo-mark {
  position: relative;
  isolation: isolate;
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
  background: linear-gradient(140deg, var(--logo-tone-a), var(--logo-tone-b));
  filter:
    hue-rotate(var(--logo-hue))
    saturate(1.22)
    drop-shadow(0 0 9px rgba(243, 176, 63, 0.35));
  -webkit-mask-image: url("/assets/logomask.png");
  mask-image: url("/assets/logomask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  animation: logo-shift var(--logo-animation-duration) linear infinite;
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  -webkit-mask-image: url("/assets/logomask.png");
  mask-image: url("/assets/logomask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

body[data-theme="dnd"] {
  --logo-tone-a: #b93732;
  --logo-tone-b: #5a0b13;
  --logo-hue: 0deg;
  --logo-animation-duration: 18s;
}

body[data-theme="dnd"] .logo-mark {
  background: radial-gradient(circle at 45% 38%, #ef6a56 0%, #c53034 30%, #8a1626 58%, #3a070f 92%);
  background-size: 190% 190%;
  animation:
    dnd-logo-heat 6.5s ease-in-out infinite,
    dnd-logo-ember 16s ease-in-out infinite;
}

body[data-theme="dnd"] .logo-mark::before {
  background: linear-gradient(120deg, transparent 34%, rgba(255, 231, 174, 0.72) 50%, transparent 66%);
  mix-blend-mode: screen;
  animation: dnd-logo-glint 7.8s ease-in-out infinite;
}

body[data-theme="dnd"] .logo-mark::after {
  inset: -30%;
  -webkit-mask-image: none;
  mask-image: none;
  background: radial-gradient(circle at center, rgba(178, 30, 34, 0.56) 0%, rgba(105, 14, 24, 0.3) 42%, transparent 74%);
  filter: blur(7px);
  mix-blend-mode: normal;
  animation: dnd-logo-forge 5.8s ease-in-out infinite;
}

body[data-theme="cyber"] {
  --logo-tone-a: #17dbff;
  --logo-tone-b: #ff3970;
  --logo-hue: 20deg;
  --logo-animation-duration: 8s;
}

body[data-theme="cyber"] .logo-mark::before {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(24, 228, 255, 0.95) 0px,
      rgba(24, 228, 255, 0.95) 1px,
      transparent 1px,
      transparent 5px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 9px,
      rgba(255, 57, 112, 0.85) 9px,
      rgba(255, 57, 112, 0.85) 10px
    );
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: cyber-logo-lines 1.9s linear infinite;
}

body[data-theme="cyber"] .logo-mark::after {
  background:
    linear-gradient(92deg, rgba(24, 228, 255, 0.55) 0%, transparent 34%, rgba(255, 57, 112, 0.52) 67%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.48;
  animation: cyber-logo-glitch 3.4s steps(1, end) infinite;
}

body[data-theme="fantasy"] {
  --logo-tone-a: #f1b44a;
  --logo-tone-b: #ca5e2e;
  --logo-hue: -8deg;
  --logo-animation-duration: 14s;
}

.main-nav {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.98rem;
  line-height: 1;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text);
  background: rgba(210, 106, 47, 0.2);
}

.topbar .btn {
  padding: 0.72rem 1.08rem;
  border-radius: 11px;
}

.account-menu {
  position: relative;
  justify-self: end;
  z-index: 70;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.55rem 0.34rem 0.34rem;
  font: inherit;
  color: var(--text);
  background: rgba(20, 19, 30, 0.92);
  cursor: pointer;
}

.profile-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #1a1000;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: var(--heading-font);
}

.profile-caret {
  color: var(--muted);
  font-size: 0.82rem;
  transform: translateY(-1px);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 10.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem;
  background: linear-gradient(180deg, rgba(19, 18, 28, 0.98), rgba(14, 13, 22, 0.97));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  z-index: 20;
}

.profile-dropdown button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: 0.48rem 0.58rem;
  font: inherit;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.profile-dropdown button:hover {
  background: rgba(210, 106, 47, 0.18);
}

.app-shell {
  max-width: 1100px;
  margin: 1.2rem auto;
  padding: 0 1rem 1.8rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(22, 21, 31, 0.92), rgba(17, 16, 24, 0.9));
  backdrop-filter: blur(5px);
  padding: 1.35rem;
}

body.cyber-section .panel:not(.cyber-workspace) {
  border-color: rgba(19, 214, 255, 0.65);
  background:
    linear-gradient(180deg, rgba(16, 14, 20, 0.92), rgba(20, 16, 23, 0.9));
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--heading-font);
}

h1 {
  font-size: clamp(1.95rem, 4.3vw, 3.3rem);
  line-height: 1.1;
}

p {
  color: var(--muted);
  line-height: 1.68;
  margin: 0.15rem 0 0.85rem;
}

body.cyber-section p,
body.cyber-section small {
  color: #bb98a4;
}

.pill {
  display: inline-flex;
  margin-bottom: 0.72rem;
  padding: 0.28rem 0.63rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.8rem;
  background: rgba(210, 106, 47, 0.22);
}

body.cyber-section .pill {
  border-color: #13d6ff;
  color: #ffe67b;
  background: linear-gradient(120deg, rgba(255, 42, 84, 0.78), rgba(255, 126, 40, 0.74));
}

.stack {
  display: grid;
  gap: 1rem;
}

.cards {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.portal-stage {
  position: relative;
  overflow: hidden;
  border-color: rgba(243, 176, 63, 0.5);
  background:
    radial-gradient(circle at 14% 18%, rgba(243, 176, 63, 0.18), transparent 32%),
    radial-gradient(circle at 84% 80%, rgba(210, 106, 47, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(20, 16, 22, 0.96), rgba(18, 14, 19, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(243, 176, 63, 0.18),
    inset 0 0 44px rgba(210, 106, 47, 0.08);
}

body.portal-page .portal-stage::before,
body.portal-page .portal-stage::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
  border: 1px solid rgba(243, 176, 63, 0.35);
}

body.portal-page .portal-stage::before {
  left: -72px;
  background:
    radial-gradient(circle at center, rgba(243, 176, 63, 0.26), rgba(210, 106, 47, 0.08) 58%, transparent 74%);
  box-shadow: 0 0 32px rgba(243, 176, 63, 0.14);
}

body.portal-page .portal-stage::after {
  right: -72px;
  background:
    radial-gradient(circle at center, rgba(243, 176, 63, 0.16), rgba(210, 106, 47, 0.05) 58%, transparent 74%);
  box-shadow: 0 0 24px rgba(210, 106, 47, 0.12);
}

body.portal-page .portal-stage .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolkit-card {
  position: relative;
  padding-top: 1.25rem;
}

.toolkit-card.is-active-toolkit {
  box-shadow:
    inset 0 0 0 2px rgba(243, 176, 63, 0.45),
    0 0 18px rgba(243, 176, 63, 0.16);
}

.toolkit-pin-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 1px solid rgba(243, 176, 63, 0.5);
  background: rgba(243, 176, 63, 0.12);
  color: #ffe5bc;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toolkit-pin-btn:hover {
  border-color: rgba(243, 176, 63, 0.86);
  background: rgba(243, 176, 63, 0.22);
}

.toolkit-pin-btn.is-pinned {
  border-color: rgba(255, 229, 125, 0.92);
  background: rgba(255, 229, 125, 0.28);
  color: #1d1300;
}

.toolkit-card.dnd-card .btn-solid {
  background: linear-gradient(120deg, #8e2f1e, #b44b2d);
  border: 1px solid rgba(255, 233, 206, 0.45);
  color: #fff2dc;
}

.toolkit-card.dnd-card .btn-ghost {
  border-color: rgba(142, 47, 30, 0.45);
  color: #6e1f18;
  background: rgba(243, 224, 191, 0.3);
}

.toolkit-card.dnd-card .delete-toolkit-btn {
  border-color: rgba(142, 47, 30, 0.62);
  color: #7f2018;
  background: rgba(180, 64, 47, 0.14);
}

.toolkit-card.dnd-card .delete-toolkit-btn:hover {
  border-color: rgba(170, 42, 30, 0.9);
  color: #fff0db;
  background: rgba(160, 30, 24, 0.68);
}

.toolkit-card.dnd-card .toolkit-pin-btn {
  border-color: rgba(142, 47, 30, 0.62);
  background: rgba(142, 47, 30, 0.18);
  color: #7f2018;
}

.toolkit-card.dnd-card .toolkit-pin-btn.is-pinned {
  border-color: rgba(142, 47, 30, 0.95);
  background: rgba(142, 47, 30, 0.86);
  color: #ffe9cd;
}

.toolkit-card.cyber-card .btn-solid {
  background: #ffd532;
  border: 1px solid #ff486f;
  color: #140f00;
  font-weight: 700;
}

.toolkit-card.cyber-card .btn-ghost {
  border-color: #13d6ff;
  color: #9beeff;
  background: rgba(10, 20, 27, 0.75);
}

.toolkit-card.cyber-card .delete-toolkit-btn {
  border-color: rgba(255, 74, 125, 0.85);
  color: #ffd4e5;
  background: rgba(148, 20, 62, 0.42);
}

.toolkit-card.cyber-card .delete-toolkit-btn:hover {
  border-color: rgba(255, 95, 150, 1);
  color: #fff0f6;
  background: rgba(196, 24, 88, 0.76);
}

.toolkit-card.cyber-card .toolkit-pin-btn {
  border-color: rgba(22, 217, 255, 0.88);
  background: rgba(22, 217, 255, 0.2);
  color: #d9ffff;
}

.toolkit-card.cyber-card .toolkit-pin-btn.is-pinned {
  border-color: rgba(255, 71, 123, 0.98);
  background: rgba(255, 71, 123, 0.72);
  color: #fff7fb;
}

.card-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.05rem;
  background: linear-gradient(180deg, rgba(24, 23, 34, 0.92), rgba(19, 18, 27, 0.9));
  color: var(--text);
  cursor: pointer;
}

.card-btn:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

.system-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.system-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  z-index: -1;
}

.dnd-card {
  border-color: #8e2f1e;
  background:
    radial-gradient(circle at 88% 16%, rgba(150, 47, 26, 0.18), transparent 42%),
    linear-gradient(145deg, #f2e8d2, #e6d7ba);
  box-shadow:
    inset 0 0 0 2px rgba(142, 47, 30, 0.36),
    inset 0 0 28px rgba(121, 73, 35, 0.12);
}

.dnd-card::before {
  background:
    repeating-linear-gradient(
      -26deg,
      rgba(118, 72, 35, 0.08) 0px,
      rgba(118, 72, 35, 0.08) 2px,
      transparent 2px,
      transparent 10px
    );
}

.dnd-card h3 {
  color: #7f2018;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dnd-card p {
  color: #4f4030;
  font-weight: 500;
}

.dnd-card .tag {
  border-color: #8e2f1e;
  color: #fff0db;
  background: linear-gradient(120deg, #8e2f1e, #b34b2e);
}

.cyber-card {
  border-color: #ff2f63;
  background:
    radial-gradient(circle at 86% 14%, rgba(22, 217, 255, 0.34), transparent 42%),
    radial-gradient(circle at 14% 88%, rgba(255, 47, 99, 0.29), transparent 48%),
    linear-gradient(145deg, #0f1330, #191c49);
  box-shadow:
    inset 0 0 0 1px rgba(255, 47, 99, 0.42),
    0 0 0 1px rgba(22, 217, 255, 0.2),
    0 0 22px rgba(255, 42, 84, 0.2);
}

.cyber-card h3 {
  color: #ffe77c;
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cyber-card p {
  color: #d79cab;
}

.cyber-card::before {
  background:
    linear-gradient(rgba(22, 217, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 217, 255, 0.11) 1px, transparent 1px),
    repeating-linear-gradient(
      -14deg,
      transparent 0px,
      transparent 10px,
      rgba(255, 47, 99, 0.08) 10px,
      rgba(255, 47, 99, 0.08) 12px
    );
  background-size: 18px 18px, 18px 18px, auto;
}

.cyber-card .tag,
.cyber-workspace .pill {
  border-color: #ff4376;
  color: #ffe5ef;
  background: linear-gradient(120deg, rgba(255, 47, 99, 0.75), rgba(22, 217, 255, 0.62));
}

.tag {
  display: inline-flex;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  color: #d8c9b2;
  background: rgba(210, 106, 47, 0.15);
  margin-bottom: 0.5rem;
}

body.cyber-section .tag {
  border-color: #13d6ff;
  color: #ffe67b;
  background: rgba(26, 19, 24, 0.76);
}

.status-note {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
}

.ok-note {
  color: #1f7a4a;
}

.warn-note {
  color: #ff7f3f;
  font-weight: 600;
}

.cyber-workspace {
  position: relative;
  overflow: hidden;
  border-color: #13d6ff;
  background:
    radial-gradient(circle at 84% 20%, rgba(255, 31, 75, 0.26), transparent 34%),
    radial-gradient(circle at 10% 82%, rgba(19, 214, 255, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(7, 8, 14, 0.98), rgba(13, 11, 18, 0.97));
  box-shadow:
    inset 0 0 0 1px rgba(19, 214, 255, 0.32),
    inset 0 0 56px rgba(255, 42, 84, 0.12);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.cyber-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(19, 214, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 214, 255, 0.1) 1px, transparent 1px),
    repeating-linear-gradient(
      -18deg,
      transparent 0px,
      transparent 13px,
      rgba(255, 42, 84, 0.1) 13px,
      rgba(255, 42, 84, 0.1) 15px
    );
  background-size: 22px 22px, 22px 22px, auto;
  opacity: 0.35;
  pointer-events: none;
}

.cyber-workspace h1,
.cyber-workspace h2,
.cyber-workspace h3 {
  position: relative;
  z-index: 1;
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe57b;
  text-shadow:
    0 0 16px rgba(255, 213, 50, 0.18),
    0 0 1px rgba(255, 255, 255, 0.28);
}

.cyber-workspace p,
.cyber-workspace small,
.cyber-workspace .list li span {
  position: relative;
  z-index: 1;
  color: #c79cab;
}

.cyber-workspace .list li {
  position: relative;
  z-index: 1;
  border-bottom-color: rgba(22, 217, 255, 0.4);
}

.cyber-workspace .list li small {
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d0f4ff;
}

.cyber-workspace .btn-ghost {
  position: relative;
  z-index: 1;
  border-color: #13d6ff;
  background: rgba(6, 18, 24, 0.72);
  color: #a7f3ff;
}

.cyber-workspace .btn-solid {
  position: relative;
  z-index: 1;
  background: #ffd532;
  border: 1px solid #ff426a;
  color: #130d00;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(19, 214, 255, 0.28),
    0 0 20px rgba(255, 50, 90, 0.22);
}

.cyber-workspace .warn-note {
  position: relative;
  z-index: 1;
  color: #ff6f9a;
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  letter-spacing: 0.03em;
}

.dnd-workspace {
  position: relative;
  border-color: #8e2f1e;
  background:
    radial-gradient(circle at 14% 16%, rgba(173, 77, 40, 0.2), transparent 32%),
    linear-gradient(180deg, #eee1c8, #e4d3b5);
  box-shadow:
    inset 0 0 0 2px rgba(142, 47, 30, 0.36),
    inset 0 0 36px rgba(139, 86, 41, 0.1);
}

.dnd-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -24deg,
      transparent 0px,
      transparent 14px,
      rgba(132, 86, 50, 0.05) 14px,
      rgba(132, 86, 50, 0.05) 16px
    );
  opacity: 0.5;
  pointer-events: none;
}

.dnd-workspace h1,
.dnd-workspace h2,
.dnd-workspace h3 {
  position: relative;
  z-index: 1;
  color: #7b2018;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dnd-workspace p,
.dnd-workspace small,
.dnd-workspace .list li span {
  position: relative;
  z-index: 1;
  color: #4d3d2e;
}

.dnd-workspace .list li {
  position: relative;
  z-index: 1;
  border-bottom-color: rgba(142, 47, 30, 0.28);
}

.dnd-workspace .list li small {
  color: #7f2b22;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dnd-workspace .btn-solid {
  position: relative;
  z-index: 1;
  background: linear-gradient(120deg, #8e2f1e, #b44b2d);
  border: 1px solid rgba(255, 233, 206, 0.45);
  color: #fff2dc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dnd-workspace .btn-ghost {
  position: relative;
  z-index: 1;
  border-color: rgba(142, 47, 30, 0.45);
  color: #6e1f18;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.62rem 0.95rem;
  font: inherit;
  cursor: pointer;
}

.btn-solid {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #190f00;
  font-weight: 700;
}

body.cyber-section .btn-solid {
  background: #ffd532;
  border: 1px solid #ff486f;
  color: #140f00;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(19, 214, 255, 0.3),
    0 0 18px rgba(255, 72, 111, 0.2);
}

body.cyber-section .btn-solid:hover {
  background: #ffe15c;
}

.topbar .btn-solid,
body.cyber-section .topbar .btn-solid,
body.dnd-section .topbar .btn-solid {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border: 1px solid transparent;
  color: #190f00;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

body.cyber-section .btn-ghost {
  border-color: #13d6ff;
  color: #9beeff;
  background: rgba(10, 20, 27, 0.75);
}

.btn-row {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.portal-back-row {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.portal-toolbar {
  margin-top: 0.2rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.portal-create-row {
  margin-top: 0;
}

.portal-sort-row {
  margin-top: 0;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid rgba(243, 176, 63, 0.35);
  border-radius: 8px;
  background: rgba(243, 176, 63, 0.08);
}

.portal-sort-row .field-label {
  margin: 0;
  font-size: 0.76rem;
  opacity: 0.92;
}

.portal-sort-row select {
  width: auto;
  min-width: 8.4rem;
  font-size: 0.8rem;
  padding: 0.32rem 0.42rem;
  border-radius: 7px;
}

.portal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.52rem 0.78rem;
  border-color: rgba(210, 106, 47, 0.6);
  color: #ffd6b0;
  background: rgba(210, 106, 47, 0.14);
}

.portal-back-btn:hover {
  border-color: rgba(243, 177, 63, 0.82);
  color: #ffe7cf;
  background: rgba(243, 177, 63, 0.18);
}

.delete-toolkit-btn:hover {
  border-color: rgba(220, 70, 70, 0.9);
  color: #ffd6d6;
  background: rgba(180, 40, 40, 0.22);
}

.delete-confirm-box {
  margin-top: 0.7rem;
  padding: 0.72rem;
  border: 1px solid rgba(220, 70, 70, 0.58);
  border-radius: 10px;
  background: rgba(120, 20, 25, 0.2);
}

.delete-confirm-box p {
  margin: 0;
  color: #ffd6d6;
}

.btn-danger {
  border-color: rgba(232, 88, 88, 0.95);
  color: #ffe6e6;
  background: rgba(188, 40, 40, 0.58);
}

.btn-danger:hover {
  background: rgba(220, 52, 52, 0.72);
}

.list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.62rem;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.42rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 14, 0.46);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(900px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 17, 26, 0.96), rgba(14, 13, 21, 0.95));
  padding: 1.1rem;
  position: relative;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.field-label {
  margin: 0.6rem 0 0.22rem;
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-toggle {
  margin: 0.5rem 0 0.25rem;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.24rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 11, 17, 0.48);
}

.auth-tab {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.66rem;
  font: inherit;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--text);
  background: rgba(210, 106, 47, 0.24);
}

.auth-row.is-hidden {
  display: none;
}

.auth-feedback {
  display: block;
  min-height: 1.05rem;
  margin: 0.45rem 0 0.35rem;
  color: #ffb882;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.62rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: rgba(10, 10, 14, 0.42);
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

.price-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem;
  background: linear-gradient(180deg, rgba(25, 23, 35, 0.95), rgba(18, 17, 28, 0.93));
}

.price-box ul {
  margin: 0.7rem 0 0.9rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.icon-close {
  position: absolute;
  right: 0.6rem;
  top: 0.45rem;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}

.stagger {
  opacity: 0;
  transform: translateY(8px);
  animation: enter 360ms ease forwards;
}

.stagger:nth-child(2) {
  animation-delay: 60ms;
}

.stagger:nth-child(3) {
  animation-delay: 120ms;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logo-shift {
  0% {
    filter:
      hue-rotate(calc(var(--logo-hue) - 8deg))
      saturate(1.12)
      drop-shadow(0 0 7px rgba(243, 176, 63, 0.24));
  }

  50% {
    filter:
      hue-rotate(calc(var(--logo-hue) + 8deg))
      saturate(1.28)
      drop-shadow(0 0 12px rgba(243, 176, 63, 0.44));
  }

  100% {
    filter:
      hue-rotate(calc(var(--logo-hue) - 8deg))
      saturate(1.12)
      drop-shadow(0 0 7px rgba(243, 176, 63, 0.24));
  }
}

@keyframes cyber-logo-lines {
  0% {
    transform: translateY(-12%);
    opacity: 0.45;
  }

  50% {
    transform: translateY(12%);
    opacity: 0.72;
  }

  100% {
    transform: translateY(-12%);
    opacity: 0.45;
  }
}

@keyframes cyber-logo-glitch {
  0%,
  82%,
  100% {
    transform: translate(0, 0);
    opacity: 0.3;
  }

  84% {
    transform: translate(-1px, 0);
    opacity: 0.62;
  }

  86% {
    transform: translate(2px, 0);
    opacity: 0.7;
  }

  88% {
    transform: translate(-2px, 1px);
    opacity: 0.55;
  }

  90% {
    transform: translate(1px, -1px);
    opacity: 0.64;
  }

  92% {
    transform: translate(0, 0);
    opacity: 0.35;
  }
}

@keyframes dnd-logo-ember {
  0% {
    background-position: 16% 30%;
  }

  50% {
    background-position: 82% 68%;
  }

  100% {
    background-position: 16% 30%;
  }
}

@keyframes dnd-logo-heat {
  0%,
  100% {
    filter:
      saturate(1.15)
      brightness(1.03)
      drop-shadow(0 0 9px rgba(198, 44, 40, 0.38))
      drop-shadow(0 0 15px rgba(90, 12, 19, 0.28));
  }

  50% {
    filter:
      saturate(1.28)
      brightness(1.13)
      drop-shadow(0 0 14px rgba(220, 50, 44, 0.62))
      drop-shadow(0 0 25px rgba(118, 18, 29, 0.44));
  }
}

@keyframes dnd-logo-glint {
  0%,
  70%,
  100% {
    transform: translateX(-22%);
    opacity: 0;
  }

  76% {
    transform: translateX(0%);
    opacity: 0.36;
  }

  84% {
    transform: translateX(18%);
    opacity: 0.14;
  }
}

@keyframes dnd-logo-forge {
  0%,
  100% {
    opacity: 0.36;
  }

  50% {
    opacity: 0.74;
  }
}

.footer-note {
  max-width: 1100px;
  margin: 0 auto 1.4rem;
  padding: 0 1rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #cbbdaa;
  border: 1px solid rgba(243, 176, 63, 0.28);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  background: rgba(17, 15, 22, 0.74);
}

.brand-badge img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: block;
}

.brand-badge span {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.footer-note p {
  color: #c9bead;
}

body.cyber-section .footer-note {
  color: #9db4d8;
}

.footer-note small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
}

@media (max-width: 920px) {
  .topbar,
  .hero,
  .cards,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 0.7rem;
    padding: 0.96rem 1rem;
  }

  .brand {
    font-size: 1.16rem;
  }

  .logo-mark {
    width: 3.2rem;
    height: 3.2rem;
  }
}
