/*
 * Content kit — styles for components written inside post content.
 * Colors follow each site's own tokens (festamap --fm-*, gamejido --gjd-*,
 * money88note WordPress presets). Component roots carry `ck` plus their own
 * class so these rules outrank the sites' generic `.fm-content li` style rules.
 */
body {
  --ck-accent: var(--fm-accent, var(--gjd-green, var(--wp--preset--color--accent-1, #2f6b55)));
  --ck-accent-2: var(--wp--preset--color--accent-3, #8c7a5b);
  --ck-ink: var(--fm-ink, var(--gjd-ink, var(--wp--preset--color--contrast, #1f2a26)));
  --ck-muted: var(--fm-muted, var(--gjd-muted, #67706a));
  --ck-line: var(--fm-line, var(--gjd-line, #dfe2da));
  --ck-surface: #fffdf9;
  --ck-track: #ebeae3;
  --ck-wash: #f0f2ec;
  --ck-hot: #9a6110;
  --ck-radius: 6px;
}
body.fm-editorial { --ck-accent-2: #5f6f66; }
body.gjd-editorial { --ck-accent-2: #8a6d3b; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  body { --ck-wash: color-mix(in srgb, var(--ck-accent) 9%, #fff); }
  /* Light badges and inactive tabs keep at least 4.5:1 on the wash. */
  .ck .ck-state, .ck.ck-status .ck-state { color: color-mix(in srgb, var(--ck-accent) 78%, #000); }
}
.ck, .ck *, .ck *::before, .ck *::after { box-sizing: border-box; }
.ck [hidden] { display: none !important; }
.ck-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Live status: festival dates and coupon deadlines */
.ck .ck-state, .ck.ck-status .ck-state {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: var(--ck-wash); color: var(--ck-accent); font-size: 13px; font-weight: 700; line-height: 1.5;
  letter-spacing: -.01em; max-width: 100%; white-space: normal;
}
.ck .ck-state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ck [data-ck-state="ongoing"] > .ck-state, .ck[data-ck-state="ongoing"] > .ck-state,
.ck [data-ck-state="open"] > .ck-state { background: var(--ck-accent); color: #fff; }
.ck [data-ck-state="lastday"] > .ck-state, .ck[data-ck-state="lastday"] > .ck-state,
.ck [data-ck-state="soon"] > .ck-state { background: var(--ck-hot); color: #fff; }
.ck [data-ck-state="ended"] > .ck-state, .ck[data-ck-state="ended"] > .ck-state { background: #ecebe6; color: #575b55; }
@media (prefers-reduced-motion: no-preference) {
  .ck[data-ck-state="ongoing"] > .ck-state::before, .ck [data-ck-state="soon"] > .ck-state::before { animation: ck-pulse 1.8s ease-in-out infinite; }
}
@keyframes ck-pulse { 50% { opacity: .35; } }
.ck.ck-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 18px 0 22px; color: var(--ck-muted); font-size: 14px; line-height: 1.6; }

/* Coupon cards */
.ck.ck-coupons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 22px 0 26px; }
@media (min-width: 680px) { .ck.ck-coupons { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); } }
.ck .ck-coupon { padding: 16px 18px 15px; border: 1px solid var(--ck-line); border-radius: var(--ck-radius); background: var(--ck-surface); }
.ck .ck-coupon[data-ck-state="ended"] { background: #f6f5f1; }
.ck .ck-coupon[data-ck-state="ended"] .ck-code code { color: #8a8d86; text-decoration: line-through; }
.ck .ck-coupon .ck-code { display: flex; align-items: center; gap: 10px; margin: 0; }
.ck .ck-coupon .ck-code code {
  flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ck-ink);
  font: 700 21px/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", Consolas, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", monospace;
  letter-spacing: .03em; overflow-wrap: anywhere;
}
.ck .ck-coupon .ck-reward { margin: 9px 0 0; color: var(--ck-ink); font-size: 14px; line-height: 1.7; word-break: keep-all; }
.ck.ck-coupons .ck-summary { grid-column: 1 / -1; margin: 0; color: var(--ck-ink); font-size: 13px; font-weight: 700; line-height: 1.6; }
.ck .ck-coupon .ck-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; }
.ck .ck-coupon .ck-redeem {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px; background: var(--ck-accent);
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
}
.ck .ck-coupon .ck-redeem:hover { color: #fff; filter: brightness(1.08); }
.ck-used {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--ck-line); border-radius: 999px;
  background: #fff; color: var(--ck-muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.ck-used[aria-pressed="true"] { border-color: var(--ck-accent); background: var(--ck-wash); color: var(--ck-ink); }
.ck-used:hover { border-color: var(--ck-accent); color: var(--ck-ink); }
.ck-used:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 3px; }
.ck .ck-coupon[data-ck-used] .ck-code code { color: var(--ck-muted); }
.ck .ck-coupon[data-ck-state="ended"] .ck-actions { display: none; }
.ck .ck-coupon .ck-deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 11px 0 0; color: var(--ck-muted); font-size: 13px; line-height: 1.6; }
.ck .ck-deadline[data-ck-state] > time { display: none; }

/* Copy buttons are added next to any [data-ck-copy] element, inside or outside a component */
.ck-copy {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 62px; min-height: 36px;
  margin-left: 8px; padding: 0 14px; border: 1px solid var(--ck-accent); border-radius: 999px; background: #fff;
  color: var(--ck-accent); font: inherit; font-size: 13px; font-weight: 700; line-height: 1; vertical-align: middle; cursor: pointer;
}
.ck .ck-code .ck-copy { margin-left: 0; }
.ck-copy:hover { background: var(--ck-wash); }
.ck-copy:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 3px; }
.ck-copy.is-done { background: var(--ck-accent); color: #fff; }

/* Shared chart frame */
.ck.ck-bars, .ck.ck-dayline { margin: 30px 0; padding: 20px 20px 17px; border: 1px solid var(--ck-line); border-radius: var(--ck-radius); background: var(--ck-surface); }
.ck.ck-bars figcaption, .ck.ck-dayline figcaption { margin: 0 0 15px; color: var(--ck-ink); font-size: 16px; font-weight: 750; line-height: 1.5; letter-spacing: -.025em; }
.ck.ck-bars ul, .ck.ck-dayline ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.ck.ck-bars li, .ck.ck-dayline li { margin: 0; padding: 0; }
.ck .ck-label { display: block; color: var(--ck-ink); font-size: 14px; line-height: 1.5; }
.ck .ck-note { margin: 15px 0 0; color: var(--ck-muted); font-size: 12px; line-height: 1.75; }

/* Bar chart, one or two series */
/* A fixed value column keeps every track the same length, so bar lengths stay comparable. */
.ck.ck-bars .ck-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--ck-value-width, 7.4em); align-items: center; gap: 10px; margin-top: 5px; }
.ck.ck-bars .ck-bar { position: relative; height: 12px; overflow: hidden; border-radius: 999px; background: var(--ck-track); }
.ck.ck-bars .ck-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: inherit; background: var(--ck-accent); transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.ck.ck-bars .ck-b .ck-bar-fill { background: var(--ck-accent-2); }
.ck.ck-bars .ck-value { color: var(--ck-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.ck.ck-bars:not(.ck-ready) .ck-bar { display: none; }
.ck.ck-bars:not(.ck-ready) .ck-row { grid-template-columns: auto; }
.ck.ck-bars .ck-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -6px 0 14px; color: var(--ck-muted); font-size: 12px; }
.ck.ck-bars .ck-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: var(--ck-accent); vertical-align: -1px; }
.ck.ck-bars .ck-legend .ck-b::before { background: var(--ck-accent-2); }
@media (prefers-reduced-motion: reduce) { .ck.ck-bars .ck-bar-fill { transition: none; } }

/* Day timeline: opening hours and single moments on one clock axis */
.ck.ck-dayline li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 10px; }
.ck.ck-dayline .ck-time { color: var(--ck-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck.ck-dayline .ck-track { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 999px; background: var(--ck-track); }
.ck.ck-dayline .ck-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--ck-accent); }
.ck.ck-dayline li.ck-key .ck-band { background: var(--ck-hot); }
.ck.ck-dayline .ck-dot { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border: 3px solid var(--ck-surface); border-radius: 50%; background: var(--ck-hot); box-shadow: 0 0 0 1px var(--ck-hot); }
.ck.ck-dayline .ck-scale { position: relative; height: 18px; margin-top: 12px; color: var(--ck-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ck.ck-dayline .ck-scale span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ck.ck-dayline .ck-scale span:first-child { transform: none; }
.ck.ck-dayline .ck-scale span:last-child { transform: translateX(-100%); }

/* Device or option tabs */
.ck.ck-tabs { margin: 26px 0; overflow: hidden; border: 1px solid var(--ck-line); border-radius: var(--ck-radius); background: var(--ck-surface); }
.ck.ck-tabs .ck-tablist { display: flex; gap: 4px; padding: 6px; overflow-x: auto; border-bottom: 1px solid var(--ck-line); background: var(--ck-wash); }
.ck.ck-tabs .ck-tablist [role="tab"] {
  flex: 1 0 auto; min-height: 42px; padding: 0 16px; border: 0; border-radius: 4px; background: transparent;
  color: var(--ck-ink); font: inherit; font-size: 14px; font-weight: 600; opacity: .82; cursor: pointer;
}
.ck.ck-tabs .ck-tablist [aria-selected="true"] { opacity: 1; font-weight: 700; }
.ck.ck-tabs .ck-tablist [aria-selected="true"] { background: #fff; color: var(--ck-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.ck.ck-tabs .ck-tablist [role="tab"]:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: -2px; }
.ck.ck-tabs > [data-ck-tab] { padding: 4px 20px 18px; }
.ck.ck-tabs > [data-ck-tab] > :first-child { margin-top: 14px; }
.ck.ck-tabs > [data-ck-tab] > :last-child { margin-bottom: 0; }
.ck.ck-tabs:not(.ck-ready) > [data-ck-tab] + [data-ck-tab] { border-top: 1px solid var(--ck-line); }
.ck.ck-tabs.ck-ready > [data-ck-tab] > :is(h3, h4):first-child { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ck.ck-tabs.ck-ready > [data-ck-tab] > :is(h3, h4):first-child + * { margin-top: 14px; }

/* Visit checklist with saved progress */
.ck.ck-checklist { margin: 20px 0 6px; padding: 0; list-style: none; border: 1px solid var(--ck-line); border-radius: var(--ck-radius); background: var(--ck-surface); }
.ck.ck-checklist > li { margin: 0; padding: 0; border-top: 1px solid var(--ck-line); }
.ck.ck-checklist > li:first-child { border-top: 0; }
.ck.ck-checklist:not(.ck-ready) > li { padding: 13px 16px; }
.ck.ck-checklist label { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; color: var(--ck-ink); font-size: 15px; line-height: 1.65; cursor: pointer; }
.ck.ck-checklist input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ck-accent); }
.ck.ck-checklist label:has(input:checked) { color: var(--ck-muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); }
.ck.ck-progress { margin: 8px 2px 22px; color: var(--ck-muted); font-size: 13px; text-align: right; }

/* Map with app links */
.ck.ck-map { margin: 26px 0; overflow: hidden; border: 1px solid var(--ck-line); border-radius: var(--ck-radius); background: var(--ck-surface); }
.ck.ck-map iframe { display: block; width: 100%; height: 280px; border: 0; background: var(--ck-track); }
.ck.ck-map figcaption { margin: 0; padding: 13px 16px 0; color: var(--ck-ink); font-size: 14px; line-height: 1.65; }
.ck.ck-map figcaption small { display: block; margin-top: 2px; color: var(--ck-muted); font-size: 11px; }
.ck.ck-map:not(.ck-ready) figcaption small { display: none; }
.ck .ck-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 16px 16px; }
.ck .ck-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--ck-accent); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none;
}
.ck .ck-links a + a { background: #fff; color: var(--ck-accent); box-shadow: inset 0 0 0 1px var(--ck-accent); }
.ck .ck-links a:hover { color: #fff; filter: brightness(1.08); }
.ck .ck-links a + a:hover { color: var(--ck-accent); background: var(--ck-wash); filter: none; }
.ck .ck-links a:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 3px; }

/* Vertical date steps */
.ck.ck-steps { margin: 26px 0; padding: 0 0 0 6px; list-style: none; }
.ck.ck-steps > li { position: relative; margin: 0; padding: 0 0 22px 26px; border-left: 2px solid var(--ck-line); }
.ck.ck-steps > li:last-child { padding-bottom: 2px; border-left-color: transparent; }
.ck.ck-steps > li::before { content: ""; position: absolute; top: 6px; left: -8px; width: 14px; height: 14px; border: 2px solid var(--ck-accent); border-radius: 50%; background: var(--ck-surface); }
.ck.ck-steps > li.ck-now::before { background: var(--ck-accent); }
.ck.ck-steps .ck-when { display: block; color: var(--ck-accent); font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.6; }
.ck.ck-steps strong { display: block; color: var(--ck-ink); font-size: 16px; line-height: 1.6; }
.ck.ck-steps li > span:not(.ck-when) { display: block; color: var(--ck-muted); font-size: 14px; line-height: 1.7; }

/* Folded questions */
.ck.ck-faqs { margin: 22px 0; border-bottom: 1px solid var(--ck-line); }
.ck.ck-faqs details { border-top: 1px solid var(--ck-line); }
.ck.ck-faqs summary { position: relative; padding: 15px 36px 15px 0; color: var(--ck-ink); font-size: 16px; font-weight: 700; line-height: 1.6; list-style: none; cursor: pointer; }
.ck.ck-faqs summary::-webkit-details-marker { display: none; }
.ck.ck-faqs summary::after { content: "+"; position: absolute; top: 11px; right: 6px; color: var(--ck-accent); font-size: 22px; font-weight: 400; }
.ck.ck-faqs details[open] summary::after { content: "−"; }
.ck.ck-faqs summary:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 2px; }
.ck.ck-faqs details > :not(summary) { margin: 0 0 16px; }

/* Licensed reference photo; festamap's design lifts the lead photo into its hero */
.ck.ck-photo { margin: 24px 0; }
.ck.ck-photo img { display: block; width: 100%; height: auto; border-radius: 4px; }
.ck.ck-photo figcaption { margin-top: 8px; color: var(--ck-muted); font-size: 12px; line-height: 1.7; }
body:has(.fm-hero-photo) .ck.ck-photo.ck-lead { display: none; }

/* gamejido coupon posts: on phones the tall store screenshot pushed the codes below the first screen. */
@media (max-width: 700px) {
  body.gjd-editorial:has(.ck-coupons) .gjd-hero-art .gjd-image-portrait { height: 200px; }
}

@media (max-width: 520px) {
  .ck.ck-bars, .ck.ck-dayline { padding: 17px 15px 15px; }
  .ck.ck-tabs > [data-ck-tab] { padding-inline: 16px; }
  .ck.ck-map iframe { height: 230px; }
}
