/* In-app notice pages (opened by the app's web view from the Remote Config "ops" notice "page").
   2026-10-27: the app's paper look (NekPaperStyle) in HTML. Words are text, never inside the pictures, so one picture
   serves every language. How each kind of notice is written and laid out: admin/rules/notice.md (templates in
   templates/news/). */
:root {
  --paper: #fbf6ec; --card: #fffdf8; --ink: #4a3326; --muted: #8c7057; --tan: #f1e8d9; --line: #dbccb3;
  --warm: #b86633; --sale: #c4493a; --night: #3d3460;
  --body: ui-rounded, 'Hiragino Maru Gothic ProN', 'Zen Maru Gothic', system-ui, sans-serif;
  --display: 'Cormorant Garamond', 'Hiragino Mincho ProN', serif;
}
:lang(ko) { --body: ui-rounded, 'Apple SD Gothic Neo', system-ui, sans-serif; word-break: keep-all; }
:lang(zh-Hans) { --body: ui-rounded, 'PingFang SC', system-ui, sans-serif; }
:lang(zh-Hant) { --body: ui-rounded, 'PingFang TC', system-ui, sans-serif; }
@font-face { font-family: 'Cormorant Garamond'; src: url('cormorant.woff2') format('woff2'); font-weight: 300 700; }
@font-face { font-family: 'Cormorant Garamond'; src: url('cormorant-italic.woff2') format('woff2'); font-style: italic; font-weight: 300 700; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.75 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
main { max-width: 560px; margin: 0 auto; padding: 0 0 calc(48px + env(safe-area-inset-bottom)); opacity: 0; transition: opacity .25s; }
main.ready { opacity: 1; }

/* ---- The picture on top, the words under it ---- */
/* 2026-10-28 (user: 「ヘッダー画像の角丸やめて」): edge to edge with square corners. The heading goes under the picture on
   the paper, never over it (small words over the picture hid the cats); only the tag and a sale's stamp sit on it. */
.hero { position: relative; overflow: hidden; }
.hero .key { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.head { margin: 0; padding: 18px 22px 0; }
.head small { display: block; color: var(--warm); font-size: 14px; font-weight: 800; letter-spacing: .05em; }
.head b { display: block; margin-top: 2px; font-size: 25px; line-height: 1.4; white-space: pre-line; }
.head .logo { width: 88%; margin: 2px auto 0; }
.has-logo .title-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.say { margin: 14px 22px 0; font-size: 17px; line-height: 1.75; }

/* A luggage tag hanging on its string, like the app's captions. */
.tag { position: absolute; z-index: 2; top: 14px; left: 16px; padding: 7px 16px 7px 26px; background: var(--card); color: var(--ink);
  font-weight: 800; font-size: 15px; letter-spacing: .04em; border-radius: 4px 10px 10px 4px; transform: rotate(-4deg);
  box-shadow: 0 3px 8px rgba(40, 25, 10, .25); clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); transform-origin: 0 50%;
  animation: sway 3.2s ease-in-out infinite; }
.tag::before { content: ''; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--line); }
.tag--sale { color: var(--sale); }
@keyframes sway { 50% { transform: rotate(-1.5deg); } }

/* A round stamp, the number large: digits read the same in every language. */
.stamp { position: absolute; z-index: 2; top: 12px; right: 14px; width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center;
  text-align: center; color: #fff; background: var(--sale); border: 3px solid #fff; outline: 2px dashed rgba(255, 255, 255, .7); outline-offset: -9px;
  transform: rotate(10deg); box-shadow: 0 4px 12px rgba(80, 20, 10, .35); line-height: 1; }
.stamp b { font: 700 32px/1 var(--display); letter-spacing: -.02em; }
.stamp small { display: block; margin-top: 2px; font: 700 13px/1 var(--body); letter-spacing: .12em; }

.hero--photo .key { aspect-ratio: 4 / 3; }

/* Kinds without a big picture (maintenance, info; an apology has no cat either): the tag on the paper, at most a
   small cat beside the heading. */
.plain-top { position: relative; padding: 22px 0 0; }
.plain-top .tag { position: relative; top: auto; left: 16px; display: inline-block; animation: none; transform: rotate(-3deg); }
.plain-top .head { padding-right: 96px; }
.plain-top.no-cat .head { padding-right: 22px; }
.plain-top .accent { position: absolute; right: 18px; top: 18px; width: 66px; }

/* ---- Paper cards ---- */
.card { margin: 18px 16px 0; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 0 var(--tan); }
.card h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.45; }
.card p { margin: 0; color: var(--ink); }
.lead { margin: 18px 22px 0; color: var(--muted); }
.period { margin: 0 0 12px; color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: .03em; text-align: center; }
.period time { color: var(--ink); }

.prices { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.prices small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.price { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price img { width: 22px; height: 22px; }
.was .price { color: var(--muted); font-size: 17px; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(196, 73, 58, .7); }
.now .price { color: var(--sale); font-size: 26px; }
.now .price img { width: 30px; height: 30px; }
.arrow { color: var(--line); font-size: 24px; }

.spots { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; padding: 0; text-align: center; }
.spots img { width: 100%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 2px 6px rgba(60, 40, 90, .2); }
.spots span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.35; color: var(--muted); font-weight: 700; }

.topic { display: grid; grid-template-columns: 1fr 84px; gap: 12px; align-items: center; }
.topic.no-pic { grid-template-columns: 1fr; }
.topic img { width: 84px; height: 112px; object-fit: contain; }
.topic .num { display: block; color: var(--warm); font: italic 700 20px/1 var(--display); }
.others ul { margin: 6px 0 0; padding-left: 1.1em; }
.others li { margin: 2px 0; }

/* ---- Buttons ---- */
.cta { display: block; margin: 22px 16px 0; padding: 16px; border-radius: 999px; background: var(--warm); color: #fff; text-align: center;
  font-weight: 800; font-size: 17px; letter-spacing: .04em; text-decoration: none; box-shadow: 0 4px 0 #8f4c22; }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #8f4c22; }
.cta--night { background: var(--night); box-shadow: 0 4px 0 #241e3d; }
.cta--night:active { box-shadow: 0 1px 0 #241e3d; }
.cta--quiet { background: var(--tan); color: var(--ink); box-shadow: 0 4px 0 var(--line); }
.fine { margin: 14px 24px 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

/* ---- An update's changes, numbered, without cards (a framed picture of the app stands out on the paper) ---- */
.changes { list-style: none; margin: 6px 0 0; padding: 0; counter-reset: change; }
.changes li { padding: 20px 22px 0; }
.changes li + li { margin-top: 20px; border-top: 1px dashed var(--line); }
.changes h2 { display: flex; gap: 10px; align-items: center; margin: 0 0 4px; font-size: 19px; line-height: 1.45; }
.changes h2::before { counter-increment: change; content: counter(change); flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-content: center; background: var(--warm); color: #fff; font: 700 17px/1 var(--display); }
.changes p { margin: 0; }

/* ---- A picture of the app's screen (2026-10-28, user: 「UIの画像を挿入する場合は、それ自体がUIと間違わないようにアウトライ
   ン必要では？」): a dark line and a shifted shadow, narrower than the text and not tappable, so its buttons never pass
   for the page's own. One picture per language: <img data-lang-src="shot-code-{lang}.webp">. ---- */
.shot { width: 82%; margin: 14px auto 12px; pointer-events: none; -webkit-user-select: none; user-select: none; }
.shot img { width: 100%; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--tan); }

/* ---- Maintenance: the hours large, then what stops and what keeps working ---- */
.when { margin: 16px 16px 0; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.when small { display: block; color: var(--muted); font-size: 15px; font-weight: 800; }
.when b { display: block; font-size: 30px; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 16px 0; }
.two .card { margin: 0; padding: 14px 14px 12px; }
.two h2 { font-size: 15px; margin-bottom: 4px; }
.two ul { margin: 0; padding-left: 1.1em; font-size: 14px; line-height: 1.6; }
.two .stop h2 { color: var(--sale); }
.two .keep h2 { color: #4f7a4a; }

/* ---- Apology: what happened, what we fixed, the gift and how to get it ---- */
.facts { margin: 16px 16px 0; padding: 4px 20px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.facts h2 { margin: 14px 0 2px; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.facts p { margin: 0; }
.gift { display: flex; gap: 12px; align-items: center; margin: 12px 16px 0; padding: 14px 18px; background: #fff6e8; border: 1px solid #ecd3ad; border-radius: 18px; }
.gift img { flex: none; width: 46px; }
.gift b { display: block; font-size: 18px; }
.gift span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
.code { margin: 10px 16px 0; padding: 10px; border: 2px dashed var(--line); border-radius: 12px; background: var(--card); text-align: center;
  font: 800 24px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .12em; -webkit-user-select: all; user-select: all; }

/* ---- An update's versions (update-3-0: 3.0.0, then 3.0.1) ---- */
.group { margin: 28px 22px 0; color: var(--warm); font-size: 15px; font-weight: 800; letter-spacing: .04em; }

/* ---- A sale that has ended: the prices stay, crossed out ---- */
.ended-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--tan); color: var(--ink); font-weight: 800; text-align: center; }
main.ended .now .price { color: var(--muted); text-decoration: line-through; }
main.ended .stamp { filter: grayscale(1); opacity: .7; }

/* ---- Opened in a browser (not the app): back to the site's /news list ---- */
.to-list { display: block; padding: 12px 18px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }

/* ---- Review only (?preview=1): every language at a tap ---- */
.langs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 9; }
.langs a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font: 13px/1.6 system-ui; text-decoration: none; }
.langs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .tag { animation: none; } main { transition: none; } }

/* ---- The relay's next sale (2026-11-02): one quiet line under the prices, its map and period from feed.json ---- */
.next { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; text-align: center; }
.next b, .next time { color: var(--ink); }
.next[hidden] { display: none; }

/* ---- The monthly secret word (event 01): a limited-time ticket over a low landscape, the gift printed on it ----
   Design 3 chosen 2026-11-02 (.reports/20261102-1105-nek-code-letter-designs). No story around it, no event tag
   (user: 「ひだまりちょう郵便局とかへんな設定入れないでいい」「左上のイベントタグ いらない」「期間限定チケット っていうのをしめして」
   「チケットはもっと上に移動して」). Template: templates/news/code/. */
.code-land { display: block; width: 100%; aspect-ratio: 390 / 160; object-fit: cover; object-position: 50% 45%; }
.ticket { position: relative; z-index: 2; margin: -78px 18px 0; padding: 24px 20px 18px; background: var(--card); border-radius: 16px;
  box-shadow: 0 12px 28px -14px rgba(74, 51, 38, .55); text-align: center; }
.ticket .limited { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 5px 16px;
  border-radius: 99px; background: var(--warm); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .12em;
  box-shadow: 0 3px 8px -3px rgba(74, 51, 38, .5); }
.ticket small { display: block; color: var(--warm); font-weight: 800; font-size: 13px; letter-spacing: .08em; }
.ticket h1 { margin: 4px 0 0; font-size: 22px; line-height: 1.4; }
.ticket .cut { position: relative; margin: 16px -20px 14px; border-top: 2px dashed var(--line); }
.ticket .cut::before, .ticket .cut::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); }
.ticket .cut::before { left: -11px; } .ticket .cut::after { right: -11px; }
.ticket .code { color: var(--ink); font: 800 34px/1.1 ui-monospace, Menlo, monospace; letter-spacing: .14em; -webkit-user-select: all; user-select: all; }
.ticket .prize { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 10px 14px; text-align: left;
  background: #fff6e8; border: 1px solid #ecd3ad; border-radius: 12px; }
.ticket .prize img { flex: none; width: 40px; }
.ticket .prize b { display: block; font-size: 17px; }
.ticket .prize span { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.where { margin: 16px 16px 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
.where span { padding: 5px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
