/* D-DNS.JP shared styles. Palette "赤レンガ2" (design/directions/*.dc.html). */
:root {
  --primary: #b64c49;
  --deep: #903736;
  --hover: #722a2a;
  --soft: #ebb5a9;
  --tint: #f4e1db;
  --bg: #fbf5f2;
  --line: #e7cfc7;
  --line-strong: #d1b4ac;
  --row-line: #eee0db;
  --sub: #70534d;
  --ink: #2e1918;
  --placeholder: #a88e88;
  --on-dark-sub: #dbc2bb;
  --ok: #3f8a5a;
  --ok-bg: #e4f5ea;
  --ok-fg: #2f6b45;
  --err: #a8234f;
  --err-bg: #fbe4ea;
  --warn-bg: #fdf0d8;
  --warn-fg: #8a5a10;
  --shadow: 0 2px 0 rgba(46, 25, 24, 0.1);
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --mono: "DM Mono", "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); }
a { color: var(--deep); text-decoration: none; font-weight: 700; }
a:hover { color: var(--hover); }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }
input::placeholder { color: var(--placeholder); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.sub { color: var(--sub); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline-form { display: inline; margin: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1.5px solid transparent; font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; white-space: nowrap; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--deep); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.btn-danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-danger-solid { background: var(--err); color: #fff; }
.btn-danger-solid:hover { background: #8c1c41; color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--tint); color: var(--placeholder); border-color: transparent; cursor: not-allowed; }
.btn-lg { height: 46px; border-radius: 12px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.link-button { background: none; border: none; padding: 0; color: var(--deep); font-weight: 700; font-size: inherit; cursor: pointer; }
.link-button:hover { color: var(--hover); }

/* inputs */
.input { height: 40px; width: 100%; border: 1.5px solid var(--ink); border-radius: 10px; padding: 0 12px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; outline: none; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
.label { font-size: 12px; font-weight: 700; color: var(--sub); }
/* authenticator code (templates/_otp.html): js/otp.js lays one box per digit over the input, which
   stays the field underneath (the boxes let the pointer through and hide it, autofill tints too) */
.otp { position: relative; display: flex; }
.otp.is-ready .input:focus { box-shadow: none; }
/* the input keeps its size under the boxes, but not its border: at fractional zoom the
   rounding leaves a line of it between the boxes (2026-09-16: 103 pixels at 125%) */
.otp.is-ready .input { border-color: transparent; }
.otp-boxes { position: absolute; inset: 0; display: flex; gap: 8px; background: #fff; pointer-events: none; font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--ink); }
.otp-box { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); border-radius: 10px; }
.otp:focus-within .otp-box.is-next { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
/* forced colours (Windows contrast themes) drop box-shadow and replace border colours, and the boxes
   hide the input's own focus ring: outline the next box in the system's focus colour */
@media (forced-colors: active) { .otp:focus-within .otp-box.is-next { outline: 2px solid Highlight; outline-offset: 2px; } }

/* chips and badges */
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); white-space: nowrap; cursor: pointer; }
.chip:hover { color: var(--ink); background: var(--tint); }
.chip.is-on, .chip.is-on:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1.5px solid; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.badge-muted { background: var(--tint); color: var(--sub); border-color: var(--line); }
.badge-stop { background: var(--tint); color: var(--sub); border-color: var(--line-strong); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: #c98a1e; }
.badge-type { background: var(--tint); color: var(--ink); border-color: var(--line); }

.msg-error { color: var(--err); font-size: 13px; min-height: 18px; }
.msg-sub { color: var(--sub); font-size: 13px; min-height: 18px; }

/* brand mark */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }

/* simple centred pages (placeholder, error, my page) */
.simple { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 24px 48px; }
.simple-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; }
.simple-main { flex-grow: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding-top: 32px; }
.card-box { width: min(460px, 100%); background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 36px 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.card-box h1 { font-size: 22px; font-weight: 700; }
.card-box p { font-size: 14px; line-height: 1.8; color: var(--sub); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
