/* ECモール イベントカレンダー（ShopValue）
   色と書体は shopvalue.net のテーマに合わせる。外部の Web フォントは読み込まない */
:root {
  --red: #e50914;
  --red-dark: #b5070f;
  --gold: #ffc85a;
  --ink: #1a1a1a;
  --muted: #5f5f5f;
  --mist: #f6f6f6;
  --rule: #e3e3e3;
  --white: #ffffff;
  --warn-bg: #fff4dc;
  --warn-ink: #7a4d00;
  --error-bg: #fdeced;
  --error-ink: #9a1017;

  --m-rakuten: #a61e4d;
  --m-yahoo: #1c6dd0;
  --m-amazon: #a85a00;
  --m-aupay: #0f7a5c;
  --m-qoo10: #6b4fd3;

  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --font-serif: "Noto Serif JP", "Yu Mincho", "游明朝", "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", "MS PMincho", serif;
  --font-brand: "EB Garamond", Garamond, "Times New Roman", "Hiragino Mincho ProN", serif;

  --lane-h: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
}

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.5; margin: 0; }

button, input { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }

/* ヘッダー */
.site-header { border-top: 4px solid var(--red); border-bottom: 1px solid var(--rule); background: var(--white); }
.header-inner { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-block: 14px; }
.brand { text-decoration: none; }
.brand-mark { font-family: var(--font-brand); font-size: 27px; font-weight: 600; letter-spacing: 0.04em; line-height: 1; color: var(--ink); }
.site-name { font-size: 14px; color: var(--muted); }
.header-nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.header-nav a { text-decoration: none; padding: 4px 0; }
.header-nav a:hover { text-decoration: underline; }

/* 見出しまわり */
.intro { padding-block: 44px 8px; }
.intro h1 { font-size: clamp(24px, 4vw, 34px); max-width: 24em; }
.lead { margin: 14px 0 0; max-width: 40em; color: var(--muted); }
.status { margin: 18px 0 0; font-size: 14px; }
.status.warn { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 14px; border-left: 4px solid var(--gold); }
.status-detail { margin-top: 8px; font-size: 13px; color: var(--muted); }
.status-detail summary { cursor: pointer; }
.status-detail ul { margin: 8px 0 0; padding-left: 20px; }
.status-detail .bad { color: var(--error-ink); font-weight: 600; }

section.wrap > h2, .cta h2 { font-size: 22px; }
.section-lead { margin: 8px 0 18px; color: var(--muted); max-width: 44em; }

/* これから始まる大型セール */
.next { padding-block: 36px 8px; }
.next-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.next-list li { border-bottom: 1px solid var(--rule); }
.next-row {
  display: grid; grid-template-columns: 9.5em 1fr auto; gap: 6px 18px; align-items: baseline;
  width: 100%; text-align: left; background: none; border: 0; padding: 12px 4px; cursor: pointer;
}
.next-row:hover { background: var(--mist); }
.next-when { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.next-title { font-weight: 600; }
.next-title .chip { margin-right: 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border: 1px solid var(--ink); white-space: nowrap; }
.tag.now { background: var(--gold); border-color: var(--gold); }

/* カレンダー */
.cal-section { padding-block: 40px 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.month-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.month-label { font-family: var(--font-serif); font-size: 20px; min-width: 7.5em; text-align: center; }
.view-toggle { display: flex; }
.view-toggle .btn:first-child { border-right: 0; }

.btn {
  display: inline-block; background: var(--white); border: 1px solid var(--ink); padding: 6px 14px;
  cursor: pointer; text-decoration: none; font-size: 14px; line-height: 1.6; border-radius: 0;
}
.btn:hover { background: var(--mist); color: var(--ink); }
.btn-quiet { border-color: var(--rule); }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--white); font-weight: 600; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.toggle[aria-pressed="true"]:hover { background: var(--ink); color: var(--white); }

.filters { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 16px; }
.filter-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.filter-group legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); padding: 3px 12px 3px 8px; cursor: pointer; font-size: 13px; background: var(--white); }
.chk input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chk:has(input:checked) { border-color: var(--ink); background: var(--mist); font-weight: 600; }
.chk:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch { width: 12px; height: 12px; background: var(--c, var(--ink)); flex: none; }
.chk:not(:has(input:checked)) .swatch { opacity: 0.35; }

.count { margin: 18px 0 8px; font-size: 13px; color: var(--muted); }

.m-rakuten { --c: var(--m-rakuten); }
.m-yahoo { --c: var(--m-yahoo); }
.m-amazon { --c: var(--m-amazon); }
.m-aupay { --c: var(--m-aupay); }
.m-qoo10 { --c: var(--m-qoo10); }

.chip { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 0 8px; background: var(--c); color: var(--white); white-space: nowrap; }

/* 月表示 */
.cal-scroll { overflow-x: auto; border: 1px solid var(--rule); border-bottom: 0; }
.cal-inner { min-width: 700px; }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--mist); border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--muted); text-align: center; }
.dow div { padding: 4px 0; }
.week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: var(--lane-h);
  grid-template-rows: auto; border-bottom: 1px solid var(--rule); position: relative; padding-bottom: 4px;
}
.day { grid-row: 1 / -1; border-left: 1px solid var(--rule); min-height: 64px; }
.day:first-of-type { border-left: 0; }
.day.out { background: var(--mist); }
.day.today { background: #fff7f7; box-shadow: inset 0 3px 0 var(--red); }
.day-num {
  grid-row: 1; justify-self: start; margin: 4px 0 2px 4px; min-width: 26px; height: 24px; padding: 0 4px;
  background: none; border: 0; font-size: 13px; line-height: 24px; text-align: center; cursor: pointer; z-index: 1; font-variant-numeric: tabular-nums;
}
.day-num:hover { text-decoration: underline; }
.day-num.out { color: #8a8a8a; }
.day-num.today { background: var(--red); color: var(--white); font-weight: 700; border-radius: 12px; }
.bar {
  height: calc(var(--lane-h) - 3px); margin: 0 2px; padding: 0 6px; background: var(--c); color: var(--white);
  border: 0; text-align: left; font-size: 12px; line-height: calc(var(--lane-h) - 3px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; z-index: 1; border-radius: 3px; align-self: center;
}
.bar:hover { filter: brightness(0.88); }
.bar:focus-visible { outline: 2px solid var(--white); box-shadow: 0 0 0 5px var(--ink); }
.bar.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar .ini { font-weight: 700; margin-right: 5px; opacity: 0.95; }
.bar.rule { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--c); }
.bar.rule .ini { color: var(--c); }
.more { margin: 0 4px; border: 0; background: none; font-size: 12px; color: var(--muted); text-align: left; cursor: pointer; z-index: 1; text-decoration: underline; padding: 0; }
.cal-bottom { border-top: 1px solid var(--rule); }

/* 一覧表示 */
.list-group { margin: 22px 0 0; }
.list-group h3 { font-size: 17px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { border-bottom: 1px solid var(--rule); }
.event-row {
  display: grid; grid-template-columns: 11.5em 5.5em 1fr auto; gap: 4px 14px; align-items: baseline;
  width: 100%; text-align: left; background: none; border: 0; padding: 10px 4px; cursor: pointer;
}
.event-row:hover { background: var(--mist); }
.event-row .when { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-row .cat { font-size: 12px; color: var(--muted); margin-left: 8px; }
.list-more { display: block; margin: 20px auto 0; padding: 10px 28px; }
.past-toggle { display: inline-block; margin-top: 16px; font-size: 14px; cursor: pointer; }

.empty { margin: 18px 0; padding: 18px; background: var(--mist); }
.error { margin: 18px 0; padding: 14px 16px; background: var(--error-bg); color: var(--error-ink); }
.note { margin: 16px 0 0; font-size: 13px; color: var(--muted); max-width: 50em; }

/* 購読 */
.subscribe { padding-block: 48px 8px; }
.feed-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.feed-list li { display: grid; grid-template-columns: 11em 1fr auto; gap: 6px 14px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.feed-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.feed-url { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.howto { margin-top: 16px; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto dl { margin: 10px 0 0; }
.howto dt { font-weight: 600; margin-top: 10px; }
.howto dd { margin: 2px 0 0; color: var(--muted); max-width: 46em; }

/* ニュース */
.news { padding-block: 48px 8px; }
.news-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.news-list li { display: grid; grid-template-columns: 6.5em 1fr; gap: 4px 14px; padding: 10px 4px; border-bottom: 1px solid var(--rule); align-items: baseline; }
.news-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-site { font-size: 12px; color: var(--muted); margin-left: 8px; }
.news-list .chip { margin-left: 8px; }

/* 相談への導線とフッター */
.cta-band { margin-top: 56px; background: var(--mist); border-top: 1px solid var(--rule); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-block: 32px; }
.cta p { margin: 6px 0 0; color: var(--muted); max-width: 38em; }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; }

.site-footer { padding-block: 28px 44px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); }
.site-footer p { margin: 0 0 10px; max-width: 52em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { color: var(--ink); }

/* 詳細ダイアログ */
.dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 0; box-shadow: 0 0 0 1px var(--ink), 0 18px 48px rgba(0, 0, 0, 0.28); background: var(--white); color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 2px solid var(--ink); }
.dialog-head h2 { font-size: 19px; }
.dialog-head .btn { flex: none; }
.dialog-body { padding: 14px 20px 22px; overflow-y: auto; }
.facts { margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); margin-top: 12px; }
.facts dd { margin: 2px 0 0; }
.facts .hint { font-size: 13px; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { border-bottom: 1px solid var(--rule); }
.day-list .event-row { grid-template-columns: 5.5em 1fr; }

/* 説明・規約のページ */
.prose { padding-block: 40px 56px; max-width: 760px; }
.prose h1 { font-size: clamp(24px, 4vw, 32px); }
.prose h2 { font-size: 19px; margin-top: 34px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.prose p, .prose li { max-width: 42em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin-top: 4px; }
.prose .meta { font-size: 13px; color: var(--muted); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--mist); padding: 1px 6px; }
.spec { border-collapse: collapse; width: 100%; max-width: 42em; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--rule); }
.spec th { width: 9em; font-weight: 600; white-space: nowrap; }
.site-name[href] { text-decoration: none; }

/* 小さい画面 */
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .intro { padding-block: 30px 4px; }
  .header-nav { margin-left: 0; width: 100%; }
  .next-row { grid-template-columns: 1fr auto; }
  .next-when { grid-column: 1 / -1; }
  .event-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .event-row .when { width: 100%; }
  .event-row .ttl { flex: 1 1 12em; }
  .day-list .event-row .mall-col { min-width: 5.5em; }
  .feed-list li { grid-template-columns: 1fr auto; }
  .feed-url { grid-column: 1 / -1; grid-row: 2; }
  .news-list li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
