/* Mom Ping: plum lettering, rose details and rounded cream surfaces. */
:root {
  --mp-bg: #fff8f3;
  --mp-surface: #f6e7ee;
  --mp-surface-2: #fff0e8;
  --mp-line: #98718a;
  --mp-text: #382438;
  --mp-text-2: #685063;
  --mp-accent: #6b2d5c;
  --mp-accent-strong: #532047;
  --mp-accent-soft: #f8dce5;
  --mp-ok: #0f5132;
  --mp-focus: #6b2d5c;
  --mp-on-accent: #ffffff;
  --mp-radius: 22px;
  --mp-fs: 20px;
  --mp-maxw: 68rem;
  --mp-rose: #d9667f;
  --mp-shadow: 0 10px 30px rgb(107 45 92 / .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mp-bg: #211822; --mp-surface: #382739; --mp-surface-2: #2c202e; --mp-line: #9d7993;
    --mp-text: #fff1ed; --mp-text-2: #e4cbdc; --mp-accent: #f2aacd; --mp-accent-strong: #ffd2e5; --mp-accent-soft: #4a2d42;
    --mp-ok: #8fd6ae; --mp-focus: #f7ba7e; --mp-on-accent: #211822; --mp-shadow: 0 10px 30px rgb(0 0 0 / .2); color-scheme: dark;
  }
}
html[data-size="1"] { --mp-fs: 23px; }
html[data-size="2"] { --mp-fs: 26px; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mp-bg); color: var(--mp-text);
  font: 400 var(--mp-fs)/1.6 ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
}
:lang(ja) body, body:lang(ja) { font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif; line-break: strict; }
:lang(zh-Hans) body, body:lang(zh-Hans), :lang(zh-CN) body, body:lang(zh-CN) { font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
:lang(zh-Hant) body, body:lang(zh-Hant) { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; }
a { color: var(--mp-accent); text-underline-offset: .15em; }
a:hover { color: var(--mp-accent-strong); }
:focus-visible { outline: 3px solid var(--mp-focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
code { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; color: var(--mp-text); font-weight: 700; }
h1 { font-size: 1.75em; margin: .4em 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.3em; margin: 1.6em 0 .6em; }
h3 { font-size: 1.1em; margin: 1.2em 0 .4em; }
p { margin: 0 0 .9em; text-wrap: pretty; }   /* no lone character or word on a paragraph's last line */
.mp-wrap { max-width: var(--mp-maxw); margin: 0 auto; padding: 0 16px; }
.mp-skip { position: absolute; left: -9999px; top: 0; }
.mp-skip:focus { left: 16px; top: 8px; background: var(--mp-bg); padding: 8px 12px; z-index: 10; }

/* header */
.mp-site-head { background: var(--mp-surface-2); padding-top: 18px; }
.mp-head-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 0 20px; }
.mp-brand { grid-column: 2; display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 800; font-size: 1.5em; color: var(--mp-accent); text-decoration: none; min-height: 48px; }
.mp-brand svg { width: 34px; height: 34px; flex: none; }
.mp-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; max-width: 100%; grid-column: 3; }   /* wraps on phones, but stays at the right edge so the language menu (anchored right) opens inside the screen */
.mp-size-btn { min-width: 48px; min-height: 48px; border: 1px solid var(--mp-line); background: var(--mp-bg); color: var(--mp-text); border-radius: var(--mp-radius); font: inherit; font-weight: 700; cursor: pointer; }
.mp-size-btn[aria-pressed="true"] { background: var(--mp-accent); color: var(--mp-on-accent); border-color: var(--mp-accent); }
.mp-lang { position: relative; }
.mp-lang summary { list-style: none; min-height: 48px; display: flex; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap; border: 1px solid var(--mp-line); border-radius: var(--mp-radius); cursor: pointer; background: var(--mp-bg); }
.mp-lang summary::-webkit-details-marker { display: none; }
.mp-lang ul { position: absolute; right: 0; top: 54px; z-index: 5; list-style: none; margin: 0; padding: 6px; background: var(--mp-bg); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); min-width: min(14rem, calc(100vw - 32px)); max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.mp-lang li a { display: block; padding: 10px 12px; border-radius: var(--mp-radius); text-decoration: none; color: var(--mp-text); }
.mp-lang li a:hover, .mp-lang li a[aria-current="true"] { background: var(--mp-accent-soft); }
.mp-nav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 0 8px; margin: 0; list-style: none; }
.mp-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 999px; background: var(--mp-bg); text-decoration: none; color: var(--mp-accent); font-weight: 600; }
.mp-nav a[aria-current="page"] { background: var(--mp-accent-soft); color: var(--mp-accent-strong); }
.mp-nav a:hover { background: var(--mp-surface); }
@media (max-width: 40rem) {
  /* phones: one row that scrolls sideways instead of three or four rows above the page title */
  .mp-head-row { grid-template-columns: 1fr; }
  .mp-brand, .mp-tools { grid-column: 1; justify-content: center; margin: 0; }
  .mp-nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; margin: 0 -16px; padding: 0 16px 8px; }
  .mp-nav li { flex: none; }
  .mp-nav a { white-space: nowrap; }
}

/* banner */
.mp-lang-banner { background: var(--mp-accent-soft); border-bottom: 1px solid var(--mp-line); }
.mp-lang-banner .mp-wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 16px; }
.mp-lang-banner[hidden] { display: none; }

/* main */
main { padding: 8px 0 48px; }
.mp-lead { font-size: 1.1em; color: var(--mp-text-2); max-width: 46rem; }
.mp-ai-note { display: flex; align-items: flex-start; gap: 14px; font-size: .9em; color: var(--mp-text-2); background: var(--mp-surface); padding: 18px 20px; border-radius: var(--mp-radius); max-width: 54rem; margin: 24px 0 20px; }
.mp-ai-note p { margin: 0; }
.mp-ai-seal { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mp-accent); color: var(--mp-on-accent); font-weight: 800; font-size: .9em; }
.mp-gentle-note { background: var(--mp-surface-2); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); padding: 12px 16px; color: var(--mp-text-2); max-width: 52rem; }
.mp-meta { color: var(--mp-text-2); font-size: .9em; }
.mp-crumbs { font-size: .9em; color: var(--mp-text-2); margin: 12px 0 0; }
.mp-crumbs a { color: var(--mp-text-2); }

/* messages */
.mp-msgs { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }
.mp-msg { background: var(--mp-surface-2); border: 0; box-shadow: var(--mp-shadow); border-radius: var(--mp-radius); padding: 18px 18px 12px; display: flex; flex-direction: column; gap: 10px; }
.mp-msg-text { margin: 0; font-size: 1.05em; white-space: pre-line; }
.mp-msg-tags { font-size: .8em; color: var(--mp-text-2); }
.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.mp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; min-width: 48px; padding: 0 16px; border-radius: var(--mp-radius); border: 1px solid var(--mp-line); background: var(--mp-bg); color: var(--mp-text); font: inherit; font-size: .9em; font-weight: 700; text-decoration: none; cursor: pointer; }
.mp-btn:hover { border-color: var(--mp-accent); color: var(--mp-accent-strong); }
.mp-btn.mp-primary { background: var(--mp-accent); border-color: var(--mp-accent); color: var(--mp-on-accent); }
.mp-btn.mp-primary:hover { background: var(--mp-accent-strong); color: var(--mp-on-accent); }
.mp-btn[hidden] { display: none; }
.mp-btn.mp-done { border-color: var(--mp-ok); color: var(--mp-ok); }

/* cards */
.mp-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 15rem), 1fr)); }
.mp-cards a { display: block; border-radius: var(--mp-radius); overflow: hidden; border: 0; box-shadow: var(--mp-shadow); background: var(--mp-surface); text-decoration: none; color: var(--mp-text); }
.mp-cards img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.mp-card-hero { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 52rem) { .mp-card-hero { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); } }
.mp-card-hero img { border-radius: var(--mp-radius); border: 0; box-shadow: var(--mp-shadow); }

/* scenario grid */
.mp-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.mp-tiles a { display: flex; flex-direction: column; justify-content: center; min-height: 84px; padding: 14px 16px; border-radius: var(--mp-radius); background: var(--mp-surface-2); border: 0; box-shadow: var(--mp-shadow); text-decoration: none; color: var(--mp-text); font-weight: 700; }
.mp-tiles a span { font-weight: 400; color: var(--mp-text-2); font-size: .85em; }
.mp-tiles a:hover { box-shadow: 0 0 0 2px var(--mp-accent), var(--mp-shadow); }

/* holidays */
.mp-hol-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mp-hol-list li { padding: 12px 16px; background: var(--mp-surface-2); border: 0; box-shadow: var(--mp-shadow); border-radius: var(--mp-radius); }
.mp-table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9em; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--mp-line); vertical-align: top; }
th { background: var(--mp-surface); }
@media (max-width: 40rem) {
  /* phones: one card per country instead of a table that needs sideways scrolling */
  table.mp-by-country, table.mp-by-country tbody, table.mp-by-country tr, table.mp-by-country th, table.mp-by-country td { display: block; width: auto; }
  table.mp-by-country thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.mp-by-country tr { border: 0; box-shadow: var(--mp-shadow); border-radius: var(--mp-radius); padding: 6px 12px 10px; margin: 0 0 12px; background: var(--mp-surface-2); }
  table.mp-by-country th[scope="row"] { background: none; border: 0; padding: 6px 0; font-size: 1.05em; }
  table.mp-by-country td { border: 0; padding: 3px 0; }
  table.mp-by-country td[data-label]::before { content: attr(data-label) " · "; font-weight: 700; }
}

/* generator */
.mp-gen fieldset { border: 1px solid var(--mp-line); border-radius: var(--mp-radius); padding: 10px 14px 14px; margin: 0 0 14px; }
.mp-gen legend { font-weight: 700; padding: 0 6px; }
.mp-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-choices label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--mp-line); border-radius: var(--mp-radius); background: var(--mp-bg); cursor: pointer; }
.mp-choices input { width: 20px; height: 20px; accent-color: var(--mp-accent); }
.mp-gen-out { margin-top: 16px; }

/* article */
.mp-prose { max-width: 46rem; }
.mp-prose li { margin: .3em 0; }
.mp-sources { font-size: .9em; }
.mp-sources li { margin: .4em 0; word-break: break-word; }
.mp-notice { background: var(--mp-surface); border-radius: var(--mp-radius); padding: 12px 16px; font-size: .9em; }

/* footer */
.mp-site-foot { border-top: 0; background: var(--mp-surface-2); padding: 24px 0 36px; font-size: .9em; color: var(--mp-text-2); }
.mp-site-foot ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.mp-site-foot a { color: var(--mp-text-2); display: inline-flex; min-height: 48px; align-items: center; }
.mp-pager { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin: 24px 0; }
.mp-langs-root { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.mp-langs-root a { display: block; padding: 16px 18px; border: 1px solid var(--mp-line); border-radius: var(--mp-radius); background: var(--mp-surface-2); text-decoration: none; color: var(--mp-text); }
.mp-langs-root strong { display: block; font-size: 1.1em; }
.mp-langs-root span { color: var(--mp-text-2); font-size: .9em; }
.mp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-more { display: inline-block; }
.mp-more summary { list-style: none; }
.mp-more summary::-webkit-details-marker { display: none; }
.mp-more[open] { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-more[hidden] { display: none; }
ul.mp-quotes { list-style: none; padding: 0; }
ul.mp-quotes li { margin: 0 0 1.2em; }
ul.mp-quotes blockquote { margin: 0; padding: 10px 16px; border-left: 4px solid var(--mp-accent); background: var(--mp-surface-2); border-radius: var(--mp-radius); }
ul.mp-quotes blockquote p { margin: 0 0 .4em; }
ul.mp-quotes .mp-orig { font-size: .85em; color: var(--mp-text-2); }

.mp-root-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; list-style: none; }
.mp-root-cards figure { margin: 0; height: 100%; overflow: hidden; border-radius: var(--mp-radius); background: var(--mp-surface-2); box-shadow: var(--mp-shadow); }
.mp-root-cards img { width: 100%; }
.mp-root-cards figcaption { padding: 18px; font-size: .9em; }
.mp-root-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 32px 0; }
.mp-root-entries a { padding: 20px; color: var(--mp-accent); background: var(--mp-surface); border-radius: var(--mp-radius); text-decoration: none; font-weight: 700; box-shadow: var(--mp-shadow); }
.mp-root-languages { font-size: .9em; margin: 32px 0 20px; }
.mp-root-languages a { display: inline-block; padding: 10px 0; }
.mp-site-head::after { content: ""; display: block; width: 68px; height: 4px; background: var(--mp-rose); border-radius: 22px; margin: 6px auto 0; }
.mp-help-purpose { color: var(--mp-accent); font-weight: 600; }
@media (max-width: 54rem) { .mp-root-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .mp-root-cards, .mp-root-entries { grid-template-columns: 1fr; } }
