/* === Advent with Friends Tactile Holiday Calendar Tool === */
.awf-app [hidden],
.awf-modal-backdrop[hidden] {
  display: none !important;
}

.awf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
}

/* Redesigned Festive Quick-Create Card */
.awf-create-card {
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--text);
  overflow: hidden;
}

.awf-card-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 22px;
  background: #fdecc8;
  border-bottom: 2px solid var(--text);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.awf-card-ribbon-tag {
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1.5px solid var(--text);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}

.awf-card-body {
  padding: 22px;
}

.awf-pill-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 14px;
  margin-bottom: 18px;
}

.awf-pill-opt {
  min-height: 40px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.awf-pill-opt[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  border-color: var(--text);
  box-shadow: 2px 2px 0 var(--text);
}

.awf-tfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.awf-tfield input,
.awf-tfield select,
.awf-tfield textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--text);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
}

.awf-tfield input::placeholder,
.awf-tfield textarea::placeholder {
  color: #8a929e;
}

.awf-swatch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.awf-swatch-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.awf-swatch-hint {
  font-size: 12px;
  color: var(--muted);
}

.awf-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.awf-swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.awf-swatch:hover {
  transform: translateY(-2px);
  border-color: var(--text);
}

.awf-swatch[aria-pressed="true"] {
  border-color: var(--text);
  background: #fdecc8;
  box-shadow: 3px 3px 0 var(--text);
}

.awf-swatch[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: -7px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: 1.5px solid var(--text);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.awf-swatch-mini {
  width: 42px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  border: 2px solid var(--text);
}

.awf-swatch-mini i {
  display: block;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.38);
}

.awf-swatch-mini[data-sw="pine"] { background: #19452d; }
.awf-swatch-mini[data-sw="pine"] i:first-child { background: #e5a928; }
.awf-swatch-mini[data-sw="berry"] { background: #8f1d32; }
.awf-swatch-mini[data-sw="berry"] i:first-child { background: #f5d47a; }
.awf-swatch-mini[data-sw="frost"] { background: #1c4263; }
.awf-swatch-mini[data-sw="frost"] i:first-child { background: #cbe6f9; }
.awf-swatch-mini[data-sw="cocoa"] { background: #52311f; }
.awf-swatch-mini[data-sw="cocoa"] i:first-child { background: #f0bc47; }

.awf-unlock-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.awf-unlock-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.awf-cta-full {
  width: 100%;
  font-size: 17px;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--text);
}

.awf-cta-meta {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.awf-card-footer {
  padding: 14px 22px 18px;
  background: var(--bg);
  border-top: 1.5px solid var(--border);
}

.awf-card-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.awf-demo-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--text);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.awf-demo-pill-btn:hover {
  background: #fdecc8;
}

.awf-foot-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.awf-code-lookup {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.awf-code-lookup input {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px solid var(--text);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

/* Framed 24-Door Holiday Board */
.awf-board-wrap {
  position: relative;
  padding-top: 20px;
}

.awf-bow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  border-radius: var(--radius);
  background: #c4233b;
  color: #ffffff;
  border: 2px solid var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 2px 2px 0 var(--text);
}

.awf-wood-frame {
  border-radius: 18px;
  padding: 12px;
  background: #8b5a34;
  border: 2.5px solid var(--text);
  box-shadow: 6px 6px 0 var(--text);
}

.awf-board-inner {
  border-radius: 12px;
  padding: 20px 16px 16px;
  color: #ffffff;
  transition: background-color 0.2s ease;
}

.awf-board-inner[data-theme="pine"] { background: #19452d; }
.awf-board-inner[data-theme="berry"] { background: #851d30; }
.awf-board-inner[data-theme="frost"] { background: #1c4263; }
.awf-board-inner[data-theme="cocoa"] { background: #52311f; }

.awf-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.awf-board-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  color: #ffffff;
}

.awf-board-sub {
  margin: 0;
  font-size: 12px;
  color: #f3ede2;
}

.awf-doors-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.awf-door {
  position: relative;
  min-height: 70px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-top: 3px solid rgba(255, 255, 255, 0.78);
  background-color: rgba(255, 255, 255, 0.1);
  background-image: linear-gradient(90deg, transparent 46%, rgba(255, 224, 140, 0.2) 46%, rgba(255, 224, 140, 0.2) 54%, transparent 54%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.awf-door:hover {
  transform: translateY(-2px);
  border-color: #f5d47a;
}

.awf-door.gift-c0 { background-color: #b5243b; }
.awf-door.gift-c1 { background-color: #216640; }
.awf-door.gift-c2 { background-color: #255a8a; }
.awf-door.gift-c3 { background-color: #9e671c; }
.awf-door.gift-c4 { background-color: #6b2d54; }

.awf-door.is-empty-slot {
  border-style: dashed;
  border-top-style: dashed;
  background-image: none;
  background-color: rgba(255, 255, 255, 0.08);
}

.awf-door.is-filled {
  border-style: solid;
  border-color: #f5d47a;
}

.awf-door.wrap-gold {
  background-color: #8f6415;
  border-color: #f5d47a;
}

.awf-door.wrap-frosted {
  background-color: #265980;
  border-color: #cbe6f9;
}

.awf-door.wrap-plaid {
  background-color: #8f1d32;
  border-color: #f5d47a;
}

.awf-door.is-opened {
  background-color: #fffdf7;
  background-image: none;
  color: var(--text);
  border: 2px solid var(--accent);
}

.awf-door.is-today {
  border: 2.5px solid #f5d47a;
  box-shadow: 0 0 0 3px rgba(245, 212, 122, 0.48);
}

.awf-today-tag {
  position: absolute;
  top: -9px;
  right: -5px;
  background: #f5d47a;
  color: #1c2430;
  border: 1.5px solid #1c2430;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.awf-door-num {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
}

.awf-door-label {
  font-size: 11px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* Dashboard Banner with Snowfall */
.awf-dash-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px;
  color: #ffffff;
  margin-bottom: 20px;
  border: 2.5px solid var(--text);
  box-shadow: 5px 5px 0 var(--text);
}

.awf-dash-banner[data-theme="pine"] { background: #19452d; }
.awf-dash-banner[data-theme="berry"] { background: #851d30; }
.awf-dash-banner[data-theme="frost"] { background: #1c4263; }
.awf-dash-banner[data-theme="cocoa"] { background: #52311f; }

.awf-snow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 15% 20%, rgba(255,255,255,0.6) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 45% 60%, rgba(255,255,255,0.5) 50%, transparent 100%),
    radial-gradient(2px 2px at 78% 30%, rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(3px 3px at 88% 75%, rgba(255,255,255,0.45) 50%, transparent 100%);
  background-size: 240px 180px;
  animation: awfSnowDrift 10s linear infinite;
}

@keyframes awfSnowDrift {
  from { background-position: 0 0; }
  to { background-position: 40px 180px; }
}

.awf-dash-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.awf-dash-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.2;
  color: #ffffff;
}

.awf-dash-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.awf-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.awf-countdown-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius);
  background: #fdecc8;
  border: 1.5px solid var(--text);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.awf-bulb-string {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  align-items: center;
}

.awf-bulb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.awf-bulb.is-lit {
  background: #f5d47a;
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(245, 212, 122, 0.9);
}

.awf-bulb-text {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.awf-dash-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.awf-share-panel {
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.awf-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.awf-share-row input {
  flex: 1 1 240px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.awf-dash-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Modal */
.awf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28, 36, 48, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.awf-modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--text);
}

.awf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.awf-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  color: var(--text);
}

.awf-close-btn {
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1.5px solid var(--text);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.awf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.awf-chip {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.awf-chip[aria-pressed="true"] {
  border: 2px solid var(--text);
  background: #fdecc8;
  color: var(--text);
}

.awf-keepsake-note {
  background: #fffdf7;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  padding: 20px;
  margin: 12px 0 16px;
  background-image: repeating-linear-gradient(transparent, transparent 27px, #ebe1cf 28px);
}

.awf-keepsake-day {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.awf-keepsake-text {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.awf-keepsake-from {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--primary);
}

.awf-demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.awf-demo-tab {
  min-height: 40px;
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.awf-demo-tab[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--text);
  color: #ffffff;
}

.awf-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  cursor: pointer;
}

.awf-status-msg {
  font-size: 14px;
  font-weight: 600;
  color: var(--pine);
}

.awf-status-msg.is-error {
  color: var(--primary);
}

@media (max-width: 900px) {
  .awf-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .awf-card-body,
  .awf-card-ribbon,
  .awf-card-footer,
  .awf-dash-banner,
  .awf-modal-card {
    padding-left: 16px;
    padding-right: 16px;
  }
  .awf-doors-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .awf-door {
    min-height: 62px;
  }
  .awf-demo-tabs {
    grid-template-columns: 1fr;
  }
}
