* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #111;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
}

.wordmark {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #bbb;
  text-transform: uppercase;
  text-decoration: none;
}

.menu-btn {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  line-height: 1;
}

.menu-btn:hover {
  color: #111;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 32px 64px;
}

.content.top {
  justify-content: flex-start;
  padding-top: 48px;
}

.date-heading {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 6px;
}

.date-sub {
  font-size: 13px;
  color: #bbb;
  text-align: center;
  margin-bottom: 48px;
}

.writing-area {
  width: 100%;
  max-width: 480px;
}

textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #111;
  resize: none;
  outline: none;
  text-align: center;
  min-height: 120px;
  background: transparent;
}

textarea::placeholder {
  color: #bbb;
}

.text-link {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #111;
  border-bottom: 1.5px solid #111;
  padding-bottom: 3px;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

.text-link:hover {
  opacity: 0.6;
}

.text-link.muted {
  color: #bbb;
  border-bottom-color: #bbb;
}

.label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #bbb;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.status-primary {
  font-size: 16px;
  color: #111;
  text-align: center;
}

.status-secondary {
  font-size: 14px;
  color: #bbb;
  text-align: center;
  margin-top: 10px;
}

.entry-block {
  text-align: center;
  max-width: 480px;
  width: 100%;
  margin-bottom: 28px;
}

.entry-text {
  font-size: 14px;
  color: #111;
  line-height: 1.8;
  white-space: pre-wrap;
}

.divider {
  width: 40px;
  border-top: 1px solid #e0e0e0;
  margin: 0 auto 28px;
}

.reward-block {
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.reward-text {
  font-size: 15px;
  color: #111;
  line-height: 1.8;
  white-space: pre-wrap;
}

.reward-text.italic {
  font-style: italic;
}

.reward-attr {
  font-size: 12px;
  color: #bbb;
  margin-top: 6px;
}

.login-form {
  text-align: center;
  width: 100%;
  max-width: 280px;
}

.login-form input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  padding: 8px 0;
  outline: none;
  text-align: center;
  color: #111;
  background: transparent;
  margin-bottom: 20px;
}

.login-form input::placeholder {
  color: #bbb;
}

.login-error {
  font-size: 13px;
  color: #c00;
  margin-bottom: 16px;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.menu-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.menu-link {
  font-size: 20px;
  color: #111;
  text-decoration: none;
  cursor: pointer;
}

.menu-link:hover {
  opacity: 0.6;
}

.calendar {
  width: 100%;
  max-width: 320px;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-nav h2 {
  font-size: 18px;
  font-weight: bold;
}

.calendar-nav button {
  font-size: 14px;
  color: #bbb;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 4px 8px;
}

.calendar-nav button:hover {
  color: #111;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-grid .day-header {
  font-size: 10px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 0;
}

.calendar-grid .day {
  padding: 6px 0;
  font-size: 13px;
  color: #bbb;
  position: relative;
}

.calendar-grid .day.both {
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  cursor: pointer;
}

.calendar-grid .day.both:hover {
  background: #333;
}

.calendar-grid .day.you-only {
  color: #111;
  border-bottom: 1.5px solid #111;
}

.calendar-grid .day.them-only {
  color: #111;
  border-bottom: 1.5px solid #bbb;
  font-style: italic;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
  font-size: 11px;
  color: #bbb;
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  background: #111;
  border-radius: 50%;
  display: inline-block;
}

.legend-line-solid {
  width: 12px;
  border-bottom: 1.5px solid #111;
  display: inline-block;
}

.legend-line-light {
  width: 12px;
  border-bottom: 1.5px solid #bbb;
  display: inline-block;
}

.collection {
  width: 100%;
  max-width: 480px;
}

.collection-heading {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 6px;
}

.collection-count {
  font-size: 13px;
  color: #bbb;
  text-align: center;
  margin-bottom: 40px;
}

.collection-item {
  text-align: left;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.collection-item:last-child {
  border-bottom: none;
}

.collection-date {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #bbb;
  text-transform: uppercase;
  margin-bottom: 6px;
  cursor: pointer;
}

.collection-date:hover {
  color: #111;
}

.error-msg {
  font-size: 13px;
  color: #c00;
  text-align: center;
  margin-top: 16px;
}

.back-link {
  margin-bottom: 32px;
}

/* Admin panel */
.admin-panel {
  width: 100%;
  max-width: 560px;
}

.admin-heading {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 6px;
}

.admin-sub {
  font-size: 13px;
  color: #bbb;
  text-align: center;
  margin-bottom: 40px;
}

/* Add reward form */
.admin-form {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f0f0f0;
}

.admin-form .label {
  margin-bottom: 12px;
}

.admin-form select {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  padding: 8px 0;
  outline: none;
  color: #111;
  background: transparent;
  margin-bottom: 20px;
  -webkit-appearance: none;
}

.admin-form input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  padding: 8px 0;
  outline: none;
  color: #111;
  background: transparent;
  margin-bottom: 20px;
}

.admin-form input::placeholder,
.admin-form select::placeholder {
  color: #bbb;
}

/* Rich text toolbar */
.rte-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.rte-toolbar button {
  background: none;
  border: 1px solid #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 4px 10px;
  cursor: pointer;
  color: #111;
  border-radius: 3px;
}

.rte-toolbar button:hover {
  background: #f5f5f5;
}

.rte-editor {
  width: 100%;
  min-height: 80px;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #111;
  outline: none;
  padding: 8px 0;
  margin-bottom: 20px;
}

.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: #bbb;
}

/* Rewards inventory */
.reward-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.reward-item:last-child {
  border-bottom: none;
}

.reward-type-tag {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  background: #f5f5f5;
  padding: 3px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.reward-item-body {
  flex: 1;
  min-width: 0;
}

.reward-item-text {
  font-size: 13px;
  color: #111;
  line-height: 1.6;
  margin-bottom: 4px;
}

.reward-item-meta {
  font-size: 11px;
  color: #bbb;
}

.reward-item-status {
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.reward-item-status.used {
  color: #999;
}

.reward-item-status.available {
  color: #4a4;
}

.reward-delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.reward-delete-btn:hover {
  color: #c00;
}

.inventory-section {
  margin-top: 8px;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

/* Image grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.image-item {
  text-align: center;
}

.image-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
}

.image-item-name {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
  word-break: break-all;
}
