:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --bg-accent: #fff6df;
  --surface: #ffffff;
  --text: #1c2a32;
  --muted: #5e6a72;
  --primary: #0b2a3d;
  --primary-strong: #0a1d2b;
  --success: #1d6f42;
  --warning: #c08a1c;
  --danger: #b00020;
  --border: #d8d3c9;
  --shadow: 0 10px 24px rgba(16, 24, 32, 0.08);
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 0.75rem;
  font-family: "Space Grotesk", "Satoshi", "Avenir Next", sans-serif;
  background: #f6f7f3;
  color: var(--text);
}

a {
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.topbar-right {
  position: relative;
}

.topbar-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hamburger {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.hamburger span {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--text);
}

.menu-panel {
  position: absolute;
  top: 64px;
  right: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.75rem;
  min-width: 180px;
  display: grid;
  gap: 0.5rem;
}

.menu-panel a {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--text);
}

.menu-panel .menu-link {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  text-align: left;
  min-height: auto;
}

.menu-panel .menu-link:hover {
  background: #f1ede6;
}

.menu-panel a:hover {
  background: #f1ede6;
}
a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 0.75rem;
}

button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.525rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  min-height: 33px;
  font-size: 0.75rem;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 24, 32, 0.12);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
}

textarea {
  min-height: 88px;
}

.comment-box {
  min-height: 1.5rem;
  max-height: 4.5rem;
  overflow: auto;
  resize: none;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0.25rem 1rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.8rem;
  margin: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-inner {
  padding: 0.3rem;
  margin-bottom: 0.1rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--primary);
  min-height: 24px;
  font-size: 0.7rem;
}

.section-title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.5rem 0;
}

.tile-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tile-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.tile-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.tile-card {
  height: 100%;
}

.tile-card .card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tile-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.tool-panel {
  min-height: 3.25rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.project-list {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}

.tile-media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tile-media-thumb {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
}

.media-thumb-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  touch-action: none;
}

.media-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.media-drop-slot {
  border: 2px dashed #0b2a3d;
  border-radius: 10px;
  height: 80px;
  background: #fff;
}

.media-star {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #f5c542;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1px 3px;
}


@media (min-width: 640px) {
  .media-thumb-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .media-thumb-grid {
    grid-template-columns: repeat(15, minmax(0, 1fr));
  }
}


.icon-button {
  padding: 0.3rem;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button .bi {
  font-size: 0.9rem;
  line-height: 1;
}

.icon-button .bi-square-fill {
  color: #9a9a9a;
}

.muted {
  color: var(--muted);
}

.primary-button {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-strong);
}

.primary-button:hover {
  box-shadow: 0 10px 20px rgba(11, 42, 61, 0.24);
}

.ghost-button {
  background: transparent;
}

.danger-button {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}
.media-actions .icon-button {
  min-width: 40px;
  min-height: 40px;
  padding: 0.45rem;
}
