* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  background: #0a0a0a;
  color: #f5f5f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-weight: 300;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}
#app { width: 100%; max-width: 720px; padding: 20px; }
.screen { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hidden { display: none !important; }

/* ONBOARDING */
.tagline {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -0.3px;
  opacity: 0.95;
}
.sub {
  font-size: 14px;
  opacity: 0.5;
  text-align: center;
  margin-top: 8px;
}
#categories {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #161616;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.cat-item:active { background: #1f1f1f; transform: scale(0.98); }
.cat-emoji { font-size: 26px; }
.cat-label { font-size: 17px; opacity: 0.92; }

/* MAIN */
.ticker {
  font-size: 15px;
  opacity: 0.55;
  letter-spacing: 0.2px;
}
.karma-button {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 30%, #f5f5f0, #d4d4cc);
  color: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 0 80px rgba(245,245,240,0.12), inset 0 -8px 24px rgba(0,0,0,0.08);
  transition: transform 0.1s, box-shadow 0.2s;
}
.karma-button:active {
  transform: scale(0.96);
  box-shadow: 0 0 40px rgba(245,245,240,0.08);
}
.btn-amount {
  font-size: 56px;
  font-weight: 200;
  letter-spacing: -2px;
}
.btn-label {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  opacity: 0.6;
}
.settings-link {
  font-size: 13px;
  opacity: 0.35;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.settings-link:active { opacity: 0.7; }

/* CONFIRMATION */
.check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #f5f5f0;
}
.confirmation h2 {
  font-size: 24px;
  font-weight: 300;
}
.confirm-line {
  font-size: 17px;
  opacity: 0.7;
  text-align: center;
  font-style: italic;
}
.back-btn {
  margin-top: 20px;
  padding: 14px 32px;
  background: transparent;
  color: #f5f5f0;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.back-btn:active { background: #161616; }

/* CONFESSION + FEED */
.confess-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
#confess-text {
  width: 100%;
  min-height: 70px;
  padding: 14px 16px;
  background: #161616;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  color: #f5f5f0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  resize: none;
  outline: none;
}
#confess-text::placeholder { color: #555; }
#confess-text:focus { border-color: #2a2a2a; }
.confess-btn {
  align-self: flex-end;
  padding: 10px 18px;
  background: #1a1a1a;
  color: #f5f5f0;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.confess-btn:active:not(:disabled) { background: #222; }
.confess-btn:disabled { opacity: 0.4; cursor: default; }
.confess-status {
  font-size: 12px;
  opacity: 0.5;
  text-align: right;
  font-style: italic;
  min-height: 14px;
}

.feed-title {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.3px;
  opacity: 0.95;
}
#feed-list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px 2px;
}
#feed-list::-webkit-scrollbar { width: 4px; }
#feed-list::-webkit-scrollbar-thumb { background: #1f1f1f; border-radius: 4px; }
.feed-item {
  padding: 14px 16px;
  background: #161616;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
}
.feed-text {
  font-size: 15px;
  opacity: 0.92;
  line-height: 1.4;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.feed-meta {
  font-size: 12px;
  opacity: 0.45;
  letter-spacing: 0.2px;
}
.feed-empty, .feed-loading {
  opacity: 0.5;
  text-align: center;
  font-style: italic;
  font-size: 14px;
  padding: 20px;
}


/* SPLIT LANDING: feed left, button right */
.screen.split {
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  min-height: 90vh;
}
.col-feed {
  flex: 1.2 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.col-button {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

/* Smaller button for split layout */
.screen.split .karma-button {
  width: 150px;
  height: 150px;
}
.screen.split .btn-amount { font-size: 36px; letter-spacing: -1.5px; }
.screen.split .btn-label { font-size: 11px; }

/* Feed fills its column */
.screen.split #feed-list {
  max-height: none;
  flex: 1;
}

.confess-generic {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #f5f5f0;
  opacity: 0.4;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: -2px;
}
.confess-generic:active { opacity: 0.7; }

/* SIN ENTRY on main */
#sin-text {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  background: #161616;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  color: #f5f5f0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  resize: none;
  outline: none;
}
#sin-text::placeholder { color: #555; }
#sin-text:focus { border-color: #2a2a2a; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: 0.55;
  cursor: pointer;
  user-select: none;
  width: 100%;
}
.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #333;
  border-radius: 3px;
  background: #161616;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.check-row input[type="checkbox"]:checked {
  background: #f5f5f0;
  border-color: #f5f5f0;
}
.check-row input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #0a0a0a;
  font-weight: bold;
}

.sin-status {
  font-size: 12px;
  opacity: 0.6;
  font-style: italic;
  min-height: 14px;
  text-align: center;
}

.privacy-note {
  font-size: 11px;
  opacity: 0.35;
  text-align: center;
  letter-spacing: 0.3px;
  margin-top: 12px;
  line-height: 1.4;
}
.privacy-note.small {
  font-size: 10px;
  margin-top: 6px;
}
