:root {
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --fg: #1C1C1E;
  --secondary: #8E8E93;
  --tertiary: #AEAEB2;
  --accent: #007AFF;
  --separator: rgba(60, 60, 67, 0.12);
  --danger: #FF3B30;
  --radius: 16px;
  --content: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
button { font: inherit; }

.hidden { display: none !important; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--content);
  background: rgba(242, 242, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--separator);
}

.topbar-brand {
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  font-size: 0.95rem;
  color: var(--fg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 980px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { opacity: 0.85; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: rgba(120, 120, 128, 0.16);
  color: var(--fg);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 8px 10px;
}

.btn-block {
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
}

.btn-outline {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid rgba(0, 122, 255, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px var(--content) 48px;
}

.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50dvh;
  color: var(--secondary);
  text-align: center;
  padding: 40px 16px;
}

.state-panel h1 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--fg);
}

.state-panel p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.error-text { color: var(--danger); }

/* Card */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cover-wrap {
  position: relative;
  height: 168px;
  background: linear-gradient(145deg, #d7dde8, #b8c2d4 45%, #8e99ad);
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}

.avatar {
  position: absolute;
  left: 20px;
  bottom: -32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: #c7c7cc;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 46px 24px 28px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-titles {
  flex: 1;
  min-width: 0;
}

.display-name {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tagline {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--secondary);
}

.handle-line {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--tertiary);
}

.bio {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Sections */
.section {
  margin-top: 22px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.02em;
}

.section-header .section-title {
  margin: 0;
}

.section-see-all {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.section-see-all:active {
  opacity: 0.7;
}

.list-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid rgba(60, 60, 67, 0.12);
}

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.list-row + .list-row {
  border-top: 1px solid var(--separator);
}

.list-row:active {
  background: rgba(60, 60, 67, 0.06);
}

.list-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #c7c7cc;
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
}

.list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-text {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-size: 1rem;
  font-weight: 500;
}

.list-sub {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron {
  color: var(--tertiary);
  font-size: 0.85rem;
}

/* Events — mirror EventNavigationRow */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.event-kind-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.12);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-kind-icon svg {
  width: 15px;
  height: 15px;
}

.event-main {
  flex: 1;
  min-width: 0;
}

.event-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.event-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg);
}

.event-kind-label {
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary);
}

.event-when {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  color: var(--secondary);
  line-height: 1.35;
}

.event-venue {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--tertiary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-venue-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--tertiary);
}

.event-venue-icon svg {
  width: 12px;
  height: 12px;
}


.hold-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.hold-badge:active { opacity: 0.85; }

.hold-badge-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
}

.hold-badge-icon svg {
  width: 12px;
  height: 12px;
}

.ticket-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(60, 60, 67, 0.18);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.ticket-btn:active { opacity: 0.85; }

.ticket-btn-icon {
  display: inline-flex;
  width: 13px;
  height: 13px;
}

.ticket-btn-icon svg {
  width: 13px;
  height: 13px;
}

/* Links / contact / portfolio */
.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.link-row + .link-row {
  border-top: 1px solid var(--separator);
}

.link-row:active {
  background: rgba(60, 60, 67, 0.06);
}

.link-label {
  flex: 1;
  font-size: 1rem;
}

.link-external {
  color: var(--tertiary);
  font-size: 0.75rem;
  font-weight: 600;
}

.link-icon {
  width: 24px;
  text-align: center;
  color: var(--secondary);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  color: var(--fg);
  text-decoration: none;
}

.contact-row .link-label {
  color: var(--fg);
  font-weight: 400;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid rgba(60, 60, 67, 0.12);
}

.portfolio-cell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background: rgba(120, 120, 128, 0.12);
  overflow: hidden;
  text-decoration: none;
}

.portfolio-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.portfolio-play {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.discog-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.12);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

a.discog-row {
  cursor: pointer;
}

.discog-cta {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.btn-follow-inline {
  min-width: 88px;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-follow-inline:active { opacity: 0.85; }

.footer-note {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary);
  line-height: 1.55;
}

.footer-note a {
  color: var(--accent);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(60, 60, 67, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 600px) {
  .page { padding-top: 24px; }
}
