:root {
  --ink: #171515;
  --muted: #716b66;
  --paper: #fffdf9;
  --line: #e6dfd8;
  --canvas: #f2eee8;
  --green: #1f6a49;
  --green-soft: #eaf5ef;
  --red: #9d3f37;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 90% 0%, #dfd5c8 0, transparent 31rem),
    radial-gradient(circle at 0% 100%, #ded8d1 0, transparent 34rem),
    var(--canvas);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell { min-height: 100svh; padding: 28px; }
.login-card {
  width: min(100%, 480px);
  margin: max(4vh, 24px) auto;
  border: 1px solid rgb(32 27 24 / 10%);
  border-radius: 30px;
  background: rgb(255 253 249 / 97%);
  padding: 46px;
  box-shadow: 0 28px 80px rgb(54 44 35 / 12%);
}
.login-logo { width: 116px; height: auto; }
.eyebrow {
  margin: 28px 0 10px;
  color: #817a73;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
h1, h2, p { margin-top: 0; }
.login-card h1 { margin-bottom: 12px; font-size: 38px; letter-spacing: -.055em; }
.lead { color: var(--muted); line-height: 1.7; }
.login-card form { display: grid; gap: 10px; margin-top: 30px; }
label { font-size: 13px; font-weight: 750; }
input {
  width: 100%;
  height: 54px;
  border: 1px solid #d8d0c9;
  border-radius: 14px;
  outline: none;
  padding: 0 16px;
  background: #fff;
}
input:focus { border-color: #4f4944; box-shadow: 0 0 0 4px rgb(32 28 25 / 8%); }
.login-card form button, .search-form button {
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}
.login-card form button { margin-top: 10px; }
button:disabled { cursor: wait; opacity: .65; }
.notice { min-height: 22px; margin-top: 18px; color: var(--red); font-size: 13px; }
.password-change-card h1 { font-size: clamp(31px, 7vw, 38px); }
.password-change-card .lead { margin-bottom: 0; }
.password-change-logout {
  display: block;
  margin: 6px auto 0;
  padding: 10px 12px;
}

.portal {
  width: min(100%, 1140px);
  margin: 0 auto;
  border: 1px solid rgb(32 27 24 / 10%);
  border-radius: 30px;
  background: rgb(255 253 249 / 97%);
  box-shadow: 0 28px 90px rgb(54 44 35 / 10%);
  overflow: hidden;
}
.portal-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 18px 36px;
}
.portal-header img { width: 105px; height: auto; }
.account { display: flex; align-items: center; gap: 15px; font-size: 13px; font-weight: 750; }
.text-button { border: 0; background: transparent; color: var(--muted); text-decoration: underline; }
.hero { padding: 58px 54px 28px; }
.hero .eyebrow { margin-top: 0; }
.hero h1 { margin-bottom: 14px; font-size: clamp(36px, 6vw, 58px); letter-spacing: -.06em; }
.hero p:last-child { color: var(--muted); }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 0 54px 54px; }
.service-card {
  display: grid;
  min-height: 230px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 28px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.service-card:hover { transform: translateY(-3px); border-color: #beb5ad; box-shadow: 0 16px 35px rgb(42 34 29 / 8%); }
.service-card:focus-visible { outline: 3px solid #7c5cff; outline-offset: 3px; }
.service-card.accent { background: #1c1a19; color: #fff; border-color: #1c1a19; }
.service-number { color: #9b948e; font-size: 12px; font-weight: 800; }
.service-card strong { align-self: end; font-size: 28px; letter-spacing: -.04em; }
.service-card > span:nth-of-type(2) { color: var(--muted); line-height: 1.6; }
.service-card.accent > span:nth-of-type(2) { color: #c9c4c0; }
.service-card b { font-size: 13px; }

.workspace { margin: 0 54px 54px; border: 1px solid var(--line); border-radius: 24px; background: #fff; padding: 28px; }
.workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.workspace-heading .eyebrow { margin-top: 0; }
.workspace-heading h2 { font-size: 30px; letter-spacing: -.04em; }
.outline-button { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 14px; }
.search-form { margin-top: 22px; }
.search-form > div { display: grid; grid-template-columns: 1fr 120px; gap: 10px; margin-top: 9px; }
.search-status { min-height: 42px; padding-top: 16px; color: var(--muted); font-size: 13px; }
.results { display: grid; gap: 10px; }
.stock-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; border: 1px solid var(--line); border-radius: 17px; padding: 20px; }
.stock-card h3 { margin: 0 0 10px; font-size: 17px; }
.stock-card p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.stock-state { align-self: center; border-radius: 999px; padding: 9px 12px; font-size: 12px; font-weight: 850; }
.stock-state.available { background: var(--green-soft); color: var(--green); }
.stock-state.unavailable { background: #f7e9e7; color: var(--red); }

.my-activity { display: grid; grid-template-columns: 1fr auto; gap: 26px; border-top: 1px solid var(--line); padding: 42px 54px 54px; }
.my-activity .eyebrow { margin-top: 0; }
.activity-metrics { display: flex; gap: 12px; }
.activity-metrics div { min-width: 120px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; }
.activity-metrics strong { display: block; font-size: 25px; }
.activity-metrics span { color: var(--muted); font-size: 12px; }
.recent-list { grid-column: 1 / -1; display: grid; gap: 8px; }
.recent-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; border-top: 1px solid var(--line); padding: 12px 2px; font-size: 13px; }
.recent-item time, .recent-item span:last-child { color: var(--muted); }

.notice-board {
  border-top: 1px solid var(--line);
  padding: 38px 54px 50px;
  background: #fcfaf7;
}
.notice-board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.notice-board-heading .eyebrow { margin-top: 0; }
.notice-board-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.notice-board-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.notice-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.notice-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}
.notice-item:first-child { border-top: 0; }
.notice-item.important { background: #fffaf4; }
.notice-item-meta { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; padding-top: 2px; }
.notice-item-meta time { color: #918981; font-size: 11px; font-weight: 700; }
.notice-important-badge { border-radius: 999px; padding: 4px 7px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 850; }
.notice-item h3 { margin: 0 0 7px; font-size: 16px; letter-spacing: -.02em; }
.notice-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; white-space: pre-line; }
.notice-empty { margin: 0; padding: 24px; color: var(--muted); text-align: center; font-size: 13px; }

@media (max-width: 720px) {
  .shell { padding: 0; }
  .portal, .login-card { border-radius: 0; min-height: 100svh; margin: 0; }
  .login-card { padding: 36px 24px; }
  .portal-header { padding: 16px 20px; }
  .hero { padding: 42px 22px 24px; }
  .service-grid { grid-template-columns: 1fr; padding: 0 22px 36px; }
  .workspace { margin: 0 22px 36px; padding: 20px; }
  .search-form > div { grid-template-columns: 1fr; }
  .my-activity { grid-template-columns: 1fr; padding: 34px 22px; }
  .activity-metrics { width: 100%; }
  .activity-metrics div { flex: 1; min-width: 0; }
  .recent-item { grid-template-columns: 1fr; gap: 3px; }
  .notice-board { padding: 32px 22px 38px; }
  .notice-board-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .notice-item { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
}



.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-library-card { background: #f4eee7; border-color: #d9ccbf; }
.product-library-card:hover { background: #ece1d6; }
.library-resource-panel { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 26px; border-radius: 22px; color: #fff; background: #181614; }
.library-resource-panel span { display: block; color: #c6b6a6; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.library-resource-panel h3 { margin: 8px 0 7px; font-size: 23px; }
.library-resource-panel p { margin: 0; color: #d9d2cc; line-height: 1.55; }
.library-resource-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; min-width: min(100%, 390px); }
.library-resource-link { display: inline-flex; align-items: center; min-height: 43px; padding: 0 16px; border-radius: 999px; color: #171513; background: #fff; text-decoration: none; font-size: 13px; font-weight: 800; }
.library-resource-link + .library-resource-link { background: #aa8d73; color: #fff; }
.library-resource-link.disabled { opacity: .42; cursor: not-allowed; pointer-events: none; }
.product-library-list { display: grid; gap: 10px; }
.product-library-row { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: center; padding: 20px 22px; border: 1px solid #e1d8cf; border-radius: 18px; background: #fff; }
.product-library-row h3 { margin: 0 0 6px; font-size: 18px; }
.product-library-row p { margin: 0; color: #786d64; font-size: 13px; }
.product-code-list { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.product-code-list code { padding: 6px 9px; border-radius: 8px; color: #4d453f; background: #f4f0ec; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
@media (max-width: 900px) { .service-grid { grid-template-columns: 1fr; } .library-resource-panel { align-items: flex-start; flex-direction: column; } .library-resource-actions { justify-content: flex-start; min-width: 0; } }
@media (max-width: 620px) { .product-library-row { grid-template-columns: 1fr; } .product-code-list { justify-content: flex-start; } }


.library-resource-panel .library-resource-updated {
  margin-top: 12px;
  color: #bda58f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}
.library-resource-updated time { color: #fff; }
