:root {
  --ink: #101010;
  --muted: #565656;
  --line: #c8c8c8;
  --soft-line: #dddddd;
  --paper: #f8f7f4;
  --panel: #fbfaf7;
  --blue: #134fd4;
  --blue-dark: #0b39a7;
  --blue-light: #1758e6;
  font-family: "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; }
body { margin: 0; background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }

.shell {
  min-height: 100vh;
  width: 100%;
  border: 1px solid #bdbdbd;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.brand {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--ink);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 31px;
  font-weight: 760;
  letter-spacing: -.055em;
}

.section-name {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.symbol {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 48px;
  flex: 0 0 38px;
}

.symbol::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 37px;
  height: 8px;
  background: #050505;
  box-shadow: 0 15px 0 #050505;
}

.symbol::after {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 25px;
  height: 8px;
  background: var(--paper);
}

.symbol i {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 13px;
  height: 12px;
  background: var(--blue);
}

.auth-layout {
  flex: 1;
  min-height: 690px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.account-copy,
.auth-panel {
  display: flex;
  align-items: center;
}

.account-copy {
  padding: 70px clamp(48px, 5.8vw, 90px);
}

.account-copy-inner {
  width: 100%;
  max-width: 590px;
}

.auth-panel {
  position: relative;
  border-left: 1px solid #d5d5d5;
  padding: 70px clamp(58px, 6.2vw, 100px);
  transition: background-color .18s ease, border-color .18s ease;
}

.auth-layout.register-mode .auth-panel {
  border-left-color: var(--blue);
  background: #f1f4fb;
}

.auth-layout.register-mode .auth-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--blue);
}

.auth-panel-inner {
  width: 100%;
  max-width: 570px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--blue);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: .105em;
}

.account-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-size: clamp(82px, 8.2vw, 126px);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.065em;
}

.account-rule {
  display: block;
  width: 70px;
  height: 3px;
  margin: 38px 0 34px;
  background: var(--blue);
}

.account-lead {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(20px, 1.75vw, 28px);
  line-height: 1.55;
  letter-spacing: -.04em;
}

h1, h2, p { margin-top: 0; }

.auth-panel h2 {
  margin: 0 0 24px;
  font-size: clamp(38px, 3vw, 48px);
  font-weight: 700;
  letter-spacing: -.055em;
}

.auth-layout.register-mode .auth-panel h2::before {
  content: "NEW ACCOUNT";
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .16em;
}

.intro {
  margin-bottom: 36px;
  color: #4b4b4b;
  font-size: 18px;
  line-height: 1.65;
  letter-spacing: -.02em;
}

label {
  display: block;
  margin: 24px 0 9px;
  color: #4e4e4e;
  font-size: 17px;
  font-weight: 500;
}

input {
  width: 100%;
  height: 69px;
  border: 1px solid #a8a8a8;
  border-radius: 0;
  padding: 0 16px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(19, 79, 212, .12);
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

button {
  min-height: 56px;
  border: 1px solid var(--blue);
  border-radius: 0;
  padding: 0 20px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
}

button:hover { background: var(--blue-dark); }
button:disabled { cursor: wait; opacity: .65; }

#auth-submit {
  width: 100%;
  height: 60px;
  margin-top: 20px;
  border-color: var(--blue);
  background: linear-gradient(105deg, var(--blue-dark), var(--blue-light));
  font-size: 18px;
}

#auth-submit:hover {
  background: linear-gradient(105deg, #082f8e, #124ccc);
}

.auth-layout.register-mode #auth-submit {
  border-color: #101010;
  background: #101010;
}

.auth-layout.register-mode #auth-submit:hover {
  background: #292929;
}

.auth-divider {
  height: 1px;
  margin: 22px 0;
  background: #d6d6d6;
}

.text-button {
  width: 100%;
  height: 54px;
  margin: 0;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-size: 17px;
  font-weight: 600;
}

.text-button:hover {
  background: rgba(19, 79, 212, .045);
  color: var(--blue-dark);
}

.auth-layout.register-mode .text-button {
  border-color: #777;
  color: #252525;
}

.auth-layout.register-mode .text-button:hover {
  background: rgba(0, 0, 0, .035);
  color: #000;
}

.message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #bb2636;
  font-size: 13px;
  line-height: 1.45;
}

.message.success { color: #187145; }
.hidden { display: none !important; }

.site-footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  padding: 0 54px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* Account dashboard */
.dashboard {
  flex: 1;
  padding: 60px 48px 76px;
}

.dashboard-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.dashboard .eyebrow {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: .15em;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--ink);
}

.dashboard-head h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(37px, 5vw, 54px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.06em;
}

.secondary {
  border-color: #aaa399;
  background: transparent;
  color: var(--ink);
}

.secondary:hover { background: #ebe7df; }

.add-link,
.links-panel {
  margin-top: 24px;
  padding: 28px;
}

.product-heading {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin-bottom: 17px;
}

.product-heading > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.product-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.04em;
}

.product-heading.compact { margin: 0; }

.add-link form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 92px;
  gap: 8px;
}

.add-link input {
  min-width: 0;
  height: 45px;
}

.add-link form button {
  width: auto;
  min-height: 45px;
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border-bottom: 1px solid #e0dcd3;
  padding: 16px 0;
}

.link-list a {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-list a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.link-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.delete {
  min-height: 32px;
  padding: 0 11px;
  align-self: center;
  border-color: #b8b1a7;
  background: transparent;
  color: #5b606b;
  font-size: 12px;
}

.delete:hover {
  border-color: #b72b3a;
  background: #fff5f5;
  color: #a41f2d;
}

.empty {
  margin: 28px 0 4px;
  color: var(--muted);
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .brand {
    min-height: 82px;
    padding: 0 24px;
  }

  .brand-lockup {
    gap: 13px;
    font-size: 27px;
  }

  .section-name { font-size: 16px; }

  .auth-layout {
    display: block;
    min-height: 0;
  }

  .account-copy {
    padding: 58px 30px 54px;
  }

  .account-copy h1 {
    font-size: clamp(68px, 16vw, 102px);
  }

  .auth-panel {
    border-top: 1px solid #d5d5d5;
    border-left: 0;
    padding: 54px 30px 64px;
  }

  .auth-layout.register-mode .auth-panel {
    border-top-color: var(--blue);
    border-left: 0;
  }

  .auth-panel-inner,
  .account-copy-inner {
    max-width: 620px;
    margin: 0 auto;
  }

  .site-footer {
    min-height: 72px;
    padding: 0 28px;
  }
}

@media (max-width: 640px) {
  .brand {
    min-height: 72px;
    padding: 0 18px;
  }

  .brand-lockup {
    gap: 10px;
    font-size: 24px;
  }

  .symbol {
    width: 31px;
    height: 40px;
    flex-basis: 31px;
  }

  .symbol::before {
    width: 31px;
    height: 7px;
    box-shadow: 0 12px 0 #050505;
  }

  .symbol::after {
    top: 14px;
    width: 20px;
    height: 7px;
  }

  .symbol i {
    width: 11px;
    height: 10px;
  }

  .account-copy {
    padding: 46px 22px 42px;
  }

  .account-copy .eyebrow {
    margin-bottom: 18px;
    font-size: 14px;
  }

  .account-copy h1 {
    font-size: clamp(58px, 19vw, 84px);
  }

  .account-rule {
    width: 54px;
    height: 2px;
    margin: 28px 0 24px;
  }

  .account-lead {
    font-size: 18px;
  }

  .desktop-break { display: none; }

  .auth-panel {
    padding: 42px 22px 54px;
  }

  .auth-panel h2 { font-size: 36px; }
  .intro { font-size: 15px; margin-bottom: 28px; }
  label { font-size: 15px; }
  input { height: 56px; }

  #auth-submit {
    height: 56px;
    font-size: 16px;
  }

  .text-button { font-size: 15px; }

  .dashboard { padding: 42px 18px 54px; }
  .dashboard-head {
    align-items: start;
    flex-direction: column;
  }

  .add-link,
  .links-panel { padding: 20px; }

  .add-link form { grid-template-columns: 1fr; }
  .add-link form button { width: 100%; }

  .site-footer {
    min-height: 64px;
    padding: 0 20px;
    font-size: 13px;
  }
}
