:root {
  --bg1: #ffeaea;
  --bg2: #ffd6d6;
  --accent: #ff9e9e;
  --accent-soft: #ffc4c4;
  --accent-strong: #e5626a;
  --card-bg: #ffffff;
  --text: #4a343a;
  --shadow-color: rgba(83, 32, 110, 0.25);
  --shadow-strong: rgba(83, 32, 110, 0.35);
  --radius-pill: 999px;
  --radius-lg: 18px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, var(--bg2), var(--bg1));
  min-height: 100dvh; /* use dynamic viewport height on mobile */
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrap {
  width: 100%;
  max-width: 520px;
  padding: 1rem; /* move the padding from body to here */
  box-sizing: border-box;
}

.card {
  background: linear-gradient(135deg, #fff, #fff7f8);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  box-shadow: 0 8px 24px var(--shadow-color);
  border: 1px solid rgba(255, 198, 198, 0.6);
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .card {
    padding: 2rem;
  }
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-strong));
  box-shadow: 0 2px 8px rgba(255, 158, 158, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
  letter-spacing: 0.01em;
  font-weight: 700;
}

h1 span {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: #7f5a66;
  line-height: 1.4;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #7f5a66;
}

.breadcrumbs span {
  opacity: 0.85;
}

.breadcrumbs span.current {
  font-weight: 600;
}

/* unified button style (nav pills, links, accordion headers) */

.accordion-header,
.link-list a,
.breadcrumbs a {
  border-radius: 12px;
  border: 1px solid rgba(255, 198, 198, 0.6);
  background: linear-gradient(135deg, #fff7f8, #ffffff);
  padding: 0.6rem 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.accordion-header:hover,
.link-list a:hover,
.breadcrumbs a:hover {
  background: linear-gradient(135deg, #ffeaea, #fff7f8);
  box-shadow: 0 4px 12px rgba(255, 158, 158, 0.3);
  transform: translateY(-1px);
}

.accordion-header:active,
.link-list a:active,
.breadcrumbs a:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 158, 158, 0.25);
}

/* fine-tune anchors inside unified button style */

.link-list a,
.breadcrumbs a {
  text-decoration: none;
  justify-content: center;
}

/* layout helpers */

.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b454f;
}

.field select {
  border-radius: 10px;
  border: 1px solid rgba(148, 87, 111, 0.25);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--text);
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
}

.field select:hover {
  border-color: rgba(255, 158, 158, 0.5);
  box-shadow: 0 3px 10px rgba(255, 158, 158, 0.2);
}

.field select:focus {
  box-shadow: 0 0 0 3px rgba(255, 158, 158, 0.2);
  border-color: var(--accent-strong);
}

.detail-note {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: #8c5f6a;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* result card (calculator) */

.result-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffe8e8, #ffd6d6);
  box-shadow: 0 4px 16px rgba(255, 158, 158, 0.25);
  border: 1px solid rgba(255, 190, 190, 0.5);
}

.result-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.result-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #7f4b59;
}

.result-price {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #4a343a;
}

.result-price small {
  font-size: 0.85rem;
  font-weight: 500;
  color: #7f4b59;
  opacity: 0.9;
}

.result-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  margin-top: 0.65rem;
  color: #7f4b59;
  font-weight: 500;
}

.result-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 8px rgba(229, 98, 106, 0.8);
}

.fine-print {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  color: #8c5f6a;
  line-height: 1.4;
}

/* sections / text blocks */

.section-title {
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.section-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.multi-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .multi-column-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1rem;
  }
}

/* gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

figure {
  margin: 0;
}

.gallery-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #fcdcdc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  font-size: 0.78rem;
  color: #7f5a66;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* simple lists */

ul.simple-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.5;
}

ul.simple-list a {
  color: #4a343a;
}

/* accordion */

.accordion {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 198, 198, 0.6);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  border: none;
  outline: none;
  background: linear-gradient(135deg, #fff7f8, #ffffff);
}

.accordion-title {
  flex: 1;
  text-align: left;
}

.accordion-icon {
  font-size: 1rem;
  line-height: 1;
  margin-left: 0.5rem;
  color: var(--accent-strong);
  transition: transform 0.16s ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 0.8rem;
  transition: max-height 0.2s ease;
}

.accordion-content-inner {
  padding: 0.35rem 0 0.7rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #4a343a;
  white-space: pre-wrap;
}

.accordion.open .accordion-icon {
  transform: rotate(45deg);
}

.poem-text,
.essay-text {
  margin: 0;
}

/* poem / essay containers */

.poem-block,
.essay-block {
  margin-bottom: 0.75rem;
}

.poem-title,
.essay-title {
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.placeholder-text {
  font-size: 0.78rem;
  color: #7f5a66;
}

/* favorite color special text */

.fav-hex {
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-strong);
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-pill);
  background: rgba(229, 98, 106, 0.08);
  border: 1px solid rgba(229, 98, 106, 0.4);
}

/* full-screen image lightbox */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 0;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-image-wrapper {
  max-width: 95vw;
  max-height: 95vh;
  overflow: auto;
}

/* default: fit nicely, zoom-in cursor */
.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  cursor: zoom-in;
}

/* zoomed: use natural size so we can scroll/pan, cursor = open hand */
.lightbox-image.zoomed {
  max-width: none;
  max-height: none;
  cursor: grab;
}

/* when dragging to pan, show closed hand */
.lightbox-image-wrapper.dragging {
  cursor: grabbing;
}

.lightbox-image-wrapper.dragging .lightbox-image {
  cursor: grabbing;
}

/* optional scrollbar styling */
.lightbox-image-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.lightbox-image-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

/* freeze page scroll while lightbox is open */
body.lb-open {
  overflow: hidden;
  touch-action: none;
}
/* icon styling for socials */
.icon-links a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-links .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon-links a:hover .icon {
  transform: scale(1.12);
  opacity: 1;
}
