:root {
  --ink: #241d28;
  --muted: #756b79;
  --paper: #f7f4f1;
  --card: #fffefd;
  --plum: #5b3f67;
  --plum-dark: #38263f;
  --peach: #efad88;
  --sage: #b8c8b4;
  --line: #e7dfe5;
  --success: #2f7659;
  --warning: #8b6627;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 8%, #f3dacb 0, transparent 28rem), var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: white; background: var(--plum); border-radius: 11px 11px 11px 3px; font-family: Georgia, serif; font-size: 21px; }
.account-actions { display: flex; align-items: center; gap: 14px; }
.account-email { color: var(--muted); font-size: 13px; }

main { max-width: 1180px; margin: 0 auto; padding: 20px 28px 80px; }
.hero { min-height: 410px; display: flex; flex-direction: column; justify-content: center; padding: 54px 0 70px; }
.eyebrow { margin: 0 0 16px; color: var(--plum); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1 { max-width: 760px; margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(52px, 8vw, 92px); font-weight: 500; line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--plum); }
.hero-copy { max-width: 650px; margin: 30px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }

.sign-in-card { width: min(100%, 620px); margin-top: 34px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 254, 253, .8); box-shadow: 0 18px 50px rgba(49, 32, 55, .07); }
.sign-in-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.account-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 160px)); gap: 12px; margin-top: 38px; }
.account-summary div { padding: 16px 18px; background: rgba(255, 254, 253, .76); border: 1px solid var(--line); border-radius: 15px; }
.account-summary span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.account-summary strong { font-size: 17px; }

.section { margin-top: 34px; padding: 34px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255, 254, 253, .91); box-shadow: 0 22px 70px rgba(48, 31, 53, .055); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.section h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(28px, 4vw, 43px); font-weight: 500; letter-spacing: -.035em; }
.section-copy { max-width: 790px; color: var(--muted); line-height: 1.75; }

.status { display: inline-flex; align-items: center; width: fit-content; padding: 6px 10px; border-radius: 999px; white-space: nowrap; font-size: 11px; font-weight: 750; }
.status-ready { color: var(--success); background: #e9f3ee; }
.status-wait { color: var(--warning); background: #f7eedb; }

.command-list { display: grid; gap: 10px; margin: 26px 0; padding: 0; list-style: none; counter-reset: commands; }
.command-item { counter-increment: commands; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 11px 12px 11px 17px; border-radius: 14px; color: #f8f2fa; background: var(--plum-dark); }
.command-item::before { content: counter(commands); display: grid; place-items: center; width: 24px; height: 24px; color: var(--plum-dark); background: var(--peach); border-radius: 50%; font-size: 11px; font-weight: 800; }
.command { min-width: 0; overflow-x: auto; padding: 7px 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; white-space: nowrap; }
.boundary-note { padding: 18px 20px; border-left: 4px solid var(--sage); border-radius: 4px 14px 14px 4px; background: #f1f5ef; }
.boundary-note p { margin: 6px 0 0; color: #556351; line-height: 1.65; }

.catalog-heading { align-items: center; }
.search input { width: min(260px, 40vw); padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; outline: none; }
.search input:focus { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(91, 63, 103, .12); }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 28px; }
.skill-card { display: flex; flex-direction: column; min-height: 310px; padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: var(--card); transition: transform .18s ease, box-shadow .18s ease; }
.skill-card:hover { transform: translateY(-2px); box-shadow: 0 13px 35px rgba(48, 31, 53, .08); }
.skill-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.skill-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: #f2ecef; font-size: 21px; }
.skill-labels { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; }
.category { color: var(--muted); font-size: 11px; }
.skill-title { margin: 22px 0 8px; font-family: Georgia, "Yu Mincho", serif; font-size: 23px; font-weight: 600; }
.skill-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.skill-boundary { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0; }
.boundary-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 9px; background: #f6f3f5; color: #564c59; font-size: 11px; }
.boundary-chip small { color: #968b99; }
.skill-actions { display: flex; gap: 8px; margin-top: auto; }

.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; padding: 10px 14px; cursor: pointer; text-decoration: none; font-weight: 720; font-size: 12px; transition: opacity .15s ease, transform .15s ease; }
.button:hover { opacity: .88; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--plum); }
.button-quiet { color: var(--plum); background: #eee7f0; }
.button-copy { color: var(--plum-dark); background: var(--peach); }

.history-list { display: grid; gap: 9px; margin-top: 22px; }
.history-title { margin: 0 0 8px; font-size: 18px; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; }
.history-result { font-size: 12px; font-weight: 800; }
.result-success { color: var(--success); }
.result-error { color: #a74343; }
.result-neutral { color: var(--warning); }
.history-details { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 11px; }
.empty { color: var(--muted); }
.error { color: #a74343 !important; }

footer { display: flex; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 30px 28px 55px; color: var(--muted); font-size: 11px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; padding: 13px 16px; border-radius: 12px; color: white; background: var(--plum-dark); box-shadow: 0 12px 40px rgba(0, 0, 0, .2); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 850px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-email { display: none; }
}

@media (max-width: 600px) {
  .topbar, main, footer { padding-left: 18px; padding-right: 18px; }
  .hero { min-height: auto; padding-top: 60px; }
  .account-summary { grid-template-columns: repeat(3, 1fr); }
  .account-summary div { padding: 12px; }
  .section { padding: 23px 18px; border-radius: 20px; }
  .section-heading, .catalog-heading { align-items: flex-start; flex-direction: column; }
  .search, .search input { width: 100%; }
  .skill-grid { grid-template-columns: 1fr; }
  .command-item { grid-template-columns: auto minmax(0, 1fr); }
  .command-item .button { grid-column: 2; justify-self: start; }
  .history-row, .history-details { align-items: flex-start; flex-direction: column; gap: 5px; }
  footer { gap: 12px; flex-direction: column; }
}

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