@font-face {
  font-family: "HeliosExtC";
  src: url("./HeliosExtC.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg: #fafafa;
  --card: #ffffff;
  --text: #111111;
  --muted: #666666;
  --line: #e7e7e7;

  --radius: 14px;

  /* Story dot colors (same principle as planner dashboard story mini cal) */
  --story-future-bg: #e7f6ed;
  --story-future-border: #bfe7cc;

  --story-today-bg: #fff1e2;
  --story-today-border: #ffd6ad;

  --story-past-bg: #e9e9e9;
  --story-past-border: #d8d8d8;

  /* Feed dots = darker shade of story colors */
  --feed-future-bg: #1f7a3a;
  --feed-future-border: #1a6a31;

  --feed-today-bg: #a45700;
  --feed-today-border: #8f4b00;

  --feed-past-bg: #9b9b9b;
  --feed-past-border: #8a8a8a;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

button, input, textarea{
  font: inherit;
}

.app{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* =========================
   Header (full width)
========================= */
.mobileCalHeader{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;

  min-height: 60px;
  padding: 10px 12px;
}

.mobileCalHeader__left{
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.mobileCalHeader__right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mobileCalHeader__title{
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.btn{
  border: 1px solid var(--line);
  background: #fff;
  color: #111;
  border-radius: 10px;
  cursor: pointer;
  min-height: 36px;
}

.btn--icon{
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.btn--today{
  padding: 0 12px;
  font-size: 12px;
  min-height: 36px;
}

/* =========================
   Calendar
========================= */
.mobileCal{
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  Margin: 15px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.mobileCal__dow{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  padding: 6px 0 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.mobileCal__dowCell{
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0 8px;
}

.mobileCal__grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0;
  min-height: 0;

  background: #fff;
}

/* Remove right border on Sunday cells (7th column) */
.mobileCalDay:nth-child(7n){
  border-right: 0px solid black;
}

/* Remove bottom border on last calendar row (last 7 cells) */
.mobileCalDay:nth-last-child(-n + 7){
  border-bottom: 0px solid black;
}

/* Date cell */
.mobileCalDay{
  border: 0px solid black;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  border-radius: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.mobileCalDay:hover,
.mobileCalDay:active{
  background: #fcfcfc;
}

.mobileCalDay.is-muted{
  background: #fcfcfc;
}

.mobileCalDay.is-muted .mobileCalDay__dateBlock{
  background: #ffffff;
  color: #aaaaaa;
  border-bottom-color: #efefef;
}

.mobileCalDay.is-todayActive{
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 1px #999999;
}

.mobileCalDay.is-todayActive .mobileCalDay__dateBlock{
  box-shadow: inset 0 0 0 1px #999999;
}

/* Date title block (like planner) */
.mobileCalDay__dateBlock{
  display: flex;
  align-items: center;
  justify-content: flex-end;

  width: 100%;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;

  background: #fbfbfb;
  color: #111;
  border-bottom: 1px solid #efefef;
  padding: 5px 7px;
  position: relative;
  z-index: 1;
}

.mobileCalDay__body{
  flex: 1 1 auto;
  min-height: 0;
  padding: 6px 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
}

/* Feed row: max 1 dot */
.mobileCalDay__feedRow{
  min-height: 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Story row: multiple dots */
.mobileCalDay__storyRow{
  min-height: 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* Base dot */
.mobileDot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: 0 0 auto;
}

/* Feed dots (darker) */
.mobileDot--feed.is-future{
  background: var(--feed-future-bg);
  border-color: var(--feed-future-border);
}
.mobileDot--feed.is-today{
  background: var(--feed-today-bg);
  border-color: var(--feed-today-border);
}
.mobileDot--feed.is-past{
  background: var(--feed-past-bg);
  border-color: var(--feed-past-border);
}

/* Story dots (lighter) */
.mobileDot--story.is-future{
  background: var(--story-future-bg);
  border-color: var(--story-future-border);
}
.mobileDot--story.is-today{
  background: var(--story-today-bg);
  border-color: var(--story-today-border);
}
.mobileDot--story.is-past{
  background: var(--story-past-bg);
  border-color: var(--story-past-border);
}

/* =========================
   Popup (Phase 1 skeleton)
========================= */
.datePopupOverlay{
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.35);
  display: none;
  place-items: end center;
  padding: 0;
}

.datePopupOverlay[hidden]{
  display: none !important;
}

.datePopupOverlay.is-open{
  display: grid;
}

.datePopup{
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: auto;
  background: #fff;
}

.datePopup__top{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  padding-right: 8px;
}

.datePopup__title{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.datePopup__close{
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #111;
}

.datePopup__body{
  padding: 12px;
  display: grid;
  gap: 12px;
}

.blockTitle{
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px 6px;
  background: #111111;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-align: center;
  margin-top: 12px;
}

.blockTitle:first-child{
  margin-top: 0;
}

.popupPlaceholder{
  border: 0;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
}

/* =========================
   Popup (Phase 2 components)
========================= */
.datePopupSection{
  margin-top: 12px;
}

.datePopupSection:first-child{
  margin-top: 0;
}

.datePopupSection .blockTitle{
  margin-top: 0;
}

.popupCarousel{
  border: 0;
  background: #fff;
  overflow: hidden;
}

.popupCarousel__mediaWrap{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #f6f6f6;
  overflow: hidden;
}

.popupCarousel__media{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f6f6f6;
}

video.popupCarousel__media{
  object-fit: contain;
  background: #111;
}

.popupCarousel__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
}

.popupCarousel__nav--prev{
  left: 8px;
}

.popupCarousel__nav--next{
  right: 8px;
}

.popupCarousel__nav:disabled{
  opacity: 0.45;
  cursor: default;
}

.popupCarousel__footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid #efefef;
}

.popupCarousel__count{
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.popupCarousel__dots{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.popupCarousel__dot{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d5d5d5;
  border: 0;
  padding: 0;
}

.popupCarousel__dot.is-active{
  background: #111;
}

.popupActionBtn{
  width: 100%;
  margin-bottom: 15px;
  border: 1px solid #f6f6f6;
  background: #f6f6f6;
  color: #000;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
    border-radius: 6px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.popupActionBtn:hover{
  background: #000;
  border-color: #000;
Color: #fff;
}

.popupActionBtn:active{
  background: #ebebe7;
  border-color: #cccccc;
  box-shadow: none;
  transform: none;
}

.popupActionBtn:focus-visible{
  outline: none;
  border-color: rgba(17,17,17,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.65),
    0 0 0 2px rgba(17,17,17,0.04);
}

.copyField{
  border: 0;
  background: #fff;
}

.copyField.is-copied{
  border-color: #000;
}

.copyField + .copyField{
  border-top: 0;
}

.copyField__label{
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e9e9e9;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
  color: #111111;
  font-family: "HeliosExtC", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
}

.copyField.is-copied .copyField__label,
.copyField:has(.copyField__textarea.is-copied) .copyField__label{
  border-color: #000;
  border-bottom-color: #000;
}

.copyField__textarea{
  border: 1px solid #e9e9e9;
  border-top: 0;
  display: block;
  width: 100%;
  min-height: 88px;
  resize: none;
  outline: 0;
  padding: 10px;
  background: #fff;
  color: #111;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 0;
  cursor: copy;
  margin-bottom: 15px;
}

.copyField__textarea:focus{
  outline: none;
}

.copyField__textarea.is-copied{
  box-shadow: none;
  border-color: #000;
}

.copyField--hashtags .copyField__textarea{
  min-height: 72px;
}

.copyField--sticker .copyField__textarea{
  min-height: 56px;
}

.popupEmpty{
  border: 0;
  background: #fff;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
}

.copyToast{
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  z-index: 1100;
  background: rgba(17,17,17,0.95);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.copyToast.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}



/* Slightly taller cells on wider phones */
@media (min-width: 390px){
  .mobileCalDay{
    min-height: 102px;
  }
}

/* Desktop layout overrides (keep current styles as mobile defaults) */
@media (min-width: 1024px){
  .app{
    align-items: center;
  }

  .mobileCalHeader{
    width: 100%;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
margin-left: 0px;
margin-right: 0px;
  }

  .mobileCal{
    width: 1000px;
    margin: 15px auto;
  }

  .datePopup{
    width: 600px;
    max-width: calc(100vw - 24px);
    max-height: min(92dvh, 920px);
    border-radius: 18px;
    border-bottom: 1px solid var(--line);
    margin: 0;
    align-self: center;
    justify-self: center;
  box-shadow: 0 -8px 24px rgba(17,17,17,0.08);
  }

  .datePopupOverlay{
    padding: 12px;
    display: none;
    align-items: center;
    justify-content: center;
  }

  .datePopupOverlay.is-open{
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .datePopupOverlay[hidden]{
    display: none !important;
  }
}
