:root {
  color-scheme: light;
  --paper: #f6f2eb;
  --card: #fffdfa;
  --ink: #27202a;
  --muted: #625864;
  --accent: #74364c;
  --accent-deep: #512334;
  --accent-light: #f5e5ea;
  --line: #dfd4d0;
  --green: #28584b;
  --green-light: #e6f1e9;
  --gold: #6d4917;
  --gold-light: #f8edd5;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); }
a { color: var(--accent-deep); text-underline-offset: .22em; }
button, input, select { font: inherit; }
button, input, select, a { -webkit-tap-highlight-color: #74364c21; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: min(100%, 1050px); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
.mast { border-bottom: 1px solid var(--line); }
.mast-inner { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font: 700 25px/1.2 var(--serif); letter-spacing: .05em; }
.brand small { display: block; font: 600 11px/1.4 var(--sans); color: var(--muted); margin-top: 3px; letter-spacing: .04em; }
.mark { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; background: var(--accent); color: white; border-radius: 9px 6px 8px 6px; outline: 1px solid #ffffffb8; outline-offset: -5px; font: 700 23px var(--serif); }
.subtle, .primary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 15px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 700; }
.subtle { color: var(--accent-deep); background: var(--card); border: 1px solid var(--line); }
.primary { background: var(--accent); border: 1px solid var(--accent); color: white; }
.primary:hover { background: var(--accent-deep); }
button:disabled { opacity: .6; cursor: wait; }
main.shell { padding-top: 24px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
h1,h2,p { margin-top: 0; }
h1,h2 { letter-spacing: .025em; font-family: var(--serif); }
h1 { margin-bottom: 13px; font-size: clamp(26px,6vw,39px); line-height: 1.35; }
h2 { margin-bottom: 0; font-size: 23px; }
.hero { position: relative; overflow: hidden; background: #eee3df; border-radius: 17px; padding: clamp(21px,5vw,38px); border: 1px solid #ded0cb; }
.hero h1 { max-width: 20em; }
.hero p { color: var(--muted); max-width: 45ch; margin-bottom: 17px; }
.hero .tags { margin-bottom: 0; }
.section { margin: 26px 0 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-head a { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.tile { min-height: 52px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.tile span { color: var(--accent); }
.tile.accent { background: var(--accent-light); color: var(--accent-deep); }
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.card, .panel { border: 1px solid var(--line); background: var(--card); border-radius: 13px; padding: 15px; overflow-wrap: anywhere; }
.card { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; gap: 9px; }
.card:hover, .tile:hover { border-color: var(--accent); }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 8px; border-radius: 6px; background: #eee9e6; color: #554a56; font-size: 12px; font-weight: 700; }
.tag.picture { background: var(--accent-light); color: var(--accent-deep); }
.tag.open { background: var(--green-light); color: var(--green); }
.tag.warning { background: var(--gold-light); color: var(--gold); }
.card strong { line-height: 1.55; font-size: 15px; }
.card small, .muted { color: var(--muted); font-size: 13px; }
.card-bottom { border-top: 1px solid var(--line); padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; }
.empty { background: #fffaf5; border: 1px dashed var(--line); border-radius: 12px; padding: 16px; color: var(--muted); margin: 0 0 12px; }
.dock { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-inner { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
.nav-inner a { min-height: 62px; display: grid; justify-items: center; align-content: center; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap; line-height: 1.4; }
.nav-inner a span { font-size: 24px; line-height: 1.1; }
.nav-inner a[aria-current] { background: var(--accent-light); color: var(--accent-deep); }
.controls { margin-bottom: 14px; }
label { font-weight: 700; font-size: 14px; display: block; }
input,select { width: 100%; min-height: 45px; border-radius: 8px; border: 1px solid #ad9fa6; background: white; color: var(--ink); padding: 7px 9px; font-size: 16px; }
.searchline { display: flex; gap: 7px; align-items: stretch; margin: 4px 0 5px; }
.searchline button { flex: 0 0 auto; }
details { border-top: 1px solid var(--line); margin-top: 10px; }
summary { display: list-item; min-height: 44px; cursor: pointer; padding: 9px 0; font-weight: 700; }
.filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,146px),1fr)); gap: 9px; padding-bottom: 12px; }
.panel + .panel { margin-top: 10px; }
.panel p:last-child, .empty:last-child { margin-bottom: 0; }
.data { display: grid; grid-template-columns: minmax(7em,31%) 1fr; margin: 0; }
.data dt,.data dd { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; overflow-wrap: anywhere; }
.data dt { color: var(--muted); padding-right: 12px; font-size: 14px; }
.data dd { font-weight: 600; }
.detail .primary { width: 100%; margin-block: 12px 8px; min-height: 53px; }
.detail .subtle { margin-block: 4px; }
.detail h1 { overflow-wrap: anywhere; }
.back { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; font-weight: 700; margin-bottom: 7px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.paging { justify-content: center; padding-top: 14px; }
.links { padding-left: 20px; }
.links li { padding-block: 4px; }
.login { width: min(91%,430px); margin: 12vh auto; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.login h1 { margin-top: 22px; }
.login input { margin-top: 5px; }
.login p { color: var(--accent-deep); margin: 10px 0; }
.login button { width: 100%; }
#feedback:not(:empty) { position: fixed; z-index: 9; bottom: calc(75px + env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); left: max(14px, env(safe-area-inset-left)); width: fit-content; margin-left: auto; background: var(--ink); color: white; border-radius: 8px; padding: 8px 15px; font-size: 14px; }
@media (min-width:700px) { .tiles { grid-template-columns: repeat(4,minmax(0,1fr)); } .card { padding: 18px; } }
@media (max-width:370px) { .shell { padding-inline: 13px; } .tile { padding-inline: 8px; } }
@media (orientation:landscape) and (max-height:500px) { .mast-inner { min-height: 58px; } .nav-inner a { min-height: 47px; } .nav-inner a span { font-size: 18px; } }
.spacing { margin-top: 14px; }
.check-row { display: flex; gap: 8px; align-items: center; min-height: 45px; }
.check-row input { width: 20px; min-height: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--accent); }
#app-update:not(:empty) { position: fixed; z-index: 6; right: 14px; top: max(8px,env(safe-area-inset-top)); }
