@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg-primary: #f8f5ff;
  --bg-surface: #ffffff;
  --bg-surface-2: #f0ebff;
  --bg-surface-3: #e8e0ff;
  --accent: #6d46cb;
  --stamp-gold: #6d46cb;
  --nickname: #6d46cb;
  --ink: #ffffff;
  --text-primary: #1a1035;
  --text-secondary: #4a3a6b;
  --text-muted: #8a7aaa;
  --text-light: #c8bce0;
  --border: rgba(109, 70, 203, 0.12);
  --shadow-soft: 0 4px 24px rgba(109, 70, 203, 0.08);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-xl: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.25s;
  --font: "Inter", -apple-system, system-ui, sans-serif;
  --font-display: "Rajdhani", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", "Space Mono", monospace;
}
html.dark {
  --bg-primary: #050806;
  --bg-surface: #0b100c;
  --bg-surface-2: #121810;
  --bg-surface-3: #1a2216;
  --accent: #6d46cb;
  --stamp-gold: #6d46cb;
  --ink: #050806;
  --text-primary: #f2f5ee;
  --text-secondary: #9fae9f;
  --text-muted: #5b6b5c;
  --text-light: #2a332a;
  --border: rgba(242, 245, 238, 0.1);
  --shadow-soft: 0 4px 22px rgba(0, 0, 0, 0.6);
}
html.dark body {
  background-image: radial-gradient(
      ellipse 55% 35% at 10% 0%,
      rgba(255, 122, 26, 0.06) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 45% 30% at 95% 100%,
      rgba(200, 255, 61, 0.04) 0%,
      transparent 50%
    );
}
html.dark .menu-wrapper::after {
  background: linear-gradient(to right, transparent, var(--bg-surface));
}
html.dark .input-sec {
  background: linear-gradient(to bottom, #050806 75%, transparent);
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--bg-primary);
  font-family: var(--font);
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0;
  margin: 0;
}
.container {
  max-width: 1080px;
  margin: 0 auto;
}
.deco-dialog {
  background: var(--bg-primary);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  text-transform: uppercase;
}
h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-bottom: 0.2rem;
}
h1 span {
  color: var(--accent);
  font-weight: 700;
}
h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 1.3rem 0 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--stamp-gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  flex-shrink: 0;
}
h3 {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin: 1rem 0 0.4rem;
}
p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.75;
  font-size: 0.95rem;
}
ul,
ol {
  padding-left: 1.4rem;
  margin: 0.3rem 0 0.65rem;
}
li {
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.sposec {
  margin: 5px 0;
}
header {
  background: var(--bg-surface-2);
  padding: 8px;
  border-bottom: 1.5px solid var(--border);
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 5px;
}
.brand-link a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
}
.brand-link img {
  height: 32px;
  width: 32px;
  border-radius: 5px;
}
.brand-link span {
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: none;
  font-weight: 500;
  font-size: 0.8rem;
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
.nav-desktop a {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--accent);
}
.more-wrapper {
  position: relative;
}
.more-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}
.more-btn:hover {
  color: var(--accent);
}
.more-btn svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--text-light);
  transition: transform 0.2s ease;
}
.more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  min-width: 160px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 20;
  border: 1.5px solid var(--border);
}
.dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dropdown a:hover {
  background: var(--bg-surface-2);
  color: var(--accent);
}
.right-actions {
  display: none;
}
.hamburger {
  display: flex;
  padding: 0.55rem;
  border-radius: 5px;
  background: transparent;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger:hover {
  background: var(--bg-surface-2);
}
.hamburger svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--text-light);
  stroke-width: 2;
  fill: none;
}
.mobile-menu {
  display: none;
  background: var(--bg-surface);
  padding: 1rem 1.5rem;
  margin-top: 10px;
}
.mobile-menu.open {
  display: block;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-height: 24rem;
  overflow-y: auto;
}
.mobile-nav a {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
  padding: 0.35rem 0;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
}
.mobile-footer {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px dashed var(--border);
}
.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-links a {
  font-size: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover {
  color: var(--text-muted);
}
.page-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 10px 2px 10px;
}
.page-info p {
  max-width: 44rem;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.85rem;
}
.btn-group {
  text-align: right;
}
.input-sec {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(to bottom, var(--bg-primary) 75%, transparent);
}
.input {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  margin: 0 1% 5px 1%;
  overflow: hidden;
}
.input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.16);
}
.input input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  padding: 12px 0 16px;
  line-height: 1.5;
  text-align: center;
}
.input input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}
#inputCount {
  position: absolute;
  bottom: 0;
  right: 60px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  font-weight: 700;
}
#clearInput,
#bioIdeas {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: all var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
#clearInput:hover {
  background: #b23a2e;
  color: white;
}
#bioIdeas {
  right: 0;
  top: auto;
  width: auto;
  padding: 2px 12px;
  height: auto;
  bottom: 0;
  background: var(--stamp-gold);
  color: var(--ink);
  border: none;
  cursor: pointer;
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm) 0;
}
#bioIdeas:hover {
  filter: brightness(1.08);
}
#clearInput:active,
#bioIdeas:active {
  transform: scale(0.9);
}
.share-it {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.share-it span {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: bold;
  font-family: var(--font-mono);
}
#st-1 {
  z-index: 9 !important;
}
.share-url {
  display: flex;
  align-items: center;
  padding: 10px 0;
}
.share-url label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: var(--font-mono);
}
.share-url input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--bg-surface-2);
  border-radius: 5px 0 0 5px;
  font-size: 16px;
  height: 42px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  outline: none;
  font-family: var(--font-mono);
}
.share-url button {
  padding: 5px 14px;
  background: var(--bg-surface-2);
  color: var(--text-muted);
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  font-size: 13px;
  height: 42px;
  font-weight: 700;
  text-transform: uppercase;
  transition: background 0.2s;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.share-url button:hover {
  background: var(--accent);
  color: var(--ink);
}
.menu-wrapper {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  position: relative;
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 0.18rem 0.12rem;
  margin-bottom: 5px;
  border: 1.5px solid var(--border);
  overflow: hidden;
}
#topMenu {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.15rem 0.1rem 0.2rem;
  flex: 1;
  align-items: center;
  scroll-behavior: smooth;
}
#topMenu::-webkit-scrollbar {
  display: none;
}
.nav-btn,
.btn-group button {
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-size: clamp(0.68rem, 1.3vw, 0.78rem);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.nav-btn i {
  font-style: normal;
  font-weight: 700;
}
.nav-btn:hover,
.btn-group button:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}
.nav-btn:active,
.btn-group button:active {
  transform: scale(0.94);
}
.nav-btn.active,
.deco-mood-chip.active {
  color: var(--ink);
  background: var(--accent);
  font-weight: 700;
  clip-path: polygon(
    6px 0,
    100% 0,
    100% calc(100% - 6px),
    calc(100% - 6px) 100%,
    0 100%,
    0 6px
  );
}
.scroll-btn {
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 36px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.scroll-btn:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.scroll-btn:active {
  transform: scale(0.9);
}
.scroll-btn:disabled {
  opacity: 0.2;
  pointer-events: none;
}
.cat-name h2 {
  font-size: clamp(0.65rem, 1.6vw, 0.75rem);
  margin: 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.cat-name h2::before {
  width: 6px;
  height: 6px;
}
.cat-name span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--stamp-gold);
  padding: 0.06rem 0.6rem;
  font-weight: 700;
  margin-left: 6px;
}
.gallery-card {
  position: relative;
}
.item-tag {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 10px 0;
  font-weight: 600;
  margin-bottom: 2px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 0.15s ease;
  user-select: none;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}
.item-tag:hover {
  background: var(--bg-surface-2);
}
.copy-badge {
  position: absolute;
  transform: translate(-50%, -8px) scale(0.8);
  background: #1a1a2e;
  color: #f5f0eb;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 50;
}
.copy-badge.show {
  opacity: 1;
  transform: translate(-50%, -32px) scale(1);
}
.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.5rem;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8e0d8;
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 10px 0;
}
.page-btn {
  background: var(--bg-surface-3);
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--accent);
  transition: opacity 0.2s;
}
.page-btn:hover:not(:disabled) {
  background: #d5ccc4;
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.page-indicator {
  background: var(--bg-surface);
  padding: 0.3rem 1.2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  min-width: 80px;
  text-align: center;
}
.font,
.qList p {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  position: relative;
  overflow: visible;
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}
.font::before,
.font::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--text-light);
  transition: border-color var(--t) var(--ease);
  pointer-events: none;
}
.font::before {
  top: -6px;
  left: -6px;
  border-right: none;
  border-bottom: none;
}
.font::after {
  bottom: -6px;
  right: -6px;
  border-left: none;
  border-top: none;
}
.font:hover,
.font:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.font:hover::before,
.font:hover::after,
.font:focus-within::before,
.font:focus-within::after {
  border-color: var(--accent);
}
.font:hover span {
  display: block;
}
.font p {
  font-size: 1.25rem;
  margin: 0;
  word-break: break-word;
  line-height: 1.5;
  color: var(--text-secondary);
  flex: 1;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: color var(--t) var(--ease);
}
.font p:hover {
  color: var(--accent);
}
.dark .font p:hover,
.dark .font .alert:hover {
  color: #fff;
}
.font div {
  width: 100%;
  position: relative;
}
.font span {
  position: absolute;
  bottom: 0;
  right: 0;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  padding: 0.04rem 0.5rem;
  margin-left: 3px;
}
.alert {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--accent);
}
.font button,
.otools a {
  border: none;
  background: var(--bg-surface-2);
  border-left: 1.5px solid var(--border);
  padding: 0.3rem 0.9rem;
  font-size: clamp(0.62rem, 1.2vw, 0.72rem);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t) var(--ease);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.font button:hover,
.otools a:hover {
  background: var(--stamp-gold);
  color: var(--ink);
}
.font button:active,
.otools a:active {
  transform: scale(0.94);
}
.deco-cards-container {
  overflow: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.deco-loadmore-wrap {
  margin: 5px 5px 10px 5px;
  display: flex;
  justify-content: center;
}
.deco-loadmore-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 44px;
}
.deco-loadmore-btn:active {
  transform: scale(0.96);
}
.load-more-trigger {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.random-card-grid {
  display: block;
  margin-bottom: 10px;
}
#decoDialogClose {
  color: var(--text-secondary);
}
.cat-name {
  margin: 10px;
}
.regen {
  position: fixed;
  bottom: calc(20% + env(safe-area-inset-bottom));
  right: 0;
  display: flex;
  gap: 6px;
  flex-direction: column;
  align-items: flex-end;
  z-index: 999;
}
.regen svg {
  width: 20px;
  height: 20px;
}
.regen button {
  padding: 12px 14px;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-right: none;
  background: var(--bg-surface);
  font-size: 1rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-soft);
  transition: all var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  min-height: 44px;
  position: relative;
  -webkit-touch-callout: none;
}
.regen button:active {
  transform: scale(0.95);
  background: var(--bg-surface-hover, rgba(0, 0, 0, 0.05));
  box-shadow: var(--shadow-none, none);
  border-color: var(--border-active, var(--border));
}
.regen button:focus-visible {
  outline: 2px solid var(--accent, #0066ff);
  outline-offset: 2px;
}
.regen button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px 0 0 5px;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.regen button:active::after {
  opacity: 1;
  transition: opacity 0s;
}
.regen button:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: transparent;
}
#regen {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  padding: 10px;
  align-items: center;
  background: var(--bg-surface-3);
}
.info-text {
  padding: 0 12px;
}
.info-text img {
  max-width: 720px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-soft);
}
#bottomMenu {
  margin-top: 15px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.2rem 0.8rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(109, 70, 203, 0.03),
    rgba(109, 70, 203, 0.01)
  );
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(109, 70, 203, 0.12);
}
.stat-card:hover::before {
  opacity: 1;
}
.stat-card:hover .stat-number {
  text-shadow: 0 0 30px rgba(109, 70, 203, 0.15);
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent);
  display: block;
  line-height: 1.2;
  transition: text-shadow var(--t) var(--ease);
}
.stat-number::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--accent);
  margin: 0.3rem auto 0.4rem;
  border-radius: 2px;
  opacity: 0.3;
  transition: width var(--t) var(--ease), opacity var(--t) var(--ease);
}
.stat-card:hover .stat-number::after {
  width: 50px;
  opacity: 0.6;
}
.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: block;
  font-weight: 600;
}
html.dark .stat-card {
  background: var(--bg-surface);
  border-color: var(--border);
}
html.dark .stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(139, 111, 255, 0.08);
}
html.dark .stat-card:hover .stat-number {
  text-shadow: 0 0 30px rgba(139, 111, 255, 0.15);
}
footer {
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1.5px solid var(--border);
}
footer .container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
footer .container p {
  color: var(--text-muted);
}
.menu-wrapper {
  position: relative;
  overflow: hidden;
}
.menu-wrapper::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--bg-surface));
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.menu-wrapper:not(:has(.scroll-right:disabled))::after {
  opacity: 1;
}
#themeToggle {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  height: 32px;
  width: auto;
  padding: 5px;
  cursor: pointer;
  display: flex;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  transition: all var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-mono);
}
.info-div .image-box img,
.feat {
  width: 100%;
  height: auto;
}
.deco-dialog {
  width: 600px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.deco-layout-row {
  display: flex;
  flex-direction: row;
  position: relative;
}
.deco-main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
  min-width: 0;
}
.vmenu {
  flex: 0 0 auto;
  width: 85px;
  display: flex;
  flex-direction: column;
  padding: 6px 4px;
  position: sticky;
  top: 120px;
  align-self: flex-start;
  height: fit-content;
  max-height: calc(90vh - 240px);
  background: transparent;
  z-index: 5;
}
.deco-dialog .vmenu {
  top: 10px;
}
.deco-mood-chip {
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 0;
  font-size: 12px;
  font-weight: bold;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  line-height: 1.3;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: all 0.15s;
  user-select: none;
  min-height: 40px;
}
.deco-mood-bar {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 0;
}
.mood-scroll-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 13px;
  padding: 6px 0;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.4;
  touch-action: manipulation;
  user-select: none;
  height: 36px;
  width: 100%;
}
.mood-scroll-btn:disabled {
  opacity: 0.2;
  cursor: default;
}
#decoDialog .deco-layout-row {
  padding: 0 1rem;
}
#decoDialog .deco-loadmore-wrap {
  margin-bottom: 2.5rem;
}
.art-main {
  display: flex;
}
.art-content {
  flex: 1;
}
.art-content .item {
  display: inline-block;
  align-items: center;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 5px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  aspect-ratio: 1;
  user-select: none;
  min-width: 55px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.art-content .item div {
  font-size: 1rem;
  padding: 5px;
}
.art-content .emos .item div {
  font-size: 1rem;
}
.emos .item {
  aspect-ratio: 0 !important;
  padding: 2px;
}
.arts textarea {
  height: 100%;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  font-size: 12px;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-mono);
}
.art-content .item:hover {
  border-color: var(--accent);
}
.copied-alert {
  position: absolute;
  display: flex;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  align-items: center;
  justify-content: center;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.otools a {
  display: inline-block;
  padding: 10px;
  margin: 3px;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.top-point ul {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
}
.top-point li {
  font-size: 1.1rem;
  font-weight: bold;
  font-family: var(--font-display);
  width: 210px;
}
@media (min-width: 720px) {
  .nav-desktop {
    display: flex;
  }
  .hamburger {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu.open {
    display: none !important;
  }
  #fontslist,
  .deco-grid,
  .items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  #fontslist .cat-name,
  #fontsrandom .cat-name,
  .load-more-trigger,
  .deco-loadmore-wrap,
  .menu-wrapper {
    grid-column: 1 / -1;
  }
  .info-div {
    display: flex;
    align-items: flex-start;
    gap: 30px;
  }
  .image-box {
    flex: 0 0 40%;
  }
  .text-box {
    flex: 0 0 60%;
    padding-right: 10px;
  }
  .feat {
    width: 720px;
  }
  .info-div .image-box img {
    width: 100%;
  }
}
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin: 1rem 0 1.5rem;
  }
  .stat-card {
    padding: 1rem 0.6rem;
  }
  .stat-number {
    font-size: 1.4rem;
  }
  .stat-number::after {
    width: 20px;
    margin: 0.2rem auto 0.3rem;
  }
  .stat-card:hover .stat-number::after {
    width: 35px;
  }
  .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }
  .vmenu {
    width: 70px;
  }
  .deco-mood-chip {
    font-size: 11px;
  }
  .info img {
    width: 100%;
  }
  .font,
  .qList p {
    margin-bottom: 2px;
  }
  .right-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .brand a {
    font-size: 1.1rem;
  }
  .deco-dialog {
    width: 100%;
  }
  .container {
    margin: 0 1rem;
  }
  .font p,
  .deco-loadmore-btn {
    font-size: 0.9rem;
  }
  .font::before,
  .font::after {
    width: 10px;
    height: 10px;
  }
  .nav-btn,
  .btn-group button,
  .scroll-btn,
  #themeToggle,
  .hamburger {
    min-height: 30px;
  }
  footer .container{
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 380px) {
  h1 {
    font-size: 1.7rem;
  }
  .font p {
    padding: 12px 10px;
    font-size: 1.05rem;
  }
}
