/* NetworKING Engine Web — mobile-first styles */

:root {
  --bg: #111111;
  --surface: #1a1a1a;
  --surface2: #222222;
  --yellow: #D1D827;
  --blue: #3948C0;
  --text: #f0f0f0;
  --muted: #999;
  --green: #3d9a5f;
  --danger: #e05c5c;
  --radius: 12px;
  --tap: 48px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--yellow);
  text-decoration: none;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.logo span {
  color: var(--yellow);
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav a {
  font-size: 0.9rem;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 2rem 1rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin: 0;
}

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

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: var(--bg);
}

.btn-primary {
  background: var(--yellow);
}

.btn-secondary {
  background: var(--blue);
  color: #fff;
}

.btn-text {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  min-height: var(--tap);
  padding: 0.5rem;
}

.btn-block {
  display: flex;
  width: 100%;
  margin: 1rem 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.inline-form {
  display: inline;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

fieldset {
  border: 1px solid #333;
  border-radius: 8px;
  margin: 1rem 0;
  padding: 0.75rem;
}

legend {
  color: var(--yellow);
  padding: 0 0.25rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  min-height: var(--tap);
  cursor: pointer;
}

.checkbox-row input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--yellow);
}

.moment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.moment-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  border-left: 4px solid var(--blue);
  color: var(--text);
}

.moment-card:active {
  background: var(--surface2);
}

.moment-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-yellow {
  background: var(--yellow);
  color: var(--bg);
}

.chip-blue {
  background: var(--blue);
  color: #fff;
}

.chip-green {
  background: var(--green);
  color: #fff;
}

.chip-progress {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: none;
  margin-top: 2px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.thumb {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  background: var(--surface2);
  aspect-ratio: 1;
  object-fit: cover;
}

.status-box {
  background: var(--surface2);
  border-radius: 8px;
  padding: 0.75rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.status-box.error {
  border-left: 4px solid var(--danger);
  color: #ffb3b3;
}

.status-box.success {
  border-left: 4px solid var(--green);
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 0;
}

.login-box {
  max-width: 360px;
  margin: 3rem auto;
  text-align: center;
}

.login-box h1 {
  color: var(--yellow);
}

.subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.error {
  color: var(--danger);
  margin-bottom: 1rem;
}

.output-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.output-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  border-left: 4px solid var(--blue);
}

.output-card.is-copied {
  border-left-color: var(--yellow);
}

.output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.output-text {
  width: 100%;
  font-size: 0.85rem;
  line-height: 1.45;
}

.copy-btn {
  min-width: 120px;
}

.improve-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

.improve-hint {
  margin: 0.25rem 0 0.5rem;
}

.improve-notes {
  min-height: 100px;
}

.voice-btn.is-recording {
  background: var(--danger);
  color: #fff;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}

.marker {
  font-size: 1.1rem;
}

.checklist-section {
  color: var(--yellow);
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
}

.checklist-item {
  background: var(--surface);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.week-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.week-picker label {
  margin: 0;
}

.week-picker select {
  width: auto;
  min-width: 140px;
}

@media (min-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .container {
    padding: 1.5rem;
  }
}
