@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --bg: #f3f5f9; --card: #ffffff; --text: #111827; --muted: #6b7280; --line: #e5e7eb;
  --brand: #ff9900; --brand-dark: #e68a00; --ink: #0f172a; --ink-2: #1e293b;
  --primary: #2563eb; --primary-dark: #1d4ed8; --danger: #dc2626; --ok: #16a34a; --warn: #d97706;
  --ok-bg: #dcfce7; --ng-bg: #fee2e2; --warn-bg: #fef3c7; --info-bg: #dbeafe;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Noto Sans JP", -apple-system, "Segoe UI", "Hiragino Sans", sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 8px; letter-spacing: .01em; }
h2 { font-size: 1.1rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h2 .ico { width: 20px; height: 20px; color: var(--primary); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.small { font-size: .85rem; }
.ok-text { color: var(--ok); font-weight: 700; }

/* ---------- ヘッダー ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; background: var(--ink); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), #ffc266); display: grid; place-items: center; color: var(--ink); font-weight: 800; font-size: .95rem; }
.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav a, .topbar nav button.link { color: #cbd5e1; padding: 6px 12px; border-radius: 8px; font-size: .92rem; text-decoration: none; }
.topbar nav a:hover, .topbar nav button.link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.topbar nav a.cta { background: var(--brand); color: var(--ink); font-weight: 700; }
.topbar nav a.cta:hover { background: #ffad33; }

.container { max-width: 1040px; margin: 28px auto; padding: 0 20px; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 32px 16px 40px; }

/* ---------- カード / ボタン / フォーム ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; margin: 40px auto; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; color: var(--text); cursor: pointer; font: inherit; font-size: .95rem; font-weight: 500; text-decoration: none; transition: .15s; }
button:hover, .button:hover { border-color: #94a3b8; text-decoration: none; }
button.primary, .button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--primary-dark); }
button.brand, .button.brand { background: var(--brand); border-color: var(--brand); color: var(--ink); font-weight: 700; }
button.brand:hover, .button.brand:hover { background: var(--brand-dark); }
.button.small, button.small { padding: 5px 12px; font-size: .85rem; border-radius: 8px; }
.button.danger, button.danger { border-color: #fca5a5; color: var(--danger); background: #fff5f5; }
.button.danger:hover, button.danger:hover { background: #fee2e2; }
button.block { width: 100%; padding: 12px; font-size: 1rem; margin-top: 8px; }
button.link { background: none; border: none; color: var(--primary); padding: 0; cursor: pointer; }
form.inline { display: inline; }
label { display: block; margin: 14px 0 0; font-weight: 600; font-size: .92rem; }
label .sub { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: .82rem; }
input[type=text], input[type=email], input[type=password], input[type=number] { width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; margin-top: 6px; background: #fff; transition: .15s; }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px 16px; margin: 18px 0 0; background: #fafbfc; }
legend { font-weight: 700; padding: 0 6px; font-size: .92rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid2 .full { grid-column: 1 / -1; }
.grid2 .actions { grid-column: 1 / -1; margin-top: 16px; }

/* ---------- アラート / バッジ ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0 18px; display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.alert.error { background: var(--ng-bg); color: #991b1b; }
.alert.info { background: var(--info-bg); color: #1e3a8a; }
.alert.success { background: var(--ok-bg); color: #14532d; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: #166534; }
.badge.ng { background: var(--ng-bg); color: #991b1b; }
.badge.warn { background: var(--warn-bg); color: #92400e; }

/* ---------- 認証画面（2カラム） ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; max-width: 960px; margin: 24px auto; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth .side { background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 60%, #27364a 100%); color: #e2e8f0; padding: 40px 36px; }
.auth .side h1 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.auth .side .lead { color: #cbd5e1; margin-bottom: 26px; }
.auth .side ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.auth .side li { display: flex; gap: 12px; align-items: flex-start; }
.auth .side .num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--ink); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.auth .side li b { color: #fff; display: block; }
.auth .side li span { color: #cbd5e1; font-size: .88rem; }
.auth .side .note { margin-top: 28px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: .85rem; color: #cbd5e1; }
.auth .form { background: #fff; padding: 36px; }
.auth .form h1 { font-size: 1.35rem; }

/* ---------- トップページ ---------- */
.hero { background: radial-gradient(1200px 500px at 20% -20%, #ffb84d33, transparent), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 70%, #27364a 100%); color: #fff; border-radius: 20px; padding: 56px 44px; margin-bottom: 28px; box-shadow: var(--shadow); }
.hero .eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .08em; font-size: .8rem; text-transform: uppercase; }
.hero h1 { font-size: 2.1rem; line-height: 1.3; margin: 8px 0 12px; }
.hero p { color: #cbd5e1; font-size: 1.05rem; max-width: 620px; }
.hero .actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero .button { padding: 12px 22px; font-size: 1rem; border-radius: 12px; }
.hero .button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.hero .button.ghost:hover { background: rgba(255,255,255,.08); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fff4e0; color: var(--brand-dark); margin-bottom: 12px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 1.02rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.howto { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow); }
.howto ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.howto li { position: relative; padding-top: 8px; }
.howto .num { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--brand); font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; }
.howto li b { display: block; margin-bottom: 4px; }
.howto li span { color: var(--muted); font-size: .9rem; }
.howto .cta { margin-top: 22px; }

/* ---------- マイページ ---------- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead .sub { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.tile .label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.tile .value { font-size: 1.35rem; font-weight: 700; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.tile .value.ok { color: var(--ok); } .tile .value.ng { color: var(--danger); } .tile .value.warn { color: var(--warn); }
.tile .bar { height: 6px; border-radius: 999px; background: #e5e7eb; margin-top: 10px; overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #ffc266); border-radius: 999px; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.step:first-child { border-top: none; padding-top: 4px; }
.step .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #e5e7eb; color: #6b7280; }
.step.done .num { background: var(--ok); color: #fff; }
.step.todo .num { background: var(--brand); color: var(--ink); }
.step .body b { font-size: 1rem; display: block; }
.step .body .hint { margin-top: 4px; }
.step .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 130px; }
.step .num svg { width: 18px; height: 18px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two .card { margin-bottom: 20px; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; letter-spacing: .02em; }
tbody tr:hover { background: #f8fafc; }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; background: #fafbfc; }

/* ---------- Amazonログイン画面 ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .status { display: flex; align-items: center; gap: 10px; }
.vnc-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.vnc-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 18px; }
.guide div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .9rem; }
.guide b { display: block; color: var(--ink); margin-bottom: 2px; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth .side { padding: 28px 24px; }
  .features, .howto ol, .guide { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .two, .grid2 { grid-template-columns: 1fr; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 1.6rem; }
  .step { grid-template-columns: 40px 1fr; }
  .step .side { grid-column: 2; align-items: flex-start; }
  .topbar { padding: 10px 14px; }
}
