/* NenkinOne app — navy #0F3D5E, orange #F28C28, light blue #E8F1F7 */
:root {
  --bg: #F4F8FB; --surface: #fff; --surface-2: #E8F1F7; --fg: #0F2B42; --muted: #557087; --line: rgba(15,61,94,.12);
  --navy: #0F3D5E; --blue: #1F6FA8; --orange: #F28C28; --orange-ink: #C9650C; --ok: #1F8A5B; --warn: #B7791F; --bad: #C0392B;
  --dog-bg: #0F3D5E; --dog-face: #fff; --dog-feat: #0F3D5E; --ink: #0F3D5E;
  --radius: 18px; --shadow: 0 1px 2px rgba(15,61,94,.05), 0 14px 34px -22px rgba(15,61,94,.35);
  --font: "Plus Jakarta Sans", "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0A1B29; --surface: #0F2A3F; --surface-2: #16384F; --fg: #EEF4F9; --muted: #9CB2C5; --line: rgba(255,255,255,.12);
    --navy: #8DC0EA; --blue: #4E9BD6; --orange-ink: #F79A45; --dog-bg: #fff; --dog-face: #0F3D5E; --dog-feat: #fff; --ink: #fff; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--font); }
html[lang="ja"] body { font-family: "Noto Sans JP", "Plus Jakarta Sans", "Hiragino Sans", system-ui, sans-serif; }
a { color: var(--blue); }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 560px; }
main.wrap { padding: 28px 0 56px; min-height: 60vh; }
h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); margin-bottom: 22px; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: auto; color: var(--ink); }
.logo .dog { width: 36px; height: 36px; flex: none; }
.wm { font-weight: 800; font-size: 21px; letter-spacing: -.03em; font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.wm b { color: var(--orange); font-weight: 800; }
.staff-tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; background: var(--orange); color: #0F3D5E; padding: 2px 8px; border-radius: 99px; }
.nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; font-weight: 600; font-size: 14.5px; }
.nav a { color: var(--fg); text-decoration: none; }
.nav a:hover { color: var(--blue); }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; font-weight: 600; }
.langs { position: relative; font-size: 14px; }
.langs summary { cursor: pointer; list-style: none; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); font-weight: 600; }
.langs summary::-webkit-details-marker { display: none; }
.langs div { position: absolute; right: 0; top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 150px; z-index: 20; }
.langs div a { padding: 7px 12px; border-radius: 9px; color: var(--fg); text-decoration: none; }
.langs div a[aria-current] { background: var(--surface-2); font-weight: 700; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: none; background: var(--orange); color: #0F3D5E; box-shadow: 0 10px 22px -14px rgba(242,140,40,.9); text-align: center; }
.btn:hover { filter: brightness(1.04); }
.btn.sec { background: var(--surface-2); color: var(--fg); box-shadow: none; }
.btn.navy { background: #0F3D5E; color: #fff; box-shadow: none; }
.btn.sm { padding: 8px 16px; font-size: 14px; }
.btn.danger { background: var(--bad); color: #fff; box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }

/* cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .card { padding: 18px; } }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.opt { font-weight: 500; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=tel], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue); }
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.err { color: var(--bad); font-size: 13.5px; font-weight: 600; margin: 6px 0 0; }
.has-err input, .has-err select { border-color: var(--bad); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: flex-start; gap: 9px; font-weight: 500 !important; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--bg); }
.choice input { margin-top: 4px; accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.check .choice { display: flex; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; background: var(--surface-2); }
.flash.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.flash.err { background: color-mix(in srgb, var(--bad) 13%, var(--surface)); color: var(--fg); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* steps */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; flex-wrap: wrap; }
.steps li { flex: 1 1 110px; font-size: 12.5px; font-weight: 700; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.steps li.done { border-color: var(--blue); color: var(--fg); }
.steps li.cur { border-color: var(--orange); color: var(--fg); }
.steps a { color: inherit; text-decoration: none; }

/* dashboard */
.badge { display: inline-block; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--fg); }
.st-awaiting_payment, .st-needs_info, .st-awaiting_signature { background: color-mix(in srgb, var(--orange) 25%, var(--surface)); }
.st-submitted, .st-preparing, .st-filed { background: color-mix(in srgb, var(--blue) 18%, var(--surface)); }
.st-decided, .st-completed { background: color-mix(in srgb, var(--ok) 20%, var(--surface)); }
.st-cancelled { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.kv { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.docs li { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.docs .files { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.docs form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; }
.docs form input[type=file] { flex: 1 1 220px; padding: 8px; }
.req { color: var(--orange-ink); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.okmark { color: var(--ok); font-weight: 800; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { display: block; padding: 16px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; background: var(--bg); }
.plan:has(input:checked) { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 8%, var(--surface)); }
.plan b { display: block; } .plan .price { font-size: 22px; font-weight: 800; color: var(--orange-ink); margin: 4px 0; }
.thread { display: grid; gap: 10px; margin-bottom: 18px; }
.msg { padding: 12px 15px; border-radius: 16px; background: var(--surface-2); max-width: 82%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { justify-self: end; background: color-mix(in srgb, var(--orange) 16%, var(--surface)); }
.msg.internal { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); border: 1px dashed var(--warn); }
.msg small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; white-space: normal; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }

/* admin tables */
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; overflow: hidden; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: var(--surface-2); font-size: 13px; }
.tablewrap { overflow-x: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { width: auto; flex: 1 1 200px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
code.key { font-size: 18px; letter-spacing: .12em; background: var(--surface-2); padding: 8px 12px; border-radius: 10px; display: inline-block; word-break: break-all; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 22px 0 34px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }

/* printable sheets */
.sheet { background: #fff; color: #000; }
.sheet table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.sheet th, .sheet td { border: 1px solid #333; padding: 6px 8px; text-align: left; font-size: 13px; vertical-align: top; }
.sheet th { width: 34%; background: #f0f0f0; }
@media print { .top, .foot, .noprint { display: none !important; } body { background: #fff; } main.wrap { padding: 0; width: 100%; } .card { box-shadow: none; border: 0; padding: 0; } }
/* additions: wide buttons, secondary links, prices, print helpers */
.btn.wide{width:100%;justify-content:center}
.alt{margin:.8rem 0 0;font-size:.95rem}
.plan .price{display:block;margin-top:.35rem;font-weight:700;color:var(--navy,#0F3D5E)}
.review .kv{margin-bottom:.6rem}
.upload{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.5rem}
.upload .field{margin:0;flex:1 1 100%}
.ph{background:#FFF3B0;color:#5c4700;padding:0 .2em;border-radius:3px}
@media print{.noprint,.top,.foot,.flash{display:none!important}}
.nav a.btn, .nav a.btn:hover { color: #0F3D5E; }
@media (max-width: 640px) {
  .bar { gap: 8px 12px; padding: 8px 0; min-height: 0; }
  .nav { order: 3; width: 100%; gap: 4px 18px; font-size: 14px; }
}
