@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Gujarati:wght@400;600;700&display=swap');

/* Legacy font used for ALL poster text (see js/poster.js + js/akruti.js,
   which re-encode Unicode Gujarati into this font's byte-mapped glyphs).
   Two real weights are registered under the same family name so the browser
   picks the correct face for "normal" vs "bold" the same way it would for
   any ordinary font — poster.js always draws bold, using the genuine Bold
   face below (not a browser-synthesized fake bold, which produced an
   inconsistent outline/fringe artifact on some rendering engines). */
@font-face {
  font-family: 'AkrutiGujGayatri';
  src: url('../fonts/AkrutiGujGayatri.ttf') format('truetype');
  font-weight: normal;
  font-display: block;
}
@font-face {
  font-family: 'AkrutiGujGayatri';
  src: url('../fonts/AkrutiGujGayatriBold.ttf') format('truetype');
  font-weight: bold;
  font-display: block;
}

:root {
  --brand-red: #a02b2d;
  --brand-gold: #c9a227;
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2a2a2a;
  --muted: #767676;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans Gujarati', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header.topbar {
  background: var(--brand-red);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

header.topbar h1 {
  font-size: 18px;
  margin: 0;
}

main {
  padding: 16px;
  max-width: 720px;
  margin: 0 auto 80px auto;
}

nav.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0d8cc;
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  z-index: 10;
}

nav.tabbar button {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  position: relative;
}

/* Small count bubble on the Reminders tab when something is due today. */
.badge {
  position: absolute;
  top: 0;
  right: 6px;
  background: #d81e1e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

nav.tabbar button.active {
  color: var(--brand-red);
  font-weight: 700;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}

.row { display: flex; gap: 10px; }
.row > .field { flex: 1; }

button.primary {
  background: var(--brand-red);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.color-swatches { display: flex; gap: 10px; margin-bottom: 6px; }
.color-swatches .swatch {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 2px #d8d8d8;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.color-swatches .swatch.selected {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #1a7a3a;
  transform: scale(1.12);
}
.color-swatches .swatch.selected::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
  text-shadow: 0 0 3px rgba(0,0,0,0.65);
}
.selected-color-label {
  font-size: 13px; font-weight: 600; color: #1a7a3a;
  margin-bottom: 14px;
}

#posterCanvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
}

.screen { display: none; }
.screen.active { display: block; }

.hint { font-size: 12px; color: var(--muted); margin-top: -8px; margin-bottom: 12px; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 8px; border-bottom: 1px solid #eee; }
