:root {
  --ink: #e7ecef;
  --surface: #f7f9fa;
  --surface-2: #eef2f5;
  --line: #d5dde4;
  --text: #3d4752;
  --muted: #7d8a96;
  --accent: #6d8f84;
  --accent-soft: #8aada1;
  --accent-deep: #55756c;
  --ok: #5f8f7a;
  --danger: #b5847c;
  --shadow: 0 10px 28px rgba(70, 90, 100, 0.07);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 8px 24px rgba(70, 90, 100, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --space: 1rem;
  --font: "Poppins", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 40% at 8% 0%, rgba(138, 173, 161, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 35% at 100% 100%, rgba(150, 170, 190, 0.12), transparent 50%),
    linear-gradient(180deg, #e9eef1 0%, #e5eaee 100%);
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100vh;
}

.app-shell > :not(.topbar) {
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* ?? ?st bar: ba?l?k | men? ?? */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin: 0;
  padding: 1.15rem clamp(1rem, 3vw, 2rem);
  background: rgba(247, 249, 250, 0.96);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand .ico {
  color: var(--accent-deep);
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-ico {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--accent-deep);
}

.brand-ico .ico {
  width: 1.55rem;
  height: 1.55rem;
  min-width: 1.55rem;
  min-height: 1.55rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.brand-sub {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
}

.topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
}

.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.25rem;
  background: var(--surface-2);
  border-radius: 999px;
  border: 1px solid rgba(213, 221, 228, 0.8);
}

.chip {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 0.76rem/1 var(--font);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s, background 0.15s;
}

.chip[aria-pressed="true"] {
  color: #f5faf8;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(109, 143, 132, 0.28);
}

.account-group {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--accent-deep);
  background: rgba(109, 143, 132, 0.1);
}

/* ?? ?al??ma alan? ?? */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.study-panel {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.deck {
  width: 100%;
  perspective: 1400px;
  display: flex;
  justify-content: center;
}

.card-shell {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 3 / 4;
  max-height: min(74vh, 720px);
  position: relative;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

/* Masaüstü: kontroller solda (sticky), kart sağda — kaydırmadan erişim */
@media (min-width: 901px) {
  .study-panel {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0.75rem 1rem;
    align-items: start;
  }

  .study-panel > .study-tools,
  .study-panel > .progress {
    grid-column: 1 / -1;
  }

  .study-panel > .action-tray {
    grid-column: 1;
    grid-row: 3;
    position: sticky;
    top: 0.75rem;
    align-self: start;
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .study-panel > .deck,
  .study-panel > .empty {
    grid-column: 2;
    grid-row: 3;
  }

  .study-panel .card-shell {
    max-width: 580px;
    max-height: min(78vh, 760px);
  }

  .study-panel .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .study-panel .ctrl {
    height: 2.65rem;
    font-size: 0.84rem;
  }

  .study-panel #btnPrev {
    order: 1;
  }

  .study-panel #btnNext {
    order: 2;
  }

  .study-panel #btnFlip {
    order: 3;
    grid-column: 1 / -1;
  }

  .study-panel #btnSpeak {
    order: 4;
    grid-column: 1 / -1;
  }

  .study-panel .autoplay-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.65rem;
  }

  .study-panel .autoplay-opts {
    order: 0;
    width: 100%;
    margin-left: 0;
  }

  .study-panel .autoplay-opts .speed-wrap {
    flex: 1;
    min-width: 0;
  }

  .study-panel .autoplay-opts .speed-wrap select {
    width: 100%;
  }

  .study-panel .auto-btn {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .study-panel .voice-bar {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-top: 0.65rem;
  }

  .study-panel .voice-preview {
    width: 100%;
  }
}

.progress-row {
  display: flex;
  justify-content: center;
}

.study-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: rgba(247, 249, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: 500 0.8rem/1 var(--font);
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.tool-btn:hover {
  border-color: var(--accent);
}

.tool-btn.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7fbf9;
}

.tool-btn.know:hover {
  border-color: var(--ok);
  color: var(--ok);
}

.tool-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.tool-select {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.tool-select select {
  font: 500 0.8rem/1.2 var(--font);
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.tool-link {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 0.75rem/1 var(--font);
  cursor: pointer;
  padding: 0.35rem 0.2rem;
}

.tool-link:hover {
  color: var(--accent-deep);
}

.known-box {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(95, 143, 122, 0.1);
  border: 1px solid rgba(95, 143, 122, 0.22);
}

.known-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-deep);
  text-decoration: none;
}

.known-label:hover {
  text-decoration: underline;
}

.known-label strong {
  font-weight: 600;
}

.known-box .tool-link {
  margin-left: 0;
}

/* ?? Bildiklerim sayfas? ?? */
.known-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.known-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem 1rem;
}

.known-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
}

.known-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.known-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.known-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 220px;
  min-width: 140px;
  max-width: 360px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.known-search input {
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  width: 100%;
  font: 500 0.88rem/1.2 var(--font);
  color: var(--text);
}

.known-search input:focus {
  outline: none;
}

.known-actions .tool-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .known-head {
    flex-wrap: wrap;
  }

  .known-actions {
    width: 100%;
  }

  .known-search {
    max-width: none;
  }
}

.danger-btn {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}

.danger-btn:hover {
  background: rgba(181, 132, 124, 0.08) !important;
}

.danger-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.known-panel {
  background: rgba(247, 249, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.known-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.known-table th,
.known-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.known-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.45);
}

.known-table .actions-row {
  text-align: right;
  white-space: nowrap;
}

.known-panel .empty,
.known-panel .no-results {
  margin: 0;
  padding: 2rem 1rem;
}

/* ?? Ana sayfa hub ?? */
.hub {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hub-intro h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hub-intro p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.25rem 1.2rem 1.35rem;
  background: rgba(247, 249, 250, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(70, 90, 100, 0.1);
}

.hub-primary {
  border-color: rgba(109, 143, 132, 0.45);
  background: linear-gradient(165deg, #f4faf7, #eef4f2);
}

.hub-ico {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--accent-deep);
}

.hub-ico svg {
  width: 100%;
  height: 100%;
}

.hub-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.hub-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.progress {
  margin: 0 auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  color: var(--accent-deep);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  padding: 0.55rem 1.15rem;
  background: rgba(109, 143, 132, 0.14);
  border: 1px solid rgba(85, 117, 108, 0.35);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.progress #progressText {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
}

.progress-now {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.progress-slash {
  color: var(--muted);
  font-weight: 600;
}

.progress-total {
  font-weight: 700;
  color: var(--accent-deep);
}

.progress-sep {
  color: var(--muted);
  margin: 0 0.1rem;
}

.progress-party {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.face-media[hidden] {
  display: none !important;
}

.face-media:not([hidden]) {
  flex: 0 0 62%;
}

.face.front:has(.face-media[hidden]) .face-body,
.face.back:has(.face-media[hidden]) .face-body,
.face.back:not(:has(.face-media)) .face-body {
  flex: 1;
}

.auto-hint,
.voice-title,
.hint {
  display: none !important;
}

.voice-bar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.voice-preview {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
}

.card-shell.slide-out-left {
  transform: translateX(-18%) rotate(-2deg);
  opacity: 0;
}

.card-shell.slide-out-right {
  transform: translateX(18%) rotate(2deg);
  opacity: 0;
}

.card-shell.slide-in {
  animation: deckIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes deckIn {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card.is-flipped {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.face.back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #f8fafb, #eef4f2);
}

.face-media {
  flex: 0 0 62%;
  background: linear-gradient(145deg, #e3ebe8, #e6ebf0);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border-bottom: 1px solid rgba(213, 221, 228, 0.55);
}

.face-media.has-image {
  background-color: #d8e0e4;
  background-size: cover;
}

.face-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.35rem 1.25rem;
  text-align: left;
  gap: 0.3rem;
}

.label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.word {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hint {
  margin: 0.65rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.meaning {
  margin: 0;
  font-size: clamp(1.35rem, 4.8vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}

.card-word-ref {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* ?? Alt eylem tepsisi ?? */
.action-tray {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: rgba(247, 249, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.5fr 1fr;
  gap: 0.45rem;
  width: 100%;
}

.ctrl {
  height: 2.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: 500 0.88rem/1 var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}

.ctrl:hover {
  border-color: var(--accent);
  background: #fff;
}

.ctrl:active {
  transform: scale(0.97);
}

.ctrl.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7fbf9;
  font-weight: 600;
}

.ctrl.primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.ctrl .ico {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
}

.autoplay-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.auto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 10rem;
  min-height: 2.85rem;
  height: 2.85rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: 600 0.95rem/1 var(--font);
  padding: 0 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}

.auto-btn .ico {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
}

.auto-btn:active {
  transform: scale(0.97);
}

.auto-btn:hover {
  border-color: var(--accent);
}

.auto-btn.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7fbf9;
}

.autoplay-opts {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  order: -1;
  margin-left: 0;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.speed-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.speed-wrap .opt-label {
  white-space: nowrap;
}

.speed-wrap select {
  font: 500 0.82rem/1.2 var(--font);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.auto-hint {
  flex: 1 1 100%;
  margin: 0;
  text-align: left;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.voice-bar {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.voice-title {
  margin: 0;
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.voice-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-deep);
  min-width: 0;
}

.voice-wrap select {
  width: 100%;
  font: 500 0.75rem/1.2 var(--font);
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
}

.voice-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  align-self: end;
  height: 2.15rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: 500 0.78rem/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
}

.voice-preview:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.empty {
  color: var(--muted);
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* —— İkonlar —— */
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  min-width: 1.15em;
  min-height: 1.15em;
  flex: 0 0 auto;
  line-height: 0;
  vertical-align: middle;
  color: inherit;
}

.ico svg {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none;
}

.ico-sm {
  width: 1em;
  height: 1em;
  min-width: 1em;
  min-height: 1em;
}

.ico-lg {
  width: 1.6em;
  height: 1.6em;
  min-width: 1.6em;
  min-height: 1.6em;
}

.ico-inline {
  margin-right: 0.1rem;
}

.manage-search .ico,
.tool-btn .ico,
.icon-btn .ico,
.ctrl .ico,
.auto-btn .ico {
  flex: 0 0 auto;
}

.manage-search .ico {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  color: var(--muted);
}

.tool-btn .ico {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
}

.icon-btn .ico {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
}

/* ?? Giri? ?? */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(380px, 100%);
  padding: 1.75rem 1.5rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: var(--shadow);
}

.login-brand {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.login-card h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-err {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(181, 132, 124, 0.12);
  color: var(--danger);
  font-size: 0.88rem;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.login-card label .ico {
  display: inline-flex;
  margin-right: 0.15rem;
}

.login-card input {
  font: 500 0.95rem/1.2 var(--font);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #eef2f5;
  color: var(--text);
}

.login-card input.pin-input {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-align: center;
  padding-left: 0.9rem;
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.login-card button {
  margin-top: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem;
  background: var(--accent);
  color: #f7fbf9;
  font: 600 0.95rem/1 var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.login-card button:hover {
  background: var(--accent-deep);
}

@media (max-width: 700px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .account-group {
    border-left: 0;
    padding-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .controls {
    grid-template-columns: 1fr 1fr 1.4fr 1fr;
  }

  .card-shell {
    max-height: 52vh;
    aspect-ratio: 4 / 5;
  }

  .autoplay-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .auto-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.85rem;
    height: 2.85rem;
    font-size: 0.92rem;
    padding: 0 1rem;
  }

  .autoplay-bar .autoplay-opts {
    order: 0;
    width: 100%;
    margin-left: 0;
  }

  .autoplay-bar .speed-wrap {
    flex: 1;
    min-width: 0;
  }

  .autoplay-bar .speed-wrap select {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
  }

  .voice-bar {
    grid-template-columns: 1fr;
  }

  .voice-preview {
    width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 420px) {
  .ctrl.speak span,
  .ctrl.primary span {
    display: none;
  }

  .filter-group .chip {
    padding: 0.42rem 0.55rem;
  }
}

/* ?? T?m kartlar (y?netim) ?? */
.manage-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.manage-flash {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.9rem;
}

.manage-flash.ok {
  border-color: rgba(95, 143, 122, 0.35);
  color: var(--ok);
  background: rgba(95, 143, 122, 0.08);
}

.manage-flash.err {
  border-color: rgba(181, 132, 124, 0.4);
  color: var(--danger);
  background: rgba(181, 132, 124, 0.08);
}

/* ?? Toast bildirim (sa? ?st) ?? */
.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  padding: 0.85rem 2.1rem 0.95rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(70, 90, 100, 0.14);
  color: var(--text);
  font: 500 0.9rem/1.35 var(--font);
  transform: translateX(110%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.toast.is-in {
  transform: translateX(0);
  opacity: 1;
}

.toast.is-out {
  transform: translateX(110%);
  opacity: 0;
}

.toast.ok {
  border-color: rgba(95, 143, 122, 0.4);
}

.toast.err {
  border-color: rgba(181, 132, 124, 0.45);
}

.toast-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}

.toast-close:hover {
  color: var(--text);
  background: rgba(125, 138, 150, 0.12);
}

.toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: var(--accent);
  animation: toast-progress var(--toast-ms, 4200ms) linear forwards;
}

.toast.err .toast-bar {
  background: var(--danger);
}

.toast.ok .toast-bar {
  background: var(--ok);
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
  .toast-bar {
    animation: none;
  }
}

.manage-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.35fr);
  gap: 1.25rem;
  padding: 1.15rem;
  background: rgba(247, 249, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.manage-picker {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.manage-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.manage-search input {
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  width: 100%;
  font: 500 0.88rem/1.2 var(--font);
  color: var(--text);
}

.manage-search input:focus {
  outline: none;
}

.manage-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
  flex: 1;
}

.manage-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.manage-select-wrap select {
  width: 100%;
  flex: 1;
  min-height: 280px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: 500 0.88rem/1.35 var(--font);
  color: var(--text);
}

.manage-select-wrap select:focus {
  outline: 2px solid rgba(109, 143, 132, 0.35);
  outline-offset: 1px;
}

.manage-select-wrap option {
  padding: 0.35rem 0.45rem;
}

.manage-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.manage-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.manage-form-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}

.manage-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.manage-grid label.span-2 {
  grid-column: 1 / -1;
}

.manage-grid input[type="text"],
.manage-grid input[type="file"],
.manage-grid select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: 500 0.9rem/1.3 var(--font);
  color: var(--text);
}

.manage-grid input:focus,
.manage-grid select:focus {
  outline: 2px solid rgba(109, 143, 132, 0.35);
  outline-offset: 1px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--accent-deep);
}

.edit-only {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.edit-only .check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.25rem;
}

@media (max-width: 820px) {
  .manage-panel {
    grid-template-columns: 1fr;
  }

  .manage-select-wrap select {
    min-height: 200px;
  }
}

@media (max-width: 560px) {
  .manage-grid {
    grid-template-columns: 1fr;
  }

  .manage-grid label.span-2 {
    grid-column: auto;
  }
}

/* ?? ?statistik panelleri ?? */
.hub-wide {
  max-width: 1080px;
}

.stats-panel {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.stats-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.stats-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.stat-metric {
  padding: 0.85rem 0.9rem;
  background: rgba(247, 249, 250, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.stat-metric-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.stat-metric-value {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-metric-hint {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.stat-card {
  padding: 1rem 1.05rem 1.1rem;
  background: rgba(247, 249, 250, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.stat-card.span-2 {
  grid-column: 1 / -1;
}

.stat-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.stat-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(88px, 120px) 1fr 2.2rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.stat-bar-label {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(213, 221, 228, 0.7);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent-deep));
  min-width: 0;
  transition: width 0.35s ease;
}

.stat-bar-fill.is-zero {
  width: 0 !important;
}

.stat-bar-val {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}

.stat-spark-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-spark {
  width: 100%;
  height: auto;
  display: block;
}

.stat-spark-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
}

.stat-party-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--text);
}

.stat-party-list li {
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid transparent;
}

.stat-party-list li.is-done {
  border-color: rgba(95, 143, 122, 0.35);
  background: rgba(95, 143, 122, 0.08);
}

.stat-life-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.stat-life-row b {
  color: var(--text);
  font-weight: 600;
}

.stage-with-stats {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 1rem;
  align-items: start;
}

.party-stats {
  padding: 0.95rem 1rem;
  background: rgba(247, 249, 250, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 1rem;
}

.party-stats-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.party-stats-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.badge-done,
.badge-open {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-done {
  background: rgba(95, 143, 122, 0.15);
  color: var(--ok);
}

.badge-open {
  background: rgba(125, 138, 150, 0.14);
  color: var(--muted);
}

.party-stats-bars .stat-bar-row {
  grid-template-columns: 3.2rem 1fr 1.6rem;
}

.party-stats-foot {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.stage-with-stats .empty {
  grid-column: 2;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card.span-2 {
    grid-column: auto;
  }

  .stage-with-stats {
    grid-template-columns: 1fr;
  }

  .party-stats {
    position: static;
    order: -1;
  }

  .stage-with-stats .empty {
    grid-column: auto;
  }
}

/* ?? Tam geni?lik + ortak men? ?? */
.page-full,
.hub,
.hub-wide,
.manage-page,
.known-page {
  width: 100%;
  max-width: none !important;
  margin: 0;
}

.topbar-full {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  grid-template-columns: none;
}

.topbar-bleed {
  width: 100%;
  margin: 0;
  border-radius: 0;
  min-height: 4.75rem;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.main-nav .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.main-nav .nav-btn .ico {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  color: var(--accent-deep);
  flex: 0 0 auto;
}

.main-nav .nav-btn:hover {
  color: var(--accent-deep);
  border-color: rgba(109, 143, 132, 0.45);
  background: rgba(109, 143, 132, 0.08);
}

.main-nav .nav-btn.is-active {
  color: #f5faf8;
  background: var(--accent);
  border-color: var(--accent-deep);
  box-shadow: 0 2px 10px rgba(109, 143, 132, 0.28);
}

.main-nav .nav-btn.is-active .ico {
  color: #f5faf8;
}

.main-nav .nav-btn-out {
  color: var(--danger);
  border-color: rgba(181, 132, 124, 0.35);
}

.main-nav .nav-btn-out .ico {
  color: var(--danger);
}

.main-nav .nav-btn-out:hover {
  color: var(--danger);
  background: rgba(181, 132, 124, 0.1);
  border-color: rgba(181, 132, 124, 0.55);
}

/* eski s?n?f ? geriye d?n?k */
.main-nav .nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav .nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.main-nav .nav-link.is-active {
  color: var(--accent-deep);
  background: rgba(109, 143, 132, 0.14);
  font-weight: 600;
}

.subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  background: rgba(247, 249, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-intro p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

/* ?? Katalog / ?r?n ?zgaras? ?? */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.catalog-toolbar h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.catalog-filters select {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: 500 0.88rem/1.2 var(--font);
  color: var(--text);
}

.catalog-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(247, 249, 250, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  min-height: 100%;
}

.product-card:hover {
  border-color: rgba(61, 71, 82, 0.28);
  box-shadow: 0 8px 24px rgba(40, 48, 56, 0.1);
  transform: translateY(-1px);
}

.product-card:focus-visible {
  outline: 2px solid var(--accent, #3d6b8a);
  outline-offset: 2px;
}

.product-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #e8eef1, #dce5ea);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.product-media.has-img {
  background-color: #dce5ea;
}

.product-media-fallback {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(61, 71, 82, 0.35);
  letter-spacing: -0.03em;
}

.product-media .diff {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.diff-1 { color: #5f8f7a; }
.diff-2 { color: #8a7a5c; }
.diff-3 { color: #b5847c; }

.product-body {
  padding: 0.85rem 0.95rem 1rem;
  flex: 1;
}

.product-en {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-tr {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.35;
}

.product-foot {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 0.85rem 0.9rem;
}

.product-foot .tool-btn {
  flex: 1;
  justify-content: center;
}

.product-foot .inline-del {
  margin: 0;
}

.product-foot .inline-del .tool-btn {
  flex: 0;
  min-width: 2.6rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.infinite-sentinel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.5rem;
  margin: 1rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.infinite-spinner {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid var(--line);
  border-top-color: var(--accent-deep);
  border-radius: 50%;
  animation: infinite-spin 0.7s linear infinite;
}

.infinite-end {
  letter-spacing: 0.01em;
}

@keyframes infinite-spin {
  to { transform: rotate(360deg); }
}

/* ?? Modal ?? */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(40, 50, 58, 0.35);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(640px, 100%);
  max-height: min(92vh, 800px);
  overflow: auto;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(40, 50, 58, 0.18);
}

.modal.modal-sm {
  width: min(400px, 100%);
  max-height: none;
}

.confirm-text {
  margin: 0 0 0.35rem;
  color: var(--text);
  line-height: 1.5;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-body {
  padding: 1.1rem 1.15rem 0.5rem;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 0 1.15rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

@media (max-width: 720px) {
  .catalog-toolbar {
    align-items: stretch;
  }

  .catalog-actions,
  .catalog-filters {
    width: 100%;
  }

  .catalog-filters .manage-search {
    flex: 1;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ?? Parti lobisi (kategori kartlar?) ?? */
.party-lobby {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.party-lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.party-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 249, 250, 0.96);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.party-cat-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  background: #fff;
}

.party-cat-card.is-worked {
  border-color: rgba(109, 143, 132, 0.45);
}

.party-cat-card.is-done {
  border-color: rgba(95, 143, 122, 0.55);
  background: rgba(95, 143, 122, 0.08);
}

.party-cat-num {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.party-cat-count {
  font-size: 0.88rem;
  color: var(--muted);
}

.party-cat-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--accent-deep);
}

.party-now {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(109, 143, 132, 0.12);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 600;
}

.subbar .tool-select {
  margin-left: auto;
}

@media (max-width: 720px) {
  .subbar .tool-select {
    margin-left: 0;
    width: 100%;
  }
}

.lobby-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.party-cat-eta {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-deep);
  margin-top: 0.15rem;
}

#partyStudyWrap[hidden],
#partyLobby[hidden] {
  display: none !important;
}

/* ?? Ana sayfa zaman aral??? ?? */
.range-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: rgba(247, 249, 250, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.range-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.range-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: 500 0.8rem/1 var(--font);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.range-chip:hover {
  color: var(--text);
  border-color: var(--accent-soft);
}

.range-chip.is-active {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #f7fbf9;
}

.range-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.range-custom.is-hidden {
  display: none;
}

.range-custom-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.range-custom input[type="date"] {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: 500 0.85rem/1.2 var(--font);
  color: var(--text);
}

.stat-hero {
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, rgba(109, 143, 132, 0.14), rgba(247, 249, 250, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.stat-hero-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.stat-hero-value {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
}

.stat-hero-sub {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--text);
}

/* ?? Yan yana toolbar + iyile?tirilmi? parti kartlar? ?? */
.catalog-toolbar-row {
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
}

.catalog-title {
  flex: 0 0 auto;
  min-width: 8rem;
}

.catalog-filters-inline {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
}

.catalog-filters-inline .manage-search {
  flex: 1 1 180px;
  max-width: 280px;
  min-width: 140px;
}

.catalog-filters-inline .catalog-filter-select {
  flex: 0 0 auto;
}

.catalog-filters-inline select,
.catalog-filters-inline .tool-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.catalog-filter-select {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.catalog-filter-select .chips-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

.catalog-filter-select select {
  min-width: 9.5rem;
  max-width: 14rem;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237d8a96' d='M1.4 1.2 6 5.6l4.6-4.4 1.2 1.3L6 8 0.2 2.5z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  background-size: 10px 7px;
  font: 500 0.88rem/1.2 var(--font);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.catalog-filter-select select:focus {
  outline: 2px solid rgba(109, 143, 132, 0.35);
  outline-offset: 1px;
}

.range-bar-row {
  flex-direction: row;
  align-items: center;
}

.range-bar-row .range-chips {
  width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.range-modal {
  width: min(420px, 100%);
}

.range-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.range-modal-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.range-modal-grid input[type="date"] {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: 500 0.9rem/1.3 var(--font);
  color: var(--text);
}

.party-cat-card {
  gap: 0.55rem;
  padding: 1.2rem 1.15rem;
  min-height: 132px;
  justify-content: space-between;
}

.party-cat-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.party-cat-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(125, 138, 150, 0.14);
  color: var(--muted);
}

.party-cat-card.is-worked .party-cat-badge {
  background: rgba(109, 143, 132, 0.16);
  color: var(--accent-deep);
}

.party-cat-card.is-done .party-cat-badge {
  background: rgba(95, 143, 122, 0.18);
  color: var(--ok);
}

.party-cat-eta {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
  margin: 0;
}

.party-cat-count {
  font-size: 0.82rem;
  color: var(--muted);
}

.party-cat-meta {
  display: none;
}

@media (max-width: 900px) {
  .catalog-toolbar-row {
    flex-wrap: wrap;
  }

  .catalog-filters-inline {
    width: 100%;
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .catalog-filters-inline .manage-search {
    max-width: none;
    flex: 1 1 100%;
  }

  .range-bar-row .range-chips {
    flex-wrap: wrap;
  }
}

/* ?? Katalog chip filtre + modal prompt ?? */
.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0.25rem 0 1rem;
}

.catalog-chips-in-filter {
  margin: 0;
}

.catalog-chips .chips-label {
  margin-left: 0.35rem;
  margin-right: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.catalog-chips .chips-label:first-child {
  margin-left: 0;
}

.catalog-chips a.chip {
  text-decoration: none;
}

.modal-wide {
  width: min(1080px, calc(100vw - 2rem));
  max-height: min(92vh, 880px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-wide .modal-head {
  flex-shrink: 0;
}

.modal-wide .modal-body.manage-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1.15rem 1.35rem 0.35rem;
  gap: 0;
}

.modal-wide .modal-foot {
  flex-shrink: 0;
  margin: 0;
  padding: 0.9rem 1.35rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(247, 249, 250, 0.96);
}

.card-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.15rem 1.35rem;
  align-items: start;
}

.card-edit-fields {
  align-content: start;
}

.card-edit-fields .card-edit-flags {
  grid-column: 2;
  align-self: end;
  padding-bottom: 0.35rem;
}

.shortcut-help {
  margin-top: 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px dashed rgba(213, 221, 228, 0.95);
  border-radius: var(--radius-sm);
  background: rgba(247, 249, 250, 0.85);
}

.card-edit-fields.manage-grid > .shortcut-help.span-2 {
  grid-column: 1 / -1;
}

.shortcut-help-title {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shortcut-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.shortcut-section {
  min-width: 0;
  padding: 0.55rem 0.5rem 0.6rem;
  border: 1px solid rgba(213, 221, 228, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
}

.shortcut-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.shortcut-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  gap: 0.4rem;
}

.shortcut-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.45rem 0.3rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text);
  border: 1px solid rgba(213, 221, 228, 0.95);
  border-radius: 8px;
  background: #fff;
}

.shortcut-keys {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 1.7rem;
  flex-shrink: 0;
}

.shortcut-label {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: break-word;
}

.shortcut-list kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.4rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  font: 600 0.72rem/1 var(--font);
  color: var(--accent-deep);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  flex-shrink: 0;
}

.card-edit-media {
  min-width: 0;
}

.card-edit-media .image-dropzone {
  min-height: 168px;
}

.card-edit-media .image-dropzone-preview {
  min-height: 180px;
  max-height: 260px;
}

.card-edit-media .image-dropzone-preview img {
  max-height: 260px;
}

.card-edit-media .prompt-box textarea {
  min-height: 88px;
}

@media (max-width: 860px) {
  .card-edit-layout {
    grid-template-columns: 1fr;
  }

  .card-edit-fields .card-edit-flags {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .modal-wide {
    width: 100%;
    max-height: 96vh;
  }

  .modal-wide .modal-body.manage-form,
  .modal-wide .modal-foot {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .shortcut-sections {
    grid-template-columns: 1fr;
  }

  .shortcut-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) and (min-width: 561px) {
  .shortcut-sections {
    grid-template-columns: 1fr 1fr;
  }

  .shortcut-section:last-child {
    grid-column: 1 / -1;
  }
}

.modal-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.modal-nav h2,
.modal-nav .modal-title {
  margin: 0;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.modal-title-pager {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 500;
}

.modal-title-sep {
  margin-right: 0.1rem;
}

.card-jump-input {
  width: 2.4ch;
  min-width: 1.6ch;
  max-width: 4.5ch;
  padding: 0.1rem 0.2rem;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.card-jump-input::-webkit-outer-spin-button,
.card-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.card-jump-input:hover {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.03);
}

.card-jump-input:focus {
  outline: none;
  border-color: rgba(109, 143, 132, 0.55);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(109, 143, 132, 0.2);
}

.card-jump-total {
  font-variant-numeric: tabular-nums;
}

.field-hint-inline {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

.prompt-box {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.75);
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.prompt-head strong {
  font-size: 0.88rem;
}

.prompt-box textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: 500 0.82rem/1.45 var(--font);
  color: var(--text);
}

.prompt-hint {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.image-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.65);
}

.image-filter-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.image-filter-panel .prompt-box {
  margin-top: 0.25rem;
  background: rgba(247, 249, 250, 0.9);
}

.image-file-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.image-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 132px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.image-dropzone:hover,
.image-dropzone:focus-visible {
  border-color: var(--accent-soft);
  background: rgba(138, 173, 161, 0.08);
  outline: none;
}

.image-dropzone.is-dragover {
  border-color: var(--accent);
  border-style: solid;
  background: rgba(109, 143, 132, 0.12);
  box-shadow: inset 0 0 0 2px rgba(109, 143, 132, 0.2);
}

.image-dropzone.has-preview {
  min-height: 0;
  border-style: solid;
  border-color: var(--line);
  cursor: default;
}

.image-dropzone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.15rem 1rem;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}

.image-dropzone.has-preview .image-dropzone-placeholder {
  display: none;
}

.image-dropzone-icon {
  color: var(--accent);
  margin-bottom: 0.15rem;
  opacity: 0.9;
}

.image-dropzone-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.image-dropzone-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.image-dropzone-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  max-height: 200px;
  background: var(--surface-2);
}

.image-dropzone-preview img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.image-dropzone-clear {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.image-dropzone-clear:hover {
  background: #fff;
  border-color: var(--danger);
  color: var(--danger);
}

.image-dropzone .field-hint {
  padding: 0.35rem 0.65rem 0.55rem;
  text-align: center;
}

.image-dropzone.has-preview .field-hint {
  display: none;
}

.image-url-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.image-url-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.image-url-controls {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}

.image-url-controls input[type="url"] {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: 500 0.85rem/1.3 var(--font);
  color: var(--text);
}

.image-url-controls input[type="url"]:focus {
  outline: 2px solid rgba(109, 143, 132, 0.35);
  outline-offset: 1px;
}

.image-url-controls .tool-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.image-url-row .field-hint {
  font-size: 0.75rem;
}

.image-url-row .field-hint.is-error {
  color: var(--danger);
}
