/* Shared look of the couple's pages (/mypage, /edit/<id>): same tokens and buttons as the LP */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --gold: #9a7028; --gold-2: #b88838; --rose: #b85068;
  --bg: #fdfaf6; --bg2: #f5efe6; --paper: #fff;
  --ink: #1c1008; --muted: #7a6858; --border: rgba(154,112,40,0.2); --border-2: rgba(154,112,40,0.35);
  --danger: #b3261e; --ok: #3f7a4a;
  --serif: 'Georgia', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: -apple-system, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--gold); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

/* Logo (same as the LP) */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
/* Lemory LM mark (public/icons/logo-mark.png) */
.logo-mark { flex: none; width: 32px; height: 32px; background: #f1f1ea url(/icons/logo-mark.png) center / cover no-repeat; border-radius: 7px; box-shadow: 0 2px 8px rgba(154,112,40,0.22); border: 1px solid rgba(154,112,40,0.25); }
.logo-text { font-family: var(--serif); font-size: 16px; letter-spacing: 0.08em; color: var(--ink); white-space: nowrap; }
.logo-text b { font-weight: normal; color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 22px; min-height: 44px;
  border-radius: 999px; font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform 0.15s, opacity 0.15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), #8a6020); color: #fff; box-shadow: 0 4px 16px rgba(154,112,40,0.25); }
.btn-line { border-color: var(--gold); color: var(--gold); background: rgba(255,255,255,0.7); }
.btn-ghost { background: none; color: var(--muted); border-color: var(--border); }
.btn-danger { background: none; color: var(--danger); border-color: rgba(179,38,30,0.35); }
.btn-danger.fill { background: var(--danger); color: #fff; border-color: transparent; }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: 13px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Form controls: 16px or more so iOS does not zoom in */
.field { display: block; margin-bottom: 16px; }
.field > span, .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; letter-spacing: 0.02em; }
.field small, .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], select, textarea {
  display: block; width: 100%; max-width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; min-height: 44px; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 120px; line-height: 1.8; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(154,112,40,0.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 380px) { .row3 { grid-template-columns: 1fr 1fr; } }

/* Checkbox with label */
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--gold); }

/* On/off switch: <input type=checkbox class=switch role=switch> */
.switch { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 48px; height: 28px; border-radius: 999px; background: #d9d0c4; cursor: pointer; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s; }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.55; cursor: default; }

/* Segmented control: <div class=seg><label><input type=radio><span>…</span></label>… */
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 999px; overflow: hidden; background: #fff; max-width: 100%; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 14px; font-size: 13px; white-space: nowrap; color: var(--muted); min-height: 36px; line-height: 22px; }
.seg input:checked + span { background: var(--gold); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Dialogs */
dialog { margin: auto; border: none; border-radius: 18px; padding: 0; color: var(--ink); background: var(--bg); box-shadow: 0 24px 60px rgba(40,20,5,0.3); max-width: min(560px, calc(100vw - 32px)); width: 100%; }
dialog::backdrop { background: rgba(28,16,8,0.45); }
.dlg-body { padding: 24px 22px 20px; }
.dlg-body h2 { font-family: var(--serif); font-weight: normal; font-size: 20px; margin-bottom: 8px; }
.dlg-body p { color: var(--muted); font-size: 14px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; background: rgba(28,16,8,0.92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; max-width: calc(100vw - 32px); }
