:root {
  --bg: #ffffff;
  --text: #9A2929;
  --line: #E8E8E8;
  --accent: #9A2929;
  --muted: #E8E8E8;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth {
  width: min(100%, 420px);
  text-align: center;
}

.auth__title {
  margin: 0 0 44px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.form {
  display: grid;
  gap: 22px;
}

.field {
  text-align: left;
}

.field label {
  display: block;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}

.field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 4px 10px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.field input::placeholder {
  color: rgba(154, 41, 41, 0.35);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.button--small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  white-space: nowrap;
}

.links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  font-size: 14px;
}

.links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.links a:hover {
  border-bottom-color: var(--text);
}

.panel {
  width: min(100%, 420px);
  text-align: center;
}

.subtitle {
  margin: 0 0 34px;
  font-size: 18px;
  color: var(--text);
}

.hint {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text);
  opacity: 0.78;
}

.note {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text);
  opacity: 0.78;
}

.helper {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text);
  opacity: 0.72;
  text-align: left;
}

.mypage {
  width: min(100%, 1180px);
}

.mypage-shell {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

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

.mypage-topbar__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mypage-topbar__icon {
  width: 14px;
  height: 14px;
  border: 1px solid var(--text);
  border-radius: 4px;
  position: relative;
}

.mypage-topbar__icon::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}

.mypage-hero {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.mypage-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.mypage-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.mypage-avatar::before {
  content: "사진";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--text);
  opacity: 0.4;
  pointer-events: none;
}

.mypage-avatar.has-image::before {
  content: "";
}

.mypage-avatar__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.mypage-user {
  display: grid;
  gap: 6px;
}

.mypage-user__name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mypage-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  opacity: 0.36;
  font-size: 13px;
}

.mypage-stars__score {
  margin-left: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.mypage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.mypage-stat {
  min-height: 110px;
  padding: 18px 14px;
  display: grid;
  gap: 10px;
  justify-items: center;
  align-content: center;
  text-align: center;
  border-right: 1px solid var(--line);
}

.mypage-stat:last-child {
  border-right: 0;
}

.mypage-stat__label {
  font-size: 12px;
  color: var(--text);
  opacity: 0.78;
}

.mypage-stat__value {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.mypage-action {
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.mypage-action .button {
  min-height: 42px;
  border-radius: 14px;
  font-size: 13px;
}

.mypage-menu {
  display: grid;
}

.auth--narrow {
  width: min(100%, 360px);
}

.auth__title--small {
  font-size: 28px;
  margin-bottom: 34px;
}

.page-note {
  margin: 0 0 20px;
  font-size: 12px;
  color: var(--text);
  opacity: 0.72;
  text-align: left;
}

.button--link {
  text-decoration: none;
}

.mypage-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}

.mypage-menu__item:last-child {
  border-bottom: 0;
}

.mypage-menu__item::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
  opacity: 0.5;
}

.mypage-menu__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mypage-menu__icon {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  body {
    padding: 18px;
  }

  .auth__title {
    font-size: 30px;
    margin-bottom: 36px;
  }

  .links {
    gap: 18px;
  }
}

@media (max-width: 860px) {
  .mypage {
    width: min(100%, 760px);
  }

  .mypage-stats {
    grid-template-columns: 1fr;
  }

  .mypage-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mypage-stat:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .mypage-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .mypage-menu__item {
    font-size: 12px;
  }
}
