:root {
  --bg: #fbf6ec;
  --card: #fffdf8;
  --text: #2b2622;
  --muted: #7a6f66;
  --border: #2b2622;
  --accent: #6f95c9;
  --shadow: 4px 4px 0 var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 56px 16px 40px;
}

.profile { text-align: center; margin-bottom: 36px; }

.avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

h1 { margin: 0; font-size: 22px; }
.bio { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.socials {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.socials a {
  padding: 4px 12px;
  border: 2px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }

section { margin-bottom: 28px; }

h2 {
  margin: 0 0 10px 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.links { display: grid; gap: 10px; }

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--text); }
.card:focus-visible, .socials a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #e4ecf7;
  display: grid;
  place-items: center;
  font-size: 22px;
  overflow: hidden;
}
.icon img { width: 100%; height: 100%; object-fit: cover; }

.text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.text strong { font-size: 15px; font-weight: 600; }
.text small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.arrow { color: var(--muted); font-size: 20px; }

.page-head { margin-bottom: 24px; }
.back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.back:hover { color: var(--accent); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.tab {
  flex: 1;
  padding: 9px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab .count { margin-left: 6px; font-weight: 400; opacity: 0.75; }

.empty {
  margin-top: 16px;
  padding: 48px 12px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 8px;
  margin-top: 16px;
  padding: 20px 12px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.app-grid[hidden] { display: none; }

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 30px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--text);
  transition: transform 0.12s ease;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app:hover .app-icon { transform: scale(1.06); }
.app:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.app-name {
  max-width: 100%;
  font-size: 12px;
  text-align: center;
  word-break: keep-all;
  line-height: 1.3;
}

@media (max-width: 380px) {
  .app-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer { margin-top: 40px; text-align: center; color: var(--muted); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .card, .app-icon { transition: none; }
}
