/* K&J Talk web client — couples style, same as the Android app:
   warm cream background, neon pink / blue pill buttons, big touch targets. */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #FDE2B9;
  color: #3a2a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

/* Header */
.header {
  position: relative;
  text-align: center;
  padding: 12px 0 4px;
}
.title-img {
  max-width: 320px;
  width: 78%;
  height: auto;
}
.icon-btn {
  position: absolute;
  top: 14px;
  right: 0;
  background: #fff;
  border: 2px solid #FF1493;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Screens */
.screen { flex: 1; display: flex; flex-direction: column; }
h1 { font-size: 26px; line-height: 1.25; margin: 18px 0 8px; text-align: center; }
.hint { font-size: 17px; line-height: 1.45; text-align: center; margin: 6px 0; }
.ar { direction: rtl; font-size: 17px; }
.error { color: #c00; font-weight: 700; text-align: center; font-size: 17px; }

/* Pairing */
#codeInput {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 22px auto 14px;
  padding: 16px;
  font-size: 28px;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  border: 3px solid #FF1493;
  border-radius: 16px;
  background: #fff;
  color: #3a2a1a;
}
#codeInput:focus { outline: 3px solid #1E90FF; outline-offset: 2px; }

/* Buttons */
.btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 10px auto;
  padding: 16px 20px;
  font-size: 22px;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
}
.btn-pink { background: #FF1493; }
.btn-blue { background: #1E90FF; }
.btn-small { max-width: 220px; font-size: 18px; padding: 12px 16px; }
.btn:disabled { opacity: 0.55; cursor: default; }

/* Home-screen hint + no-push note */
.homescreen-hint {
  margin: 26px auto 0;
  max-width: 420px;
  background: #fff;
  border: 2px solid #1E90FF;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.45;
}
.homescreen-hint p { margin: 6px 0; }
.nopush {
  margin: 18px auto 0;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.45;
  color: #6b543a;
  text-align: center;
}

/* Thread */
.paired-bar {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #0a7d2c;
  padding: 6px 0 10px;
}
.notes {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 4px 2px 12px;
}
.empty-state { text-align: center; font-size: 18px; color: #6b543a; margin: auto 0; }
.empty-state p { margin: 8px 0; }

.note {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #e8c98f;
  cursor: pointer;
  text-align: left;
  font-size: 17px;
  line-height: 1.4;
  color: #3a2a1a;
  font-family: inherit;
}
.note.mine { align-self: flex-end; background: #ffe0f0; border-color: #FF1493; }
.note.theirs { align-self: flex-start; background: #e6f2ff; border-color: #1E90FF; }
.note .orig { font-weight: 700; }
.note .trans { margin-top: 4px; }
.note .trans.arabic { direction: rtl; text-align: right; }
.note .meta {
  margin-top: 8px;
  font-size: 13px;
  color: #6b543a;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.note .play-state { font-weight: 700; color: #FF1493; }
.note .translating { font-style: italic; color: #6b543a; }
.note.playing { outline: 3px solid #FF1493; outline-offset: 1px; }

/* Status line */
.status-line {
  min-height: 24px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #3a2a1a;
  padding: 4px 0;
}
.status-line.error { color: #c00; }

/* Record */
.record-area { text-align: center; padding: 8px 0 4px; }
.countdown {
  font-size: 26px;
  font-weight: 700;
  color: #c00;
  margin-bottom: 8px;
}
.record-btn {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #FF1493;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.record-btn .rec-label-en { font-size: 22px; font-weight: 800; line-height: 1.15; }
.record-btn .rec-label-ar { font-size: 19px; direction: rtl; }
.record-btn.recording {
  background: #c00;
  transform: scale(0.94);
}
.rec-hint { font-size: 15px; color: #6b543a; margin: 10px 0 0; line-height: 1.4; }

/* Settings panel */
.settings-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(92vw, 420px);
  background: #fff;
  border: 3px solid #FF1493;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  z-index: 10;
}
.settings-note { font-size: 15px; line-height: 1.45; color: #6b543a; text-align: center; }
.settings-panel .nopush { margin-top: 10px; }
