:root {
  color-scheme: dark;
  --bg: #131210;
  --surface: #1c1a16;
  --surface-hover: #242119;
  --surface-top: rgba(255, 255, 255, 0.035);
  --line: #37332a;
  --line-soft: #2a2721;
  --text: #f4f2ea;
  --muted: #a79f8f;
  --accent: #caa063;
  --accent-soft: rgba(202, 160, 99, 0.16);
  --danger: #e2836a;
  --radius: 12px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  position: relative;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse 900px 520px at 50% -8%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("/noise.png");
  background-repeat: repeat;
  background-size: 96px 96px;
  opacity: 0.04;
  pointer-events: none;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
.shell, .admin-shell { position: relative; z-index: 1; }
.shell { width: min(100% - 32px, 600px); margin: 0 auto; padding: 52px 0 64px; }
.profile { text-align: center; margin-bottom: 40px; }
.logo { display: block; width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 20px; object-fit: cover; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.7); }
h1, h2, p { margin-top: 0; }
.profile h1 { margin-bottom: 10px; font-size: clamp(26px, 7vw, 34px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.profile p { max-width: 32ch; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.55; }
section + section { margin-top: 38px; }
.shell h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 14px 2px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.shell h2::before { content: ""; flex: 0 0 auto; width: 14px; height: 2px; background: var(--accent); border-radius: 1px; }
.link-stack { display: grid; gap: 14px; }
.resource-link {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-top), transparent 40%), var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 24px -18px rgba(0, 0, 0, 0.85);
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.resource-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}
.resource-copy { min-width: 0; flex: 1 1 auto; display: grid; gap: 4px; }
.resource-copy strong { font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.resource-copy span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.arrow { flex: 0 0 auto; color: var(--accent); font-size: 20px; transition: transform 150ms ease; }
.resource-link:hover { border-color: #55503f; background: linear-gradient(180deg, var(--surface-top), transparent 40%), var(--surface-hover); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 30px -18px rgba(0, 0, 0, 0.9); }
.resource-link:hover .arrow { transform: translate(1px, -1px); }
.resource-link:active, button:active { transform: translateY(1px); }
.resource-link:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.social-stack .resource-link { min-height: 64px; }
.admin-shell { width: min(100% - 32px, 780px); margin: 0 auto; padding: 36px 0 72px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.admin-header h1 { margin: 12px 0 7px; font-size: clamp(28px, 7vw, 42px); letter-spacing: -.045em; }
.admin-header p, .list-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.back-link { color: var(--accent); font-size: 13px; text-underline-offset: 4px; }
.primary-button, .text-button, .icon-button, .danger-button { min-height: 44px; border-radius: 8px; cursor: pointer; transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #191408; padding: 0 16px; font-weight: 700; white-space: nowrap; }
.primary-button:hover { background: #d9ae70; border-color: #d9ae70; }
.text-button, .icon-button { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 0 14px; }
.text-button:hover, .icon-button:hover { border-color: #55503f; background: var(--surface-hover); }
.danger-button { border: 1px solid #74443e; background: transparent; color: var(--danger); padding: 0 14px; }
.danger-button:hover { background: rgba(226, 131, 106, 0.1); }
.new-link {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-top), transparent 40%), var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 24px -18px rgba(0, 0, 0, 0.85);
}
.new-link h2, .list-heading h2 { margin-bottom: 7px; font-size: 18px; }
.list-heading { margin: 32px 0 14px; }
.link-form { display: grid; gap: 16px; }
.link-form label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 650; }
.link-form label span { color: var(--muted); font-weight: 400; }
.link-form input, .link-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #16140f; color: var(--text); padding: 11px 12px; }
.link-form input:focus-visible, .link-form textarea:focus-visible { border-color: var(--accent); }
.link-form textarea { resize: vertical; }
.form-actions, .row-actions, .order-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.form-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 13px; }
.form-status.error { color: var(--danger); }
.admin-list { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.admin-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-top), transparent 40%), var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 24px -18px rgba(0, 0, 0, 0.85);
}
.admin-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.admin-card-title { min-width: 0; width: 100%; max-width: 100%; }
.admin-card-title strong, .admin-card-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-card-title span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.visibility { display: flex !important; grid-template-columns: auto 1fr; align-items: center; justify-content: start; }
.visibility input { width: 18px; height: 18px; accent-color: var(--accent); }
.loading-state, .empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 560px) {
  .shell { padding-top: 32px; }
  .profile { margin-bottom: 30px; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-header .primary-button { width: 100%; }
  .admin-card-head { align-items: flex-start; flex-direction: column; }
  .order-actions { width: 100%; }
  .order-actions button { flex: 1; }
  .row-actions button { flex: 1; }
}
@media (min-width: 900px) {
  .shell { width: min(100% - 64px, 640px); padding-top: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
