/* 色と寸法はアプリ(ContentView.swift の Color 拡張)と同じ値 */
:root {
  --red: #d9272e;
  --header-red: #d9272e;
  --blue: #2366b1;
  --yellow: #826200;
  --gold: #f2b705;
  --ink: #171717;
  --body: #41413d;
  --muted: #6f6f68;
  --faint: #92928a;
  --page: #fffdf8;
  --card: #ffffff;
  --subtle: #f6f5f1;
  --status-bg: #fff1ef;
  --border: #e5e3dd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --red: #ff766e;
    --blue: #7aaff3;
    --yellow: #f2c84d;
    --gold: #f2c84d;
    --ink: #f7f5f0;
    --body: #d6d4cf;
    --muted: #adafa6;
    --faint: #999a90;
    --page: #171715;
    --card: #20201e;
    --subtle: #232321;
    --status-bg: #392321;
    --border: #3e3d38;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "palt";
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ol { margin: 0; padding: 0; }

/* 赤い帯と金の線:アプリの画面ヘッダーと同じ */
.masthead { background: var(--header-red); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 10; }
.masthead__inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand img { border-radius: 8px; display: block; }
.masthead__nav { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.masthead__nav a { color: #fff; text-decoration: none; padding: 7px 10px; border-radius: 8px; white-space: nowrap; }
.masthead__nav a[aria-current] { background: rgba(0, 0, 0, .18); }
.masthead__nav a:hover { background: rgba(0, 0, 0, .12); }
.masthead__nav .masthead__app { background: #fff; color: #d9272e; margin-left: 6px; }
.masthead__nav .masthead__app:hover { background: #fff3d1; }

/* ホームのバナー:App Store掲載画像と同じ赤地・白文字・黄色の強調 */
.hero { background: var(--header-red); color: #fff; overflow: hidden; }
.hero__inner { max-width: 1080px; margin: 0 auto; padding: 26px 16px 0; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 32px; align-items: end; position: relative; }
.hero__copy { padding-bottom: 28px; }
.hero__lead { font-size: 15px; font-weight: 700; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.2; font-weight: 800; margin: 2px 0 8px; letter-spacing: .01em; }
.hero h1 em { font-style: normal; color: #ffd84a; margin-left: .25em; }
.hero__sub { font-size: 15px; margin-bottom: 18px; }
.hero__phone { align-self: end; border: 6px solid #171717; border-bottom: 0; border-radius: 28px 28px 0 0; overflow: hidden; height: 262px; background: #fffdf8; }
.hero__phone img { display: block; width: 100%; }
.hero__mascot { position: absolute; right: 196px; bottom: 0; width: 96px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.try-button { display: inline-flex; align-items: baseline; gap: 12px; background: #fff; color: #d9272e; text-decoration: none; font-weight: 800; font-size: 21px; line-height: 1.2; padding: 17px 30px; border-radius: 13px; box-shadow: 0 3px 0 rgba(0, 0, 0, .22); }
.try-button small { font-size: 12px; font-weight: 700; opacity: .8; }
.try-button:hover { background: #fff3d1; }
.try-button--red { background: #d9272e; color: #fff; }
.try-button--red:hover { background: #b81f25; }
.badge { display: block; line-height: 0; }
.badge img { height: 60px; width: auto; display: block; }

.page { max-width: 1080px; margin: 0 auto; padding: 28px 16px 48px; }
.page--narrow { max-width: 760px; }
.section-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--gold); margin-bottom: 12px; }
.section-title h2 { font-size: 24px; font-weight: 800; padding-bottom: 6px; }
.section-title img { width: 104px; display: block; }
.section-title--plain { margin-top: 40px; }
.summary { font-size: 14px; color: var(--body); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.summary b { color: var(--ink); margin-right: 10px; }
.summary__time { margin-left: auto; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--red { background: var(--red); }
.dot--gold { background: var(--gold); }

.genre { margin-top: 22px; }
.genre__head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.deal-list { display: flex; flex-direction: column; gap: 8px; }
/* 基本は縦積みのカード。広い画面の一覧では1件1行に並べる(下の media 参照) */
.deal { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px 13px; min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
.deal:hover { border-color: var(--red); }
.deal__main { display: contents; }
.deal__icon { border-radius: 7px; grid-column: 1; grid-row: 1; }
.deal__merchant { color: var(--muted); font-size: 15px; line-height: 1.3; grid-column: 2; grid-row: 1; min-width: 0; }
.deal__mark { grid-column: 3; grid-row: 1; min-height: 44px; display: flex; align-items: center; }
.deal__title { font-size: 17px; font-weight: 700; line-height: 1.4; margin-top: 2px; grid-column: 1 / -1; }
.deal__title a { text-decoration: none; }
.deal__title a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.deal__title a:focus-visible::after { outline: 2px solid var(--red); outline-offset: 2px; }
.deal__info { grid-column: 1 / -1; min-width: 0; }
.deal__benefit { color: var(--red); font-size: 15px; font-weight: 600; line-height: 1.5; margin-top: 4px; }
.deal__period { font-size: 15px; margin-top: 4px; display: flex; gap: 10px; align-items: baseline; }
.deal__period span { font-size: 12px; color: var(--muted); flex: none; }
.deal__windows { list-style: none; margin: 4px 0 0; padding: 0; font-size: 15px; }
.deal__windows li { display: flex; gap: 10px; align-items: baseline; }
.deal__windows span { font-size: 12px; color: var(--muted); flex: none; min-width: 2.6em; }
.deal__windows small { font-size: 11px; color: var(--muted); }
.deal__windows .is-over { color: var(--faint); }
.daybadge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--subtle); border-radius: 3px; padding: 1px 7px; margin-top: 6px; }
.daybadge--start { color: #fff; background: #d9272e; }

/* スタンプ:アプリの枠画像を色付けして使う */
.stamp { position: relative; flex: none; width: 96px; aspect-ratio: 2 / 1; transform: rotate(-4deg); margin: -6px -4px 0 0; color: var(--red); }
.stamp::before { content: ""; position: absolute; inset: 0; background: currentColor; -webkit-mask: var(--frame) center / contain no-repeat; mask: var(--frame) center / contain no-repeat; }
.stamp span { position: absolute; left: 5%; right: 5%; top: 44%; bottom: 8%; display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.stamp--sales { --frame: url(stamp-sales.png); color: var(--red); }
.stamp--reservation { --frame: url(stamp-reservation.png); color: var(--blue); }
.stamp--upcoming { --frame: url(stamp-upcoming.png); color: var(--yellow); }
.tag { flex: none; font-size: 11px; font-weight: 600; color: var(--red); background: var(--status-bg); border: 1px solid var(--red); border-radius: 2px; padding: 2px 6px; white-space: nowrap; }
.tag--ref { color: var(--muted); background: var(--subtle); border-color: var(--border); }

/* 未確定の参考行:アプリと同じく破線・淡い文字・彩度を落とした絵 */
.deal--ref { background: var(--subtle); border-style: dashed; }
.deal--ref .deal__title { color: var(--muted); font-weight: 500; }
.deal--ref .deal__benefit { color: var(--muted); font-weight: 400; }
.deal--ref .deal__period { color: var(--muted); font-size: 14px; }
.deal--ref .deal__icon { filter: saturate(.25); opacity: .65; }

.more { margin-top: 28px; text-align: center; }
.more a { display: inline-block; color: var(--red); font-weight: 700; text-decoration: none; border: 1.5px solid var(--red); border-radius: 13px; padding: 12px 22px; }
.more a:hover { background: var(--status-bg); }

.app { background: var(--subtle); border-top: 1px solid var(--border); }
.app__inner { max-width: 1080px; margin: 0 auto; padding: 44px 16px 52px; }
.app h2 { font-size: 26px; font-weight: 800; margin-bottom: 20px; }
.app__points { list-style: none; counter-reset: point; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 28px; border-top: 1px solid var(--border); }
.app__points li { counter-increment: point; padding: 18px 20px 4px 0; display: flex; flex-direction: column; gap: 4px; }
.app__points li + li { padding-left: 20px; border-left: 1px solid var(--border); }
.app__points li::before { content: "0" counter(point); font-size: 13px; font-weight: 700; color: var(--red); }
.app__points b { font-size: 18px; }
.app__points span { font-size: 14px; color: var(--body); }

.pagehead { background: var(--header-red); color: #fff; }
.pagehead__inner { max-width: 1080px; margin: 0 auto; padding: 14px 16px 0; display: flex; justify-content: space-between; align-items: end; }
.pagehead h1 { font-size: 26px; font-weight: 800; padding-bottom: 14px; }
.pagehead img { display: block; width: 120px; }

/* 月のタブ:1か月を1ページに分ける */
.monthtabs { position: sticky; top: 59px; z-index: 9; background: var(--page); border-bottom: 1px solid var(--border); }
.monthtabs__inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; overflow-x: auto; scrollbar-width: none; }
.monthtabs a { flex: 1 0 auto; text-align: center; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted); padding: 11px 13px 9px; border-bottom: 3px solid transparent; white-space: nowrap; }
.monthtabs a small { font-size: 11px; font-weight: 600; margin-right: 3px; }
.monthtabs a:hover { color: var(--ink); }
.monthtabs a[aria-current] { color: var(--red); border-bottom-color: var(--red); font-weight: 800; }

.month-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.month-title h2 { white-space: nowrap; flex: none; font-size: 34px; font-weight: 800; line-height: 1.1; display: flex; align-items: baseline; gap: 8px; }
.month-title h2 small { font-size: 14px; font-weight: 600; color: var(--muted); }
.month-title p { font-size: 14px; color: var(--muted); }
.month-title p span { margin-left: 12px; }

.calview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { font-size: 13px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal__dow--sun, .cal__day--sun { color: var(--red); }
.cal__day { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: 8px; min-height: 84px; padding: 6px 4px 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.cal__day.cal__day--sun { color: var(--red); }
.cal__day > span { width: 30px; height: 30px; line-height: 30px; border-radius: 50%; font-size: 17px; font-weight: 600; }
.cal__day--today > span { background: var(--ink); color: var(--page); font-weight: 800; }
.cal__day i, .cal__note i { font-style: normal; background: #d9272e; color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; padding: 0 6px; border-radius: 9px; white-space: nowrap; }
.cal__day small { font-size: 11px; color: var(--muted); margin-top: auto; white-space: nowrap; }
.cal__day:hover { border-color: var(--red); }
.cal__day[aria-pressed="true"] { border: 2px solid var(--red); background: var(--status-bg); padding: 5px 3px 4px; }
.cal__note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.cal__note i { margin: 0 4px; display: inline-block; }
.daypanel { background: var(--subtle); border-radius: 8px; padding: 14px 14px 16px; max-height: 620px; overflow-y: auto; }
.daypanel__head { font-size: 18px; font-weight: 800; display: flex; align-items: baseline; gap: 2px; margin-bottom: 10px; }
.daypanel__head small { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.empty { color: var(--muted); padding: 6px 0 4px; }
.reference { margin-top: 26px; }
.reference summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--body); padding: 10px 14px; background: var(--subtle); border-radius: 8px; }
.reference summary small { font-weight: 400; color: var(--muted); margin-left: 10px; font-size: 12px; }
.reference .genre:first-of-type { margin-top: 14px; }

/* 詳細ページ */
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 14px; }
.crumbs > * + *::before { content: "›"; margin-right: 8px; color: var(--faint); }
.detail { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px 24px; }
.detail--ref { border-style: dashed; }
.detail__head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.detail__head .deal__icon, .detail__head .deal__merchant, .detail__head .deal__mark { grid-column: auto; grid-row: auto; }
.detail h1 { font-size: 26px; font-weight: 800; line-height: 1.35; }
.detail__benefit { color: var(--red); font-size: 20px; font-weight: 700; line-height: 1.5; margin-top: 16px; }
.detail__summary { color: var(--body); margin-top: 8px; }
.detail__periods { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 16px; }
.detail__periods th, .detail__periods td { text-align: left; padding: 10px 0; border-top: 1px solid var(--border); vertical-align: baseline; }
.detail__periods tr:last-child th, .detail__periods tr:last-child td { border-bottom: 1px solid var(--border); }
.detail__periods th { width: 8.5em; font-size: 13px; font-weight: 600; color: var(--muted); }
.detail__periods td { font-weight: 600; }
.detail__periods small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 10px; }
.detail__periods .is-over td { color: var(--faint); font-weight: 400; }
.official { display: block; text-align: center; margin-top: 20px; background: var(--ink); color: var(--page); text-decoration: none; font-weight: 700; font-size: 17px; padding: 14px 20px; border-radius: 13px; }
.official:hover { opacity: .88; }
.detail__block { margin-top: 26px; }
.detail__block h2 { font-size: 15px; font-weight: 800; border-bottom: 2px solid var(--gold); padding-bottom: 4px; margin-bottom: 10px; display: inline-block; }
.detail__block ul { margin: 0; padding-left: 1.2em; color: var(--body); }
.detail__block li + li { margin-top: 4px; }
.detail__block p { color: var(--body); }
.detail__sources ul { list-style: none; padding: 0; font-size: 14px; }
.detail__sources a { color: var(--blue); overflow-wrap: anywhere; }
.detail__sources span { color: var(--muted); margin-left: 8px; font-size: 12px; }
.detail__updated { margin-top: 20px; font-size: 12px; color: var(--muted); }
.notify { margin-top: 22px; background: var(--status-bg); border-radius: 8px; padding: 20px 22px; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 18px; align-items: center; }
.notify h2 { font-size: 19px; font-weight: 800; line-height: 1.4; }
.notify p { font-size: 14px; color: var(--body); margin: 4px 0 14px; }
.notify .try-button { font-size: 18px; padding: 14px 24px; box-shadow: none; }
.notify .badge img { height: 52px; }

.footer { border-top: 1px solid var(--border); }
.footer__inner { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; font-size: 13px; color: var(--muted); }
.footer__links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* 広い画面の一覧:1件を1行に */
@media (min-width: 761px) {
  .deal-list--rows .deal { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.1fr) 104px; column-gap: 16px; padding: 10px 18px; }
  .deal-list--rows .deal__main { display: block; grid-column: 2; grid-row: 1; }
  .deal-list--rows .deal__icon { width: 40px; height: 40px; }
  .deal-list--rows .deal__info { grid-column: 3; grid-row: 1; }
  .deal-list--rows .deal__mark { grid-column: 4; grid-row: 1; justify-content: flex-end; }
  .deal-list--rows .deal__benefit, .deal-list--rows .deal__period, .deal-list--rows .deal__windows { margin-top: 0; }
  .deal-list--rows .deal__title { margin-top: 0; }
}
@media (max-width: 900px) {
  .calview { grid-template-columns: 1fr; gap: 18px; }
  .daypanel { max-height: none; scroll-margin-top: 112px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 108px; }
  .brand span { font-size: 16px; }
  .masthead__nav { font-size: 13px; gap: 0; }
  .masthead__nav a { padding: 6px 7px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) 96px; padding-top: 20px; gap: 8px; }
  .hero__copy { padding-bottom: 22px; grid-column: 1 / -1; }
  .hero__phone { display: none; }
  .hero__mascot { right: 10px; width: 76px; }
  .hero h1 em { display: block; margin-left: 0; }
  .hero__sub { padding-right: 84px; }
  .try-button { font-size: 19px; padding: 15px 22px; }
  .badge img { height: 52px; }
  .section-title h2 { font-size: 19px; white-space: nowrap; }
  .section-title img { width: 84px; }
  .pagehead h1 { font-size: 21px; white-space: nowrap; }
  .pagehead img { width: 96px; }
  .app__points { grid-template-columns: 1fr; }
  .app__points li, .app__points li + li { padding: 14px 0; border-left: 0; }
  .app__points li + li { border-top: 1px solid var(--border); }
  .cal { gap: 3px; }
  .cal__day { min-height: 62px; padding: 4px 1px; border-radius: 6px; }
  .cal__day[aria-pressed="true"] { padding: 3px 0; }
  .cal__day > span { width: 26px; height: 26px; line-height: 26px; font-size: 15px; }
  .cal__day i { font-size: 10px; padding: 0 4px; line-height: 15px; }
  .cal__day small { display: none; }
  .detail { padding: 16px 16px 20px; }
  .detail h1 { font-size: 21px; }
  .detail__head { grid-template-columns: 40px minmax(0, 1fr); }
  .detail__head .deal__mark { grid-column: 1 / -1; min-height: 0; }
  .notify { grid-template-columns: 1fr; }
  .notify > img { display: none; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}

/* 一覧のカードは高さを揃える:入りきらない文字は省略 */
.deal__title, .deal__benefit, .deal__merchant { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal__period { white-space: nowrap; overflow: hidden; }
.deal__period small { font-size: 11px; color: var(--muted); }
.detail .deal__merchant { white-space: normal; }
.android-note { font-size: 13px; margin-top: 10px; opacity: .9; }
.app .android-note, .notify .android-note { color: var(--muted); opacity: 1; margin-bottom: 0; }
.detail__sources li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.detail__sources em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 3px; padding: 0 5px; flex: none; }
.detail__sources span { margin-left: 0; }
@media (min-width: 761px) { .deal-list--rows .deal { min-height: 68px; } }
@media (max-width: 760px) { .hero .android-note { padding-right: 84px; } }
.section-title h2 time { color: var(--red); margin-right: .45em; }
@media (max-width: 760px) { .section-title h2 { white-space: normal; } .section-title h2 time { display: block; font-size: 15px; } }

/* 本実装で追加したページの部品 */
.section-title h1 { font-size: 24px; font-weight: 800; padding-bottom: 6px; }
.newer { background: var(--status-bg); border-radius: 8px; padding: 12px 16px; margin-bottom: 14px; font-size: 15px; }
.newer a { color: var(--red); font-weight: 700; margin-left: 6px; }
.detail__summary--lead { font-size: 17px; color: var(--ink); margin-top: 16px; }
.detail__block .deal-list { margin-top: 4px; }
.detail__periods--past th { width: 11.5em; }
.detail__periods--past td { font-weight: 400; }
.detail__periods--past td small { display: block; margin-left: 0; }
.detail__periods--past a { color: var(--blue); font-weight: 600; }
.detail__links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.detail__links a { color: var(--blue); }
.pager { display: flex; justify-content: space-between; margin-top: 36px; font-size: 15px; font-weight: 600; }
.pager a { color: var(--red); text-decoration: none; }
.shoplist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.shoplist a { display: block; padding: 9px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; font-size: 15px; }
.shoplist a:hover { border-color: var(--red); }
@media (max-width: 760px) { .detail__periods--past th { width: 7.5em; } }
