@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-ui);
  --font-editorial: var(--font-ui);
  --font-list: var(--font-ui);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font: 400 15.5px/1.5 var(--font-ui);
  --sage: #5D866C;
  --sage-dark: #476853;
  --sage-soft: #E8F0EB;
  --clay: #C2A68C;
  --clay-dark: #7E6147;
  --sand: #E6D8C3;
  --sand-soft: #EFE6D8;
  --paper: #F4F3EE;
  --surface: #FBFAF6;
  --ink: #171D19;
  --muted: #525E56;
  --border: #D2C6B4;
  --warn-bg: #E6D8C3;
  --warn-ink: #5B432E;
  --err-bg: #F6E4E1;
  --err-ink: #8E3730;
  color: var(--ink);
  background-color: var(--paper);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }

/* Smooth Preloader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--paper);
  opacity: 1;
  visibility: visible;
  transition: opacity .48s cubic-bezier(0.22, 1, 0.36, 1), visibility .48s ease;
}
.page-loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-box {
  width: min(300px, 84vw);
  display: grid;
  justify-items: center;
  gap: 14px;
}
.loader-logo {
  height: 76px;
  width: auto;
  filter: drop-shadow(0 3px 0 rgba(194, 166, 140, 0.5));
  animation: loaderFloat 2s ease-in-out infinite;
}
.loader-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid var(--clay);
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: var(--sage);
  transition: width .28s cubic-bezier(0.22, 1, 0.36, 1);
}
.loader-text {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
@keyframes loaderFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Sticky Pinterest-style Header */
.pin-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(245, 245, 240, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--sand);
}
.pin-topbar, .pin-main {
  max-width: 1640px;
  padding-inline: 22px;
  margin-inline: auto;
}
.pin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  padding-block: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 46px;
  width: auto;
  filter: drop-shadow(0 2px 0 rgba(194, 166, 140, 0.45));
}
.brand-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--sand);
  color: var(--clay-dark);
  border: 1.5px solid var(--clay);
  border-radius: 999px;
  padding: 3px 9px;
}
.header-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--sage);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
}
.header-link:hover { background: var(--sand-soft); }

/* Minimal Flat Rounded Search Bar */
.pin-search {
  position: relative;
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sand-soft);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  min-height: 48px;
  margin: 0;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pin-search:hover {
  background: var(--sand);
}
.pin-search:focus-within {
  background: var(--surface);
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(93, 134, 108, 0.14);
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(34, 48, 39, 0.14);
  padding: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.search-section-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 12px 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.search-clear-recent-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.search-clear-recent-btn:hover {
  color: var(--clay-dark);
  background: var(--sand-soft);
}
.search-suggest-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}
.search-suggest-item:hover,
.search-suggest-item.active {
  background: var(--sand-soft);
}
.search-suggest-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.search-suggest-main svg {
  color: var(--muted);
  flex-shrink: 0;
}
.search-suggest-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-suggest-meta {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.search-suggest-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.search-recent-remove {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.search-recent-remove:hover {
  background: var(--sand);
  color: var(--ink);
}
.search-recent-remove svg {
  display: block;
}
.search-icon {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}
.pin-search input[type=search] {
  border: 0;
  background: transparent;
  padding: 10px 0;
  min-height: auto;
  width: 100%;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  outline: none;
}
.pin-search input[type=search]::placeholder {
  color: var(--muted);
  opacity: 0.88;
}
.pin-search input[type=search]::-webkit-search-cancel-button { display: none; }
.clear-search-btn {
  border: 0;
  background: var(--clay);
  color: var(--paper);
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 999px;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clear-search-btn[hidden] { display: none; }
.clear-search-btn svg { display: block; }
.clear-search-btn:hover:enabled { background: var(--clay-dark); }

.pin-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--clay);
  padding: 7px 14px;
}
.filter-toggle-btn.active {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.filter-badge {
  background: var(--sand);
  color: var(--clay-dark);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 800;
}
.filter-toggle-btn.active .filter-badge {
  background: var(--paper);
  color: var(--sage-dark);
}
.count-pill {
  display: inline-flex;
  align-items: center;
  background: var(--sage-soft);
  color: var(--sage-dark);
  border: 1px solid rgba(93, 134, 108, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
nav button { background: var(--surface); border-color: var(--border); border-radius: 999px; }
nav button[aria-pressed=true] {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--paper);
}

.pin-main { padding-block: 10px 48px; }
h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; letter-spacing: -.03em; }
h2 { margin: 0; font-size: 16px; }
h3 { margin: 0; font-size: 14px; }

button, .button, select, input, textarea { font: inherit; }
button, .button, select, input[type=number], input[type=text], input[type=password], textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  min-height: 38px;
}
button, .button {
  cursor: pointer;
  padding: 7px 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:hover:enabled, a.button:hover {
  border-color: var(--sage);
  background: var(--sand-soft);
  text-decoration: none;
}
button:disabled { opacity: .48; cursor: default; }
.primary {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--paper);
}
.primary:hover:enabled, a.button.primary:hover {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--paper);
  text-decoration: none;
}
.profile-owner-actions a.button.primary {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent, var(--sage));
  color: var(--pt-tab-text, var(--paper));
}
.profile-owner-actions a.button.primary:hover {
  background: var(--pt-accent-dark, var(--sage-dark));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.button { position: relative; display: inline-flex; align-items: center; }
.button input { position: absolute; opacity: 0; inset: 0; width: 100%; cursor: pointer; }
.button:focus-within, :focus-visible { outline: 2.5px solid var(--sage); outline-offset: 2px; }
[role=status] { min-height: 1.3em; color: var(--muted); margin: 6px 0; font-size: 13px; }
.empty { text-align: center; padding: 72px 16px; border: 2px dashed var(--clay); border-radius: 16px; background: var(--surface); color: var(--muted); }

/* Horizontal Quick Tabs (Pinterest style) */
.pin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: thin;
}
.pin-tab {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-bottom: 2.5px solid transparent;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px 7px;
  min-height: 36px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.pin-tab:hover:enabled,
a.pin-tab:hover {
  background: var(--sand-soft);
  color: var(--ink);
}
a.pin-tab-gesture {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--sage-dark);
  font-weight: 700;
}
.pin-tab-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
}
.pin-tab-filters svg {
  display: block;
  flex-shrink: 0;
}
.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sage);
  color: #fffdf8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.filter-count-badge[hidden] {
  display: none;
}
.pin-tab.active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--sage);
  background: transparent;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-block: 4px 8px;
}
.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sage);
  color: var(--paper);
  border: 1px solid var(--sage-dark);
  border-radius: 999px;
  padding: 3px 10px;
  min-height: 28px;
  font-size: 12px;
}
.active-chip:hover:enabled { background: var(--sage-dark); }
.clear-all-btn {
  padding: 3px 10px;
  min-height: 28px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--sand);
  border-color: var(--clay);
  color: var(--clay-dark);
}
.pin-status { margin: 2px 0 10px; min-height: 0; font-size: 13px; color: var(--muted); }

/* Collapsible Slide-Over Filter Drawer */
.filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(34, 48, 39, 0.36);
  backdrop-filter: blur(2px);
}
.filter-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(370px, 92vw);
  z-index: 40;
  background: var(--surface);
  border-right: 2px solid var(--clay);
  box-shadow: 8px 0 28px rgba(34, 48, 39, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform .22s ease;
}
.filter-drawer.open { transform: translateX(0); }
.props-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(34, 48, 39, 0.36);
  backdrop-filter: blur(2px);
}
.props-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(520px, 94vw);
  z-index: 50;
  background: var(--surface);
  border-right: 2px solid var(--clay);
  box-shadow: 8px 0 28px rgba(34, 48, 39, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform .22s ease;
}
.props-drawer.open { transform: translateX(0); }
.props-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
  display: grid;
  align-content: start;
  gap: 12px;
  border-top: 0;
}
.props-drawer-body .readonly-section {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(230, 216, 195, .85);
  border-radius: 0;
  padding: 10px 0 0;
  gap: 6px;
}
.props-drawer-body > :first-child {
  border-top: 0;
  padding-top: 0;
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--border);
  background: var(--paper);
}
.drawer-sub { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.drawer-tools {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 8px;
  background: var(--sand-soft);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.drawer-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1.5px solid var(--border);
  background: var(--paper);
}
.drawer-foot button { flex: 1; }

.filter-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--paper);
}
.filter-group[open] { border-color: var(--clay); background: var(--surface); }
.filter-group summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "▾"; font-size: 12px; color: var(--clay-dark); }
.filter-group:not([open]) summary::after { content: "▸"; }
.group-badge {
  font-size: 11px;
  background: var(--sage);
  color: var(--paper);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: auto;
  margin-right: 6px;
}
.filter-subfields { display: grid; gap: 10px; margin-top: 10px; }
.subfield-title { font-size: 12px; font-weight: 700; color: var(--clay-dark); margin-bottom: 5px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  min-height: 28px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--paper);
}
.filter-pill:hover:enabled { background: var(--sand-soft); border-color: var(--clay); }
.filter-pill.zero { opacity: .44; }
.filter-pill[aria-pressed=true] {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.filter-pill .count { font-size: 11px; opacity: .78; }

.inline-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); font-weight: 600; cursor: pointer; }
.inline-check input { width: 16px; height: 16px; min-height: auto; accent-color: var(--sage); }

/* Pinterest Flex-Column Masonry & Minimal Pin Cards */
.pin-masonry {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: opacity .26s ease;
}
.pin-masonry.is-updating { opacity: 0.45; }
.pin-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 600px) {
  .pin-masonry { gap: 12px; }
  .pin-col { gap: 14px; }
}

@keyframes pinShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes pinReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.pin-card {
  width: 100%;
  animation: pinReveal .28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pin-skeleton-card {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(194, 166, 140, 0.45);
  background: linear-gradient(110deg, var(--sand) 8%, var(--sand-soft) 18%, var(--sand) 33%);
  background-size: 200% 100%;
  animation: pinShimmer 1.4s linear infinite;
}
.pin-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(194, 166, 140, 0.55);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(110deg, var(--sand) 8%, var(--sand-soft) 18%, var(--sand) 33%);
  background-size: 200% 100%;
  animation: pinShimmer 1.4s linear infinite;
}
.pin-media.loaded {
  background: var(--sand);
  animation: none;
}
.pin-media img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .42s cubic-bezier(0.22, 1, 0.36, 1), transform .42s cubic-bezier(0.22, 1, 0.36, 1), filter .18s ease;
}
.pin-media.loaded img {
  opacity: 1;
  transform: scale(1);
}
.pin-media.loaded:hover img {
  filter: brightness(0.92);
  transform: scale(1.015);
}
.pin-media.is-tall-cropped img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.pin-media.is-tall-cropped::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 26, 22, 0.44) 0%, rgba(20, 26, 22, 0) 34%);
  z-index: 1;
}
.pin-tall-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 26, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  pointer-events: none;
}
.pin-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 4px 0;
}
.pin-title-btn {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
.pin-title-btn:hover:enabled { background: transparent; color: var(--sage-dark); }
.pin-more-btn {
  border: 0;
  background: transparent;
  padding: 2px 5px;
  min-height: auto;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.pin-more-btn:hover:enabled { background: var(--sand); color: var(--ink); }

.pin-matched { margin-top: 4px; padding-inline: 4px; }
.matched-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.matched-tags span {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--sand);
  color: var(--warn-ink);
  border: 1px solid var(--clay);
  padding: 1px 7px;
}

.pin-admin-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 4px 4px 0;
}
.status-pill { font-size: 10.5px; border-radius: 999px; padding: 1px 7px; font-weight: 700; white-space: nowrap; }
.status-pill.edited { background: var(--sand); color: var(--clay-dark); border: 1px solid var(--clay); }
.status-pill.failed { background: var(--err-bg); color: var(--err-ink); }
.status-pill.queued, .status-pill.processing, .status-pill.pending { background: var(--sand-soft); color: var(--warn-ink); }
.status-pill.hidden { background: var(--sand); color: var(--muted); border: 1px solid var(--border); }
.status-pill.review { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--clay); }
.pin-retry-btn { padding: 2px 8px; min-height: 24px; font-size: 11px; border-radius: 999px; }
.pin-restore-btn { padding: 2px 8px; min-height: 24px; font-size: 11px; border-radius: 999px; background: var(--sage); color: var(--paper); border: 1px solid var(--sage-dark); cursor: pointer; font-weight: 700; }
.pin-restore-btn:hover { background: var(--sage-dark); }
.pin-decision-reason { margin: 4px 4px 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }

/* Admin Gallery Controls */
.admin-gallery-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

/* Editor */
.heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.canvas {
  min-height: 350px;
  display: grid;
  justify-items: center;
  padding: 20px;
  border-radius: 14px;
  background: #26362C;
  border: 2px solid var(--clay);
}
#stage { width: min(100%, 700px); position: relative; align-self: start; touch-action: none; }
#stage.drawing { cursor: crosshair; }
#preview { display: block; width: 100%; height: auto; user-select: none; }
#overlay { position: absolute; inset: 0; pointer-events: none; }
.box { position: absolute; border: 2px solid #74B68C; background: rgba(93, 134, 108, 0.18); pointer-events: auto; cursor: move; }
.box.selected { border-color: var(--sand); background: rgba(230, 216, 195, 0.24); z-index: 1; }
.box-number { position: absolute; top: 0; left: 0; background: var(--sage-dark); color: var(--paper); font-size: 12px; font-weight: 800; padding: 0 5px; pointer-events: none; }
.selected .box-number { background: var(--clay-dark); }
.handle { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border: 1px solid var(--clay-dark); background: var(--sand); cursor: nwse-resize; }
#workspace aside {
  display: grid;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--clay);
  border-radius: 14px;
  padding: 16px;
}
.field { display: grid; gap: 4px; color: var(--muted); font-size: 13px; min-width: 0; font-weight: 600; }
select, input[type=number], input[type=text], input[type=password], textarea { width: 100%; padding: 6px 10px; }
textarea { min-height: 76px; resize: vertical; }
.summary, small { color: var(--muted); font-size: 13px; margin: 2px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 12px; }
#box-list { display: flex; flex-wrap: wrap; gap: 6px; }
#box-list:empty { display: none; }
#box-list button[aria-pressed=true], #add[aria-pressed=true] {
  color: var(--warn-ink);
  background: var(--sand);
  border-color: var(--clay);
}
#coordinate-editor, #coordinates { display: grid; gap: 8px; }
#coordinates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.danger { color: var(--err-ink); }

/* Modals */
dialog#panel-modal, dialog#public-modal {
  border: 2px solid var(--clay);
  border-radius: 16px;
  padding: 0;
  width: min(1140px, 95vw);
  max-height: 92vh;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 36px rgba(34, 48, 39, 0.28);
}
dialog#panel-modal::backdrop, dialog#public-modal::backdrop {
  background: rgba(34, 48, 39, 0.54);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-shell { display: flex; flex-direction: column; max-height: 92vh; }
.modal-header, .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
}
.modal-footer { border-bottom: 0; border-top: 1.5px solid var(--border); justify-content: flex-end; }
#modal-status { padding-inline: 18px; margin: 6px 0 0; }
.modal-body {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
  overflow-y: auto;
}
.modal-preview-col { display: grid; gap: 10px; align-content: start; position: sticky; top: 0; }
.modal-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid var(--clay);
  border-radius: 10px;
  overflow: hidden;
  background: #26362C;
  cursor: zoom-in;
}
.modal-image-btn:hover:enabled { border-color: var(--sage); background: #26362C; }
#modal-image { width: 100%; max-height: 440px; object-fit: contain; display: block; transition: transform .18s ease; }
.modal-image-btn:hover #modal-image { transform: scale(1.015); }
.modal-preview-links { display: flex; justify-content: flex-start; }
.zoom-trigger-btn {
  background: var(--sand-soft);
  border-color: var(--clay);
  color: var(--clay-dark);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}
.zoom-trigger-btn:hover:enabled { background: var(--sage); border-color: var(--sage-dark); color: var(--paper); }
.info-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.modal-form { display: grid; gap: 14px; }
.form-section, .readonly-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}
.form-section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.char-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
  display: grid;
  gap: 10px;
}
.chip-selector { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-opt {
  padding: 3px 9px;
  min-height: 28px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--paper);
}
.chip-opt[aria-pressed=true] {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}

/* Public read-only details */
.readonly-grid { display: grid; gap: 8px; }
.readonly-kv {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.readonly-label { font-size: 12.5px; font-weight: 700; color: var(--clay-dark); padding-top: 3px; }
.readonly-values { display: flex; flex-wrap: wrap; gap: 5px; }
.readonly-pill, .tag-link-pill {
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 10px;
  min-height: auto;
  font-weight: 600;
}
.readonly-pill { background: var(--sand-soft); color: var(--clay-dark); border: 1px solid var(--border); }
.tag-link-pill { background: var(--sage-soft); border: 1px solid rgba(93, 134, 108, 0.4); color: var(--sage-dark); }
.tag-link-pill:hover { background: var(--sage); color: var(--paper); border-color: var(--sage-dark); }
.readonly-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  background: var(--sand-soft);
  border-left: 4px solid var(--sage);
  padding: 9px 12px;
  border-radius: 8px;
}

/* Admin Login */
.login-shell {
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 2px solid var(--clay);
  border-radius: 16px;
  padding: 26px;
  display: grid;
  gap: 12px;
  box-shadow: 6px 6px 0 var(--sand);
}
.login-logo { height: 74px; width: auto; justify-self: center; filter: drop-shadow(0 3px 0 rgba(194, 166, 140, 0.45)); }
.login-card h1 { font-size: 24px; text-align: center; }
.login-card .summary { text-align: center; }
.login-form { display: grid; gap: 12px; margin-top: 4px; }
.login-error { color: var(--err-ink); font-size: 13px; margin: 0; min-height: 1.3em; font-weight: 600; }

@media (max-width: 960px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-preview-col { position: static; }
}
@media (max-width: 760px) {
  .pin-topbar { flex-wrap: wrap; }
  .pin-search { order: 3; flex: 1 0 100%; }
  .workspace { grid-template-columns: 1fr; }
  .form-grid-2, .readonly-kv { grid-template-columns: 1fr; }
  .canvas { padding: 10px; }
  .brand-logo { height: 40px; }
}
@media (max-width: 430px) {
  .pin-main, .pin-topbar { padding-inline: 12px; }
}

/* Infinite Scroll & Dialog Transitions */
.scroll-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.scroll-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--sand);
  border-top-color: var(--sage);
  animation: spin .75s linear infinite;
}
.scroll-sentinel {
  height: 1px;
  width: 100%;
}
dialog#panel-modal[open], dialog#public-modal[open] {
  animation: modalIn .22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* In-Page Image Lightbox */
@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
dialog.lightbox-dialog {
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
}
dialog.lightbox-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: lightboxIn .24s cubic-bezier(0.22, 1, 0.36, 1);
}
dialog.lightbox-dialog::backdrop {
  background: rgba(24, 34, 28, 0.64);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.lightbox-toolbar {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(252, 251, 247, 0.94);
  border: 1.5px solid var(--clay);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}
.lightbox-tool-btn,
.lightbox-close {
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--clay);
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-close svg {
  display: block;
}
.lightbox-tool-btn {
  min-width: 36px;
  padding: 0 10px;
  font-size: 17px;
  line-height: 1;
}
.lightbox-zoom-level {
  min-width: 60px;
  font-size: 13px;
}
.lightbox-close {
  width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}
.lightbox-tool-btn:hover:enabled,
.lightbox-close:hover:enabled {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.lightbox-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lightbox-stage {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  padding: 72px 24px 28px;
  box-sizing: border-box;
}
.lightbox-figure {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
#lightbox-image {
  pointer-events: auto;
  max-width: min(88vw, 1360px);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  border: 2px solid var(--clay);
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  user-select: none;
  flex-shrink: 0;
}
#lightbox-image.zoomed {
  max-width: none;
  max-height: none;
  cursor: grab;
}
#lightbox-image.dragging {
  cursor: grabbing;
}
.lightbox-caption {
  pointer-events: auto;
  background: rgba(252, 251, 247, 0.94);
  color: var(--ink);
  border: 1.5px solid var(--clay);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.lightbox-caption:empty { display: none; }

/* Pin detail view (Pinterest-inspired stage + related masonry) */
.detail-view {
  padding: 12px 0 36px;
}

.detail-stage {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
  align-items: start;
}

.detail-left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(280px, 1fr);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--sand);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

.detail-media-pane {
  position: sticky;
  top: 82px;
  align-self: start;
  padding: 16px 0 16px 16px;
  min-width: 0;
  background: transparent;
}

.detail-image-frame {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(194, 166, 140, .28);
}

.detail-back-btn,
.detail-zoom-fab {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(34, 48, 39, .14);
  background: rgba(252, 251, 247, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 48, 39, .10);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.detail-back-btn {
  top: 12px;
  left: 12px;
}

.detail-zoom-fab {
  bottom: 12px;
  right: 12px;
  font-size: 1rem;
}

.detail-back-btn:hover,
.detail-zoom-fab:hover {
  background: #ffffff;
  border-color: var(--sage);
  transform: translateY(-1px);
}

.detail-image-btn {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: zoom-in;
}

.detail-image-btn:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}

.detail-image-btn img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.detail-info-pane {
  padding: 20px 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-social-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
.detail-action-pill {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.detail-action-pill:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--clay);
}
.detail-action-pill svg {
  display: block;
  flex-shrink: 0;
}
.detail-action-pill.is-like.is-active {
  background: var(--err-bg);
  border-color: #d9a49f;
  color: var(--err-ink);
}
.detail-action-pill.is-like.is-active svg,
.detail-action-pill.is-save.is-active svg {
  fill: currentColor;
}
.detail-action-pill.is-repost.is-active {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage-dark);
}
.detail-action-pill.is-save.is-active {
  background: var(--warn-bg);
  border-color: var(--clay-dark);
  color: var(--warn-ink);
}

.detail-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, transform .14s ease;
}

.detail-icon-btn:hover,
.detail-icon-btn[aria-expanded="true"] {
  background: var(--paper);
  color: var(--sage-dark);
}

.detail-icon-btn:active {
  transform: scale(0.95);
}

.detail-share-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.detail-share-feedback {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(-50%, 6px, 0) scale(.96);
  will-change: transform, opacity;
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  font-size: .75rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(34, 48, 39, .20);
}

.detail-share-feedback[hidden] {
  display: block;
  opacity: 0;
  visibility: hidden;
}

.detail-share-feedback::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
}

@keyframes shareBubbleFloat {
  0% { opacity: 0; transform: translate3d(-50%, 6px, 0) scale(.96); }
  14% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); }
  58% { opacity: 1; transform: translate3d(-50%, -3px, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-50%, -22px, 0) scale(.98); }
}

.detail-share-feedback.is-showing {
  visibility: visible;
  animation: shareBubbleFloat 1.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.detail-menu-wrap {
  position: relative;
}

.detail-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 172px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--sand);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(34, 48, 39, .14);
  z-index: 25;
}

.detail-menu[hidden] {
  display: none;
}

.detail-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}

.detail-menu-item:hover {
  background: var(--paper);
  color: var(--sage-dark);
}
.detail-menu-item-danger:hover {
  background: #fdf2f2;
  color: var(--err-ink);
}

.detail-title {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.25;
  color: var(--ink);
}

.detail-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
}

#detail-status:empty {
  display: none;
}

#detail-status {
  margin: 0;
}

.detail-meta-pill {
  background: var(--paper);
  border: 1px solid var(--sand);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .78rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-meta-pill-link {
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.detail-meta-pill-link:hover {
  border-color: var(--sage);
  background: var(--sand-soft);
  color: var(--sage-dark);
}

.detail-sections {
  display: grid;
  gap: 12px;
}

.detail-info-pane .readonly-section {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(230, 216, 195, .85);
  border-radius: 0;
  padding: 12px 0 0;
  gap: 8px;
}

.detail-info-pane .detail-sections > .readonly-section:first-child {
  border-top: 0;
  padding-top: 2px;
}

.detail-info-pane .readonly-section h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 2px;
}

.detail-info-pane .readonly-kv {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 6px 10px;
}

.detail-info-pane .char-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 14px;
  padding: 10px 12px;
}

.detail-collapsible {
  position: relative;
  max-height: 116px;
  overflow: hidden;
  border-radius: 16px;
  transition: max-height .42s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-collapsible-inner {
  display: grid;
  gap: 12px;
  filter: blur(5px);
  opacity: .7;
  transform: translateY(2px);
  pointer-events: none;
  user-select: none;
  transition: filter .38s ease, opacity .38s ease, transform .38s ease;
}

.detail-collapsible.is-expanded .detail-collapsible-inner {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  user-select: auto;
}

.detail-blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  background: linear-gradient(
    to bottom,
    rgba(252, 251, 247, .12) 0%,
    rgba(252, 251, 247, .74) 58%,
    rgba(252, 251, 247, .98) 100%
  );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
  transition: opacity .3s ease, backdrop-filter .3s ease;
}

.detail-collapsible.is-expanded .detail-blur-overlay {
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.detail-more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(93, 134, 108, .35);
  border-radius: 999px;
  background: rgba(252, 251, 247, .94);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(34, 48, 39, .10);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.detail-more-toggle:hover {
  border-color: var(--sage);
  background: rgba(93, 134, 108, .14);
  color: var(--sage-dark);
  transform: translateY(-1px);
}

.detail-more-dots {
  font-size: 1rem;
  letter-spacing: 3px;
  line-height: 1;
  padding-left: 3px;
}

.detail-collapse-btn {
  justify-self: center;
  margin-top: 4px;
  border: 1px solid var(--sand);
  background: var(--paper);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.detail-collapse-btn:hover {
  border-color: var(--sage);
  background: rgba(93, 134, 108, .10);
  color: var(--sage-dark);
}

/* Compact Panel Properties Trigger + Drawer Details */
.detail-props-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(194, 166, 140, .48);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.detail-props-trigger:hover:enabled {
  background: rgba(93, 134, 108, .08);
  border-color: var(--sage);
}
.detail-props-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(93, 134, 108, .13);
  color: var(--sage-dark);
}
.detail-props-copy {
  display: grid;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}
.detail-props-copy strong {
  font-size: .84rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.detail-props-summary {
  font-size: .74rem;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-props-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .15s ease, color .15s ease;
}
.detail-props-trigger:hover:enabled .detail-props-arrow {
  transform: translateX(2px);
  color: var(--sage-dark);
}
.detail-props-body {
  border-top: 1px solid rgba(230, 216, 195, .8);
  padding: 9px 11px 11px;
  display: grid;
  gap: 8px;
}
.detail-props-body[hidden] {
  display: none;
}
.detail-props-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 7px 10px;
  border-radius: 9px;
}
.detail-props-body .readonly-section {
  padding-top: 8px;
  gap: 6px;
}
.detail-props-body .readonly-section h3 {
  font-size: .72rem;
  margin: 0;
}
.detail-props-body .readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 6px;
}
.detail-props-body .readonly-kv {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(230, 216, 195, .8);
}
.detail-props-body .readonly-label {
  font-size: 10.5px;
  line-height: 1.2;
  padding-top: 0;
}
.detail-props-body .tag-link-pill {
  font-size: 11px;
  padding: 2px 6px;
}
.detail-props-body .char-card {
  padding: 7px 9px;
  border-radius: 10px;
  display: grid;
  gap: 5px;
}
.detail-props-body .char-card > strong {
  font-size: .78rem;
}

.detail-comments {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(230, 216, 195, .85);
}
.detail-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
}
.detail-comments-head:hover:enabled {
  background: transparent;
  border: 0;
  color: var(--sage-dark);
}
.detail-comments-chevron {
  color: var(--muted);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.detail-comments.is-collapsed .detail-comments-chevron {
  transform: rotate(-90deg);
}
.detail-comments-body {
  display: grid;
  gap: 8px;
}
.detail-comments-list {
  display: grid;
  gap: 2px;
}
.detail-comments-list[hidden] {
  display: none;
}
.detail-comments-more {
  justify-self: start;
  min-height: 28px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--sand);
  background: var(--paper);
  color: var(--sage-dark);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.detail-comments-more:hover:enabled {
  border-color: var(--sage);
  background: var(--sage-soft);
}
.detail-comment-bottom {
  margin-top: auto;
  padding-top: 8px;
  display: grid;
  gap: 6px;
}
.detail-comment-prompt {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  font-size: .88rem;
  opacity: .56;
  transition: opacity .18s ease, border-color .18s ease;
}
.detail-comment-prompt:hover {
  opacity: 1;
  border-color: var(--sage);
}
.detail-comment-prompt a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  display: block;
  width: 100%;
}
.detail-comment-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 5px 4px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  opacity: .56;
  cursor: text;
  transition: opacity .18s ease, border-color .18s ease, background-color .18s ease;
}
.detail-comment-pill:hover,
.detail-comment-pill.is-active {
  opacity: 1;
}
.detail-comment-pill.is-active {
  border-color: var(--sage);
  background: var(--surface);
}
.detail-comment-pill[hidden] {
  display: none;
}
.detail-comment-pill input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
  cursor: text;
}
.detail-comment-pill input:focus {
  outline: none;
}
.detail-comment-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--sage);
  color: var(--paper);
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease;
}
.detail-comment-send-btn[hidden] {
  display: none;
}
.detail-comment-send-btn:hover:enabled {
  background: var(--sage-dark);
  border: 0;
  transform: scale(1.04);
}
.detail-comment-send-btn svg {
  display: block;
}
.detail-comment-status {
  margin: 0;
  padding-left: 12px;
  font-size: .78rem;
  color: var(--muted);
}
.detail-comment-status:empty {
  display: none;
}
.detail-comment-status.is-error {
  color: #a93b32;
  font-weight: 600;
}
.comment-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(230, 216, 195, .6);
}
.comment-item:last-child {
  border-bottom: 0;
}
.comment-item.is-preview {
  align-items: center;
}
.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  overflow: hidden;
  border: 1.5px solid var(--clay);
  background: var(--paper);
  display: block;
}
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.comment-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.comment-inline-line {
  font-size: .86rem;
  line-height: 1.42;
  color: var(--ink);
  word-break: break-word;
}
.comment-item.is-preview .comment-inline-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-author {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.comment-author:hover {
  color: var(--sage-dark);
  text-decoration: underline;
}
.comment-body-inline {
  white-space: pre-wrap;
}
.comment-item.is-preview .comment-body-inline {
  white-space: nowrap;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-time {
  font-size: .72rem;
  color: var(--muted);
}
.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.comment-like-btn:hover:enabled {
  background: rgba(181, 69, 59, .08);
  border-color: rgba(181, 69, 59, .24);
  color: #b5453b;
}
.comment-like-btn.is-liked {
  color: #b5453b;
}
.comment-like-btn.is-liked svg {
  fill: currentColor;
}
.comment-delete-btn {
  margin-left: auto;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(169, 59, 50, .28);
  background: transparent;
  color: #a93b32;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}
.comment-delete-btn:hover:enabled {
  background: rgba(169, 59, 50, .09);
  border-color: rgba(169, 59, 50, .45);
}
.comment-reply-btn {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.comment-reply-btn:hover:enabled {
  background: rgba(93, 134, 108, .1);
  border-color: rgba(93, 134, 108, .25);
  color: var(--accent-dark);
}
.comment-thread {
  border-bottom: 1px solid rgba(230, 216, 195, .6);
  padding-bottom: 4px;
}
.comment-thread:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.comment-thread .comment-item {
  border-bottom: 0;
}
.comment-replies {
  margin: 4px 0 4px 36px;
  padding-left: 12px;
  border-left: 1px solid var(--sand);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-item.is-reply {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-bottom: 0;
}
.comment-item.is-reply .comment-avatar {
  width: 24px;
  height: 24px;
}
.comment-reply-mention {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}
.comment-reply-mention:hover {
  text-decoration: underline;
}
.comment-deleted-parent-note {
  font-size: .74rem;
  color: var(--muted);
  font-style: italic;
}
.comment-item.is-highlight {
  animation: commentFocusFlash 1.8s ease;
}
@keyframes commentFocusFlash {
  0% { background: rgba(93, 134, 108, .2); border-radius: 6px; }
  100% { background: transparent; }
}
.detail-comment-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  border: 1px solid var(--sand);
  border-left: 2px solid var(--accent);
  background: rgba(0, 0, 0, .03);
}
.detail-comment-reply-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.detail-comment-reply-author {
  font-size: .74rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.detail-comment-reply-snippet {
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-comment-reply-cancel {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--sand);
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.detail-comment-reply-cancel:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.detail-side-similar {
  min-width: 0;
}

.detail-under-masonry,
.detail-side-masonry {
  gap: 16px;
  padding: 0;
}

.pin-shared {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.pin-shared span {
  font-size: .71rem;
  font-weight: 600;
  background: rgba(93, 134, 108, .12);
  color: var(--sage-dark);
  padding: 2px 7px;
  border-radius: 999px;
}

@media (min-width: 1560px) {
  .detail-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .detail-stage {
    grid-template-columns: 1fr;
  }
  .detail-side-similar {
    display: none;
  }
}

@media (max-width: 780px) {
  .detail-card {
    grid-template-columns: 1fr;
  }
  .detail-media-pane {
    position: static;
    padding: 14px 14px 0;
  }
  .detail-info-pane {
    padding: 16px;
  }
  .detail-info-pane .readonly-kv {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader, .loader-logo, .pin-card, .pin-media, .pin-media img, .pin-masonry, .scroll-spinner, dialog[open], .detail-back-btn, .detail-zoom-fab, .detail-icon-btn, .detail-menu-item, .detail-more-toggle, .detail-collapsible, .detail-collapsible-inner, .detail-blur-overlay, .detail-collapse-btn {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* Header Auth Navigation */
.auth-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--sage);
  border: 1.5px solid var(--sage-dark);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, transform .14s ease;
}
.auth-entry-btn:hover {
  background: var(--sage-dark);
}
.auth-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-avatar-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--clay);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .16s ease, transform .14s ease;
}
.auth-avatar-btn:hover {
  border-color: var(--sage);
}
.auth-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
button.auth-menu-toggle {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
button.auth-menu-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform .22s cubic-bezier(0.22, 1, 0.36, 1);
}
button.auth-menu-toggle:hover:enabled,
.auth-avatar-wrap.is-open button.auth-menu-toggle,
.auth-avatar-wrap.is-open button.auth-menu-toggle:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--sand);
  color: var(--ink);
}
.auth-avatar-wrap.is-open button.auth-menu-toggle svg {
  transform: rotate(180deg);
}
.auth-avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 184px;
  background: var(--surface);
  border: 1.5px solid var(--clay);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 14px 34px rgba(34, 48, 39, 0.16);
  display: grid;
  gap: 2px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity .18s ease, transform .22s cubic-bezier(0.22, 1, 0.36, 1), visibility .18s ease;
}
.auth-avatar-wrap.is-open .auth-avatar-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.auth-avatar-menu-user {
  padding: 6px 10px 7px;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--sand);
}
.auth-avatar-menu-item {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.auth-avatar-menu-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color .14s ease;
}
a.auth-avatar-menu-item:hover,
button.auth-avatar-menu-item:hover:enabled {
  background: var(--sand-soft);
  color: var(--sage-dark);
}
a.auth-avatar-menu-item:hover svg,
button.auth-avatar-menu-item:hover:enabled svg {
  color: var(--sage-dark);
}
.pix-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  display: block;
}
.pix-icon-img.is-lg {
  width: 28px;
  height: 28px;
}
a.header-pix-pill,
.header-pix-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--clay);
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(34, 48, 39, 0.08);
  transition: border-color .16s ease, background-color .16s ease, transform .18s ease;
}
a.header-pix-pill:hover {
  background: var(--sand-soft);
  border-color: var(--sage);
}
.header-pix-pill.is-bump {
  transform: scale(1.06);
  border-color: var(--sage);
}
.pix-float-pop {
  position: fixed;
  z-index: 120;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--sage);
  box-shadow: 0 8px 20px rgba(34, 48, 39, 0.18);
  color: var(--sage-dark);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
  pointer-events: none;
  animation: pixFloatPop 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.pix-float-pop .pix-icon-img {
  width: 15px;
  height: 15px;
}
@keyframes pixFloatPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -65%) scale(0.86);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -105%) scale(1.04);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -155%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -195%) scale(0.95);
  }
}
.header-pix-amount {
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.header-pix-unit {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.03em;
}
a.header-link-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
a.header-link-pill:hover {
  background: var(--sand-soft);
  border-color: var(--clay);
}

/* PIX Market (Two-Column Storefront) */
.shop-layout {
  max-width: 1320px;
  margin-inline: auto;
  padding: 24px 22px 64px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.shop-sidebar {
  position: sticky;
  top: 78px;
  padding: 16px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: 0 8px 24px rgba(34, 48, 39, 0.05);
  display: grid;
  gap: 16px;
}
.shop-balance-box {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sand);
  display: grid;
  gap: 6px;
}
.shop-balance-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shop-balance-label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.shop-balance-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.shop-daily-cap {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sage-dark);
}
.shop-epin-card {
  display: grid;
  gap: 8px;
}
.shop-epin-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.shop-epin-box {
  display: grid;
  gap: 7px;
  max-width: 440px;
}
.shop-epin-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.shop-epin-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.shop-epin-input:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--surface);
}
.shop-epin-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 16px;
  border-radius: 9px;
  border: 1px solid var(--sage-dark);
  background: var(--sage);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.shop-epin-btn:hover:enabled {
  background: var(--sage-dark);
}
.shop-epin-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.shop-epin-msg {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.shop-epin-msg.is-ok {
  color: var(--sage-dark);
}
.shop-epin-msg.is-error {
  color: var(--err-ink);
}
.shop-nav-group {
  display: grid;
  gap: 2px;
}
.shop-nav-group.is-footer {
  padding-top: 10px;
  border-top: 1px solid var(--sand);
}
.shop-nav-heading {
  padding: 0 8px 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--sage-dark);
}
button.shop-nav-btn,
a.shop-nav-link {
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
button.shop-nav-btn:hover,
a.shop-nav-link:hover {
  background: var(--sand-soft);
  color: var(--ink);
}
button.shop-nav-btn.active {
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-weight: 700;
}
.shop-main {
  min-width: 0;
  display: grid;
  gap: 24px;
}
.shop-status {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--paper);
}
.shop-status.is-ok {
  background: rgba(93, 134, 108, 0.14);
  border-color: var(--sage);
  color: var(--sage-dark);
}
.shop-status.is-error {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-ink);
}
.shop-content {
  min-width: 0;
  display: grid;
  gap: 26px;
}
.shop-spotlight {
  padding: 22px 24px 24px;
  border-radius: 20px;
  background: radial-gradient(circle at 18% 20%, rgba(93, 134, 108, 0.28), transparent 55%),
    linear-gradient(135deg, #1b231e 0%, #27322b 60%, #1d2420 100%);
  border: 1.5px solid #35443b;
  box-shadow: 0 14px 34px rgba(24, 34, 28, 0.16);
  display: grid;
  gap: 16px;
}
.shop-spotlight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.shop-spotlight-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fcfbf7;
}
button.shop-all-pill {
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
button.shop-all-pill:hover {
  background: var(--sand-soft);
  color: var(--ink);
}
button.shop-all-pill.is-dark {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f5f5f0;
}
button.shop-all-pill.is-dark:hover {
  background: rgba(255, 255, 255, 0.20);
}
.shop-spotlight-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.shop-shelf {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.shop-shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--sand);
}
.shop-shelf-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.shop-shelf-title-row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.shop-shelf-arrows {
  display: inline-flex;
  gap: 4px;
}
.shop-shelf-arrows button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.shop-shelf-arrows button:hover {
  background: var(--sand-soft);
  border-color: var(--clay);
}
.shop-shelf-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.shop-shelf-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--clay) transparent;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
}
button.shop-item-card {
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.shop-shelf-track button.shop-item-card.is-compact {
  flex: 0 0 178px;
  scroll-snap-align: start;
}
button.shop-item-card:hover {
  border-color: var(--sage);
  box-shadow: 0 8px 20px rgba(34, 48, 39, 0.10);
}
button.shop-item-card.is-owned {
  border-color: var(--sage);
}
.shop-spotlight .shop-item-card {
  background: #222c26;
  border-color: rgba(255, 255, 255, 0.14);
  color: #fcfbf7;
}
.shop-spotlight .shop-item-card:hover {
  border-color: #9dc2a8;
}
.shop-spotlight .shop-item-cat {
  color: #b7c4bb;
}
.shop-spotlight .shop-item-meta {
  border-top-color: rgba(255, 255, 255, 0.10);
}
.shop-item-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--paper);
  overflow: hidden;
}
.shop-item-visual.is-frame {
  background: radial-gradient(circle, var(--surface) 0%, var(--sand-soft) 100%);
}
.shop-spotlight .shop-item-visual.is-frame {
  background: radial-gradient(circle, #2d3a32 0%, #19201c 100%);
}
.shop-item-visual.is-large {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--sand);
}
.shop-frame-av {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: 3px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shop-item-visual.is-large .shop-frame-av {
  width: 96px;
  height: 96px;
}
.shop-frame-av.shape-square,
.shop-frame-av.shape-square > img {
  border-radius: 4px !important;
}
.shop-frame-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-owned-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(71, 104, 83, 0.92);
  color: #fcfbf7;
  font-size: 10.5px;
  font-weight: 800;
}
.shop-item-meta {
  padding: 9px 10px 10px;
  border-top: 1px solid var(--sand);
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
}
.shop-item-title {
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-item-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-item-foot {
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.shop-item-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}
.shop-item-price strong {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.shop-owned-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--sage-dark);
}
.shop-spotlight .shop-owned-label {
  color: #9dc2a8;
}
.shop-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}
.shop-view-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.shop-view-sub {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
button.shop-back-btn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
button.shop-back-btn:hover {
  background: var(--sand-soft);
}
.shop-guide-panel {
  display: grid;
  gap: 18px;
}
.shop-guide-quota-bar {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 10px;
}
.shop-guide-quota-bar.is-guest {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.shop-guide-quota-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}
.shop-guide-quota-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.shop-guide-quota-item span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.shop-guide-quota-item strong {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--sage-dark);
  font-variant-numeric: tabular-nums;
}
.shop-guide-quota-track {
  height: 7px;
  border-radius: 999px;
  background: var(--sand-soft);
  overflow: hidden;
}
.shop-guide-quota-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--sage);
  transition: width 0.25s ease;
}
.shop-guide-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.shop-rules-box {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 10px;
  align-content: start;
}
.shop-rules-box h3 {
  margin: 0;
  font-size: 15px;
}
.shop-rules-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-list);
  font-size: 15px;
  line-height: 1.5;
}
.shop-empty {
  padding: 28px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px dashed var(--clay);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
dialog.shop-item-dialog:not([open]) {
  display: none;
}
dialog.shop-item-dialog[open] {
  width: min(680px, 94vw);
  padding: 18px;
  display: grid;
  gap: 16px;
}
.shop-profile-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f0ebe0 0%, #e4d8c5 100%);
  border: 1.5px solid var(--sand);
  display: grid;
  place-items: center;
}
.shop-profile-stage.is-dark-bg {
  background: #0a0809;
  border-color: rgba(255, 255, 255, 0.14);
}
.shop-stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
.shop-mini-sheet {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 12px;
  border-radius: 12px;
  background: rgba(250, 247, 241, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--preview-border, rgba(194, 166, 140, 0.55));
  box-shadow: 0 12px 28px rgba(34, 48, 39, 0.14);
  display: grid;
  gap: 10px;
}
.shop-mini-sheet.is-dark {
  background: rgba(16, 11, 12, 0.78);
  color: #f6edea;
}
.shop-mini-sheet.is-sakura {
  background: rgba(255, 247, 243, 0.78);
  border-color: rgba(232, 93, 128, 0.34);
}
.shop-mini-banner {
  height: 92px;
  border-radius: 9px;
  border: 1.5px solid var(--preview-border, var(--border));
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-soft) 55%, var(--sand) 100%);
}
.shop-mini-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 4px;
}
.shop-mini-av {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 3px solid #efe4d2;
  background: var(--paper);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.shop-mini-av.shape-square,
.shop-mini-av.shape-square > img {
  border-radius: 4px !important;
}
.shop-mini-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-mini-id {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.shop-mini-id strong {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-mini-id span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.shop-mini-sheet.is-dark .shop-mini-id span {
  color: #bfa9a4;
}
.shop-mini-btn {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--preview-accent, var(--sage));
  color: var(--preview-btn-text, var(--surface));
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.shop-mini-showcase {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--preview-border, var(--sand));
  display: grid;
  gap: 7px;
}
.shop-mini-sheet.is-dark .shop-mini-showcase {
  background: rgba(24, 14, 15, 0.62);
}
.shop-mini-showcase-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
}
.shop-mini-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.shop-mini-thumb {
  height: 28px;
  border-radius: 6px;
  background: rgba(194, 166, 140, 0.24);
  border: 1px solid rgba(194, 166, 140, 0.30);
}
.shop-mini-sheet.is-dark .shop-mini-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.shop-dialog-body {
  display: grid;
  gap: 8px;
}
.shop-dialog-cat {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage-dark);
}
.shop-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}
.shop-dialog-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.shop-dialog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--sand);
}
.shop-dialog-balance {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
@media (max-width: 1080px) {
  .shop-spotlight-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .shop-layout {
    grid-template-columns: 1fr;
    padding: 16px 14px 48px;
  }
  .shop-sidebar {
    position: static;
  }
}
.komenga-contact-copy {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.komenga-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 14px;
  transition: border-color .15s ease, color .15s ease;
}
.komenga-contact-link:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
}
@media (prefers-reduced-motion: reduce) {
  button.auth-menu-toggle svg,
  .auth-avatar-menu {
    transition: none;
  }
}

/* Public Auth Page (/giris & /kayit) */
.auth-topbar {
  justify-content: space-between;
}
.auth-shell {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 28px 18px 48px;
}
.auth-card {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.08fr);
  background: var(--surface);
  border: 2px solid var(--clay);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--sand);
}
.auth-aside {
  background: linear-gradient(155deg, var(--sage-soft) 0%, var(--sand-soft) 100%);
  border-right: 1.5px solid var(--border);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.auth-aside-logo {
  height: 62px;
  width: auto;
  align-self: flex-start;
  filter: drop-shadow(0 3px 0 rgba(194, 166, 140, 0.45));
}
.auth-eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--clay);
  color: var(--clay-dark);
  font-size: 12px;
  font-weight: 700;
}
.auth-aside h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink);
}
.auth-aside-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.auth-perks {
  margin: 4px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13.5px;
}
.auth-main {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--sand-soft);
  border: 1.5px solid var(--border);
}
.auth-tab {
  border: 0;
  border-radius: 999px;
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--sage);
  color: var(--paper);
}
.auth-message {
  margin: 0;
  min-height: 1.2em;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
}
.auth-message:empty {
  display: none;
}
.auth-message.is-error {
  padding: 9px 12px;
  background: var(--err-bg);
  color: var(--err-ink);
  border: 1px solid #d9a49f;
}
.auth-message.is-ok {
  padding: 9px 12px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  border: 1px solid var(--sage);
}
.auth-form {
  display: grid;
  gap: 13px;
}
.auth-form .field {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.auth-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 14.5px;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--surface);
}
.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-pw-wrap input {
  padding-right: 42px;
}
.auth-pw-toggle {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.auth-pw-toggle:hover {
  background: var(--sand-soft);
  color: var(--ink);
}
.auth-pw-toggle svg {
  display: block;
}
.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}
.auth-switch-hint {
  margin: 2px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.auth-inline-link {
  border: 0;
  background: transparent;
  padding: 0 2px;
  color: var(--sage-dark);
  font-weight: 700;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.auth-consent-box {
  display: grid;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--paper);
  border: 1.5px solid var(--border);
}
.auth-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.auth-consent-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  margin: 2px 0 0;
  flex: 0 0 auto;
  border-radius: 4px;
  accent-color: var(--sage-dark);
  cursor: pointer;
}
.auth-consent-note {
  margin: 0;
  padding-left: 26px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 820px) {
  .auth-card {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    border-right: 0;
    border-bottom: 1.5px solid var(--border);
    padding: 24px 22px;
  }
  .auth-main {
    padding: 24px 22px;
  }
}

/* Public User Profile (/u/<username>) */
.profile-bg-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #070505;
}
.profile-bg-video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 56%,
    rgba(6, 6, 9, 0.52) 100%
  );
}
.profile-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
  min-height: calc(100vh - 64px);
  margin-inline: auto;
  padding: 20px 24px 56px;
  --pt-banner: linear-gradient(135deg, var(--sage) 0%, var(--sage-soft) 55%, var(--sand) 100%);
  --pt-border: var(--clay);
  --pt-accent: var(--sage);
  --pt-accent-dark: var(--sage-dark);
  --pt-tab-text: var(--paper);
  --shell-bg: rgba(250, 247, 241, 0.78);
  --shell-blur: 18px;
  --shell-border: rgba(194, 166, 140, 0.45);
  --shell-divider: rgba(194, 166, 140, 0.34);
  --shell-shadow: 0 0 42px rgba(34, 48, 39, 0.10);
  background: var(--pt-shell-gradient, var(--shell-bg));
  backdrop-filter: blur(var(--shell-blur));
  -webkit-backdrop-filter: blur(var(--shell-blur));
  border-left: 1px solid var(--shell-border);
  border-right: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.profile-shell :focus-visible {
  outline-color: var(--pt-accent, var(--sage));
}
/* Steamworks-style 5 RGBA profile theme engine:
 * --sp-rgba-1: Upper-left shell wash RGBA
 * --sp-rgba-2: Upper-right shell wash RGBA
 * --sp-rgba-3: Lower/base shell wash RGBA
 * --sp-rgba-4: Box & showcase surface RGBA (alpha = box transparency)
 * --sp-rgba-5: Section header strip RGBA (alpha = header tint)
 */
.profile-shell[class*="theme-"]:not(.theme-classic) {
  --pt-shell-gradient:
    radial-gradient(ellipse 90% 55% at 12% 0%, var(--sp-rgba-1), transparent 70%),
    radial-gradient(ellipse 85% 55% at 92% 18%, var(--sp-rgba-2), transparent 72%),
    linear-gradient(180deg, var(--sp-rgba-1) 0%, var(--sp-rgba-3) 100%);
  --pt-showcase-gradient: var(--sp-rgba-4);
  --pt-head-gradient: linear-gradient(90deg, var(--sp-rgba-5) 0%, color-mix(in srgb, var(--sp-rgba-2) 45%, transparent) 100%);
}
/* Folder-based set themes (.profile-shell.theme-<slug>) load dynamically from /profile-sets.css */
.profile-shell.theme-sakura {
  --pt-banner: linear-gradient(135deg, #d87a98 0%, #f4c8d7 58%, #f8ede3 100%);
  --pt-border: #dfa3b8;
  --pt-accent: #cf6e8d;
  --pt-accent-dark: #a64d6a;
  --pt-tab-text: #fff9f7;
  --sp-rgba-1: rgba(252, 226, 235, 0.82);
  --sp-rgba-2: rgba(248, 236, 224, 0.78);
  --sp-rgba-3: rgba(255, 244, 247, 0.86);
  --sp-rgba-4: rgba(255, 250, 252, 0.74);
  --sp-rgba-5: rgba(207, 110, 141, 0.22);
  --shell-border: rgba(207, 110, 141, 0.28);
  --shell-divider: rgba(207, 110, 141, 0.20);
}
.profile-shell.theme-lavender {
  --pt-banner: linear-gradient(135deg, #886eb5 0%, #cfc1ea 58%, #efe9f8 100%);
  --pt-border: #bba9de;
  --pt-accent: #7f63af;
  --pt-accent-dark: #5f478a;
  --pt-tab-text: #fbf9ff;
  --sp-rgba-1: rgba(233, 223, 250, 0.82);
  --sp-rgba-2: rgba(215, 228, 250, 0.76);
  --sp-rgba-3: rgba(244, 240, 252, 0.86);
  --sp-rgba-4: rgba(251, 249, 255, 0.74);
  --sp-rgba-5: rgba(127, 99, 175, 0.22);
  --shell-border: rgba(127, 99, 175, 0.28);
  --shell-divider: rgba(127, 99, 175, 0.20);
}
.profile-shell.theme-ice {
  --pt-banner: linear-gradient(135deg, #5e9cc4 0%, #b9dcf0 58%, #eef6fb 100%);
  --pt-border: #98c5e2;
  --pt-accent: #5290b8;
  --pt-accent-dark: #386b8d;
  --pt-tab-text: #f7fcff;
  --sp-rgba-1: rgba(216, 238, 252, 0.82);
  --sp-rgba-2: rgba(202, 230, 246, 0.78);
  --sp-rgba-3: rgba(239, 248, 254, 0.86);
  --sp-rgba-4: rgba(248, 252, 255, 0.74);
  --sp-rgba-5: rgba(82, 144, 184, 0.22);
  --shell-border: rgba(82, 144, 184, 0.28);
  --shell-divider: rgba(82, 144, 184, 0.20);
}
.profile-shell.theme-sunset {
  --pt-banner: linear-gradient(135deg, #d97a54 0%, #f4b797 58%, #fae5d6 100%);
  --pt-border: #e4a183;
  --pt-accent: #d36f4a;
  --pt-accent-dark: #a85031;
  --pt-tab-text: #fffaf6;
  --sp-rgba-1: rgba(252, 224, 206, 0.82);
  --sp-rgba-2: rgba(248, 208, 212, 0.78);
  --sp-rgba-3: rgba(254, 242, 234, 0.86);
  --sp-rgba-4: rgba(255, 250, 246, 0.74);
  --sp-rgba-5: rgba(211, 111, 74, 0.22);
  --shell-border: rgba(211, 111, 74, 0.28);
  --shell-divider: rgba(211, 111, 74, 0.20);
}
.profile-shell.theme-night {
  --pt-banner: linear-gradient(135deg, #1e2f4d 0%, #375788 58%, #9cc2eb 100%);
  --pt-border: rgba(114, 152, 208, 0.42);
  --pt-accent: #4472b2;
  --pt-accent-dark: #254574;
  --pt-tab-text: #eef5ff;
  --sp-rgba-1: rgba(24, 39, 66, 0.84);
  --sp-rgba-2: rgba(46, 76, 124, 0.74);
  --sp-rgba-3: rgba(12, 20, 36, 0.88);
  --sp-rgba-4: rgba(18, 29, 49, 0.64);
  --sp-rgba-5: rgba(74, 124, 194, 0.34);
  --shell-border: rgba(114, 152, 208, 0.28);
  --shell-divider: rgba(114, 152, 208, 0.22);
  --pt-text: #edf4ff;
  --pt-muted: #b8cde8;
  --pt-link: #9cc2eb;
}
.profile-shell.theme-gold {
  --pt-banner: linear-gradient(135deg, #bfa048 0%, #e7cf85 58%, #f6edd2 100%);
  --pt-border: #d5ba68;
  --pt-accent: #b7953c;
  --pt-accent-dark: #8e7023;
  --pt-tab-text: #fffdf6;
  --sp-rgba-1: rgba(248, 236, 198, 0.82);
  --sp-rgba-2: rgba(244, 224, 178, 0.78);
  --sp-rgba-3: rgba(252, 246, 228, 0.86);
  --sp-rgba-4: rgba(255, 252, 242, 0.74);
  --sp-rgba-5: rgba(183, 149, 60, 0.22);
  --shell-border: rgba(183, 149, 60, 0.28);
  --shell-divider: rgba(183, 149, 60, 0.20);
}
.profile-shell.theme-final {
  --pt-banner: linear-gradient(135deg, #b898d4 0%, #e7cf85 52%, #f4eff9 100%);
  --pt-border: #ccb4df;
  --pt-accent: #8e6cb8;
  --pt-accent-dark: #6b4c94;
  --pt-tab-text: #fdfaff;
  --sp-rgba-1: rgba(235, 220, 248, 0.82);
  --sp-rgba-2: rgba(246, 232, 194, 0.78);
  --sp-rgba-3: rgba(247, 242, 252, 0.86);
  --sp-rgba-4: rgba(253, 250, 255, 0.74);
  --sp-rgba-5: rgba(142, 108, 184, 0.24);
  --shell-border: rgba(142, 108, 184, 0.28);
  --shell-divider: rgba(142, 108, 184, 0.20);
}
/* Theme-controlled profile text colors (independent of box styles) */
.profile-shell .profile-identity h1,
.profile-shell .profile-bio,
.profile-shell .profile-showcase-title,
.profile-shell .steam-row-title,
.profile-shell .profile-panel-meta strong,
.profile-shell .profile-comment-head strong,
.profile-shell .profile-comment-text,
.profile-shell .profile-showcase-count,
.profile-shell .profile-expanded-back,
.profile-shell .profile-page-btn {
  color: var(--pt-text, var(--ink));
}
.profile-shell .steam-foot-link {
  color: var(--pt-link, var(--pt-accent-dark, var(--sage-dark)));
}
.profile-shell .profile-handle,
.profile-shell .profile-xp-caption,
.profile-shell .profile-showcase-stat,
.profile-shell .steam-row-sub,
.profile-shell .steam-row-excerpt,
.profile-shell .steam-row-meta,
.profile-shell .profile-showcase-foot,
.profile-shell .profile-panel-meta span,
.profile-shell .profile-comment-sub,
.profile-shell .profile-comment-date,
.profile-shell .profile-showcase-empty,
.profile-shell .profile-empty-box {
  color: var(--pt-muted, var(--muted));
}
.profile-shell .profile-page-btn.active {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.profile-card {
  background: var(--surface);
  border: 2px solid var(--pt-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--pt-card-shadow, var(--sand));
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.profile-shell .profile-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.profile-shell .profile-banner {
  height: 152px;
  border-radius: 6px;
  border: 1.5px solid var(--pt-border, var(--border));
  overflow: hidden;
}
.profile-shell .profile-body {
  padding: 4px 4px 6px;
  gap: 14px;
}
.profile-shell .profile-head {
  margin-top: 16px;
  gap: 20px;
}
.profile-shell .profile-avatar-wrap,
.profile-shell .profile-avatar-lg {
  width: 104px;
  height: 104px;
}
.profile-shell .profile-collections {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--shell-divider);
}
.profile-shell .profile-showcase,
.profile-shell .profile-expanded-view {
  border-radius: 6px;
  background: var(--pt-showcase-gradient, rgba(255, 253, 248, 0.72));
  border: 1px solid var(--shell-divider);
  box-shadow: 0 6px 20px rgba(34, 48, 39, 0.06);
}
@media (max-width: 640px) {
  .profile-shell {
    padding: 14px 12px 44px;
    border-left: 0;
    border-right: 0;
  }
  .profile-shell .profile-banner {
    height: 118px;
    border-radius: 5px;
  }
  .profile-shell .profile-avatar-wrap,
  .profile-shell .profile-avatar-lg {
    width: 88px;
    height: 88px;
  }
}
.box-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.box-style-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, transform .14s ease, box-shadow .15s ease;
}
.box-style-card:hover {
  border-color: var(--pt-accent, var(--sage));
  transform: translateY(-1px);
}
.box-style-card.selected {
  border: 2.5px solid var(--pt-accent, var(--sage));
  box-shadow: 0 0 0 3px var(--pt-accent-soft, var(--sage-soft));
}
.box-style-card strong {
  font-size: 13px;
  font-weight: 800;
}
.box-style-preview {
  height: 52px;
  border-radius: 10px;
  padding: 6px 8px;
  display: grid;
  gap: 4px;
  align-content: center;
  background-image: linear-gradient(135deg, #6b8f77 0%, #c7b59b 50%, #445f6f 100%);
  position: relative;
  overflow: hidden;
}
.box-style-preview span {
  display: block;
  border-radius: 5px;
}
.box-style-preview .bsp-head {
  height: 10px;
  width: 68%;
}
.box-style-preview .bsp-row {
  height: 11px;
  width: 100%;
}
.box-style-preview.is-box-default .bsp-head,
.box-style-preview.is-box-default .bsp-row {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(214, 198, 174, 0.8);
}
.box-style-preview.is-box-glass .bsp-head,
.box-style-preview.is-box-glass .bsp-row {
  background: rgba(255, 253, 248, 0.56);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.box-style-preview.is-box-dark-glass .bsp-head,
.box-style-preview.is-box-dark-glass .bsp-row {
  background: rgba(15, 20, 28, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.box-style-preview.is-box-clear .bsp-head,
.box-style-preview.is-box-clear .bsp-row {
  background: rgba(255, 253, 248, 0.09);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.profile-shell.box-glass {
  --shell-bg: rgba(255, 255, 255, 0.04);
  --shell-blur: 14px;
  --shell-border: rgba(255, 255, 255, 0.22);
  --shell-divider: rgba(255, 255, 255, 0.16);
  --shell-shadow: none;
  --pt-shell-gradient: none;
  --pt-showcase-gradient: none;
}
.profile-shell.box-glass .profile-showcase,
.profile-shell.box-glass .profile-expanded-view {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow: none;
}
.profile-shell.box-glass .profile-showcase-head,
.profile-shell.box-glass .profile-showcase-foot {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
}
.profile-shell.box-glass .steam-row-card,
.profile-shell.box-glass .profile-panel-card,
.profile-shell.box-glass .profile-comment-card,
.profile-shell.box-glass .profile-showcase-empty,
.profile-shell.box-glass .profile-empty-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
}
.profile-shell.box-glass .steam-row-card:hover,
.profile-shell.box-glass .profile-panel-card:hover,
.profile-shell.box-glass .profile-comment-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--pt-accent, var(--sage));
}
.profile-shell.box-glass .profile-showcase-count,
.profile-shell.box-glass .profile-expanded-back,
.profile-shell.box-glass .profile-page-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.profile-shell.box-dark-glass {
  --shell-bg: rgba(13, 17, 25, 0.72);
  --shell-blur: 20px;
  --shell-border: rgba(255, 255, 255, 0.14);
  --shell-divider: rgba(255, 255, 255, 0.12);
  --shell-shadow: 0 0 48px rgba(0, 0, 0, 0.46);
}
.profile-shell.box-dark-glass .profile-showcase,
.profile-shell.box-dark-glass .profile-expanded-view {
  background: rgba(8, 11, 18, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.profile-shell.box-dark-glass .profile-showcase-head,
.profile-shell.box-dark-glass .profile-showcase-foot {
  background: rgba(9, 12, 18, 0.56);
  border-color: rgba(255, 255, 255, 0.12);
}
.profile-shell.box-dark-glass .profile-showcase-divider {
  background: rgba(255, 255, 255, 0.14);
}
.profile-shell.box-dark-glass .steam-row-card,
.profile-shell.box-dark-glass .profile-panel-card,
.profile-shell.box-dark-glass .profile-comment-card,
.profile-shell.box-dark-glass .profile-showcase-empty,
.profile-shell.box-dark-glass .profile-empty-box {
  background: rgba(11, 14, 21, 0.54);
  border-color: rgba(255, 255, 255, 0.08);
}
.profile-shell.box-dark-glass .steam-row-card:hover,
.profile-shell.box-dark-glass .profile-panel-card:hover,
.profile-shell.box-dark-glass .profile-comment-card:hover {
  background: rgba(24, 30, 42, 0.78);
  border-color: rgba(255, 255, 255, 0.28);
}
.profile-shell.box-dark-glass .profile-showcase-count,
.profile-shell.box-dark-glass .profile-expanded-back,
.profile-shell.box-dark-glass .profile-page-btn {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.profile-shell.box-clear {
  --shell-bg: transparent;
  --shell-blur: 8px;
  --shell-border: rgba(255, 255, 255, 0.08);
  --shell-divider: rgba(255, 255, 255, 0.08);
  --shell-shadow: none;
  --pt-shell-gradient: none;
  --pt-showcase-gradient: none;
}
.profile-shell.box-clear .profile-showcase,
.profile-shell.box-clear .profile-expanded-view {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}
.profile-shell.box-clear .profile-showcase-head,
.profile-shell.box-clear .profile-showcase-foot {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.07);
}
.profile-shell.box-clear .profile-showcase-divider {
  background: rgba(255, 255, 255, 0.07);
}
.profile-shell.box-clear .steam-row-card,
.profile-shell.box-clear .profile-panel-card,
.profile-shell.box-clear .profile-comment-card,
.profile-shell.box-clear .profile-showcase-empty,
.profile-shell.box-clear .profile-empty-box {
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.07);
}
.profile-shell.box-clear .steam-row-card:hover,
.profile-shell.box-clear .profile-panel-card:hover,
.profile-shell.box-clear .profile-comment-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.profile-shell.box-clear .profile-showcase-count,
.profile-shell.box-clear .profile-expanded-back,
.profile-shell.box-clear .profile-page-btn {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.10);
}
.profile-not-found {
  padding: 40px 26px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.profile-banner {
  height: 132px;
  background: var(--pt-banner);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1.5px solid var(--pt-border, var(--border));
  transition: background .25s ease, border-color .2s ease;
}
.profile-body {
  padding: 0 28px 28px;
  display: grid;
  gap: 18px;
}
.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}
.profile-avatar-wrap {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 4px solid #EFE4D2;
  background: var(--paper);
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.profile-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 3.5px solid #EFE4D2;
  background: var(--paper);
  object-fit: cover;
  flex-shrink: 0;
}
.profile-avatar-wrap .profile-avatar-lg {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.profile-identity {
  flex: 1 1 260px;
  min-width: 0;
  padding-top: 0;
  display: grid;
  gap: 4px;
}
.profile-identity h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.profile-handle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.profile-meta-pill,
.profile-fav-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.profile-meta-pill {
  background: var(--sand-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}
.profile-fav-pill {
  background: var(--paper);
  border: 1px solid var(--pt-border, var(--sage));
  color: var(--pt-accent-dark, var(--sage-dark));
}
.profile-owner-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}
.profile-owner-actions[hidden] {
  display: none;
}
.profile-appearance-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 6px;
  border: 1.5px solid var(--pt-border, var(--border));
  background: rgba(128, 128, 128, 0.12);
  color: var(--pt-text, var(--ink));
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .14s ease;
}
.profile-appearance-icon-btn:hover {
  background: rgba(128, 128, 128, 0.22);
  border-color: var(--pt-accent, var(--sage));
  transform: translateY(-1px);
}
.profile-social-links {
  flex: 0 0 185px;
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: start;
  padding-left: 20px;
  border-left: 1px solid var(--shell-divider, var(--border));
}
.profile-social-links[hidden] {
  display: none;
}
.profile-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  margin-left: -8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pt-muted, var(--muted));
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  max-width: calc(100% + 8px);
  transition: background-color .18s ease, color .18s ease;
}
.profile-social-link:hover {
  background: rgba(128, 128, 128, 0.14);
  color: var(--pt-text, var(--ink));
  text-decoration: none;
}
.profile-social-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transform: translateY(0.5px);
}
.profile-social-ico svg {
  display: block;
  width: 13px;
  height: 13px;
}
.profile-social-link.is-youtube .profile-social-ico svg {
  width: 14px;
  height: 14px;
}
.profile-social-link.is-instagram .profile-social-ico {
  color: #e4405f;
}
.profile-social-link.is-youtube .profile-social-ico {
  color: #ff3b3b;
}
.profile-social-link.is-tiktok .profile-social-ico {
  color: var(--pt-text, var(--ink));
}
.profile-social-handle {
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 860px) {
  .profile-social-links {
    flex: 1 1 100%;
    padding-left: 0;
    border-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
  }
}
.settings-social-group {
  display: grid;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.settings-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.settings-social-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.profile-bio {
  margin: 4px 0 2px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  max-width: min(58ch, 100%);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.profile-editor {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1.5px solid var(--sand);
  display: grid;
  gap: 14px;
}
.profile-editor h2 {
  margin: 0;
  font-size: 18px;
}
.profile-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--pt-border, var(--border));
}
button.settings-tab {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--pt-border, var(--border));
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button.settings-tab:hover:enabled {
  background: var(--surface);
  border-color: var(--pt-accent, var(--sage));
  color: var(--ink);
}
button.settings-tab.active,
button.settings-tab.active:hover:enabled {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.settings-panel {
  display: grid;
  gap: 14px;
}
.settings-panel[hidden] {
  display: none;
}
.profile-account-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-avatar-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-avatar-upload-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
button.profile-avatar-upload-btn {
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1.5px solid var(--pt-accent, var(--sage));
  background: var(--surface);
  color: var(--ink);
}
button.profile-avatar-upload-btn:hover:enabled {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
dialog.avatar-crop-dialog {
  width: min(360px, 94vw);
}
.avatar-crop-stage {
  display: grid;
  place-items: center;
  padding: 6px 0;
}
#avatar-crop-canvas {
  width: 240px;
  height: 240px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--paper);
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(34, 48, 39, .08);
}
#avatar-crop-canvas:active {
  cursor: grabbing;
}
.avatar-crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.avatar-crop-zoom-row input[type="range"] {
  flex: 1;
  accent-color: var(--sage);
}
.profile-editor .field {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
}
.profile-editor input:not([type="checkbox"]),
.profile-editor textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.profile-editor input:not([type="checkbox"]):focus,
.profile-editor textarea:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--surface);
}
.profile-bio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-avatar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-avatar-choice {
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, border-color .14s ease;
}
.profile-avatar-choice:hover {
  transform: translateY(-1px);
  border-color: var(--clay-dark);
}
.profile-avatar-choice.selected {
  border: 3px solid var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
.profile-avatar-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-privacy-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 12px;
}
.profile-privacy-head {
  display: grid;
  gap: 2px;
}
.profile-privacy-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.profile-privacy-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.profile-privacy-list {
  display: grid;
  gap: 8px;
}
.profile-privacy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(230, 216, 195, .85);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.profile-privacy-row:hover {
  border-color: var(--sage);
}
.profile-privacy-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.profile-privacy-copy strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.profile-privacy-copy small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.privacy-switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}
.privacy-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  min-height: 0;
  margin: 0;
}
.privacy-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid var(--clay);
  transition: background-color .18s ease, border-color .18s ease;
}
.privacy-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(34, 48, 39, .22);
  transition: transform .18s ease;
}
.privacy-switch input:checked + .privacy-slider {
  background: var(--sage);
  border-color: var(--sage-dark);
}
.privacy-switch input:checked + .privacy-slider::before {
  transform: translateX(20px);
}
.privacy-switch input:focus-visible + .privacy-slider {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}
.profile-collections {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}
.profile-showcases {
  display: grid;
  gap: 18px;
}
.profile-showcase {
  border-radius: 14px;
  overflow: hidden;
  background: var(--pt-card-bg, var(--paper));
  border: 1.5px solid var(--pt-accent-soft, var(--border));
  box-shadow: 0 10px 26px rgba(34, 48, 39, 0.06);
  display: grid;
}
.profile-showcase-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-bottom: 1.5px solid var(--pt-accent-soft, var(--sand));
}
.profile-showcase-title-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-showcase-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.profile-showcase-stat {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.profile-showcase-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--sand);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profile-showcase-lock {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pt-accent-soft, rgba(93, 134, 108, 0.14));
  color: var(--pt-accent-dark, var(--sage-dark));
  font-size: 11px;
  font-weight: 800;
}
.profile-expanded-back {
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--pt-accent-soft, var(--border));
  background: var(--surface);
  color: var(--pt-accent-dark, var(--sage-dark));
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.profile-expanded-back:hover {
  border-color: var(--pt-accent, var(--sage));
  background: var(--pt-accent, var(--sage));
  color: var(--pt-tab-text, var(--paper));
}
.profile-showcase-divider {
  height: 1.5px;
  width: 100%;
  background: var(--pt-accent-soft, var(--sand));
}
.profile-showcase-body {
  padding: 14px 18px;
  display: grid;
  gap: 10px;
}
.profile-save-bar.is-showcase-save-bar {
  margin-top: 0;
}
.profile-showcase-rows {
  display: grid;
  gap: 8px;
}
.steam-row-card {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease, transform .14s ease;
}
.steam-row-card:hover {
  border-color: var(--pt-accent, var(--sage));
  background: var(--paper);
  transform: translateY(-1px);
}
.steam-row-thumb {
  width: 156px;
  height: 76px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(230, 216, 195, 0.7);
}
.steam-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .22s ease;
}
.steam-row-card:hover .steam-row-thumb img {
  transform: scale(1.03);
}
.steam-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.steam-row-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.steam-row-sub {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.steam-row-excerpt {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.steam-row-meta {
  text-align: right;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.profile-showcase-foot {
  padding: 10px 18px 13px;
  border-top: 1px solid var(--pt-accent-soft, var(--sand));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.steam-foot-link {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.steam-foot-link:hover {
  color: var(--pt-accent-dark, var(--sage-dark));
  text-decoration: underline;
}
.profile-showcase-empty {
  margin: 2px 0;
  padding: 16px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px dashed var(--sand);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.profile-expanded-view {
  padding: 18px 20px 22px;
  border-radius: 20px;
  background: var(--pt-card-bg, var(--paper));
  border: 1.5px solid var(--pt-accent-soft, var(--border));
  display: grid;
  gap: 14px;
}
/* Profile unified-box showcase design: single outer box wraps header and transparent rows */
.profile-shell .profile-showcase-head {
  background: var(--pt-head-gradient, transparent) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--shell-divider, var(--pt-accent-soft, var(--sand))) !important;
  border-radius: 0;
}
.profile-shell .profile-showcase-divider {
  display: none;
}
.profile-shell .profile-showcase-body {
  padding: 10px 14px 12px;
  background: transparent;
}
.profile-shell .steam-row-card,
.profile-shell .profile-panel-card,
.profile-shell .profile-comment-card,
.profile-shell .profile-showcase-empty,
.profile-shell .profile-empty-box {
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 4px;
  box-shadow: none !important;
}
.profile-shell .steam-row-card {
  padding: 10px 8px;
  border-radius: 4px;
  border-bottom: 1px solid var(--shell-divider, rgba(169, 142, 113, 0.22)) !important;
}
.profile-shell .steam-row-thumb,
.profile-shell .profile-showcase-count,
.profile-shell .profile-expanded-back,
.profile-shell .profile-page-btn,
.profile-shell .profile-showcase-lock,
.profile-shell .profile-meta-pill,
.profile-shell .profile-fav-pill {
  border-radius: 4px;
}
.profile-shell .profile-badges-box {
  border-radius: 5px;
}
.profile-shell .profile-badges-box.is-mini {
  border-radius: 4px;
}
.profile-shell .steam-row-card:last-child {
  border-bottom-color: transparent !important;
}
.profile-shell .steam-row-card:hover,
.profile-shell .profile-panel-card:hover,
.profile-shell .profile-comment-card:hover {
  background: rgba(128, 128, 128, 0.09) !important;
  border-color: var(--pt-accent-soft, rgba(93, 134, 108, 0.35)) !important;
}
.profile-shell .profile-showcase-foot {
  background: transparent !important;
  border-top: 1px solid var(--shell-divider, var(--pt-accent-soft, var(--sand))) !important;
  padding: 8px 16px 12px;
}
/* Profile Wall Comments & Settings My Comments */
.profile-shell .profile-wall {
  margin-top: 18px;
}
.profile-shell .profile-wall-headbar {
  display: grid;
  gap: 6px;
  padding: 13px 18px 10px;
}
.profile-wall-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-wall-summary {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pt-muted, var(--muted));
}
.profile-wall-pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.profile-wall-pager[hidden] {
  display: none;
}
button.profile-wall-page-arrow {
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid var(--shell-divider, rgba(169, 142, 113, 0.25));
  background: rgba(128, 128, 128, 0.14);
  color: var(--pt-muted, var(--muted));
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
button.profile-wall-page-arrow:hover:enabled {
  color: var(--pt-text, var(--ink));
  border-color: var(--pt-accent, var(--sage));
}
button.profile-wall-page-arrow:disabled {
  opacity: 0.36;
  cursor: default;
}
button.profile-wall-page-num {
  min-width: 20px;
  height: 22px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--pt-muted, var(--muted));
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}
button.profile-wall-page-num:hover:enabled {
  color: var(--pt-text, var(--ink));
}
button.profile-wall-page-num.active {
  color: var(--pt-text, var(--ink));
  font-weight: 800;
  cursor: default;
}
.profile-wall-page-dots {
  font-size: 12px;
  color: var(--pt-muted, var(--muted));
  padding: 0 2px;
}
.profile-shell .profile-wall-inner {
  padding: 12px 18px 14px;
  gap: 14px;
}
.profile-wall-composer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--shell-divider, rgba(169, 142, 113, 0.22));
}
.profile-wall-composer[hidden] {
  display: none;
}
.profile-wall-me-av {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.profile-wall-me-av.shape-circle {
  border-radius: 999px;
}
.profile-wall-me-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-wall-composer-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 8px;
}
.profile-wall-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 3px;
  border: 1px solid var(--shell-divider, rgba(169, 142, 113, 0.28));
  background: rgba(0, 0, 0, 0.14);
  color: var(--pt-text, var(--ink));
  font: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  resize: none;
  transition: min-height .15s ease, border-color .15s ease;
}
.profile-wall-input::placeholder {
  font-style: italic;
  color: var(--pt-muted, var(--muted));
}
.profile-wall-composer.is-active .profile-wall-input {
  min-height: 70px;
  resize: vertical;
  border-color: var(--pt-accent, var(--sage));
}
.profile-wall-input:focus {
  outline: none;
  border-color: var(--pt-accent, var(--sage));
}
.profile-wall-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-wall-composer:not(.is-active) .profile-wall-composer-foot {
  display: none;
}
.profile-wall-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-muted, var(--muted));
}
.profile-wall-status.is-error {
  color: #dc2626;
}
.profile-wall-composer .button.primary {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12.5px;
}
.profile-wall-guest {
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 700;
}
.profile-wall-guest a {
  color: var(--pt-link, var(--pt-accent-dark, var(--sage-dark)));
  text-decoration: none;
}
.profile-wall-guest a:hover {
  text-decoration: underline;
}
.profile-wall-list {
  display: grid;
  gap: 16px;
  padding: 4px 2px;
}
.profile-wall-list:empty {
  display: none;
}
.profile-wall-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px;
}
.profile-wall-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.profile-wall-avatar.shape-square {
  border-radius: 6px;
}
.profile-wall-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-wall-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 1px;
}
.profile-wall-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.profile-wall-row-top .comment-badges {
  flex-shrink: 0;
}
.profile-wall-author {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pt-text, var(--ink));
  text-decoration: none;
}
.profile-wall-author:hover {
  text-decoration: underline;
}
.profile-wall-date {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--pt-muted, var(--muted));
}
.profile-wall-del {
  margin-left: auto;
  border: 0;
  background: transparent;
  padding: 1px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pt-muted, var(--muted));
  opacity: 0.65;
  cursor: pointer;
}
.profile-wall-del:hover:enabled {
  opacity: 1;
  color: #dc2626;
}
.profile-wall-body {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--pt-text, var(--ink));
  white-space: pre-wrap;
  word-break: break-word;
}
.profile-wall-bottom-bar {
  display: flex;
  justify-content: center;
  padding-top: 10px;
  border-top: 1px solid var(--shell-divider, rgba(169, 142, 113, 0.20));
}
.profile-wall-bottom-bar[hidden] {
  display: none;
}
.settings-my-comments {
  display: grid;
  gap: 10px;
}
.settings-empty-note {
  margin: 0;
  padding: 20px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}
.settings-comment-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--border);
}
.settings-comment-thumb {
  width: 76px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sand-soft);
  display: block;
}
.settings-comment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.settings-comment-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.settings-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.settings-comment-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.settings-comment-title:hover {
  text-decoration: underline;
}
.settings-comment-date {
  font-size: 11.5px;
  color: var(--muted);
}
.settings-comment-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}
.settings-comment-del {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  background: transparent;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.settings-comment-del:hover:enabled {
  background: rgba(220, 38, 38, 0.08);
}
.profile-expanded-bar {
  display: grid;
  gap: 10px;
}
.profile-expanded-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.profile-order-box {
  margin-top: 6px;
}
.profile-order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.profile-order-sub {
  font-size: 12px;
  color: var(--muted);
}
.profile-order-list {
  display: grid;
  gap: 8px;
}
.profile-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: grab;
  transition: border-color .15s ease, background-color .15s ease, opacity .15s ease;
}
.profile-order-row:hover {
  border-color: var(--pt-accent, var(--sage));
}
.profile-order-row.is-dragging {
  opacity: 0.5;
}
.profile-order-row.is-drop-target {
  border-color: var(--pt-accent, var(--sage));
  background: var(--paper);
}
.profile-order-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.profile-order-grip {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: -1px;
  user-select: none;
}
.profile-order-rank {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--pt-accent-dark, var(--sage-dark));
  min-width: 18px;
}
.profile-order-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.profile-order-vis {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(93, 134, 108, 0.14);
  color: var(--sage-dark);
}
.profile-order-vis.is-private {
  background: rgba(34, 48, 39, 0.1);
  color: var(--muted);
}
.profile-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.profile-order-move-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.profile-order-move-btn:hover:enabled {
  border-color: var(--pt-accent, var(--sage));
  color: var(--pt-accent-dark, var(--sage-dark));
}
.profile-order-move-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
@media (max-width: 640px) {
  .profile-showcase-head,
  .profile-showcase-body,
  .profile-showcase-foot {
    padding-left: 14px;
    padding-right: 14px;
  }
  .steam-row-card {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
  }
  .steam-row-thumb {
    width: 110px;
    height: 62px;
  }
  .steam-row-meta {
    grid-column: 2;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    white-space: normal;
  }
  .profile-expanded-view {
    padding: 14px;
    border-radius: 16px;
  }
}
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-tab {
  min-height: 38px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
button.profile-tab:hover:enabled {
  border-color: var(--pt-accent, var(--sage));
  background: var(--paper);
  color: var(--ink);
}
.profile-tab.active,
button.profile-tab.active:hover:enabled {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.profile-tab-lock {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(34, 48, 39, 0.12);
  color: inherit;
}
.profile-tab.active .profile-tab-lock {
  background: rgba(255, 255, 255, 0.22);
}
.profile-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  align-content: start;
  gap: 14px;
  min-height: 220px;
  transition: opacity .16s ease, transform .16s ease;
  will-change: opacity, transform;
}
.profile-panel-grid.is-switching {
  opacity: 0;
  transform: translateY(6px);
}
.profile-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.profile-page-btn {
  min-width: 38px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.profile-page-btn:hover:enabled {
  border-color: var(--pt-accent, var(--sage));
  background: var(--paper);
}
.profile-page-btn.active,
.profile-page-btn.active:hover:enabled {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.profile-page-btn:disabled:not(.active) {
  opacity: 0.45;
  cursor: default;
}
.profile-page-ellipsis {
  padding: 0 4px;
  color: var(--muted);
  font-weight: 700;
}
.profile-page-info {
  margin-left: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .profile-panel-grid {
    transition: none;
  }
  .profile-panel-grid.is-switching {
    transform: none;
  }
}
.profile-empty-box {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 18px;
  text-align: center;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px dashed var(--clay);
  color: var(--muted);
  font-weight: 600;
}
.profile-panel-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform .14s ease, border-color .15s ease;
}
.profile-panel-card:hover {
  transform: translateY(-2px);
  border-color: var(--pt-accent, var(--sage));
}
.profile-panel-thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.profile-panel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-panel-meta {
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}
.profile-panel-meta strong {
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-panel-meta span {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-panel-grid.is-comments-list {
  grid-template-columns: 1fr;
}
.profile-comment-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: transform .14s ease, border-color .15s ease;
}
.profile-comment-card:hover {
  transform: translateY(-1px);
  border-color: var(--pt-accent, var(--sage));
}
.profile-comment-thumb {
  width: 78px;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.profile-comment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-comment-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
}
.profile-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.profile-comment-head strong {
  font-size: 13.5px;
}
.profile-comment-sub {
  font-size: 12px;
  color: var(--muted);
}
.profile-comment-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.profile-comment-date {
  font-size: 11.5px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .profile-body {
    padding: 0 18px 22px;
  }
  .profile-head {
    align-items: flex-start;
  }
  .profile-identity {
    padding-top: 8px;
    flex-basis: 100%;
  }
}

/* Compact Confirmation Dialog */
dialog.komenga-confirm {
  margin: auto;
  width: min(350px, 92vw);
  padding: 20px 22px;
  border-radius: 20px;
  border: 1.5px solid var(--sand);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
dialog.komenga-confirm[open] {
  display: grid;
  gap: 10px;
  animation: lightboxIn .18s cubic-bezier(0.22, 1, 0.36, 1);
}
dialog.komenga-confirm::backdrop {
  background: rgba(34, 48, 39, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.komenga-confirm-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
}
.komenga-confirm-msg {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
}
.komenga-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.komenga-confirm-danger {
  background: #b5453b;
  border-color: #a0382f;
  color: #fff;
}
.komenga-confirm-danger:hover:enabled {
  background: #99362d;
  border-color: #842b23;
}

/* Avatar Level Frames (1-150) */
.avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-width: 3px;
  border-color: transparent;
}
.avatar-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-wall-avatar.avatar-frame,
.profile-wall-me-av.avatar-frame,
.dock-mini-av.avatar-frame {
  border-width: 2px;
}
.avatar-frame.frame-cream {
  border-color: #EFE4D2;
  box-shadow: 0 0 0 1px rgba(169, 142, 113, .45);
}
.avatar-frame.frame-mint {
  border-color: #A8D8B9;
  box-shadow: 0 0 0 1.5px rgba(93, 134, 108, .35);
}
.avatar-frame.frame-lavender {
  border-color: #C8B6E2;
  box-shadow: 0 0 0 1.5px rgba(132, 107, 168, .38);
}
.avatar-frame.frame-sky {
  border-color: #9ED3F2;
  box-shadow: 0 0 0 1.5px rgba(72, 136, 178, .36);
}
.avatar-frame.frame-peach {
  border-color: #F4B895;
  box-shadow: 0 0 0 1.5px rgba(201, 125, 85, .38);
}
.avatar-frame.frame-pink {
  border-color: #F3B8CE;
  box-shadow: 0 0 0 1.5px rgba(196, 108, 142, .36);
}
.avatar-frame.frame-gold {
  border-color: #E6C365;
  box-shadow: 0 0 0 1.5px rgba(196, 154, 48, .48), 0 0 9px rgba(230, 195, 101, .36);
}
.avatar-frame.frame-mint-lavender {
  border-color: #A8D8B9;
  box-shadow: 0 0 0 2.5px #C8B6E2;
}
.avatar-frame.frame-gold-pink {
  border-color: #F3B8CE;
  box-shadow: 0 0 0 2.5px #E6C365, 0 0 10px rgba(230, 195, 101, .42);
}
.profile-avatar-lg.avatar-frame,
.profile-avatar-wrap.avatar-frame {
  border-width: 4px;
}
.profile-avatar-lg.avatar-frame.frame-mint-lavender,
.profile-avatar-wrap.avatar-frame.frame-mint-lavender {
  box-shadow: 0 0 0 3px #C8B6E2;
}
.profile-avatar-lg.avatar-frame.frame-gold-pink,
.profile-avatar-wrap.avatar-frame.frame-gold-pink {
  box-shadow: 0 0 0 3.5px #E6C365, 0 0 14px rgba(230, 195, 101, .45);
}

/* Custom Illustrated Avatar Frames load dynamically from /profile-sets.css */
.profile-avatar-wrap.shape-circle,
.avatar-frame.shape-circle,
.profile-avatar-wrap.shape-circle > img,
.avatar-frame.shape-circle > img {
  border-radius: 999px !important;
}
.profile-avatar-wrap.shape-square,
.avatar-frame.shape-square,
.profile-avatar-wrap.shape-square > img,
.avatar-frame.shape-square > img {
  border-radius: 10px !important;
}
.shop-frame-av.avatar-frame.shape-square,
.shop-frame-av.avatar-frame.shape-square > img,
.shop-mini-av.avatar-frame.shape-square,
.shop-mini-av.avatar-frame.shape-square > img {
  border-radius: 4px !important;
}

/* Public Profile Level Badge & Subtle Progress Bar */
.profile-handle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.profile-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sand-soft);
  border: 1px solid var(--sand);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.profile-xp-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.profile-xp-strip[hidden] {
  display: none;
}
.profile-xp-track {
  width: 150px;
  height: 5px;
  border-radius: 999px;
  background: rgba(194, 166, 140, .26);
  overflow: hidden;
  flex-shrink: 0;
}
.profile-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--pt-accent, var(--sage));
  transition: width .35s ease, background-color .2s ease;
}

/* Early Supporter & Level Icon Badges + Görünüm Appearance Picker */
.profile-badges-box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--pt-border, var(--border));
  box-shadow: 0 1px 2px rgba(34, 48, 39, .06);
  vertical-align: middle;
}
.profile-shell .profile-badges-box {
  background: color-mix(in srgb, var(--pt-accent, var(--sage)) 10%, var(--paper));
  border-color: var(--pt-border, var(--border));
}
.profile-shell.box-glass .profile-badges-box {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow: none;
}
.profile-shell.box-dark-glass .profile-badges-box {
  background: color-mix(in srgb, var(--pt-accent, var(--sage)) 18%, rgba(16, 20, 28, 0.80));
  border-color: rgba(255, 255, 255, 0.16);
}
.profile-shell.box-clear .profile-badges-box {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.09);
  backdrop-filter: none;
  box-shadow: none;
}
.profile-shell.box-ember .profile-badges-box {
  background: rgba(26, 15, 12, 0.78);
  border-color: rgba(255, 132, 56, 0.28);
}
.profile-shell.box-crimson-rose .profile-badges-box {
  background: rgba(38, 12, 14, 0.80);
  border-color: rgba(201, 51, 48, 0.34);
}
.profile-shell.box-sakura-courier .profile-badges-box {
  background: rgba(255, 244, 240, 0.84);
  border-color: rgba(232, 93, 128, 0.30);
}
.profile-badges-box[hidden] {
  display: none;
}
.profile-badges-box.is-mini {
  gap: 4px;
  padding: 2px 5px;
  border-radius: 7px;
  background: var(--surface);
  border-color: var(--border);
  box-shadow: none;
}
.early-supporter-badge,
.level-icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  flex-shrink: 0;
  cursor: help;
}
.early-supporter-badge[hidden],
.level-icon-badge[hidden] {
  display: none;
}
.early-supporter-badge.is-mini,
.level-icon-badge.is-mini {
  width: 16px;
  height: 16px;
}
.early-supporter-badge img,
.level-icon-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.early-supporter-badge::after,
.level-icon-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translate3d(-50%, 4px, 0);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 30;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(34, 48, 39, .22);
  transition: opacity .15s ease, transform .15s ease;
}
.early-supporter-badge:hover::after,
.level-icon-badge:hover::after {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}
.comment-badges > [title] {
  cursor: default;
}
.comment-badges > [title]::after {
  content: none;
}

.profile-appearance-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 14px;
}
.appearance-row {
  display: grid;
  gap: 8px;
}
.appearance-row-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.profile-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 10px;
}
button.profile-set-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0;
  min-height: 0;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
button.profile-set-card:hover:enabled {
  border-color: var(--pt-accent, var(--sage));
  background: var(--surface);
  transform: translateY(-1px);
}
button.profile-set-card.selected,
button.profile-set-card.selected:hover:enabled {
  border: 2px solid var(--pt-accent, var(--sage));
  box-shadow: 0 0 0 2.5px rgba(93, 134, 108, .22);
}
.profile-set-card-banner {
  display: block;
  width: 100%;
  height: 36px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(34, 48, 39, .12);
}
.profile-set-card-body {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px 10px;
}
.profile-set-card-body strong {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}
.theme-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}
.theme-swatch-card,
.frame-choice-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 8px;
  min-height: 0;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.theme-swatch-card:hover:enabled,
.frame-choice-card:hover:enabled {
  border-color: var(--sage);
  background: var(--surface);
  transform: translateY(-1px);
}
.theme-swatch-card.selected,
.frame-choice-card.selected {
  border: 2px solid var(--sage);
  box-shadow: 0 0 0 2.5px var(--sage-soft);
}
.theme-swatch-card.is-locked,
.frame-choice-card.is-locked {
  opacity: .56;
  cursor: not-allowed;
}
.theme-swatch-preview {
  width: 100%;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(34, 48, 39, .12);
  display: block;
}
.theme-swatch-card strong,
.frame-choice-card strong {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}
.appearance-lock-note {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}
.frame-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.frame-choice-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid #EFE4D2;
  background: var(--paper);
  overflow: hidden;
  display: block;
}
.frame-choice-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-xp-caption {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.xp-guide-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
.xp-guide-info-btn:hover:enabled {
  border-color: var(--sage);
  color: var(--sage-dark);
  background: var(--sage-soft);
}

.profile-panel-thumb {
  position: relative;
}
.repost-owner-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #EFE4D2;
  background: var(--surface);
  overflow: hidden;
  display: block;
}
.repost-owner-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

dialog.xp-guide-dialog {
  width: min(440px, 94vw);
}
.xp-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.xp-guide-close {
  min-height: 30px;
  padding: 4px 11px;
  font-size: 12.5px;
}
.xp-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.xp-guide-table th,
.xp-guide-table td {
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid rgba(230, 216, 195, .85);
}
.xp-guide-table th {
  color: var(--muted);
  font-size: 11.5px;
}
.xp-guide-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.xp-frames-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.xp-frames-list span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink);
}

.profile-badges-box.is-clickable {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.profile-badges-box.is-clickable:hover {
  border-color: var(--pt-accent, var(--sage));
  box-shadow: 0 2px 6px rgba(34, 48, 39, .12);
}
.profile-badges-box.is-clickable:focus-visible {
  outline: 2px solid var(--pt-accent, var(--sage));
  outline-offset: 2px;
}
.profile-badges-box.is-clickable .early-supporter-badge,
.profile-badges-box.is-clickable .level-icon-badge {
  cursor: pointer;
}

dialog.badges-dialog {
  width: min(780px, 95vw);
  max-height: min(86vh, 660px);
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 2px solid var(--pt-border, var(--clay));
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(34, 48, 39, .24);
}
.badges-modal-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 450px;
  max-height: min(86vh, 660px);
}
.badges-modal-aside {
  background: var(--paper);
  border-right: 1.5px solid var(--border);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.badges-aside-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.badges-aside-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--pt-border, var(--sand));
  background: var(--surface);
  flex-shrink: 0;
}
.badges-aside-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.badges-dialog-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.badges-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}
button.badge-picker-tile {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 8px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
button.badge-picker-tile:hover {
  border-color: var(--pt-accent, var(--sage));
  transform: translateY(-1px);
  background: var(--surface);
}
button.badge-picker-tile.is-selected {
  border: 2px solid var(--pt-accent, var(--sage));
  background: var(--surface);
  box-shadow: 0 0 0 2.5px rgba(93, 134, 108, .22);
}
button.badge-picker-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.badges-aside-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.badges-aside-foot[hidden] {
  display: none;
}
.badges-aside-action {
  width: 100%;
  justify-content: center;
}
.badges-modal-main {
  position: relative;
  padding: 24px 26px 26px;
  overflow-y: auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
button.badges-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
button.badges-modal-close:hover {
  border-color: var(--pt-accent, var(--sage));
  color: var(--ink);
  background: var(--sand-soft);
}
.badges-showcase {
  display: grid;
  gap: 18px;
}
.badges-empty-state {
  margin: auto 0;
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.badges-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding-top: 6px;
}
.badges-hero-art {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 45%, var(--sand-soft) 0%, var(--paper) 72%);
  border: 1.5px solid var(--sand);
  display: grid;
  place-items: center;
  padding: 12px;
  margin-bottom: 4px;
  box-shadow: 0 8px 20px rgba(34, 48, 39, .08);
}
.badges-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.badges-hero-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.badges-hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1.15;
  color: var(--ink);
}
.badges-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-top: 2px;
}
.badges-hero-stat {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.badges-hero-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pt-accent, var(--sage));
  color: var(--pt-tab-text, var(--paper));
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
}
.badges-showcase-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 12px;
}
.badges-showcase-desc {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}
.badge-dual-progress {
  display: grid;
  gap: 8px;
}
.badge-progress-wrap {
  display: grid;
  gap: 4px;
}
.badge-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(194, 166, 140, .28);
  overflow: hidden;
}
.badge-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--pt-accent, var(--sage));
  transition: width .3s ease;
}
.badge-progress-caption {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.badges-showcase-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2px 0 0;
}
.badges-ladder-heading {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}
.badges-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
}
.badges-tier-item {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.badges-tier-item.is-current {
  background: var(--surface);
  border-color: var(--pt-accent, var(--sage));
  box-shadow: 0 2px 8px rgba(34, 48, 39, .08);
}
.badges-tier-item.is-locked {
  opacity: .46;
  filter: grayscale(.35);
}
.badges-tier-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}
.badges-tier-item strong {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.badges-tier-item span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
@media (max-width: 680px) {
  .badges-modal-layout {
    grid-template-columns: 1fr;
    max-height: 88vh;
  }
  .badges-modal-aside {
    border-right: 0;
    border-bottom: 1.5px solid var(--border);
    padding: 16px;
  }
  .badges-modal-main {
    padding: 18px 16px 20px;
  }
}

/* Single Level-Up Floating Toast */
@keyframes levelToastRise {
  0% { opacity: 0; transform: translate3d(-50%, 14px, 0) scale(.96); }
  10% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); }
  84% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-50%, -10px, 0) scale(.98); }
}
.level-up-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate3d(-50%, 14px, 0);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid #E6C365;
  box-shadow: 0 12px 30px rgba(34, 48, 39, .28);
  font-size: 13.5px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}
.level-up-toast[hidden] {
  display: none;
}
.level-up-toast.is-showing {
  animation: levelToastRise 3.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Admin Users & Level Management */
.admin-users-section {
  max-width: 980px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
}
.admin-users-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-users-bar h1 {
  margin: 0;
  font-size: 1.35rem;
}
.admin-users-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-users-tools input[type="search"] {
  min-width: 220px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}
.admin-users-list {
  display: grid;
  gap: 12px;
}
.admin-user-card {
  background: var(--surface);
  border: 1.5px solid var(--sand);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}
.admin-user-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2.5px solid #EFE4D2;
  background: var(--paper);
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}
.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-user-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.admin-user-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-user-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--ink);
  text-decoration: none;
}
.admin-user-name:hover {
  color: var(--sage-dark);
  text-decoration: underline;
}
.admin-user-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.admin-user-btn {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 10px;
}
.admin-user-btn.is-accent {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.admin-user-btn.is-accent:hover:enabled {
  background: var(--sage-dark);
}
.admin-user-btn.is-danger {
  border-color: rgba(181, 69, 59, .38);
  color: #a33a30;
}
.admin-user-btn.is-danger:hover:enabled {
  background: rgba(181, 69, 59, .1);
}
.admin-user-btn.is-active-sup {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage-dark);
}
.admin-lvl-set-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-lvl-input {
  width: 66px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12.5px;
  text-align: center;
}

.detail-save-wrap {
  position: relative;
  display: inline-flex;
}
.detail-save-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 288px;
  max-width: min(288px, 88vw);
  padding: 0;
  border-radius: 6px;
  background: var(--paper-strong, #fffdf8);
  border: 1px solid var(--clay, #c2a68c);
  box-shadow: 0 8px 24px rgba(34, 48, 39, 0.11);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.detail-save-popover[hidden] {
  display: none;
}
.detail-save-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sand, #e6d8c3);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.detail-save-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.detail-save-close-btn:hover {
  background: rgba(230, 216, 195, 0.45);
  color: var(--ink);
}
.detail-save-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  max-height: 212px;
  overflow-y: auto;
}
.detail-save-empty {
  padding: 14px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.detail-save-cat-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.detail-save-cat-item:hover:enabled {
  background: rgba(230, 216, 195, 0.42);
}
.detail-save-cat-item.is-selected {
  background: rgba(93, 134, 108, 0.1);
  border-color: rgba(93, 134, 108, 0.35);
  color: var(--sage-dark, #3d5b49);
}
.detail-save-cat-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.detail-save-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}
.detail-save-cat-item.is-selected .detail-save-cat-icon {
  color: var(--sage-dark, #3d5b49);
}
.detail-save-cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-save-cat-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.detail-save-cat-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.detail-save-cat-item.is-selected .detail-save-cat-count {
  color: var(--sage-dark, #3d5b49);
}
.detail-save-cat-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-dark, #3d5b49);
}
.detail-new-cat-form {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--sand, #e6d8c3);
  background: rgba(230, 216, 195, 0.18);
}
.detail-new-cat-form input {
  flex: 1;
  min-width: 0;
  min-height: 31px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--sand, #e6d8c3);
  background: var(--paper-strong, #fffdf8);
  color: var(--ink);
  font-size: 12.5px;
}
.detail-new-cat-form input:focus {
  outline: none;
  border-color: var(--sage, #5d866c);
}
.detail-new-cat-form button {
  min-height: 31px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.detail-new-cat-form button:hover:enabled {
  background: var(--sage-dark, #3d5b49);
  border-color: var(--sage-dark, #3d5b49);
}

.profile-save-bar {
  display: flex;
  align-items: center;
  margin-top: -2px;
  margin-bottom: 2px;
}
.profile-save-bar[hidden] {
  display: none;
}
.profile-save-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
button.profile-save-pill {
  min-height: 31px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--save-pill-border, var(--pt-border, var(--border)));
  background: var(--save-pill-bg, var(--surface));
  color: var(--pt-muted, var(--muted));
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
button.profile-save-pill:hover:enabled {
  border-color: var(--save-pill-hover-border, var(--pt-accent, var(--sage)));
  background: var(--save-pill-hover-bg, var(--paper));
  color: var(--pt-text, var(--ink));
}
button.profile-save-pill.active,
button.profile-save-pill.active:hover:enabled {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.profile-save-pill-group {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--save-pill-bg, var(--surface));
  border: 1px solid var(--save-pill-border, var(--pt-border, var(--border)));
  color: var(--pt-muted, var(--muted));
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.profile-save-pill-group:hover {
  border-color: var(--save-pill-hover-border, var(--pt-accent, var(--sage)));
  background: var(--save-pill-hover-bg, var(--paper));
  color: var(--pt-text, var(--ink));
}
.profile-save-pill-group.active,
.profile-save-pill-group.active:hover {
  background: var(--pt-accent, var(--sage));
  border-color: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
.profile-shell .profile-save-pill-group button.profile-save-pill,
.profile-shell .profile-save-pill-group button.profile-save-pill:hover:enabled,
.profile-shell .profile-save-pill-group.active button.profile-save-pill,
.profile-shell .profile-save-pill-group.active button.profile-save-pill:hover:enabled {
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}
button.profile-save-cat-del {
  min-height: 29px;
  padding: 0 9px 0 3px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: inherit;
  opacity: .68;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: opacity .12s ease;
}
button.profile-save-cat-del:hover:enabled {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 1;
}
button.profile-save-add-btn {
  min-height: 31px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px dashed var(--save-pill-border, var(--pt-border, var(--border)));
  background: transparent;
  color: var(--pt-muted, var(--muted));
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
button.profile-save-add-btn:hover:enabled {
  border-color: var(--save-pill-hover-border, var(--pt-accent, var(--sage)));
  background: var(--save-pill-hover-bg, var(--surface));
  color: var(--pt-text, var(--ink));
}
.profile-new-cat-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--pt-accent, var(--sage));
  background: var(--save-pill-bg, var(--surface));
}
.profile-new-cat-form input {
  width: 126px;
  min-height: 25px;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pt-text, var(--ink));
  font-size: 12.5px;
  outline: none;
}
button.profile-new-cat-submit {
  min-height: 25px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 0;
  background: var(--pt-accent, var(--sage));
  color: var(--pt-tab-text, var(--paper));
  font-size: 12px;
  font-weight: 700;
  transition: background-color .12s ease;
}
button.profile-new-cat-submit:hover:enabled {
  border: 0;
  background: var(--pt-accent-dark, var(--sage-dark));
  color: var(--pt-tab-text, var(--paper));
}
button.profile-new-cat-cancel {
  min-height: 25px;
  width: 25px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pt-muted, var(--muted));
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: color .12s ease;
}
button.profile-new-cat-cancel:hover:enabled {
  border: 0;
  background: transparent;
  color: var(--pt-text, var(--ink));
}
/* Box-style surface variables for save category pills (no text color overrides) */
.profile-shell.box-ember {
  --save-pill-bg: rgba(255, 132, 56, 0.12);
  --save-pill-border: rgba(255, 132, 56, 0.28);
  --save-pill-hover-bg: rgba(255, 132, 56, 0.24);
  --save-pill-hover-border: rgba(255, 132, 56, 0.56);
}
.profile-shell.box-crimson-rose {
  --save-pill-bg: rgba(201, 51, 48, 0.16);
  --save-pill-border: rgba(201, 51, 48, 0.34);
  --save-pill-hover-bg: rgba(201, 51, 48, 0.28);
  --save-pill-hover-border: rgba(201, 51, 48, 0.56);
}
.profile-shell.box-dark-glass {
  --save-pill-bg: rgba(255, 255, 255, 0.09);
  --save-pill-border: rgba(255, 255, 255, 0.18);
  --save-pill-hover-bg: rgba(255, 255, 255, 0.18);
  --save-pill-hover-border: rgba(255, 255, 255, 0.36);
}
.profile-shell.box-sakura-courier {
  --save-pill-bg: rgba(255, 245, 243, 0.72);
  --save-pill-border: rgba(232, 93, 128, 0.30);
  --save-pill-hover-bg: rgba(232, 93, 128, 0.16);
  --save-pill-hover-border: rgba(229, 83, 75, 0.50);
}
.profile-shell.box-glass {
  --save-pill-bg: rgba(255, 255, 255, 0.10);
  --save-pill-border: rgba(255, 255, 255, 0.24);
  --save-pill-hover-bg: rgba(255, 255, 255, 0.20);
  --save-pill-hover-border: var(--pt-accent, var(--sage));
}
.profile-shell.box-clear {
  --save-pill-bg: rgba(255, 255, 255, 0.04);
  --save-pill-border: rgba(255, 255, 255, 0.14);
  --save-pill-hover-bg: rgba(255, 255, 255, 0.12);
  --save-pill-hover-border: rgba(255, 255, 255, 0.30);
}

/* Docs / Contact Knowledge Center (/iletisim) */
.docs-shell {
  max-width: 1080px;
  margin-inline: auto;
  padding: 28px 18px 64px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.docs-shell.has-toc {
  max-width: 1280px;
  grid-template-columns: 244px minmax(0, 1fr) 240px;
}
.docs-sidebar {
  position: sticky;
  top: 82px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(34, 48, 39, 0.06);
  display: grid;
  gap: 14px;
}
.docs-sidebar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sand);
}
.docs-sidebar-head strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.docs-sidebar-head span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.docs-nav {
  display: grid;
  gap: 12px;
}
.docs-nav-group {
  display: grid;
  gap: 3px;
}
.docs-nav-group + .docs-nav-group {
  padding-top: 12px;
  border-top: 1px solid var(--sand);
}
.docs-group-title {
  padding: 0 10px 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
button.docs-nav-item {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button.docs-nav-item:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--sand);
  color: var(--ink);
}
button.docs-nav-item.active,
button.docs-nav-item.active:hover:enabled {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.docs-article {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 28px 30px;
  box-shadow: 0 8px 24px rgba(34, 48, 39, 0.06);
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 14px;
  transition: opacity .15s ease, transform .15s ease;
}
.docs-article.is-switching {
  opacity: 0;
  transform: translateY(4px);
}
.docs-breadcrumb {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sage-dark);
}
.docs-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  color: var(--ink);
}
.docs-body {
  display: grid;
  gap: 12px;
  font-size: 15px;
  line-height: 1.68;
  color: var(--ink);
}
.docs-body p {
  margin: 0;
}
.docs-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.docs-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.docs-link-card {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, transform .14s ease;
}
.docs-link-card span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.docs-link-card strong {
  font-size: 14.5px;
  color: var(--sage-dark);
}
.docs-link-card:hover {
  border-color: var(--sage);
  transform: translateY(-1px);
}
.docs-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sand-soft);
  border: 1px solid var(--sand);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.docs-meta-list {
  display: grid;
  gap: 6px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  font-size: 13.5px;
  line-height: 1.55;
}
.docs-meta-row strong {
  color: var(--ink);
}
.docs-section {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  scroll-margin-top: 92px;
}
.docs-toc {
  position: sticky;
  top: 82px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(34, 48, 39, 0.06);
  display: grid;
  gap: 12px;
}
.docs-toc[hidden] {
  display: none;
}
.docs-toc-nav {
  display: grid;
  gap: 4px;
}
button.docs-toc-item {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button.docs-toc-item:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--sand);
  color: var(--ink);
}
button.docs-toc-item.active,
button.docs-toc-item.active:hover:enabled {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.docs-toc-num {
  flex: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.78;
}
button.docs-toc-item.active .docs-toc-num {
  opacity: 1;
}
.docs-toc-label {
  min-width: 0;
}
.docs-section-title {
  margin: 6px 0 0;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}
.docs-inline-link {
  color: var(--sage-dark);
  font-weight: 700;
  text-decoration: underline;
}
.docs-faq-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.docs-faq-item {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
  transition: border-color .15s ease, background-color .15s ease;
}
.docs-faq-item[open] {
  border-color: var(--sage);
  background: var(--surface);
}
.docs-faq-q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}
.docs-faq-q::-webkit-details-marker {
  display: none;
}
.docs-faq-q::after {
  content: "+";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--sand-soft);
  color: var(--sage-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}
.docs-faq-item[open] .docs-faq-q::after {
  content: "−";
  background: var(--sage);
  color: var(--paper);
}
.docs-faq-a {
  padding: 0 16px 14px;
  font-size: 14px;
  line-height: 1.62;
  color: var(--muted);
}
.docs-pager {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--sand);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
button.docs-pager-btn {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
button.docs-pager-btn.is-next {
  text-align: right;
  margin-left: auto;
}
button.docs-pager-btn small {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
button.docs-pager-btn strong {
  font-size: 13.5px;
  font-weight: 700;
}
button.docs-pager-btn:hover:enabled {
  border-color: var(--sage);
  background: var(--sand-soft);
  color: var(--ink);
}
@media (max-width: 1080px) {
  .docs-shell.has-toc {
    grid-template-columns: 244px minmax(0, 1fr);
  }
  .docs-toc {
    position: static;
    grid-column: 2;
  }
}
@media (max-width: 780px) {
  .docs-shell,
  .docs-shell.has-toc {
    grid-template-columns: 1fr;
    padding: 18px 14px 48px;
    gap: 16px;
  }
  .docs-sidebar,
  .docs-toc {
    position: static;
    grid-column: 1;
  }
  .docs-article {
    padding: 20px 18px;
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .docs-article {
    transition: none;
  }
}

/* Panel Report Dialog & History */
dialog.report-dialog {
  width: min(740px, 95vw);
  max-height: min(88vh, 620px);
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 2px solid var(--clay);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(34, 48, 39, .24);
}
.report-modal-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 440px;
  max-height: min(88vh, 620px);
}
.report-modal-aside {
  background: var(--paper);
  border-right: 1.5px solid var(--border);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.report-aside-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-aside-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--sand);
  background: var(--surface);
  color: var(--sage-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.report-aside-icon svg {
  width: 17px;
  height: 17px;
}
.report-aside-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.report-dialog-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.report-panel-preview {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
}
.report-preview-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sand-soft);
  border: 1px solid var(--border);
}
.report-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.report-preview-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.report-preview-info strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-preview-info span {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-aside-foot {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.report-aside-foot a {
  color: var(--sage-dark);
  font-weight: 700;
  text-decoration: none;
}
.report-aside-foot a:hover {
  text-decoration: underline;
}
.report-modal-main {
  position: relative;
  padding: 22px 24px 20px;
  overflow-y: auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
button.report-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
button.report-modal-close:hover {
  border-color: var(--sage);
  color: var(--ink);
  background: var(--sand-soft);
}
.report-section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--ink);
}
.report-section-label span {
  font-weight: 600;
  color: var(--muted);
}
.report-reason-list {
  display: grid;
  gap: 7px;
  padding-right: 4px;
}
button.report-reason-btn {
  width: 100%;
  min-height: auto;
  padding: 9px 12px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}
.report-radio-dot {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 999px;
  border: 1.5px solid var(--clay);
  background: var(--paper);
  position: relative;
  transition: border-color .14s ease, background-color .14s ease;
}
.report-reason-copy {
  display: grid;
  gap: 1px;
}
button.report-reason-btn strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
button.report-reason-btn small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
button.report-reason-btn:hover:enabled {
  border-color: var(--sage);
  background: var(--paper);
}
button.report-reason-btn.selected,
button.report-reason-btn.selected:hover:enabled {
  border-color: var(--sage);
  background: rgba(93, 134, 108, .08);
  box-shadow: 0 0 0 2.5px rgba(93, 134, 108, .18);
}
button.report-reason-btn.selected .report-radio-dot {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}
button.report-reason-btn.selected .report-radio-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #fff;
}
.report-note-field {
  display: grid;
  gap: 6px;
}
.report-note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.report-note-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.report-note-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
  margin: 0;
}
.report-note-input:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--surface);
  box-shadow: 0 0 0 2.5px rgba(93, 134, 108, .15);
}
.report-dialog-status {
  margin: 0;
  font-size: 12.5px;
}
.report-dialog-status:empty {
  display: none;
}
.report-modal-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 680px) {
  dialog.report-dialog {
    max-height: 90vh;
  }
  .report-modal-layout {
    grid-template-columns: 1fr;
    max-height: 90vh;
  }
  .report-modal-aside {
    border-right: 0;
    border-bottom: 1.5px solid var(--border);
    padding: 16px;
    gap: 10px;
  }
  .report-panel-preview {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    padding: 8px;
  }
  .report-preview-frame {
    aspect-ratio: 1 / 1;
  }
  .report-aside-foot {
    display: none;
  }
  .report-modal-main {
    padding: 16px;
  }
}
.report-history-wrap {
  display: grid;
  gap: 12px;
}
.history-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.history-section-head .design-history-heading {
  margin: 0;
}
.history-total-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--sand);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.history-pagination {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--sand);
}
.history-pagination .profile-pagination {
  margin-top: 0;
}
.history-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}
.history-page-jump input {
  width: 78px;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.history-page-jump input:focus {
  outline: none;
  border-color: var(--sage);
}

/* Dedicated Settings Page (/ayarlar) */
.settings-shell {
  max-width: 1160px;
  margin-inline: auto;
  padding: 32px 24px 72px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.settings-sidebar {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 8px;
}
.settings-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.settings-back-link:hover {
  color: var(--ink);
  background: var(--paper);
}
.settings-nav-sep {
  height: 1px;
  margin: 6px 8px;
  background: var(--sand);
}
.settings-nav {
  display: grid;
  gap: 4px;
}
.settings-nav-item {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.settings-nav-item:hover {
  background: var(--paper);
  color: var(--ink);
}
.settings-nav-item.active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--sage);
}
.settings-nav-item-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.settings-nav-launch-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--sage-dark);
  opacity: 0.85;
}
.settings-main {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 32px 36px;
  display: grid;
  gap: 24px;
  min-width: 0;
  box-shadow: 0 10px 28px rgba(34, 48, 39, 0.05);
}
.settings-main-head {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sand);
}
.settings-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.settings-subtitle {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}
#settings-form {
  display: grid;
  gap: 26px;
}
.settings-panel-section {
  display: grid;
  gap: 20px;
}
.settings-panel-section[hidden],
.settings-stage[hidden],
#settings-stage-avatar-wrap[hidden],
#settings-stage-hero-wrap[hidden] {
  display: none;
}
.settings-stage {
  display: grid;
}
.settings-stage-avatar {
  display: flex;
  justify-content: center;
  padding: 28px 20px;
  border-radius: 18px;
  background: var(--paper);
  border: 1.5px solid var(--border);
}
.settings-mini-profile {
  width: min(380px, 100%);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: 0 14px 32px rgba(34, 48, 39, 0.12);
}
.settings-mini-banner {
  height: 76px;
  border-bottom: 1px solid var(--border);
}
.settings-mini-body {
  padding: 0 20px 18px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.settings-mini-av {
  position: relative;
  width: 108px;
  height: 108px;
  margin-top: -54px;
  flex-shrink: 0;
  background: var(--paper);
  border-radius: 22px;
  border: 4px solid transparent;
  padding: 0;
  box-shadow: 0 8px 20px rgba(34, 48, 39, 0.16);
}
.settings-mini-av img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}
.settings-mini-info {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-top: 8px;
}
.settings-mini-info strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-mini-info > span {
  font-size: 13px;
  color: var(--muted);
}
.settings-mini-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.settings-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 11.5px;
  font-weight: 800;
}
.settings-mini-xp {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.settings-mini-caption {
  padding: 9px 20px;
  border-top: 1px solid var(--sand);
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.profile-shell.settings-stage-hero {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 28px;
  border-radius: 18px;
  display: grid;
  gap: 16px;
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.settings-stage-hero .profile-card {
  box-shadow: 0 12px 28px rgba(34, 48, 39, 0.16);
}
.settings-stage-hero .profile-banner {
  height: 98px;
}
.settings-stage-hero .profile-body {
  padding: 0 22px 18px;
}
.settings-stage-hero .profile-head {
  padding-top: 0;
  margin-top: -38px;
  gap: 16px;
}
.settings-stage-hero .profile-avatar-wrap {
  width: 78px;
  height: 78px;
}
.settings-preview-name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}
.settings-preview-bio {
  margin-top: 4px;
  font-size: 13px;
}
.settings-stage-hero .profile-showcase-head {
  padding: 11px 16px;
}
.settings-stage-hero .profile-showcase-body {
  padding: 12px 16px;
}
.settings-stage-hero .profile-showcase-foot {
  padding: 8px 16px 11px;
}
.settings-preview-mini-row {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
}
.settings-field-grid {
  display: grid;
  gap: 18px;
  max-width: 620px;
}
.settings-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.settings-toolbar-row > div:first-child {
  display: grid;
  gap: 3px;
}
.settings-muted-note {
  font-size: 13px;
  color: var(--muted);
}
.settings-section-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.settings-main .profile-avatar-grid {
  gap: 14px;
}
.settings-main .profile-avatar-choice {
  width: 64px;
  height: 64px;
  min-height: 64px;
}
.settings-main .profile-set-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.settings-main .theme-swatch-grid {
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px;
}
.settings-main .frame-choice-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.settings-main .box-style-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.settings-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.settings-account-stack {
  display: grid;
  gap: 14px;
}
.settings-account-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
}
.settings-account-meta {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.settings-account-meta strong {
  color: var(--ink);
}
.settings-footer {
  padding-top: 20px;
  border-top: 1px solid var(--sand);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.settings-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Full-Page Appearance Mode Left Vertical Bar (Komenga Light Palette) */
.appearance-dock {
  position: fixed;
  left: 16px;
  top: 82px;
  bottom: auto;
  width: 300px;
  max-height: min(620px, calc(100vh - 104px));
  z-index: 60;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: 0 18px 44px rgba(34, 48, 39, 0.16);
  overflow: hidden;
}
.appearance-dock[hidden] {
  display: none;
}
.appearance-dock.is-collapsed {
  bottom: auto;
  width: auto;
  min-width: 264px;
  max-width: calc(100vw - 24px);
}
.appearance-dock.is-collapsed .appearance-dock-tabs,
.appearance-dock.is-collapsed .appearance-dock-tray,
.appearance-dock.is-collapsed .appearance-dock-foot {
  display: none;
}
.appearance-dock-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--sand);
  background: var(--surface);
}
.appearance-dock.is-collapsed .appearance-dock-head {
  border-bottom: 0;
  padding: 10px 12px;
}
.appearance-dock-title {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.appearance-dock-head-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#appearance-dock a.appearance-dock-mini-btn,
#appearance-dock button.appearance-dock-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#appearance-dock a.appearance-dock-mini-btn:hover,
#appearance-dock button.appearance-dock-mini-btn:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--clay);
  color: var(--ink);
}
.appearance-dock-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 10px 12px 6px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--sand);
}
#appearance-dock button.appearance-dock-tab {
  appearance: none;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 4px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
#appearance-dock button.appearance-dock-tab:hover:enabled {
  background: var(--sand-soft);
  border: 0;
  color: var(--ink);
}
#appearance-dock button.appearance-dock-tab.active,
#appearance-dock button.appearance-dock-tab.active:hover:enabled {
  background: var(--sage);
  color: var(--surface);
}
.appearance-dock-tray {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  padding: 6px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--clay) var(--paper);
}
.appearance-dock-tray::-webkit-scrollbar {
  width: 7px;
}
.appearance-dock-tray::-webkit-scrollbar-track {
  background: var(--paper);
  border-radius: 999px;
  margin: 4px 0;
}
.appearance-dock-tray::-webkit-scrollbar-thumb {
  background: var(--clay);
  border-radius: 999px;
}
.appearance-dock-tray::-webkit-scrollbar-thumb:hover {
  background: var(--sage);
}
.appearance-dock-tray.is-themes-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.appearance-dock-tray.is-frames-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
#appearance-dock button.dock-card {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 0;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .14s ease;
}
#appearance-dock button.dock-card:hover:enabled {
  transform: translateY(-1px);
  border-color: var(--clay);
  background: var(--surface);
}
#appearance-dock button.dock-card.is-selected,
#appearance-dock button.dock-card.is-selected:hover:enabled {
  border-color: var(--sage);
  background: var(--sage-soft);
  box-shadow: 0 0 0 2px rgba(93, 134, 108, 0.22);
}
#appearance-dock button.dock-card.is-locked {
  opacity: 0.62;
  cursor: default;
}
#appearance-dock button.dock-card.is-locked:hover,
#appearance-dock button.dock-card.is-locked:hover:enabled {
  transform: none;
  border-color: var(--border);
  background: var(--surface);
}
.dock-corner-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  z-index: 2;
}
.dock-corner-badge.is-lock {
  background: var(--ink);
  color: var(--surface);
  border: 1.5px solid var(--surface);
  pointer-events: auto;
  cursor: help;
}
.dock-lock-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 240px;
  padding: 7px 11px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(24, 34, 29, 0.28);
  pointer-events: none;
}
.dock-lock-tooltip[hidden] {
  display: none;
}
.dock-corner-badge.is-active {
  background: var(--sage);
  color: var(--surface);
  border: 1.5px solid var(--surface);
}
.dock-card-foot {
  padding: 7px 8px;
  background: var(--surface);
  display: grid;
  gap: 2px;
  min-width: 0;
}
#appearance-dock button.dock-card.is-selected .dock-card-foot {
  background: var(--sage-soft);
}
.dock-card-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.dock-card-copy strong,
.dock-frame-foot strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-card-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-set-banner {
  height: 60px;
  width: 100%;
  background-size: cover;
  background-position: center;
  display: block;
  border-bottom: 1px solid var(--sand);
}
.dock-set-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
}
.dock-mini-av {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 0;
}
.dock-mini-av img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}
.dock-theme-swatch {
  height: 50px;
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--sand);
}
.dock-frame-stage {
  width: 100%;
  padding: 18px 10px 14px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--sand);
}
.dock-frame-av {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid transparent;
  padding: 0;
}
.dock-frame-av img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}
.dock-frame-foot {
  padding: 5px 5px 6px;
  text-align: center;
}
.dock-frame-foot strong {
  font-size: 11px;
}
.dock-section-label {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 4px 2px 0;
}
.dock-box-swatch.is-box-default {
  background: linear-gradient(135deg, #FCFBF7 0%, #EFE6D8 100%);
}
.dock-box-swatch.is-box-glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #5d866c 0%, #c2a68c 100%);
}
.dock-box-swatch.is-box-dark-glass {
  background:
    linear-gradient(135deg, rgba(16, 20, 28, 0.82), rgba(32, 42, 56, 0.74)),
    linear-gradient(135deg, #5d866c 0%, #375788 100%);
}
.dock-box-swatch.is-box-clear {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, #5d866c 0%, #86ab92 50%, #c2a68c 100%);
}
.dock-box-swatch.is-box-ember {
  background:
    linear-gradient(135deg, rgba(16, 11, 10, 0.84), rgba(48, 26, 17, 0.78)),
    linear-gradient(135deg, #ff6b1a 0%, #ffb347 100%);
}
.dock-box-swatch.is-box-crimson-rose {
  background:
    linear-gradient(135deg, rgba(26, 10, 12, 0.88), rgba(68, 22, 26, 0.82)),
    linear-gradient(135deg, #c93330 0%, #4e1417 55%, #1d3124 100%);
}
.dock-box-swatch.is-box-sakura-courier {
  background:
    linear-gradient(135deg, rgba(255, 248, 244, 0.90), rgba(255, 224, 232, 0.86)),
    linear-gradient(135deg, #a9e2fc 0%, #f46a9b 55%, #e5534b 100%);
}
.dock-shape-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--sand);
  margin-bottom: 2px;
}
#appearance-dock button.dock-shape-btn {
  min-height: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
#appearance-dock button.dock-shape-btn:hover:enabled {
  background: var(--sand-soft);
  border: 0;
  color: var(--ink);
}
#appearance-dock button.dock-shape-btn.active,
#appearance-dock button.dock-shape-btn.active:hover:enabled {
  background: var(--sage);
  color: var(--surface);
}
.dock-bg-swatch.is-bg-none {
  background: linear-gradient(135deg, #F5F5F0 0%, #E6D8C3 100%);
}
.appearance-dock-foot {
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--sand);
  background: var(--surface);
  display: grid;
  gap: 8px;
}
.appearance-dock-status:empty {
  display: none;
}
.appearance-dock-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.appearance-dock-status.is-ok {
  color: var(--sage-dark);
}
.appearance-dock-status.is-error {
  color: var(--err-ink);
}
.appearance-dock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#appearance-dock button.appearance-dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}
#appearance-dock button.appearance-dock-btn:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--clay);
  color: var(--ink);
}
#appearance-dock button.appearance-dock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
#appearance-dock button.appearance-dock-btn.is-primary {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--surface);
}
#appearance-dock button.appearance-dock-btn.is-primary:hover:enabled {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--surface);
}
#appearance-dock button.appearance-dock-btn.is-profile-return {
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--sand);
  color: var(--muted);
  font-size: 12px;
}
#appearance-dock button.appearance-dock-btn.is-profile-return:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--clay);
  color: var(--ink);
}
@media (max-width: 1500px) and (min-width: 861px) {
  body.is-appearance-mode:not(.is-appearance-collapsed) #profile-shell {
    margin-left: 332px;
    margin-right: 16px;
  }
}
@media (max-width: 860px) {
  .appearance-dock {
    left: 10px;
    top: 72px;
    bottom: auto;
    max-height: calc(100vh - 88px);
    width: 268px;
  }
  .appearance-dock.is-collapsed {
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 20px);
  }
}
@media (max-width: 860px) {
  .settings-shell {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 14px 56px;
  }
  .settings-sidebar {
    position: static;
  }
  .settings-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }
  .settings-nav-sep {
    display: none;
  }
  .settings-nav-item {
    width: auto;
    white-space: nowrap;
  }
  .settings-nav-item.active {
    box-shadow: inset 0 -3px 0 var(--sage);
  }
  .settings-main {
    padding: 22px 18px;
  }
  .settings-two-col {
    grid-template-columns: 1fr;
  }
  .settings-stage-hero {
    padding: 16px;
  }
}
.report-auth-actions {
  display: flex;
  justify-content: flex-start;
}
.report-history-list {
  display: grid;
  gap: 10px;
}
.report-history-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  align-items: start;
}
.report-history-thumb {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--sand);
  display: block;
}
.report-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.report-history-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.report-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.report-history-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.report-history-title:hover {
  color: var(--sage-dark);
}
.report-history-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.report-history-reason {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.report-reason-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sand-soft);
  border: 1px solid var(--sand);
  color: var(--ink);
}
.report-reason-tag.is-gesture {
  background: rgba(208, 128, 36, 0.14);
  border-color: rgba(208, 128, 36, 0.42);
  color: #8f4e0a;
}
.report-history-date {
  font-size: 12px;
  color: var(--muted);
}
.report-history-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.report-status-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.report-status-pill.is-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.report-status-pill.is-reviewing {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #38bdf8;
}
.report-status-pill.is-resolved {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #4ade80;
}
.report-status-pill.is-rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* User Panel Upload Page (/yukle) & History */
.upload-shell {
  max-width: 1180px;
  margin-inline: auto;
  padding: 28px 18px 64px;
}
.upload-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 10px 28px rgba(34, 48, 39, 0.08);
  display: grid;
  gap: 20px;
}
.upload-card[hidden] {
  display: none;
}
.upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.upload-head h1 {
  margin: 0 0 4px;
  font-size: 24px;
}
.upload-track-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.upload-track-link:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
}
.upload-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.08fr) minmax(0, 1.12fr);
  gap: 24px;
  align-items: start;
}
.upload-left {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 12px;
}
.upload-dropzone {
  min-height: 290px;
  padding: 28px 20px;
  border-radius: 18px;
  border: 2px dashed var(--clay);
  background: var(--paper);
  color: var(--muted);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.upload-dropzone[hidden] {
  display: none;
}
.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: var(--sage);
  background: var(--sand-soft);
  color: var(--ink);
}
.upload-dropzone strong {
  font-size: 15px;
  color: var(--ink);
}
.upload-dropzone span {
  font-size: 12.5px;
}
.upload-preview-wrap {
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  overflow: hidden;
  display: grid;
}
.upload-preview-wrap[hidden] {
  display: none;
}
.upload-crop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sand);
  background: var(--surface);
}
.upload-crop-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.upload-crop-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.upload-crop-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #1d2420;
  min-height: 300px;
  user-select: none;
}
.upload-crop-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  border-radius: 4px;
}
.upload-crop-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(66vh, 620px);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.upload-crop-box {
  position: absolute;
  border: 2px solid #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 9999px rgba(18, 25, 21, 0.56), inset 0 0 0 1px rgba(93, 134, 108, 0.85);
  cursor: move;
  touch-action: none;
  outline: none;
}
.upload-crop-box:focus-visible {
  border-color: var(--sage-soft);
  box-shadow: 0 0 0 9999px rgba(18, 25, 21, 0.56), inset 0 0 0 2px var(--sage);
}
.upload-crop-stage.is-dragging .upload-crop-box {
  background: rgba(255, 255, 255, 0.04);
}
.upload-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity .12s ease;
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), rgba(255, 255, 255, 0.72) calc(33.333% - 0.5px), rgba(255, 255, 255, 0.72) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to right, transparent calc(66.666% - 0.5px), rgba(255, 255, 255, 0.72) calc(66.666% - 0.5px), rgba(255, 255, 255, 0.72) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), rgba(255, 255, 255, 0.72) calc(33.333% - 0.5px), rgba(255, 255, 255, 0.72) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.666% - 0.5px), rgba(255, 255, 255, 0.72) calc(66.666% - 0.5px), rgba(255, 255, 255, 0.72) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px));
}
.upload-crop-stage.is-dragging .upload-crop-grid {
  opacity: 0.78;
}
.upload-crop-edge {
  position: absolute;
  z-index: 2;
  touch-action: none;
}
.upload-crop-edge::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.upload-crop-edge.edge-n {
  top: 0;
  left: 14px;
  right: 14px;
  height: 14px;
  cursor: ns-resize;
}
.upload-crop-edge.edge-n::after {
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 4px;
}
.upload-crop-edge.edge-s {
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 14px;
  cursor: ns-resize;
}
.upload-crop-edge.edge-s::after {
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 4px;
}
.upload-crop-edge.edge-w {
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 14px;
  cursor: ew-resize;
}
.upload-crop-edge.edge-w::after {
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 28px;
}
.upload-crop-edge.edge-e {
  right: 0;
  top: 14px;
  bottom: 14px;
  width: 14px;
  cursor: ew-resize;
}
.upload-crop-edge.edge-e::after {
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 28px;
}
.upload-crop-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 3;
  touch-action: none;
}
.upload-crop-corner::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #ffffff;
  border-style: solid;
  border-width: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}
.upload-crop-corner.corner-nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}
.upload-crop-corner.corner-nw::after {
  top: 2px;
  left: 2px;
  border-top-width: 3px;
  border-left-width: 3px;
}
.upload-crop-corner.corner-ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}
.upload-crop-corner.corner-ne::after {
  top: 2px;
  right: 2px;
  border-top-width: 3px;
  border-right-width: 3px;
}
.upload-crop-corner.corner-sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}
.upload-crop-corner.corner-sw::after {
  bottom: 2px;
  left: 2px;
  border-bottom-width: 3px;
  border-left-width: 3px;
}
.upload-crop-corner.corner-se {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}
.upload-crop-corner.corner-se::after {
  bottom: 2px;
  right: 2px;
  border-bottom-width: 3px;
  border-right-width: 3px;
}
.upload-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--sand);
  background: var(--surface);
}
.upload-file-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-crop-dims {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink);
  white-space: nowrap;
}
button.upload-mini-btn {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}
button.upload-mini-btn:hover:enabled {
  border-color: var(--sage);
  background: var(--sand-soft);
  color: var(--sage-dark);
}
.upload-right {
  display: grid;
  gap: 16px;
}
.upload-meta-fields {
  display: grid;
  gap: 12px;
}
.upload-meta-fields .field {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
}
.upload-meta-fields input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.upload-meta-fields input:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--surface);
}
.upload-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upload-nsfw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  cursor: pointer;
}
.upload-color-row {
  cursor: default;
}
.upload-color-row.is-missing {
  border-color: #b43b3b;
  background: rgba(180, 59, 59, 0.05);
}
.upload-color-choices {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
.upload-color-btn {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--sand-soft);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.upload-color-btn:hover {
  border-color: var(--clay);
  background: var(--sand);
}
.upload-color-btn.is-active {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: #fffdf8;
}
.upload-tags-section {
  display: grid;
  gap: 10px;
}
.upload-tags-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.upload-tags-head strong {
  font-size: 14.5px;
}
.upload-tags-head span {
  font-size: 12.5px;
  color: var(--muted);
}
.upload-tag-groups {
  display: grid;
  gap: 12px;
}
.upload-tag-group {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 8px;
}
.upload-tag-group.is-missing {
  border-color: #d97706;
  background: #fffbeb;
}
.upload-tag-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.upload-tag-label strong {
  font-size: 13.5px;
}
.upload-req-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sand-soft);
  border: 1px solid var(--clay);
  color: var(--warn-ink);
}
.upload-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
button.upload-tag-pill {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .13s ease, border-color .13s ease, color .13s ease;
}
button.upload-tag-pill:hover:enabled {
  border-color: var(--sage);
  background: var(--sand-soft);
  color: var(--ink);
}
button.upload-tag-pill.selected,
button.upload-tag-pill.selected:hover:enabled {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.upload-optional-details {
  border-radius: 14px;
  border: 1px solid var(--sand);
  background: var(--paper);
  padding: 10px 14px;
}
.upload-free-tags-section {
  display: grid;
  gap: 8px;
}
.upload-free-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  cursor: text;
  transition: border-color .15s ease, background-color .15s ease;
}
.upload-free-chips-wrap:focus-within {
  border-color: var(--sage);
  background: var(--surface);
}
.upload-free-chips {
  display: contents;
}
.upload-free-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px 3px 10px;
  border-radius: 999px;
  background: var(--sage);
  border: 1px solid var(--sage-dark);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
}
button.upload-free-chip-del {
  min-height: 18px;
  width: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
button.upload-free-chip-del:hover:enabled {
  border: 0;
  background: rgba(255, 255, 255, 0.36);
  color: inherit;
}
.upload-free-input {
  flex: 1 1 160px;
  min-width: 120px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  padding: 3px 4px;
  outline: none;
}
.upload-optional-details summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.upload-optional-details[open] summary {
  margin-bottom: 12px;
}
.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.upload-success-nav[hidden] {
  display: none;
}
.upload-badges-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.upload-nsfw-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}
.upload-history-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
button.upload-cancel-btn {
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #f5b8b8;
  background: #fff5f5;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}
button.upload-cancel-btn:hover:enabled {
  background: #ffe1e1;
  border-color: #e56a6a;
  color: #8f1616;
}
@media (max-width: 820px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .upload-left {
    position: static;
  }
  .upload-meta-row {
    grid-template-columns: 1fr;
  }
  .upload-card {
    padding: 20px 18px;
  }
}

/* Admin Moderation Lists (Community Uploads & Panel Reports) */
.admin-mod-filter {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.admin-mod-list {
  display: grid;
  gap: 12px;
}
.admin-mod-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 14px rgba(34, 48, 39, 0.05);
  align-items: start;
}
.admin-mod-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--sand);
  display: block;
}
.admin-mod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-mod-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.admin-mod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-mod-top strong {
  font-size: 15px;
}
.admin-mod-note {
  width: min(420px, 100%);
  padding: 7px 11px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.admin-mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-mod-actions button,
.admin-mod-actions a.button {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .admin-mod-card {
    grid-template-columns: 1fr;
  }
  .admin-mod-thumb {
    width: 100%;
    height: 160px;
  }
}

/* Profile Design Submission (/iletisim#profil-tasarim) */
.design-submit-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--paper);
  border: 1.5px solid var(--border);
}
.design-submit-form .field {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
}
.design-submit-form input:not([type="file"]),
.design-submit-form textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.design-submit-form input:not([type="file"]):focus,
.design-submit-form textarea:focus {
  outline: none;
  border-color: var(--sage);
}
.social-status-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--paper);
}
.social-status-icon {
  width: 48px;
  height: 48px;
  padding: 6px;
  border-radius: 13px;
  border: 1.5px solid var(--sand);
  background: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.social-status-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.social-status-icon.is-locked img {
  filter: grayscale(1);
  opacity: .55;
}
.social-status-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.social-status-copy strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.social-status-copy span {
  font-size: 12.5px;
  color: var(--muted);
}
label.social-own-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
label.social-own-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--sage-dark);
  flex-shrink: 0;
}
.social-history-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}
.report-history-card.is-social-history-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.social-platform-pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--sand);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
  color: var(--sage-dark);
  flex-shrink: 0;
}
a.social-url-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.social-url-link:hover {
  color: var(--sage-dark);
  text-decoration: underline;
}
.admin-mod-card.is-social-card {
  grid-template-columns: minmax(0, 1fr);
}
.design-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.design-slot-card {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 8px;
  align-content: start;
}
.design-slot-head {
  display: grid;
  gap: 2px;
}
.design-slot-head strong {
  font-size: 13px;
}
.design-slot-head small {
  font-size: 11.5px;
  color: var(--muted);
}
button.design-slot-pick {
  min-height: 92px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px dashed var(--clay);
  background: var(--paper);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
button.design-slot-pick:hover:enabled {
  border-color: var(--sage);
  background: var(--sand-soft);
  color: var(--ink);
}
.design-slot-preview {
  display: grid;
  gap: 8px;
}
.design-slot-preview[hidden] {
  display: none;
}
.design-slot-preview img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--sand);
}
.design-slot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.design-slot-foot span {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.design-slot-clear {
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
}
button.design-slot-clear:hover:enabled {
  border-color: var(--sage);
  background: var(--sand-soft);
}
.design-submit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.design-history-heading {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 800;
}
.design-history-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 8px;
}
.design-history-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.design-history-asset {
  display: grid;
  gap: 3px;
  justify-items: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.design-history-asset img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--sand);
}
@media (max-width: 720px) {
  .design-slots-grid {
    grid-template-columns: 1fr;
  }
}

/* Bilgi Merkezi & Admin: Problem Bildir Sohbet Kutusu */
.ticket-create-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
}
.ticket-attach-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ticket-attach-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ticket-attach-preview[hidden] {
  display: none;
}
.ticket-attach-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--sand);
}
.ticket-attach-preview span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.ticket-list-card {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  color: var(--ink);
  display: grid;
  gap: 5px;
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, background-color .15s ease;
}
.ticket-list-card:hover {
  border-color: var(--sage);
  background: var(--surface);
  transform: translateY(-1px);
}
.ticket-list-card.is-selected {
  border-color: var(--sage);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--sage-soft);
}
.ticket-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.ticket-status-pill.is-pending {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.ticket-status-pill.is-active {
  background: #e1eff6;
  color: #1d5776;
}
.ticket-status-pill.is-closed {
  background: var(--sage-soft);
  color: var(--sage-dark);
}
.ticket-chat-shell {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  border-radius: 18px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.ticket-chat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
}
.ticket-chat-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ticket-chat-head-left strong {
  font-size: 14.5px;
  line-height: 1.25;
}
.ticket-chat-banner {
  padding: 9px 14px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(91, 67, 46, .16);
}
.ticket-chat-banner.is-closed {
  background: var(--sage-soft);
  color: var(--sage-dark);
}
.ticket-chat-banner[hidden] {
  display: none;
}
.ticket-chat-messages {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 430px;
  min-height: 250px;
  overflow-y: auto;
  background: var(--paper);
}
.ticket-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  gap: 4px;
}
.ticket-msg-row.is-self {
  align-self: flex-end;
  align-items: flex-end;
}
.ticket-msg-row.is-other {
  align-self: flex-start;
  align-items: flex-start;
}
.ticket-msg-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  gap: 6px;
}
.ticket-msg-bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  display: grid;
  gap: 8px;
}
.ticket-msg-row.is-self .ticket-msg-bubble {
  background: var(--sage);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}
.ticket-msg-row.is-other .ticket-msg-bubble {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ticket-msg-img {
  display: block;
  max-width: min(300px, 100%);
  max-height: 240px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(0, 0, 0, .06);
}
.ticket-chat-composer {
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  display: grid;
  gap: 8px;
}
.ticket-composer-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ticket-composer-row textarea {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 130px;
  resize: vertical;
}
.admin-tickets-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.admin-tickets-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow-y: auto;
}
.admin-ticket-chat-pane {
  min-width: 0;
}
.admin-ticket-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 840px) {
  .admin-tickets-layout {
    grid-template-columns: 1fr;
  }
}

/* Editorial & UI Typography System */
button,
input,
select,
textarea {
  font-family: inherit;
}
.button,
button.primary,
a.button,
.auth-entry-btn,
button.settings-tab,
button.shop-back-btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
}

.shop-spotlight-head h2,
.shop-view-head h1,
.auth-aside h1,
.docs-hero h1,
.upload-hero h1 {
  font-family: var(--font-ui);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.profile-identity h1,
.profile-showcase-title,
.settings-title,
.detail-title,
.shop-dialog-title,
.drawer-head h2,
.komenga-confirm-title {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.detail-description,
.docs-card p,
.docs-article p,
.profile-bio {
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.62;
}

.detail-comments-list,
.detail-comment-body,
.profile-comment-text,
.steam-row-excerpt,
.steam-row-sub,
.xp-guide-table,
.shop-rules-list {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
}
.pin-tab,
.filter-pill,
.detail-tag {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
}

/* Numeric & Tabular Counters: JetBrains Mono */
.header-pix-amount,
.shop-balance-val,
.shop-item-price strong,
.profile-showcase-count,
.profile-level-badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Editorial De-Slop System: Flat Paper & Ink, Crisp Radii, No Hover Jumps */
.pin-header {
  border-bottom: 1px solid var(--border);
}
.brand-logo {
  filter: none;
}

a.header-link-pill,
a.header-pix-pill,
.header-pix-pill,
.auth-entry-btn,
a.auth-entry-btn {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: none;
}
.auth-entry-btn,
a.auth-entry-btn {
  border-color: var(--sage-dark);
}

button,
.button,
button.primary,
a.button,
.pin-tab,
.filter-pill,
button.upload-tag-pill,
.upload-color-btn,
.upload-mini-btn,
.upload-track-link,
.shop-all-pill,
button.shop-back-btn,
button.shop-nav-btn,
a.shop-nav-link,
.docs-nav-item,
.settings-nav-item,
.settings-back-link,
button.settings-tab,
.profile-page-btn,
.detail-action-pill,
.detail-tag,
.report-reason-btn,
.upload-free-chip,
.upload-req-badge,
.report-status-pill,
.history-total-badge,
.settings-mini-pill,
.admin-badge {
  border-radius: 6px;
  box-shadow: none;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select,
.pin-search,
.upload-free-chips-wrap,
.detail-comment-pill {
  border-radius: 6px;
  box-shadow: none;
}

.pin-card,
.detail-card,
.detail-menu,
.search-dropdown,
.auth-avatar-menu,
.komenga-confirm,
.shop-item-card,
.shop-spotlight,
.shop-empty,
.shop-profile-stage,
.upload-dropzone,
.upload-crop-viewport,
.design-history-card,
.report-history-card,
.ticket-list-card,
.ticket-msg-bubble {
  border-radius: 6px;
  box-shadow: none;
}

.pin-card,
.detail-card,
.shop-item-card,
.shop-spotlight,
.design-history-card,
.report-history-card,
.ticket-list-card,
.detail-menu,
.detail-save-popover,
.search-dropdown,
.auth-avatar-menu,
.komenga-confirm {
  border-width: 1px;
}

/* Remove AI-template vertical hover jumps */
.detail-zoom-fab:hover,
.box-style-card:hover,
.profile-appearance-icon-btn:hover,
.profile-avatar-choice:hover,
.steam-row-card:hover,
.profile-panel-card:hover,
.profile-comment-card:hover,
button.profile-set-card:hover:enabled,
.frame-choice-card:hover:enabled,
button.badge-picker-tile:hover,
.docs-link-card:hover,
#appearance-dock button.dock-card:hover:enabled,
.ticket-list-card:hover,
.shop-item-card:hover {
  transform: none;
}

/* Flatten Upload Card-in-Card Nesting */
.upload-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.upload-nsfw-row,
.upload-color-row,
.upload-tag-group,
.upload-optional-details {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 14px 0;
  box-shadow: none;
}
.upload-tags-section,
.upload-free-tags-section {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.upload-color-row.is-missing,
.upload-tag-group.is-missing {
  background: rgba(180, 59, 59, 0.05);
  border-left: 2px solid #b43b3b;
  padding-left: 12px;
}

/* Flatten Settings Card-in-Card Nesting */
.settings-sidebar {
  padding-right: 20px;
  border-right: 1px solid var(--border);
}
.settings-main {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.settings-main-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.settings-nav-item.active {
  background: var(--surface);
  box-shadow: inset 2px 0 0 var(--sage);
}
.profile-privacy-box,
.profile-account-box {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 14px 0 0;
}
.settings-account-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.profile-privacy-row {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 0;
  box-shadow: none;
}
.settings-stage-avatar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.settings-mini-profile {
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Flatten Market & Guide Nesting */
.shop-sidebar {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 4px 20px 8px 0;
}
.shop-balance-box {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.shop-guide-quota-bar,
.shop-rules-box {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 16px 0;
}

/* Flatten Bilgi Merkezi Nesting */
.docs-sidebar {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 4px 20px 8px 0;
}
.docs-article {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.docs-note {
  background: transparent;
  border: 0;
  border-left: 2px solid var(--sage);
  border-radius: 0;
  padding: 4px 0 4px 14px;
}

@media (max-width: 900px) {
  .settings-sidebar,
  .shop-sidebar,
  .docs-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 16px;
  }
}

/* Auth Password Reset & Settings Email Verification UI */
.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.auth-subview-title {
  margin: 0 0 2px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.auth-subview-desc {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.auth-verify-actions .button {
  min-height: 38px;
  padding: 8px 16px;
  width: auto;
}
.settings-email-verify-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.email-verify-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.email-verify-badge.is-verified {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage-dark);
}
.email-verify-badge.is-unverified {
  background: var(--warn-bg);
  border-color: var(--clay);
  color: var(--warn-ink);
}
.settings-email-verify-actions {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
.settings-resend-verify-btn {
  justify-self: start;
  min-height: 32px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.settings-resend-verify-btn:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--clay);
}
.settings-resend-verify-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.settings-verify-msg {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
}
.settings-verify-msg.is-ok {
  color: var(--sage-dark);
}
.settings-verify-msg.is-error {
  color: var(--err-ink);
}
.settings-password-box {
  max-width: 520px;
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.settings-pw-form-stack {
  display: grid;
  gap: 12px;
}
.settings-pw-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.settings-pw-label-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.settings-pw-label-row .auth-inline-link {
  font-size: 12.5px;
  font-weight: 600;
}
.settings-password-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.settings-password-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}
.settings-session-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
button.settings-delete-account-btn {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(142, 55, 48, 0.35);
  background: var(--err-bg);
  color: var(--err-ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease;
}
button.settings-delete-account-btn:hover:enabled {
  background: #edd0cc;
  border-color: var(--err-ink);
}
button.settings-delete-account-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.settings-email-mask-btn {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin-left: 2px;
  border: 0;
  border-bottom: 1px dashed var(--clay);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.settings-email-mask-btn:hover {
  background: var(--sand-soft);
  color: var(--sage-dark);
}
.settings-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
button.settings-lang-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
button.settings-lang-card:hover {
  border-color: var(--clay);
  background: var(--surface);
}
button.settings-lang-card.is-active {
  border-color: var(--sage);
  background: var(--sage-soft);
  box-shadow: 0 0 0 2px rgba(93, 134, 108, 0.2);
}
.settings-lang-code {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--sage-dark);
  flex-shrink: 0;
}
button.settings-lang-card.is-active .settings-lang-code {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.settings-lang-meta {
  display: grid;
  gap: 2px;
}
.settings-lang-meta strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.settings-lang-meta span {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .settings-password-row {
    grid-template-columns: 1fr;
  }
  .settings-session-footer {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

/* Google Sign-In Block */
.auth-google-block {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.google-btn-slot {
  display: flex;
  justify-content: center;
  min-height: 42px;
}
.google-fallback-btn {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease;
}
.google-fallback-btn:hover:enabled {
  background: var(--sand-soft);
  border-color: var(--clay);
}
.google-fallback-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

/* Asset protection: prevent dragging & direct media context menu on badges, themes, frames, banners, backgrounds, and UI graphics (manga panels remain unaffected) */
.early-supporter-badge img,
.level-icon-badge img,
.profile-badges-box img,
.badge-hero-icon img,
.badge-ladder-icon img,
.badges-dialog img,
.profile-banner img,
.profile-banner video,
.profile-bg-media,
.profile-bg-media img,
.profile-bg-media video,
.profile-bg-video,
.profile-avatar-wrap img,
.avatar-frame-img,
.avatar-frame-layer,
.avatar-frame-layer img,
.shop-item-card img,
.shop-item-card video,
.shop-preview img,
.shop-preview video,
.appearance-dock img,
.appearance-dock video,
.box-style-card img,
.theme-card img,
.brand-logo img,
img[src*="/badges/"],
img[src*="/profile-sets/"],
video[src*="/profile-sets/"],
img[src*="/avatar/"],
img[src*="/user-avatar/"] {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

