/* いぬごころ — デザインシステム v2「季刊いぬごころ × 触感」
   方向性: 雑誌/写真集の編集的な高級感（明朝の見出し・生成りの紙・白い印画プレート枠・折丁ラベル）を
   ベースに、触りたくなる手触り（大きめタップ領域・押下で沈む反応・温かい角丸）を融合。
   - 脱AI感: Shippori Mincho(明朝)を見出しに強くコミット。紫・純白純黒・のっぺりカードを排除。
   - 写真主役: 写真は白マットの"印画プレート"に収める。
   - クラス名は既存を全維持（app.jsのロジック非改変）。色は必ずCSS変数経由。 */
:root {
  --paper: #f6efe4;       /* 生成りの紙（背景） */
  --bg: #f6efe4;
  --surface: #fffdf9;     /* 象牙のプレート */
  --plate: #fffdf9;
  --surface-2: #fbf5ec;
  --border: #e8ddcc;
  --border-strong: #dccbb2;
  --rule: #e4d8c6;
  --rule-strong: #d3c3aa;
  --ink: #2c231c;         /* 温かい墨 */
  --ink-2: #5a4c3e;
  --muted: #9a8b78;       /* 霞んだ茶 */
  --primary: #b5502e;     /* テラコッタ（箔押し・CTA・折丁番号） */
  --primary-d: #963e20;
  --primary-soft: #f2e3d6;
  --primary-ring: rgba(181, 80, 46, 0.22);
  --ok: #5c8a5f; --success: #5c8a5f; --ok-bg: #e7efe4; --success-bg: #e7efe4;
  --info: #5b7fa3; --info-bg: #e9eef3;
  --warn: #a9782a; --warn-bg: #f6ecd6;
  --danger: #b5452e; --danger-bg: #f6ddd4;
  --shadow-sm: 0 1px 0 rgba(255,255,255,.7) inset, 0 2px 8px rgba(80, 55, 30, .07);
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 4px 14px rgba(80, 55, 30, .10);
  --shadow-lg: 0 8px 34px rgba(60, 40, 22, .18);
  --shadow-plate: 0 2px 6px rgba(80, 55, 30, .10), 0 10px 26px rgba(80, 55, 30, .09);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 66px;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  /* 紙の微細グレイン */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--gothic);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
/* 紙の質感（全面の極薄グレイン） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: var(--grain); mix-blend-mode: multiply; opacity: .7;
}
button { font-family: inherit; cursor: pointer; font-size: 15px; }
input, select, textarea { font-family: inherit; font-size: 16px; }
a { color: var(--primary-d); }
img, video { max-width: 100%; }
::selection { background: var(--primary-ring); }

#screen { max-width: 620px; margin: 0 auto; padding: 8px 20px 28px; position: relative; z-index: 1; }

/* ---- header（マストヘッド） ---- */
.apphead { display: flex; align-items: flex-end; justify-content: space-between; padding: 18px 2px 10px; }
.apphead .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.apphead .brand .mark { width: 38px; height: 38px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.apphead .brand .bt { display: flex; flex-direction: column; line-height: 1; }
.apphead .brand .kicker { font-family: var(--gothic); font-size: 9.5px; font-weight: 700; letter-spacing: 3px; color: var(--primary); margin-bottom: 4px; }
.apphead .brand .name { font-family: var(--mincho); font-size: 22px; font-weight: 800; letter-spacing: 2.5px; }
.apphead .brand .name b { color: var(--primary-d); font-weight: 800; }
.apphead .who { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }

/* ---- 折丁ラベル調のセクション見出し（一貫モチーフ） ---- */
.section-title {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--mincho); font-size: 18px; font-weight: 700; letter-spacing: 1.5px; color: var(--ink);
  margin: 26px 2px 13px;
}
.section-title::before { content: "🐾"; font-size: 13px; filter: grayscale(.2); opacity: .8; }
.section-title::after { content: ""; flex: 1; height: 1px; background-image: repeating-linear-gradient(90deg, var(--rule-strong) 0 6px, transparent 6px 12px); }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 19px; box-shadow: var(--shadow-plate); margin-bottom: 14px; }
.card h2 { font-family: var(--mincho); font-size: 18px; font-weight: 700; letter-spacing: 1px; margin: 0 0 12px; }
.card h3 { font-family: var(--mincho); font-size: 15.5px; font-weight: 700; letter-spacing: .5px; margin: 0 0 9px; }
.card .sub, .sub { color: var(--muted); font-size: 13px; }

/* ---- buttons ---- */
.btn {
  background: var(--primary); color: #fdf3ea; border: 1px solid transparent; border-radius: 14px;
  padding: 13px 22px; font-size: 15.5px; font-weight: 700; letter-spacing: .5px; font-family: var(--gothic);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 0 #7f3419, 0 10px 18px rgba(150, 62, 32, .26);
  transition: transform .11s cubic-bezier(.2,.7,.3,1), box-shadow .11s;
  min-height: 48px;
}
.btn:hover:not(:disabled) { background: var(--primary-d); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 1px 0 #7f3419, 0 4px 9px rgba(150, 62, 32, .22); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring), 0 4px 0 #7f3419; }
.btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--primary-d); border: 1px solid var(--border-strong); box-shadow: 0 2px 0 var(--border-strong), var(--shadow-sm); }
.btn.ghost:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 var(--border-strong), var(--shadow-sm); }
.btn.ghost:hover:not(:disabled) { background: var(--primary-soft); border-color: var(--primary); }
.btn.danger { background: var(--surface); color: var(--danger); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.danger:active { transform: translateY(1px); }
.btn.sm { padding: 8px 15px; font-size: 13px; min-height: 38px; border-radius: 11px; box-shadow: 0 2px 0 rgba(127,52,25,.5), 0 4px 10px rgba(150,62,32,.2); }
.btn.sm.ghost { box-shadow: 0 2px 0 var(--border-strong), var(--shadow-sm); }
.btn.sm.danger { box-shadow: var(--shadow-sm); }
.btn.block { display: block; width: 100%; }
.btn.big { padding: 17px 24px; font-size: 17px; border-radius: 16px; }

/* ---- forms ---- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 700; letter-spacing: .3px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-ring);
}
.err { color: var(--danger); font-size: 13px; margin-top: 8px; }
.hint { background: var(--info-bg); color: var(--info); font-size: 12.5px; padding: 11px 13px; border-radius: var(--radius-sm); line-height: 1.75; }
.notice { background: var(--warn-bg); color: var(--warn); font-size: 12.5px; padding: 11px 13px; border-radius: var(--radius-sm); line-height: 1.75; }

/* ---- pills / chips ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700; background: var(--primary-soft); color: var(--primary-d); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.dogchips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.dogchips::-webkit-scrollbar { display: none; }
.dogchip { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 17px 6px 6px; font-family: var(--mincho); font-weight: 700; font-size: 15px; letter-spacing: .5px; white-space: nowrap; min-height: 48px; box-shadow: var(--shadow-sm); transition: transform .12s cubic-bezier(.2,.7,.3,1); }
.dogchip:active { transform: scale(.95); }
.dogchip.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm); }
.dogchip .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 50% 40%, #f3cb9e, #cd8f57); box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }

/* ---- login ---- */
.login-wrap { min-height: 86vh; display: flex; align-items: center; justify-content: center; }
.login-card { text-align: center; width: 100%; max-width: 400px; padding: 40px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); animation: rise .4s cubic-bezier(.2,.7,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.login-card .logo { font-size: 54px; }
.login-card h1 { font-family: var(--mincho); font-size: 30px; font-weight: 800; margin: 10px 0 6px; color: var(--ink); letter-spacing: 3px; }
.login-card .tag { color: var(--muted); font-size: 14px; margin-bottom: 28px; line-height: 1.8; }
.line-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #06C755; color: #fff; border: none; border-radius: 14px; padding: 15px; font-size: 16px; font-weight: 700; min-height: 52px; box-shadow: 0 4px 0 #04a145, 0 10px 18px rgba(6,199,85,.24); transition: transform .11s; }
.line-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #04a145; }
.line-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(6,199,85,.3), 0 4px 0 #04a145; }

/* ---- album grid（印画プレート） ---- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid3 .cell {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: none; padding: 0;
  background: var(--surface); box-shadow: inset 0 0 0 4px #fff, var(--shadow-sm);
  transition: transform .12s cubic-bezier(.2,.7,.3,1);
}
.grid3 .cell:active { transform: scale(.95); }
.grid3 .cell img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 11px; }
.grid3 .cell .badge { position: absolute; right: 7px; bottom: 7px; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,253,249,.95); display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.grid3 .cell .vid { position: absolute; left: 9px; top: 8px; color: #fff; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.monthnav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
.monthnav button { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 50%; width: 42px; height: 42px; font-size: 16px; box-shadow: var(--shadow-sm); transition: transform .1s; }
.monthnav button:active:not(:disabled) { transform: scale(.9); }
.monthnav button:disabled { opacity: .35; }
.monthnav .m { font-family: var(--mincho); font-weight: 700; font-size: 17px; letter-spacing: 1px; min-width: 130px; text-align: center; }

/* ---- empty state ---- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big-emoji { font-size: 48px; margin-bottom: 10px; }

/* ---- mood ---- */
.mood-card { display: flex; gap: 13px; align-items: flex-start; }
.mood-card .memoji { font-size: 36px; line-height: 1.2; }
.mood-serif { font-family: var(--mincho); background: var(--primary-soft); border-radius: 4px 18px 18px 18px; padding: 11px 15px; font-weight: 700; font-size: 15px; letter-spacing: .5px; margin-bottom: 7px; }
.mood-note { font-size: 14.5px; line-height: 1.8; }
.mood-tip { font-size: 13px; background: var(--ok-bg); color: var(--ok); border-radius: var(--radius-sm); padding: 9px 13px; margin-top: 9px; }
.disclaimer { font-size: 11.5px; color: var(--muted); margin-top: 11px; line-height: 1.65; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 11px; color: var(--muted); padding: 3px 0; font-weight: 700; }
.cal .day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 11px; font-size: 12px; color: var(--muted); background: var(--surface-2); font-variant-numeric: tabular-nums; }
.cal .day.has { background: var(--primary-soft); color: var(--primary-d); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(181,80,46,.15); }
.cal .day .e { font-size: 16px; line-height: 1; }
.cal .day.blank { background: transparent; }

/* ---- stats（罫で仕切る図版番号調） ---- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-plate); overflow: hidden; }
.metric { padding: 16px 8px 14px; text-align: center; position: relative; }
.metric + .metric::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background-image: repeating-linear-gradient(var(--rule-strong) 0 4px, transparent 4px 9px); }
.metric .v { font-family: var(--mincho); font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.metric .v .u { font-size: 13px; font-weight: 700; margin-left: 1px; color: var(--muted); }
.metric .l { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 5px; letter-spacing: .3px; }

/* ---- walk ---- */
#map, .walkmap { height: 250px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: inset 0 0 0 4px #fff; z-index: 0; overflow: hidden; }
.walk-live { display: flex; justify-content: space-around; text-align: center; margin: 14px 0; }
.walk-live .v { font-family: var(--mincho); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.walk-live .l { font-size: 12px; color: var(--muted); font-weight: 700; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1.2s infinite; margin-right: 6px; }
@keyframes blink { 50% { opacity: .25; } }
.walk-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--border); background: none; border-radius: 0; width: 100%; text-align: left; border-top: none; border-left: none; border-right: none; transition: background .12s; }
.walk-row:active { background: var(--surface-2); }
.walk-row:last-child { border-bottom: none; }
.walk-row .d { font-family: var(--mincho); font-weight: 700; letter-spacing: .5px; }
.walk-row .s { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---- timeline rows ---- */
.list-row { display: flex; gap: 13px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row .thumb { width: 56px; height: 56px; border-radius: 13px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); box-shadow: inset 0 0 0 3px #fff; }

/* ---- bottom nav ---- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-around;
  background: rgba(255, 253, 249, .88); backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--rule);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 22px rgba(80, 55, 30, .06);
}
.bottomnav button {
  flex: 1; max-width: 84px; background: none; border: none; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; color: var(--muted); font-weight: 700; padding: 4px 0; min-height: 50px;
  transition: color .15s;
}
.bottomnav button span { font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; width: 42px; height: 40px; border-radius: 13px; transition: background .15s, transform .12s; filter: grayscale(.35); }
.bottomnav button:active span { transform: translateY(1px) scale(.94); }
.bottomnav button.active { color: var(--primary-d); }
.bottomnav button.active span { background: var(--primary-soft); filter: grayscale(0); }
.bottomnav button:focus-visible { outline: none; }
.bottomnav button:focus-visible span { box-shadow: 0 0 0 3px var(--primary-ring); }

/* ---- modal ---- */
.modal-back { position: fixed; inset: 0; background: rgba(44, 35, 28, .5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; overscroll-behavior: contain; backdrop-filter: blur(2px); }
@media (min-width: 560px) { .modal-back { align-items: center; } }
.modal {
  background: var(--surface); border-radius: 24px 24px 0 0; width: 100%; max-width: 560px;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  animation: rise .28s cubic-bezier(.2,.7,.3,1); box-shadow: var(--shadow-lg);
}
@media (min-width: 560px) { .modal { border-radius: 24px; } }
.modal h2 { font-family: var(--mincho); font-size: 19px; font-weight: 700; letter-spacing: 1px; margin: 0 0 12px; }
.modal .close-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal .x { background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; width: 38px; height: 38px; font-size: 15px; color: var(--muted); transition: transform .1s; }
.modal .x:active { transform: scale(.9); }
.viewer-media { background: #fff; padding: 6px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.viewer-media img, .viewer-media video { width: 100%; border-radius: 11px; background: #000; display: block; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 20px);
  background: var(--ink); color: #fdf3ea; border-radius: 999px; padding: 11px 22px; font-size: 14px; font-weight: 500;
  z-index: 200; box-shadow: var(--shadow-lg); max-width: 88vw;
}

/* ---- reactions ---- */
.react-bar { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.react-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-size: 19px; min-height: 44px; box-shadow: var(--shadow-sm); transition: transform .12s, border-color .12s, background .12s; }
.react-btn:active { transform: scale(.9); }
.react-btn:hover { border-color: var(--primary); }
.react-btn.on { background: var(--primary-soft); border-color: var(--primary); }
.react-btn .rc { font-size: 13px; font-weight: 700; color: var(--primary-d); font-family: var(--mincho); }

/* ---- comments ---- */
.cmt { padding: 11px 2px; border-bottom: 1px solid var(--border); }
.cmt:last-child { border-bottom: none; }
.cmt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.cmt-head b { font-family: var(--mincho); font-weight: 700; letter-spacing: .5px; }
.cmt-del { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 13px; padding: 2px 6px; }

/* ---- memory banner（雑誌の表紙プレート） ---- */
.memory-banner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 17px 17px; margin: 6px 0 4px; box-shadow: var(--shadow-plate);
  position: relative; overflow: hidden;
}
.memory-banner::after { content: ""; position: absolute; top: -46px; right: -46px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--primary-soft), transparent 70%); opacity: .6; }
.memory-banner .mb-label { position: relative; font-family: var(--mincho); font-weight: 700; color: var(--primary-d); font-size: 15px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.memory-banner .mb-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: breathe 3.4s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
.memory-banner .sub { position: relative; margin-top: 2px; }
.memory-banner .grid3 { margin-top: 12px; }

/* ---- notification bell ---- */
.bell { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; width: 44px; height: 44px; font-size: 19px; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; transition: transform .1s; }
.bell:active { transform: scale(.9); }
.bell .dot { position: absolute; top: 1px; right: 1px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--surface); font-family: var(--gothic); }
.act-row { display: flex; gap: 11px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.act-row:last-child { border-bottom: none; }
.act-row .ic { font-size: 22px; }
.act-row b { font-family: var(--mincho); font-weight: 700; }

/* ---- misc ---- */
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.spin { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: -4px; }
@keyframes sp { to { transform: rotate(360deg); } }
.fab-space { height: 8px; }
.beta-tag { font-size: 10px; background: var(--info-bg); color: var(--info); border-radius: 999px; padding: 2px 9px; vertical-align: 3px; font-weight: 700; letter-spacing: .5px; }
.terms-body h4 { font-family: var(--mincho); margin: 15px 0 5px; font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.terms-body p { margin: 0 0 7px; font-size: 13.5px; line-height: 1.8; }

/* ---- home: 主役アクション（写真・さんぽ） ---- */
.home-actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 11px; margin: 16px 0 4px; }
.home-actions .btn { display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; letter-spacing: .2px; padding-left: 12px; padding-right: 12px; }

/* ============================================================
   ランディング（ログイン前の紹介ページ）— みてね型の信頼感
   ============================================================ */
.lp { max-width: 620px; margin: 0 auto; padding: 0 0 40px; position: relative; z-index: 1; }
.lp-inner { padding: 0 20px; }
.lp-mast { display: flex; align-items: center; gap: 10px; padding: 18px 20px 8px; }
.lp-mast .mark { width: 38px; height: 38px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.lp-mast .bt { display: flex; flex-direction: column; line-height: 1; }
.lp-mast .kicker { font-size: 9.5px; font-weight: 700; letter-spacing: 3px; color: var(--primary); margin-bottom: 4px; }
.lp-mast .name { font-family: var(--mincho); font-size: 21px; font-weight: 800; letter-spacing: 2.5px; }

/* 写真フレーム（無ければ上質なフォールバック） */
.lp-photo { position: relative; border-radius: 20px; overflow: hidden; background: linear-gradient(150deg, #f0dcc4, #dcae86); box-shadow: inset 0 0 0 5px #fff, var(--shadow-plate); display: flex; align-items: center; justify-content: center; }
.lp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; border-radius: 15px; }
.lp-photo .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; opacity: .82; z-index: 0; }
.lp-photo.g2 { background: linear-gradient(150deg, #d9e3cf, #a7bd8c); }
.lp-photo.g3 { background: linear-gradient(150deg, #e6d0c6, #cb9781); }
.lp-photo.g4 { background: linear-gradient(150deg, #d6e0ec, #9fbcda); }
.lp-photo.g5 { background: linear-gradient(150deg, #ecdcc6, #cbb088); }
.lp-photo.g6 { background: linear-gradient(150deg, #e9d3d0, #d3a29c); }

/* ヒーロー */
.lp-hero { padding: 14px 20px 8px; }
.lp-hero .lp-photo { aspect-ratio: 4 / 3.1; }
.lp-hero .badge-free { position: absolute; z-index: 2; top: 12px; left: 12px; background: rgba(255,253,249,.94); color: var(--primary-d); font-weight: 700; font-size: 12px; padding: 5px 13px; border-radius: 999px; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.lp-h1 { font-family: var(--mincho); font-size: 28px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.5; margin: 22px 0 10px; }
.lp-h1 .em { color: var(--primary-d); }
.lp-lead { color: var(--ink-2); font-size: 15px; line-height: 1.9; margin-bottom: 22px; }
.lp-cta { display: block; width: 100%; }
.lp-cta-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

/* 共感の3行 */
.lp-feels { display: grid; gap: 10px; margin: 8px 0 4px; }
.lp-feel { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 13px 16px; box-shadow: var(--shadow-sm); }
.lp-feel .fi { font-size: 26px; }
.lp-feel .ft { font-family: var(--mincho); font-weight: 700; font-size: 15.5px; letter-spacing: .5px; }
.lp-feel .fs { font-size: 12.5px; color: var(--muted); }

/* セクション見出し */
.lp-sec-head { text-align: center; margin: 40px 0 6px; }
.lp-sec-head .k { font-size: 10px; font-weight: 700; letter-spacing: 3px; color: var(--primary); }
.lp-sec-head .t { font-family: var(--mincho); font-size: 22px; font-weight: 800; letter-spacing: 1.5px; margin-top: 4px; }

/* 特徴ブロック（写真×説明、交互） */
.lp-feat { margin: 26px 0; }
.lp-feat .lp-photo { aspect-ratio: 5 / 4; margin-bottom: 14px; }
.lp-feat .fno { font-family: var(--mincho); font-size: 13px; font-weight: 700; color: var(--primary); border: 1px solid var(--primary); border-radius: 3px; padding: 1px 8px; display: inline-block; letter-spacing: 1px; }
.lp-feat h3 { font-family: var(--mincho); font-size: 20px; font-weight: 700; letter-spacing: 1px; margin: 10px 0 6px; }
.lp-feat p { font-size: 14px; color: var(--ink-2); line-height: 1.9; margin: 0; }

/* 安心・信頼 */
.lp-trust { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 8px 18px; box-shadow: var(--shadow-plate); margin: 20px 0; }
.lp-trust .ti { display: flex; gap: 13px; align-items: flex-start; padding: 15px 2px; border-bottom: 1px solid var(--border); }
.lp-trust .ti:last-child { border-bottom: none; }
.lp-trust .ti .ic { width: 40px; height: 40px; border-radius: 13px; background: var(--ok-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.lp-trust .ti h4 { font-family: var(--mincho); font-size: 15.5px; font-weight: 700; letter-spacing: .5px; margin: 2px 0 3px; }
.lp-trust .ti p { font-size: 13px; color: var(--muted); line-height: 1.75; margin: 0; }

/* 運営者 */
.lp-operator { background: linear-gradient(160deg, #fbf3ea, #f6ecdc); border: 1px solid var(--border); border-radius: 22px; padding: 24px 20px; text-align: center; margin: 20px 0; box-shadow: var(--shadow-sm); }
.lp-operator .oi { font-size: 40px; }
.lp-operator h3 { font-family: var(--mincho); font-size: 18px; font-weight: 700; letter-spacing: 1px; margin: 8px 0 8px; }
.lp-operator p { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; margin: 0 auto; max-width: 440px; }
.lp-operator .indep { font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.7; }

/* ギャラリー帯 */
.lp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.lp-gallery .lp-photo { aspect-ratio: 1; }
.lp-gallery .lp-photo .ph { font-size: 40px; }

/* 最終CTA */
.lp-final { text-align: center; padding: 34px 20px 10px; }
.lp-final h2 { font-family: var(--mincho); font-size: 22px; font-weight: 800; letter-spacing: 1px; margin: 0 0 6px; }
.lp-final p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

/* フッター */
.lp-foot { text-align: center; padding: 26px 20px 10px; border-top: 1px solid var(--border); margin-top: 26px; }
.lp-foot .links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.lp-foot .links a { font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.lp-foot .op { font-size: 11.5px; color: var(--muted); }
.lp-foot .dev { margin-top: 16px; }

/* ---- はじめてのおてがみ（初回きもち翻訳の特別演出） ---- */
.first-letter { text-align: center; padding: 8px 4px 4px; }
.fl-env { font-size: 52px; animation: fl-pop .55s ease; }
@keyframes fl-pop { 0% { transform: scale(.4) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.12) rotate(3deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.fl-kicker { font-family: var(--mincho); letter-spacing: .18em; font-size: 12.5px; color: var(--primary); margin-top: 8px; }
.fl-from { font-family: var(--mincho); font-size: 15px; color: var(--ink-2); margin: 3px 0 16px; }
.fl-serif { font-family: var(--mincho); font-size: 20px; line-height: 1.85; color: var(--ink); background: var(--plate); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px 18px; }
.fl-note { font-family: var(--gothic); font-size: 14px; line-height: 1.85; color: var(--ink-2); margin-top: 14px; }
.fl-share { display: block; margin: 14px auto 2px; background: none; border: none; color: var(--primary); font-size: 13px; text-decoration: underline; cursor: pointer; font-family: var(--gothic); }

/* ---- P1: いっしょ時計・今週の一言・思い出セリフ・お空 ---- */
.together-clock { text-align: center; font-family: var(--mincho); font-size: 15px; color: var(--ink-2); margin: 12px 0 2px; letter-spacing: .02em; }
.together-clock b { font-size: 22px; color: var(--primary); margin: 0 3px; }
.weekbest { display: block; width: 100%; text-align: left; background: var(--plate); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; cursor: pointer; font-family: inherit; }
.weekbest:active { transform: translateY(1px); }
.wb-label { font-family: var(--mincho); font-size: 12px; letter-spacing: .16em; color: var(--primary); margin-bottom: 8px; }
.wb-row { display: flex; align-items: center; gap: 12px; }
.wb-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.wb-serif { font-family: var(--mincho); font-size: 16px; line-height: 1.6; color: var(--ink); }
.wb-dog, .mb-dog { display: block; font-family: var(--gothic); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.mb-serif { font-family: var(--mincho); font-size: 15px; line-height: 1.6; color: var(--ink); margin: 4px 0 8px; }
.memory-teaser { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--primary-d); line-height: 1.6; margin-bottom: 4px; }
.dogchip.memorial { opacity: .78; }
.memorial-box { margin: 10px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.memorial-box summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); }

/* ---- 園の連絡帳：あいことば入力・折丁ラベル・連携解除 ---- */
/* 「特別な瞬間」は他の見どころ(初回おてがみ/今週の一言)と同じく明朝＋em字送り＋等幅数字で扱う */
.pt-code-kicker { font-family: var(--mincho); font-size: 12px; letter-spacing: .18em; color: var(--primary); text-align: center; margin: 6px 0 8px; }
.pt-code-field input {
  font-family: var(--mincho); font-size: 22px; font-weight: 700; letter-spacing: .24em;
  text-align: center; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--ink);
}
.pt-code-field input::placeholder { letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.pt-meta-label { font-family: var(--mincho); font-size: 11.5px; letter-spacing: .12em; color: var(--primary); margin-right: 6px; }
.pt-unlink-row { margin-top: 12px; text-align: center; }
/* .list-row 内などフル幅にしたくないセレクトの共通フォーム見た目（.field と同じ枠＋terracottaフォーカスリング） */
.field-inline { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.field-inline:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-ring); }
