:root {
  --ink: #18251f;
  --muted: #66746d;
  --paper: #f4f2eb;
  --card: #fffdf8;
  --line: #dcded5;
  --green: #2d604b;
  --green-dark: #173e30;
  --lime: #d8f35a;
  --coral: #ed725b;
  --shadow: 0 24px 60px rgba(21, 48, 37, .12);
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 15px;
  background: var(--lime);
  color: var(--green-dark);
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 800;
  box-shadow: 7px 7px 0 var(--green-dark);
}

.brand-mark-small {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 18px;
  box-shadow: 4px 4px 0 var(--green-dark);
}

.auth-page { background: var(--green-dark); }
.auth-shell {
  display: grid;
  grid-template-columns: minmax(440px, 45%) 1fr;
  width: 100%;
  min-height: 100vh;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 7vw, 110px);
  background: var(--card);
}

.auth-panel .brand-mark { margin-bottom: 54px; }
.auth-panel h1 {
  margin: 0;
  max-width: 610px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(37px, 4vw, 64px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.3;
}

.lead {
  max-width: 560px;
  margin: 25px 0 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.auth-form { display: grid; gap: 10px; max-width: 520px; }
.auth-form label, .password-form label { font-size: 13px; font-weight: 700; }
.auth-form input, .password-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 17px;
  border: 1px solid #cbd0c8;
  border-radius: 8px;
  outline: none;
  background: white;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}

.auth-form input:focus, .password-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(45, 96, 75, .11);
}

.auth-form button, .password-form button {
  min-height: 55px;
  margin-top: 8px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--green-dark);
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.auth-form button:hover, .password-form button:hover { background: var(--green); transform: translateY(-1px); }
.auth-form button span { float: right; font-size: 20px; }
.auth-help { max-width: 520px; margin: 19px 0 0; color: #879089; font-size: 12px; line-height: 1.7; }

.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background:
    radial-gradient(circle at 72% 30%, rgba(216, 243, 90, .22), transparent 24%),
    linear-gradient(145deg, #214d3c, #102d23 70%);
}

.auth-visual::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.visual-orbit { position: absolute; border: 1px solid rgba(216, 243, 90, .24); border-radius: 50%; }
.orbit-one { top: 12%; right: 7%; width: 470px; height: 470px; }
.orbit-two { top: 24%; right: 19%; width: 260px; height: 260px; }
.signal-card {
  position: absolute;
  z-index: 2;
  padding: 23px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.1);
  color: white;
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
  backdrop-filter: blur(16px);
}

.signal-card-main { top: 27%; left: 18%; width: 290px; transform: rotate(-3deg); }
.signal-card-main p { display: inline; margin-left: 8px; color: #cfddd6; font-size: 12px; }
.signal-card-main strong { display: block; margin-top: 28px; font: 800 28px/1 ui-monospace, monospace; letter-spacing: -.05em; }
.signal-card-sub { top: 50%; right: 12%; width: 170px; transform: rotate(5deg); }
.signal-card-sub small, .signal-card-sub strong { display: block; }
.signal-card-sub small { color: var(--lime); font: 700 10px ui-monospace, monospace; letter-spacing: .13em; }
.signal-card-sub strong { margin-top: 8px; font-size: 21px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(237,114,91,.14); }
.visual-copy { position: absolute; bottom: 11%; left: 12%; margin: 0; color: white; font-family: "Yu Mincho", serif; font-size: clamp(27px, 3vw, 43px); line-height: 1.55; }

.notice { max-width: 720px; margin: 0 0 20px; padding: 13px 15px; border-radius: 7px; font-size: 13px; line-height: 1.65; }
.notice-error { border: 1px solid #eeb6a9; background: #fff1ed; color: #8b3826; }
.notice-success { border: 1px solid #b9d8c8; background: #eff9f3; color: #23523d; }

.site-header, .admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 clamp(22px, 5vw, 80px);
  border-bottom: 1px solid var(--line);
  background: rgba(244,242,235,.88);
  backdrop-filter: blur(12px);
}

.site-brand, .admin-header > div { display: flex; align-items: center; gap: 15px; text-decoration: none; font-size: 15px; }
.site-brand b { color: var(--green); }
.text-button { padding: 9px 0; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.text-button:hover { color: var(--ink); }

.member-main { width: min(1200px, calc(100% - 44px)); margin: 0 auto; padding: 65px 0 75px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero-row h1 { margin: 0; font-family: "Yu Mincho", serif; font-size: clamp(42px, 6vw, 74px); font-weight: 500; letter-spacing: -.055em; }
.hero-description { margin: 15px 0 0; color: var(--muted); font-size: 14px; }
.update-badge { min-width: 160px; padding: 15px 18px; border-left: 2px solid var(--green); background: rgba(255,255,255,.42); }
.update-badge span, .update-badge time { display: block; }
.update-badge span { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.update-badge time { font: 700 13px/1.5 ui-monospace, monospace; }
.result-meta { display: flex; justify-content: space-between; margin: 52px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; }
.result-meta p { margin: 0; }
.result-meta strong { color: var(--ink); font-size: 20px; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.article-card {
  display: flex;
  min-height: 350px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.article-card:hover { transform: translateY(-3px); border-color: #b5c1b9; box-shadow: 0 18px 42px rgba(23,62,48,.09); }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.signal-pill { color: var(--coral); font: 800 10px ui-monospace, monospace; letter-spacing: .07em; }
.signal-pill .live-dot { width: 6px; height: 6px; margin-right: 8px; box-shadow: none; }
.price { font: 800 14px ui-monospace, monospace; }
.article-card h2 { margin: 27px 0 10px; font-size: 18px; line-height: 1.6; }
.article-card h2 a { text-decoration: none; }
.article-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 4px; }
.author { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tags span { padding: 5px 8px; border-radius: 4px; background: #edf0e9; color: #55615a; font-size: 10px; }
.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: auto 0 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.card-stats div { min-width: 0; }
.card-stats dt { color: var(--muted); font-size: 9px; }
.card-stats dd { overflow: hidden; margin: 5px 0 0; font: 700 12px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.card-link { display: flex; align-items: center; justify-content: space-between; padding-top: 15px; border-top: 1px solid var(--line); color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }
.card-link:hover { color: var(--coral); }
.empty-state { margin-top: 55px; padding: 90px 25px; border: 1px dashed #b8c0b8; border-radius: 12px; text-align: center; background: rgba(255,255,255,.3); }
.empty-icon { color: var(--green); font-size: 45px; }
.empty-state h2 { margin: 18px 0 10px; font-family: "Yu Mincho", serif; font-size: 25px; font-weight: 500; }
.empty-state p, .member-note { color: var(--muted); font-size: 12px; line-height: 1.8; }
.member-note { margin: 42px 0 0; text-align: center; }

.admin-auth-page { display: grid; place-items: center; padding: 30px; background: var(--green-dark); }
.compact-auth-shell { width: min(450px, 100%); }
.compact-auth-card { padding: clamp(30px, 7vw, 54px); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.compact-auth-card h1 { margin: 0 0 12px; font-family: "Yu Mincho", serif; font-size: 32px; font-weight: 500; }
.compact-auth-card > p:not(.eyebrow):not(.error-code) { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.back-link { display: inline-block; margin-top: 22px; color: var(--muted); font-size: 12px; text-decoration: none; }
.error-card { text-align: center; }
.error-code { margin: 0; color: var(--coral); font: 800 60px ui-monospace, monospace; }
.primary-link { display: inline-block; padding: 13px 20px; border-radius: 7px; background: var(--green-dark); color: white; font-size: 13px; font-weight: 700; text-decoration: none; }

.admin-header { background: var(--green-dark); color: white; border: 0; }
.admin-header .text-button { color: #bed0c8; }
.admin-main { width: min(1120px, calc(100% - 44px)); margin: 0 auto; padding: 58px 0 80px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.admin-heading h1 { margin: 0; font-family: "Yu Mincho", serif; font-size: 50px; font-weight: 500; letter-spacing: -.04em; }
.outline-button { padding: 11px 16px; border: 1px solid #aeb9b1; border-radius: 6px; color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
.outline-button:hover { border-color: var(--green); }
.admin-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.admin-card { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.admin-card-primary { box-shadow: 0 18px 45px rgba(23,62,48,.07); }
.admin-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.admin-card-heading > div { display: flex; align-items: center; gap: 12px; }
.admin-card h2 { margin: 0; font-size: 17px; }
.step-number { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--lime); font: 800 10px ui-monospace, monospace; }
.status-chip { padding: 5px 8px; border-radius: 30px; background: #edf0e9; color: var(--muted); font-size: 9px; font-weight: 700; }
.admin-card > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.password-form { display: grid; gap: 9px; margin-top: 24px; }
.password-form label:not(:first-of-type) { margin-top: 8px; }
.muted { margin: 14px 0 0; font: 11px ui-monospace, monospace; }
.run-list { display: grid; gap: 8px; margin-top: 22px; }
.run-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; }
.run-row.run-active { border-color: #8ead9d; background: #f1f8f3; }
.run-row > div:first-child strong, .run-row > div:first-child span { display: block; }
.run-row > div:first-child strong { font: 700 12px ui-monospace, monospace; }
.run-row > div:first-child span { margin-top: 3px; color: var(--muted); font: 10px ui-monospace, monospace; }
.run-count strong { font: 800 18px ui-monospace, monospace; }
.run-count span { margin-left: 2px; color: var(--muted); font-size: 9px; }
.run-status { min-width: 48px; padding: 5px 7px; border-radius: 20px; text-align: center; font-size: 9px; font-weight: 800; }
.status-completed { background: #edf0e9; color: var(--muted); }
.status-staging { background: #fff4d9; color: #7b5a17; }
.status-failed { background: #ffeae5; color: #923c2a; }
.run-active .run-status { background: var(--green); color: white; }
.mini-empty { margin-top: 22px; padding: 42px 20px; border: 1px dashed var(--line); text-align: center; }
.mini-empty strong { font-size: 13px; }
.mini-empty p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { min-height: 100vh; }
  .auth-visual { display: none; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-panel { padding: 36px 25px; }
  .auth-panel .brand-mark { margin-bottom: 45px; }
  .auth-panel h1 { font-size: 36px; }
  .site-header, .admin-header { min-height: 68px; padding: 0 20px; }
  .site-brand { font-size: 13px; }
  .member-main, .admin-main { width: min(100% - 30px, 1200px); padding-top: 45px; }
  .hero-row { align-items: flex-start; flex-direction: column; gap: 24px; }
  .hero-row h1 { font-size: 48px; }
  .update-badge { width: 100%; }
  .result-meta { align-items: flex-end; gap: 15px; }
  .result-meta p:last-child { max-width: 130px; text-align: right; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card { min-height: 320px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-heading h1 { font-size: 42px; }
  .admin-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
