/* クエスト掲示板 — 明るい木の板に、飾り枠の依頼書を雑に貼る。依頼主が朱色の「達成」スタンプを押す */
:root {
  --wood-1: #d49b5f;
  --wood-2: #c48649;
  --wood-3: #a96d36;
  --frame: #5a3a22;
  --brass: #e8c27a;
  --brass-dk: #b08548;
  --paper: #f1eadb;
  --paper-2: #e6dcc6;
  --paper-edge: #b9a582;
  --orn: #7a3c22;
  --ink: #2e241a;
  --ink-2: #5f4f3d;
  /* 木目（SVGのノイズで描く） */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='450'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0025 .07' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .18 0 0 0 0 .06 1.7 0 0 0 -.66'/%3E%3C/filter%3E%3Crect width='900' height='450' filter='url(%23w)'/%3E%3C/svg%3E");
  /* 紙のざらつきとしみ */
  --paper-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .16 0'/%3E%3C/filter%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .25 1.1 0 0 0 -.45'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23b)'/%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
  /* 四すみの飾り */
  --c-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%237a3c22' stroke-linecap='round'%3E%3Cpath d='M4 46V13Q4 4 13 4h33' stroke-width='3.4'/%3E%3Cpath d='M11 40V18q0-7 7-7h22' stroke-width='1.4'/%3E%3Cpath d='M17 27q0-10 10-10q6 0 6 6q0 5-5 5q-4 0-4-4' stroke-width='2.2'/%3E%3Ccircle cx='46' cy='4' r='2.6' fill='%237a3c22'/%3E%3Ccircle cx='4' cy='46' r='2.6' fill='%237a3c22'/%3E%3C/svg%3E");
  --c-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%237a3c22' stroke-linecap='round'%3E%3Cg transform='translate(48 0) scale(-1 1)'%3E%3Cpath d='M4 46V13Q4 4 13 4h33' stroke-width='3.4'/%3E%3Cpath d='M11 40V18q0-7 7-7h22' stroke-width='1.4'/%3E%3Cpath d='M17 27q0-10 10-10q6 0 6 6q0 5-5 5q-4 0-4-4' stroke-width='2.2'/%3E%3Ccircle cx='46' cy='4' r='2.6' fill='%237a3c22'/%3E%3Ccircle cx='4' cy='46' r='2.6' fill='%237a3c22'/%3E%3C/g%3E%3C/svg%3E");
  --c-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%237a3c22' stroke-linecap='round'%3E%3Cg transform='translate(0 48) scale(1 -1)'%3E%3Cpath d='M4 46V13Q4 4 13 4h33' stroke-width='3.4'/%3E%3Cpath d='M11 40V18q0-7 7-7h22' stroke-width='1.4'/%3E%3Cpath d='M17 27q0-10 10-10q6 0 6 6q0 5-5 5q-4 0-4-4' stroke-width='2.2'/%3E%3Ccircle cx='46' cy='4' r='2.6' fill='%237a3c22'/%3E%3Ccircle cx='4' cy='46' r='2.6' fill='%237a3c22'/%3E%3C/g%3E%3C/svg%3E");
  --c-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%237a3c22' stroke-linecap='round'%3E%3Cg transform='translate(48 48) scale(-1 -1)'%3E%3Cpath d='M4 46V13Q4 4 13 4h33' stroke-width='3.4'/%3E%3Cpath d='M11 40V18q0-7 7-7h22' stroke-width='1.4'/%3E%3Cpath d='M17 27q0-10 10-10q6 0 6 6q0 5-5 5q-4 0-4-4' stroke-width='2.2'/%3E%3Ccircle cx='46' cy='4' r='2.6' fill='%237a3c22'/%3E%3Ccircle cx='4' cy='46' r='2.6' fill='%237a3c22'/%3E%3C/g%3E%3C/svg%3E");
  /* 依頼書の紙（飾り枠つき）。ふちは少し焼けている */
  --paper-bg:
    var(--c-tl) left 7px top 7px / 40px no-repeat,
    var(--c-tr) right 7px top 7px / 40px no-repeat,
    var(--c-bl) left 7px bottom 7px / 40px no-repeat,
    var(--c-br) right 7px bottom 7px / 40px no-repeat,
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(150,110,60,.28) 100%),
    var(--paper-tex),
    linear-gradient(170deg, var(--paper), var(--paper-2));
  --red: #c3322b;
  --green: #4f7a3a;
  --blue: #3c6a8f;
  --orange: #c26d1f;
  --cream: #f6ecd3;
  --serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
  --brush: 'Yuji Syuku', 'Shippori Mincho B1', serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6;
  background-color: var(--wood-2);
  /* 横に並んだ明るい板：まわりを暗く・板のつなぎ目・板ごとの色むら・木目 */
  background-image:
    radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(70,30,5,.5) 100%),
    repeating-linear-gradient(180deg, transparent 0 166px, rgba(70,35,10,.6) 166px 168px, rgba(255,225,180,.25) 168px 169px, transparent 169px 170px),
    repeating-linear-gradient(180deg, rgba(255,230,190,.08) 0 170px, rgba(110,55,15,.1) 170px 340px, rgba(255,210,150,.05) 340px 510px),
    var(--grain),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 60%, var(--wood-3));
  background-size: auto, auto, auto, 900px 450px, auto;
  background-attachment: fixed;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
svg { width: 20px; height: 20px; flex: none; }

/* ---------- 見出し・タブ ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  padding: calc(10px + env(safe-area-inset-top)) 16px 0;
  background: var(--grain) 0 0 / 900px 450px, linear-gradient(180deg, #6a4327, #553420);
  border-bottom: 3px solid #3a2414;
  box-shadow: inset 0 -1px 0 rgba(255,220,170,.2), 0 4px 14px rgba(40,15,0,.45);
}
/* 濃い木の看板（四すみに留め具） */
.sign {
  margin: 0 auto 10px; width: fit-content; padding: 6px 30px 7px;
  font-family: var(--serif); font-weight: 800; font-size: 21px; letter-spacing: .14em; color: #f4e6c8;
  text-shadow: 0 1px 0 #1b0e05;
  border: 2px solid #c9a46a; border-radius: 5px; text-align: center;
  background:
    radial-gradient(circle at 9px 9px, #e7c98c 2.5px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 9px) 9px, #e7c98c 2.5px, transparent 3.5px),
    radial-gradient(circle at 9px calc(100% - 9px), #e7c98c 2.5px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #e7c98c 2.5px, transparent 3.5px),
    var(--grain) 0 0 / 600px 300px,
    linear-gradient(180deg, #5e3c24, #43291a);
  box-shadow: inset 0 0 0 2px #2f1c10, 0 3px 0 #2a170b, 0 6px 12px rgba(0,0,0,.35);
}
.sign small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .05em; color: #e9c98a; opacity: .85; }
.tabs { display: flex; justify-content: center; gap: 2px; max-width: 640px; margin: 0 auto; }
.tab {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px 8px; border: 0; background: none; color: #dcc39a; font-size: 12px; font-weight: 700;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.tab.on { color: var(--brass); border-bottom-color: var(--brass); }
.tab .badge {
  position: absolute; top: 2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px;
}

/* ---------- 掲示板 ---------- */
.main { padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); max-width: 1100px; margin: 0 auto; overflow-x: clip; }
/* 見出しは赤い帯（両はしがひし形） */
.plate {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: fit-content; min-width: 220px;
  margin: 8px 0 22px; padding: 6px 34px; font-family: var(--serif); font-weight: 800; font-size: 16px;
  color: #ffd85e; letter-spacing: .1em; text-shadow: 0 1px 0 #5a0b08;
  background: linear-gradient(180deg, #d23a2c, #a81d16 55%, #8c140f);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
  box-shadow: inset 0 3px 0 -1px rgba(255,190,150,.35), inset 0 -3px 0 -1px rgba(60,0,0,.4);
  filter: drop-shadow(0 3px 3px rgba(60,20,0,.4));
}
.plate b { font-family: var(--sans); font-size: 13px; background: rgba(60,5,3,.55); color: #ffe7a0; border-radius: 10px; padding: 0 8px; text-shadow: none; }
.plate .alert { font-style: normal; font-family: var(--sans); font-size: 12px; color: #8c140f; background: #ffe7a0; border-radius: 10px; padding: 0 8px; text-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 26px; margin-bottom: 36px; padding: 4px 6px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* 依頼書：表の紙（::after）と、下に重なった紙（::before）。雑に傾けて貼る */
.poster {
  position: relative; z-index: 0; display: flex; flex-direction: column; gap: 6px; text-align: left;
  min-height: 220px; padding: 30px 30px 32px; border: 0; background: none; color: var(--ink);
  transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--t, 0deg));
  transition: transform .2s ease, filter .2s ease;
  filter: drop-shadow(0 5px 6px rgba(60,25,0,.4));
}
.poster::before, .poster::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 2px; }
.poster::before {
  background: var(--paper-tex), linear-gradient(170deg, #e9e0cb, #d8cbb0);
  transform: rotate(var(--t2, 3deg)) translate(4px, 3px);
  box-shadow: inset 0 0 18px rgba(130,95,50,.3);
}
.poster::after {
  background: var(--paper-bg);
  border: 1px solid rgba(110,80,50,.35);
  outline: 2.5px solid var(--orn); outline-offset: -11px;
}
.poster:hover, .poster:focus-visible { z-index: 3; transform: rotate(0) translateY(-4px) scale(1.04); filter: drop-shadow(0 12px 12px rgba(60,25,0,.45)); outline: none; }
.grid.small .poster { min-height: 180px; }
.poster.ghost { opacity: .5; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.pin {
  position: absolute; top: -5px; left: 50%; width: 15px; height: 15px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a7a, var(--red) 55%, #7a1712);
  box-shadow: 1px 3px 2px rgba(40,10,0,.45);
}
.rank4 .pin, .rank5 .pin { background: radial-gradient(circle at 35% 30%, #fff1b8, #d9b36a 55%, #7a5a1c); }
.p-head {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--serif); font-weight: 800; font-size: 12px; letter-spacing: .5em; color: var(--orn);
}
.p-head::before, .p-head::after { content: ''; flex: 1; max-width: 40px; height: 2px; background: currentColor; opacity: .55; border-radius: 1px; }
.p-rank { text-align: center; color: #b07a1d; font-size: 15px; letter-spacing: 2px; }
.p-rank .off { color: rgba(110,86,57,.22); }
.p-rank small { display: block; font-size: 11px; color: var(--ink-2); letter-spacing: .1em; }
.rank5 .p-rank { color: var(--red); text-shadow: 0 0 6px rgba(195,50,43,.3); }
.p-title { font-family: var(--serif); font-weight: 800; font-size: 18px; line-height: 1.45; text-align: center; word-break: break-word; }
.p-body {
  font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.p-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; padding-top: 8px; border-top: 1px dashed rgba(110,86,57,.45); font-size: 12px; color: var(--ink-2); }
.p-status { display: flex; justify-content: center; }
.due { font-weight: 700; white-space: nowrap; }
.due.soon { color: var(--orange); }
.due.over { color: var(--red); }
.tag { display: inline-block; padding: 1px 9px; border-radius: 3px; font-size: 12px; font-weight: 700; color: #fff; }
.tag.open { background: var(--green); }
.tag.taken { background: var(--blue); }
.tag.reported { background: var(--orange); }
.tag.done { background: var(--red); }
.st-done { filter: saturate(.85); }

/* ---------- 達成スタンプ ---------- */
.stamp {
  position: absolute; right: 10px; top: 46px; width: 92px; height: 92px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--red); border: 4px solid var(--red); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--red);
  transform: rotate(var(--r, -14deg)); opacity: .88; mix-blend-mode: multiply; pointer-events: none;
  /* かすれ */
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0,0,0,.75) 70%, #000 85%);
          mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0,0,0,.75) 70%, #000 85%);
}
.s-main { font-family: var(--brush); font-size: 32px; line-height: 1; letter-spacing: .02em; }
.s-date { font-size: 8px; font-weight: 700; letter-spacing: 0; margin-top: 3px; border-top: 1.5px solid currentColor; padding-top: 1px; white-space: nowrap; }
.stamp.big { position: absolute; right: 8px; top: 150px; width: 140px; height: 140px; border-width: 6px; }
.stamp.big .s-main { font-size: 50px; }
.stamp.big .s-date { font-size: 11px; }
.stamp.slam { animation: slam .55s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes slam {
  0% { transform: rotate(var(--r)) scale(2.6); opacity: 0; }
  55% { transform: rotate(var(--r)) scale(.92); opacity: .95; }
  100% { transform: rotate(var(--r)) scale(1); opacity: .88; }
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 6px; border: 0; font-weight: 700; font-size: 15px;
}
.btn.big { padding: 14px 20px; font-size: 17px; width: 100%; }
.btn.block { width: 100%; margin-top: 8px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.primary {
  color: #2a1a0c; background: linear-gradient(180deg, #f0d48e, #c99a45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 #7a5320, 0 5px 10px rgba(0,0,0,.3);
}
.btn.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 0 #7a5320; }
.btn.ghost { background: rgba(58,42,26,.08); color: var(--ink); border: 1.5px solid rgba(58,42,26,.35); }
.btn.danger { background: var(--red); color: #fff; }
.btn.stamp-btn { background: var(--red); color: #fff; box-shadow: 0 3px 0 #7a1712, 0 5px 10px rgba(0,0,0,.3); }
.mini-stamp {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid #fff; font-family: var(--brush); font-size: 12px; line-height: 1; letter-spacing: -.05em; transform: rotate(-12deg);
}
.link { background: none; border: 0; padding: 4px; color: var(--ink-2); text-decoration: underline; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link svg { width: 16px; height: 16px; }
.link.muted { text-decoration: none; }
.fab {
  position: fixed; z-index: 20; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 14px 22px 14px 18px; border: 0; border-radius: 30px;
  font-weight: 700; font-size: 16px; color: #2a1a0c;
  background: linear-gradient(180deg, #f6dc98, #c99a45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 4px 0 #7a5320, 0 8px 20px rgba(0,0,0,.5);
}
.fab svg { width: 22px; height: 22px; }

/* ---------- 依頼書の詳細・入力 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15,8,3,.7); backdrop-filter: blur(2px);
}
.sheet {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden;
  padding: 30px 28px 26px; border-radius: 2px;
  background: var(--paper-bg);
  outline: 3px solid var(--orn); outline-offset: -12px;
  box-shadow: 0 0 0 1px rgba(110,80,50,.4), 10px 12px 0 -2px #e2d7bf, 10px 12px 0 -1px rgba(110,80,50,.3), 0 24px 50px rgba(0,0,0,.6);
  animation: rise .2s ease-out;
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.x { position: absolute; top: 20px; right: 20px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.paper { position: relative; }
.d-title { margin: 6px 0 10px; font-family: var(--serif); font-weight: 800; font-size: 23px; line-height: 1.4; text-align: center; word-break: break-word; padding: 0 20px; }
.d-body { margin: 0 0 14px; white-space: pre-wrap; word-break: break-word; }
.d-meta { margin: 0 0 12px; display: grid; gap: 6px; padding: 10px 12px; border-top: 1px dashed rgba(110,86,57,.5); border-bottom: 1px dashed rgba(110,86,57,.5); }
.d-meta div { display: flex; gap: 12px; align-items: baseline; }
.d-meta dt { width: 4em; flex: none; font-size: 12px; color: var(--ink-2); }
.d-meta dd { margin: 0; font-weight: 700; }
.note { margin: 0 0 12px; padding: 10px 12px; background: rgba(255,255,255,.45); border-left: 3px solid var(--orange); border-radius: 2px; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.note p { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--orange); }
.log { list-style: none; margin: 0 0 6px; padding: 0; font-size: 12px; color: var(--ink-2); }
.log b { display: inline-block; width: 3.4em; }
.acts { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 16px; }
.acts .link { align-self: center; }
.hint { margin: 0; text-align: center; color: var(--ink-2); font-size: 14px; }
.del { margin-top: 18px; padding-top: 12px; border-top: 1px solid rgba(110,86,57,.25); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sheet-title { margin: 0 0 14px; font-family: var(--serif); font-weight: 800; font-size: 20px; text-align: center; }
.field { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field > span { display: block; }
.tf {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
  background: rgba(255,255,255,.7); border: 1.5px solid var(--paper-edge); border-radius: 5px;
}
.tf:focus { outline: 2px solid var(--brass-dk); outline-offset: 1px; }
textarea.tf { resize: vertical; }
.rank-pick { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.rank-pick button { border: 0; background: none; font-size: 30px; line-height: 1; padding: 2px; color: rgba(110,86,57,.25); }
.rank-pick button.on { color: #c08a22; }
.rank-pick small { margin-left: 10px; font-size: 13px; }

/* ---------- 冒険者（マイページ） ---------- */
.card { max-width: 480px; margin: 10px auto; padding: 34px 28px; border-radius: 2px; background: var(--paper-bg); outline: 2.5px solid var(--orn); outline-offset: -11px; box-shadow: 0 0 0 1px rgba(110,80,50,.35), 0 8px 18px rgba(60,25,0,.4); text-align: center; transform: rotate(-1.2deg); }
.me-label { margin: 0; font-size: 12px; letter-spacing: .4em; color: var(--ink-2); }
.me-name { margin: 2px 0 16px; font-family: var(--serif); font-weight: 800; font-size: 26px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 20px; }
.stats div { padding: 10px 4px; background: rgba(255,255,255,.4); border-radius: 4px; }
.stats dt { font-size: 11px; color: var(--ink-2); line-height: 1.3; }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-weight: 800; font-size: 26px; }
.demo-who p { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip { padding: 5px 12px; border-radius: 16px; border: 1.5px solid rgba(58,42,26,.35); background: rgba(255,255,255,.4); font-size: 13px; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.empty { margin: 0 0 30px; padding: 26px 16px; text-align: center; color: #4a2a12; border: 2px dashed rgba(80,40,10,.35); border-radius: 6px; background: rgba(255,235,200,.15); }
.empty p { margin: 0; font-weight: 700; }
.empty small { opacity: .75; }

/* ---------- ログイン ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; padding: 38px 30px 30px; border-radius: 2px; background: var(--paper-bg); outline: 2.5px solid var(--orn); outline-offset: -11px; box-shadow: 0 0 0 1px rgba(110,80,50,.35), 0 10px 30px rgba(60,25,0,.45); transform: rotate(-1deg); }
.auth-brand { margin: 0; text-align: center; font-family: var(--serif); font-weight: 800; font-size: 26px; letter-spacing: .1em; }
.auth-brand.light { color: #3a2010; }
.auth-tag { margin: 4px 0 20px; text-align: center; font-size: 12px; color: var(--ink-2); }
.alt { margin-top: 12px; text-align: center; }
.msg { margin-bottom: 12px; padding: 10px 12px; border-radius: 4px; background: rgba(79,122,58,.15); font-size: 14px; }
.msg.err { background: rgba(195,50,43,.12); color: #8b1f1a; }

#toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 8px; background: #1d1108; color: var(--cream);
  border: 1px solid var(--brass-dk); font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

@media (max-width: 520px) {
  .sign { font-size: 19px; padding: 5px 18px 6px; }
  .grid, .grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .poster { min-height: 190px; padding: 26px 20px 28px; }
  .poster::after { outline-width: 2px; outline-offset: -9px; background-size: 30px 30px, 30px 30px, 30px 30px, 30px 30px, auto, auto, auto; background-position: left 6px top 6px, right 6px top 6px, left 6px bottom 6px, right 6px bottom 6px, 0 0, 0 0, 0 0; }
  .p-title { font-size: 15px; }
  .p-body { -webkit-line-clamp: 2; }
  .stamp { width: 70px; height: 70px; right: 4px; top: 40px; border-width: 3px; }
  .s-main { font-size: 24px; }
  .s-date { font-size: 8px; }
  .stamp.big { width: 110px; height: 110px; right: 0; top: 160px; }
  .stamp.big .s-date { font-size: 9px; }
  .stamp.big .s-main { font-size: 38px; }
  .fab { padding: 13px 18px 13px 14px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.slam, .sheet, .poster.ghost { animation: none; }
  .poster { transition: none; }
}
