[hidden] {
  display: none !important;
}

.cwf-home {
  display: grid;
  gap: 28px;
}

.twilight-board {
  position: relative;
  background: #1d3236;
  background-image: radial-gradient(rgba(246, 243, 236, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
  border: 3px solid rgba(242, 185, 118, 0.36);
  border-radius: 22px;
  padding: 52px 24px 22px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.string-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 0 14px;
  pointer-events: none;
}

.string-lights::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(242, 185, 118, 0.25);
  border-radius: 2px;
}

.light-bulb {
  position: relative;
  width: 11px;
  height: 15px;
  margin-top: 8px;
  border-radius: 50% 50% 55% 55%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.35s ease;
}

.light-bulb::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 3px;
  width: 5px;
  height: 4px;
  background: #2f3b3e;
  border-radius: 1px;
}

.light-bulb.bulb-on {
  background: #f2b976;
  border-color: #fff2d6;
  box-shadow: 0 0 12px 3px rgba(242, 185, 118, 0.72);
  animation: cwf-twinkle 2.8s ease-in-out infinite;
}

.light-bulb.bulb-on:nth-child(3n) {
  background: #e26f4c;
  box-shadow: 0 0 12px 3px rgba(226, 111, 76, 0.72);
  animation-delay: 0.9s;
}

.light-bulb.bulb-on:nth-child(5n) {
  background: #fcf9f2;
  box-shadow: 0 0 11px 2px rgba(252, 249, 242, 0.65);
  animation-delay: 1.6s;
}

@keyframes cwf-twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(0.94); }
}

.board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.board-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f2b976;
  margin-bottom: 4px;
}

.board-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  color: #f6f3ec;
}

.board-sub {
  margin: 0;
  font-size: 14px;
  color: #9cb3b7;
}

.board-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #e26f4c;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(226, 111, 76, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.board-cta-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.pocket-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 14px;
  padding-top: 12px;
}

.pocket-slot {
  position: relative;
  height: 108px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  text-align: center;
  font-family: inherit;
  color: inherit;
  outline: none;
}

.pocket-slot:focus-visible .pocket-front {
  outline: 2px solid #f2b976;
  outline-offset: 2px;
}

.pocket-insert {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 8px;
  height: 54px;
  border-radius: 8px 8px 3px 3px;
  background: #fcf9f2;
  border: 1px solid rgba(27, 38, 41, 0.14);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 6px;
}

.pocket-insert.pattern-dots {
  background-color: #24465d;
  background-image: radial-gradient(#f2b976 1.6px, transparent 1.6px);
  background-size: 10px 10px;
}

.pocket-insert.pattern-stripes {
  background: repeating-linear-gradient(
    -45deg,
    #fcf9f2,
    #fcf9f2 6px,
    #e26f4c 6px,
    #e26f4c 12px
  );
}

.pocket-insert.pattern-polaroid {
  background: #fcf9f2;
}

.pocket-insert.pattern-polaroid::after {
  content: "";
  width: 74%;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(135deg, #2d5552, #e26f4c);
}

.pocket-tape {
  width: 22px;
  height: 7px;
  border-radius: 2px;
  background: rgba(252, 249, 242, 0.72);
  margin-bottom: 3px;
}

.pocket-slot:hover .pocket-insert,
.pocket-slot:focus-visible .pocket-insert {
  transform: translateY(-12px) rotate(-2.5deg);
}

.pocket-slot.is-opened .pocket-insert {
  transform: translateY(-14px) rotate(-5deg);
}

.pocket-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  border-radius: 6px 6px 14px 14px;
  background: #234643;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pocket-slot.tone-1 .pocket-front { background: #234643; }
.pocket-slot.tone-2 .pocket-front { background: #6b452d; }
.pocket-slot.tone-3 .pocket-front { background: #7d382f; }

.pocket-front::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px 3px 10px 10px;
  border: 1.5px dashed rgba(252, 249, 242, 0.34);
  pointer-events: none;
}

.pocket-slot:hover .pocket-front {
  transform: translateY(1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pocket-day {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #f6f3ec;
  line-height: 1;
}

.open-me-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: #e26f4c;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(226, 111, 76, 0.85);
}

.pocket-slot.is-open-me .pocket-front {
  box-shadow: 0 0 18px rgba(242, 185, 118, 0.42), 0 8px 18px rgba(0, 0, 0, 0.36);
}

.name-tag {
  position: relative;
  z-index: 3;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fcf9f2;
  color: #1b2629;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  transform: rotate(-2deg);
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pocket-slot:nth-child(even) .name-tag {
  transform: rotate(2deg);
}

.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 185, 118, 0.16);
}

.board-hint {
  font-size: 13px;
  color: #9cb3b7;
}

.bell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(242, 185, 118, 0.35);
  background: #152129;
  color: #9cb3b7;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bell-btn.is-on {
  background: #f2b976;
  color: #1b2629;
  border-color: #f2b976;
}

.create-card {
  background: #1d3236;
  border: 1px solid rgba(242, 185, 118, 0.26);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
}

.create-card-head {
  margin-bottom: 22px;
}

.create-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f2b976;
  margin-bottom: 6px;
}

.create-card-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  color: #f6f3ec;
}

.create-sub {
  margin: 0;
  font-size: 14px;
  color: #9cb3b7;
}

.create-form {
  display: grid;
  gap: 18px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field label,
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #f6f3ec;
}

.field input[type="text"],
.field input[type="month"],
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(242, 185, 118, 0.28);
  background: #152129;
  color: #f6f3ec;
  font-size: 15px;
  font-family: inherit;
}

.month-select-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
}

.field input:focus,
.field select:focus {
  outline: 2px solid #f2b976;
  outline-offset: 1px;
}

.text-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: #f2b976;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-pill {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(242, 185, 118, 0.28);
  background: #152129;
  color: #9cb3b7;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-pill.is-active {
  background: #234643;
  color: #f6f3ec;
  border-color: #f2b976;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.theme-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid rgba(242, 185, 118, 0.25);
  background: #152129;
  color: #f6f3ec;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.theme-chip.is-active {
  border-color: #e26f4c;
  background: rgba(226, 111, 76, 0.16);
  box-shadow: 0 0 0 1px #e26f4c;
}

.swatch {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.swatch-twilight { background: linear-gradient(135deg, #234643, #e26f4c); }
.swatch-starlit { background: linear-gradient(135deg, #1e2845, #f5cf76); }
.swatch-cafe { background: linear-gradient(135deg, #6b452d, #fcf9f2); }
.swatch-coast { background: linear-gradient(135deg, #24465d, #79b7c4); }

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(226, 111, 76, 0.18);
  border: 1px solid #e26f4c;
  color: #ffd7cb;
  font-size: 14px;
}

.create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 12px;
  border: none;
  background: #e26f4c;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.code-shortcut {
  margin: 0;
  font-size: 14px;
  color: #9cb3b7;
}

.code-shortcut a {
  color: #f2b976;
  font-weight: 600;
}

.cwf-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cwf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 22, 0.76);
  backdrop-filter: blur(4px);
}

.cwf-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fcf9f2;
  color: #1b2629;
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}

.paper-note {
  background-image: linear-gradient(to bottom, transparent 27px, rgba(85, 102, 106, 0.12) 28px);
  background-size: 100% 28px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(27, 38, 41, 0.08);
  color: #1b2629;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.paper-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e26f4c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cwf-modal-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 22px;
  color: #1b2629;
}

.paper-body {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #364549;
}

.paper-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #55666a;
  margin-bottom: 18px;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .pocket-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .theme-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .twilight-board {
    padding: 46px 14px 18px;
  }
  .pocket-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 10px;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .create-card {
    padding: 20px 16px;
  }
  .btn-primary {
    width: 100%;
  }
}