:root {
  color-scheme: light;
  --ink: #14211b;
  --green: #176b4a;
  --green-deep: #0d3d2c;
  --mint: #e8f0eb;
  --gold: #c49735;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #d5ddd8;
  --muted: #66716c;
  font-family: "Yu Gothic UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 0; }

.login-page { min-height: 100vh; background: var(--ink); }
.login-shell { display: grid; grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr); min-height: 100vh; }
.login-brand { position: relative; display: flex; min-height: 100%; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: clamp(40px, 6vw, 88px); color: var(--white); background: var(--green-deep); }
.login-brand::before { content: ""; position: absolute; inset: 8% 10% 34%; border: 1px solid rgba(255,255,255,.22); background: linear-gradient(145deg, rgba(255,255,255,.06), transparent); transform: rotate(-4deg); }
.login-brand::after { content: ""; position: absolute; width: 46%; aspect-ratio: 1; right: 6%; top: 10%; border: 1px solid rgba(196,151,53,.72); border-radius: 50%; }
.login-brand p, .login-brand strong, .login-brand span { position: relative; z-index: 1; }
.login-brand p { margin: 0 0 16px; color: #b9d0c4; font-size: 13px; font-weight: 700; }
.login-brand strong { max-width: 8ch; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(54px, 7vw, 110px); font-weight: 400; line-height: .9; }
.login-brand span { margin-top: 28px; color: var(--gold); font-size: 12px; font-weight: 800; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 8vw, 120px); background: var(--white); }
.login-panel h1 { margin: 0 0 44px; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(38px, 5vw, 70px); font-weight: 400; }
.login-panel form { width: min(100%, 520px); }
.login-panel label { display: block; margin: 22px 0 8px; color: var(--muted); font-size: 13px; }
.login-panel input { width: 100%; min-height: 58px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #fbfcfa; }
.login-panel input:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.login-panel button { display: flex; width: 100%; min-height: 62px; align-items: center; justify-content: space-between; margin-top: 30px; padding: 0 20px; border: 0; border-radius: 0; color: var(--white); background: var(--green); font-weight: 800; cursor: pointer; }
.login-panel button:disabled { cursor: wait; opacity: .6; }
.login-panel small { margin-top: 56px; color: #8b948f; }
.form-message { min-height: 24px; margin: 12px 0 0; color: #9b2c24; font-size: 13px; }

.portal-header { position: sticky; z-index: 20; top: 0; display: flex; min-height: 76px; align-items: center; justify-content: space-between; padding: 12px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.portal-brand { display: flex; align-items: baseline; gap: 12px; color: var(--ink); text-decoration: none; }
.portal-brand b { font-family: Georgia, serif; font-size: 24px; }
.portal-brand span { color: var(--green); font-size: 11px; font-weight: 800; }
.customer-header { display: flex; align-items: center; gap: 16px; }
.customer-header span { color: var(--green); font-size: 12px; font-weight: 800; }
.customer-header strong { font-size: 14px; }
.customer-header button { border: 0; border-bottom: 1px solid var(--ink); padding: 6px 0; color: var(--ink); background: transparent; cursor: pointer; }
.portal-page main { width: min(1440px, 100%); margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px) 80px; }
.portal-intro { display: grid; grid-template-columns: 1fr minmax(520px, .9fr); align-items: end; gap: 54px; padding: clamp(56px, 9vw, 120px) 0 54px; }
.portal-intro h1 { max-width: 9ch; margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(48px, 7vw, 92px); font-weight: 400; line-height: 1; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(84px, 1fr)); margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.summary-grid div { padding: 18px 14px; border-right: 1px solid var(--line); }
.summary-grid div:last-child { border-right: 0; }
.summary-grid dt { color: var(--muted); font-size: 12px; }
.summary-grid dd { margin: 6px 0 0; font-family: Georgia, serif; font-size: 34px; }
.filter-band { display: grid; grid-template-columns: 1fr 1fr .8fr 1.4fr; gap: 1px; padding: 1px; background: var(--line); }
.filter-band label { display: grid; gap: 8px; min-width: 0; padding: 14px 16px; color: var(--muted); background: var(--white); font-size: 12px; }
.filter-band select, .filter-band input { width: 100%; min-width: 0; height: 38px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); background: transparent; }
.filter-band select:focus, .filter-band input:focus { outline: 0; border-bottom-color: var(--green); }
.result-heading { display: flex; align-items: end; justify-content: space-between; padding: 68px 0 20px; border-bottom: 2px solid var(--ink); }
.result-heading h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: 38px; font-weight: 400; }
.result-heading > span { color: var(--green); font-weight: 800; }
.lp-list { display: grid; }
.lp-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) 270px; align-items: center; min-height: 190px; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.lp-index { display: grid; align-content: center; min-height: 110px; padding: 18px; color: var(--white); background: var(--green-deep); }
.lp-index span { color: #a9c5b7; font-size: 11px; }
.lp-index b { margin-top: 10px; font-family: Georgia, serif; font-size: 25px; }
.lp-copy { min-width: 0; }
.lp-copy p { margin: 0 0 10px; color: var(--green); font-size: 12px; font-weight: 800; }
.lp-copy h3 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(21px, 2.2vw, 32px); font-weight: 400; line-height: 1.45; }
.lp-copy small { display: block; margin-top: 14px; overflow-wrap: anywhere; color: #87908b; }
.lp-actions { display: grid; grid-template-columns: 1fr 104px; align-items: stretch; gap: 10px; }
.open-link { display: flex; min-height: 104px; align-items: center; justify-content: space-between; padding: 16px; color: var(--white); background: var(--green); text-decoration: none; font-weight: 800; }
.qr-link { display: grid; justify-items: center; padding: 8px; border: 1px solid var(--line); color: var(--ink); background: var(--white); text-decoration: none; font-size: 11px; }
.qr-link img { width: 72px; height: 72px; object-fit: contain; }
.empty-message { padding: 64px 0; border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 34px 0; }
.pagination button { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--white); cursor: pointer; }
.pagination button:disabled { cursor: default; opacity: .35; }
.pagination span { min-width: 70px; text-align: center; }
.portal-footer { display: flex; justify-content: space-between; padding: 28px clamp(20px, 5vw, 72px); color: var(--white); background: var(--ink); }
.portal-footer span { color: #9fb0a7; font-size: 11px; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 34vh; padding: 34px 28px; }
  .login-brand::before { inset: 14% 8% 26%; }
  .login-brand strong { font-size: 54px; }
  .login-panel { min-height: 66vh; padding: 42px 28px; }
  .login-panel h1 { margin-bottom: 22px; font-size: 40px; }
  .portal-header { align-items: flex-start; }
  .customer-header { display: grid; grid-template-columns: auto auto; gap: 3px 10px; justify-items: end; }
  .customer-header button { grid-column: 1 / -1; }
  .portal-intro { grid-template-columns: 1fr; gap: 34px; }
  .portal-intro h1 { max-width: none; font-size: 52px; }
  .filter-band { grid-template-columns: 1fr 1fr; }
  .lp-item { grid-template-columns: 110px minmax(0, 1fr); }
  .lp-actions { grid-column: 1 / -1; grid-template-columns: 1fr 104px; }
}

@media (max-width: 560px) {
  .portal-brand span { display: none; }
  .customer-header strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-page main { padding-inline: 16px; }
  .portal-intro { padding-top: 44px; }
  .portal-intro h1 { font-size: 42px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid div:nth-child(2) { border-right: 0; }
  .summary-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filter-band { grid-template-columns: 1fr; }
  .lp-item { grid-template-columns: 1fr; gap: 16px; }
  .lp-index { min-height: 76px; }
  .lp-actions { grid-column: auto; }
  .portal-footer { gap: 16px; }
}

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