﻿:root {
  --bg: #f4f7f3;
  --panel: #ffffff;
  --ink: #102116;
  --accent: #123840;
  --accent-2: #f7a50a;
  --line: #d6e1d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #ffffff, var(--bg));
  color: var(--ink);
}

.topbar {
  padding: 20px;
  text-align: center;
  background: linear-gradient(100deg, #0c2830, #123840);
  color: #fff;
}

.topbar-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.topbar-links a {
  color: #fff;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}

.topbar h1 {
  margin: 0 0 6px;
}

.topbar p {
  margin: 0;
  opacity: 0.9;
}

.layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.stickers-panel,
.album-section,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.stickers-panel {
  padding: 14px;
  height: fit-content;
}

.stickers-panel h2 {
  margin: 4px 0;
}

.panel-tip {
  margin: 0 0 12px;
  font-size: 14px;
  color: #4e5f53;
}

.sticker-search {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid #cbdacb;
  font-size: 14px;
}

.stickers-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 2px;
}

.sticker-thumb-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sticker-thumb {
  width: 100%;
  border-radius: 8px;
  border: 2px solid transparent;
}

.sticker-label {
  font-size: 11px;
  text-align: center;
  color: #4e5f53;
  word-break: break-word;
  width: 100%;
  line-height: 1.2;
}

.sticker-dl-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.topbar-logo {
  height: 48px;
  display: block;
  margin: 0 auto 8px;
}

.album-section {
  padding: 16px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

button,
select,
input {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #cbdacb;
  font-size: 14px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

#resetButton {
  background: #e8efe9;
  color: #1d3324;
}

#downloadPdfButton,
#downloadJpegButton,
#loginButton,
#addPageButton,
#addStickerButton {
  background: var(--accent);
  color: #fff;
}

.album {
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid #cad8cd;
  background: #e6eee7;
}

.album-background {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  user-select: none;
  pointer-events: none;
}

.placements {
  position: absolute;
  inset: 0;
}

.slot-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.placed-sticker {
  position: absolute;
  border-radius: 8px;
  cursor: grab;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  user-select: none;
  z-index: 2;
  object-fit: fill;
}

.placed-sticker:active {
  cursor: grabbing;
}

.usage-tip {
  text-align: center;
  font-size: 14px;
  color: #46584b;
}

.admin-wrap {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 20px 20px;
}

.card {
  padding: 16px;
}

.hidden {
  display: none;
}

.card label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 600;
}

.card input {
  width: 100%;
}

.hint {
  color: #506555;
}

.list,
.stickers-admin-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.row,
.sticker-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d5e1d7;
  border-radius: 10px;
  padding: 8px;
}

.sticker-admin-item img {
  width: 50px;
  height: 65px;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .stickers-panel {
    order: 2;
  }

  .album-section {
    order: 1;
  }

  .stickers-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-wrap {
    margin: 14px auto;
    padding: 0 14px 14px;
  }

  .actions label {
    width: 100%;
  }`r`n}

@media (max-width: 640px) {
  .topbar {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  .topbar p {
    font-size: 14px;
  }

  .layout {
    padding: 10px;
    gap: 10px;
  }

  .album-section,
  .stickers-panel,
  .card {
    border-radius: 12px;
    padding: 12px;
  }

  .actions {
    gap: 8px;
  }

  .actions button,
  .actions select,
  .actions input {
    width: 100%;
  }

  .actions button,
  .actions select {
    min-height: 42px;
  }

  .stickers-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .modal-sticker-option img {
    height: 90px;
  }

  .usage-tip {
    font-size: 13px;
  }

  .row,
  .sticker-admin-item {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .row button,
  .sticker-admin-item button {
    width: 100%;
  }

  #sessionCountdown {
    width: 100%;
    text-align: left;
  }
}





