/* HR PLAY Artist Portfolio — Ljus design v3 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Outfit:wght@300;400;500&display=swap');

:root {
  --bg:        #f4f0e8;
  --bg2:       #edeae0;
  --bg3:       #e6e1d5;
  --card:      #ffffff;
  --line:      #ddd8cc;
  --text:      #1a1814;
  --muted:     #7a7260;
  --accent:    #2d4a3e;
  --accent2:   #8a6a2e;
  --white:     #ffffff;
  --ff-head:   'Cormorant Garamond', Georgia, serif;
  --ff-body:   'Outfit', system-ui, sans-serif;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(0,0,0,0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { display: flex; align-items: baseline; gap: 0.4rem; }
.logo-hr   { font-family: var(--ff-head); font-size: 22px; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; }
.logo-play { font-family: var(--ff-head); font-size: 22px; font-weight: 300; color: var(--text); letter-spacing: 0.04em; }
.logo-sub  { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-left: 0.6rem; }

.site-header nav {
  display: flex; gap: 2rem;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.site-header nav a:hover,
.site-header nav a.active { color: var(--accent); }

/* ── HERO ── */
.hero {
  padding: 3.5rem 2.5rem 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.hero h1 {
  font-family: var(--ff-head);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 300; font-style: italic;
  color: var(--text); line-height: 1.05; margin-bottom: 0.6rem;
}
.hero p { font-size: 15px; color: var(--muted); max-width: 480px; }

/* ── GALLERY GRID — Playground-inspirerad med spacing ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  padding: 32px 2.5rem;
}

.artist-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.artist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  color: inherit;
}

.artist-photo {
  width: 100%; aspect-ratio: 1/1;
  overflow: hidden; background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
}
.artist-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.artist-card:hover .artist-photo img { transform: scale(1.05); }

.artist-initial {
  font-family: var(--ff-head); font-size: 72px;
  font-style: italic; font-weight: 300; color: var(--line);
  transition: color 0.2s; user-select: none;
}
.artist-initial.large { font-size: 120px; }
.artist-card:hover .artist-initial { color: var(--bg3); }

.artist-info { padding: 1.1rem 1.25rem 1.25rem; }
.artist-info h2 {
  font-family: var(--ff-head); font-size: 21px;
  font-weight: 600; color: var(--text); margin-bottom: 3px;
}
.artist-info .genre {
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted);
}

/* ── BACK LINK ── */
.back-link {
  display: inline-block; padding: 1.5rem 2.5rem 0;
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* ── ARTIST PAGE HERO ── */
.artist-page-hero {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 0; margin: 2rem 2.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  align-items: start; /* låter kolumnerna växa oberoende */
}
.artist-page-photo {
  background: var(--bg2);
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
  position: sticky; /* bilden stannar kvar när bio scrollas */
  top: 72px; /* under sticky header */
}
.artist-page-photo img {
  width: 100%;
  height: auto;        /* naturlig proportion, ingen beskärning */
  display: block;
  object-fit: unset;
}
.artist-page-photo .artist-initial {
  /* Placeholder-initial när ingen bild finns */
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3/4;
}
.artist-page-bio {
  padding: 2.5rem; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.genre-tag {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent);
}
.artist-page-bio h1 {
  font-family: var(--ff-head);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 300; color: var(--text); line-height: 1.1;
}
.bio-text { font-size: 15px; color: #5a5248; line-height: 1.75; max-width: 560px; }
.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.social-link {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 14px; border: 1px solid var(--line); border-radius: 20px;
  color: var(--muted); transition: border-color 0.15s, color 0.15s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── MEDIA SECTION ── */
.media-section { padding: 2rem 2.5rem 4rem; }
.media-section h2 {
  font-family: var(--ff-head); font-size: 30px;
  font-weight: 300; font-style: italic; color: var(--text);
  margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.no-media { color: var(--muted); font-size: 15px; padding: 2rem 0; }
.no-media a { color: var(--accent); text-decoration: underline; }
.media-list { display: flex; flex-direction: column; }
.media-item { border-bottom: 1px solid var(--line); }
.media-item-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; cursor: pointer; user-select: none;
}
.media-item-header:hover .media-item-title { color: var(--accent); }
.media-type-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 20px; flex-shrink: 0;
}
.media-type-icon.audio { background: #e8f0ec; }
.media-type-icon.video { background: #e8ecf4; }
.media-type-icon.image { background: #f4ece8; }
.media-item-meta { flex: 1; min-width: 0; }
.media-item-title {
  display: block; font-size: 16px; font-weight: 500; color: var(--text);
  transition: color 0.15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-item-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.media-badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 10px; border-radius: 20px; flex-shrink: 0;
}
.media-badge.audio { background: #e8f0ec; color: #2d4a3e; }
.media-badge.video { background: #e8ecf4; color: #2d3e5a; }
.media-badge.image { background: #f4ece8; color: #5a3d2d; }
.toggle-arrow { font-size: 18px; color: var(--muted); flex-shrink: 0; width: 20px; text-align: center; }
.media-item-body { padding: 0 0 1.5rem 56px; }

.video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px;
}
.video-wrap iframe, .video-wrap video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px;
}
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.image-grid a img {
  border-radius: 8px; object-fit: cover; aspect-ratio: 1; width: 100%; transition: opacity 0.2s;
}
.image-grid a:hover img { opacity: 0.85; }

/* ── FORMS ── */
.upload-form {
  max-width: 640px; margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
  display: flex; flex-direction: column; gap: 2rem;
}
fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
  background: var(--white);
}
legend {
  font-family: var(--ff-head); font-size: 18px;
  font-weight: 400; font-style: italic; color: var(--text); padding: 0 0.5rem;
}
label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
}
label .req { color: var(--accent2); }
input[type=text], input[type=url], input[type=password],
input[type=file], select, textarea {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; color: var(--text);
  font-family: var(--ff-body); font-size: 15px;
  padding: 10px 14px; width: 100%; transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
small { font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.or-divider {
  text-align: center; font-size: 12px; color: var(--muted);
  margin: 0.25rem 0; text-transform: uppercase; letter-spacing: 0.08em;
}
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  font-family: var(--ff-body); font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 13px 28px; border-radius: 6px; cursor: pointer;
  display: inline-block; transition: opacity 0.15s; align-self: flex-start;
}
.btn-primary:hover { opacity: 0.85; color: #fff; }
.btn-secondary {
  background: none; border: 1px solid var(--line); color: var(--muted);
  font-family: var(--ff-body); font-size: 13px; padding: 8px 16px;
  border-radius: 6px; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-remove {
  background: none; border: 1px solid #e0c0c0; color: #c04040;
  font-family: var(--ff-body); font-size: 12px; padding: 6px 10px;
  border-radius: 6px; cursor: pointer; flex-shrink: 0; transition: background 0.15s;
}
.btn-remove:hover { background: #fdf0f0; }
.btn-danger {
  background: #c04040; color: #fff; border: none;
  font-family: var(--ff-body); font-size: 13px; padding: 10px 20px;
  border-radius: 6px; cursor: pointer; transition: opacity 0.15s;
}
.btn-danger:hover { opacity: 0.85; }

/* ── MESSAGES ── */
.upload-success {
  max-width: 480px; margin: 3rem auto; padding: 0 2.5rem; text-align: center;
}
.upload-success h2 {
  font-family: var(--ff-head); font-size: 42px; font-weight: 300; color: var(--accent); margin-bottom: 0.5rem;
}
.upload-success p { color: var(--muted); margin-bottom: 1.5rem; }
.upload-success-inline {
  background: #edf6f0; border: 1px solid #b8d8c4; border-radius: 6px;
  color: #2d5a3e; padding: 12px 16px; font-size: 14px;
}
.upload-error {
  background: #fdf0f0; border: 1px solid #e0c0c0;
  border-radius: 6px; color: #c04040; font-size: 14px; padding: 12px 16px;
}

/* ── AUTH TABS ── */
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin: 0 2.5rem; }
.auth-tab {
  padding: 1rem 1.5rem; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tab:hover { color: var(--text); }

/* ── MYPAGE ── */
.mypage-section { padding: 2rem 2.5rem; border-bottom: 1px solid var(--line); }
.mypage-h2 {
  font-family: var(--ff-head); font-size: 26px; font-weight: 300;
  font-style: italic; color: var(--text); margin-bottom: 1.5rem;
}
.link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.link-row input { flex: 1; }

/* ── MEDIA MANAGE ── */
.media-manage-list { display: flex; flex-direction: column; gap: 0; }
.media-manage-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.media-manage-item:last-child { border-bottom: none; }
.media-manage-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ── DANGER ZONE ── */
.danger-zone {
  border: 1px solid #e0c0c0; border-radius: var(--radius);
  padding: 1.5rem; background: #fdf8f8;
}
.danger-zone h3 {
  font-family: var(--ff-head); font-size: 20px; color: #c04040;
  margin-bottom: 0.5rem; font-weight: 400; font-style: italic;
}
.danger-zone p { font-size: 14px; color: var(--muted); margin-bottom: 1rem; }

/* ── FOOTER ── */
.site-footer {
  margin-top: auto; padding: 1.5rem 2.5rem;
  border-top: 1px solid var(--line); background: var(--white);
  font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ── INLINE EDIT INPUT ── */
.inline-edit-title {
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--ff-body); font-size: 14px; color: var(--text);
  padding: 5px 10px; width: 100%; display: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .site-header { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
  .site-header nav { gap: 1rem; font-size: 11px; }
  .logo-sub { display: none; }
  .hero { padding: 2.5rem 1.25rem 1.5rem; }
  .gallery { gap: 14px; padding: 16px 1.25rem; grid-template-columns: 1fr 1fr; }
  .artist-page-hero { grid-template-columns: 1fr; margin: 1rem; align-items: start; }
  .artist-page-photo { position: static; border-radius: var(--radius) var(--radius) 0 0; }
  .artist-page-bio { padding: 1.5rem; border-left: none; border-top: 1px solid var(--line); }
  .media-section { padding: 1.5rem 1.25rem 3rem; }
  .media-item-body { padding-left: 0; }
  .back-link { padding: 1.25rem 1.25rem 0; }
  .upload-form { padding: 1.5rem 1.25rem 3rem; }
  .mypage-section { padding: 1.5rem 1.25rem; }
  .auth-tabs { margin: 0 1.25rem; }
  .site-footer { padding: 1rem 1.25rem; }
}

/* ── STICKY PLAYER ── */
body.has-player { padding-bottom: 80px; }

.sticky-player {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 72px;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  z-index: 200;
}

/* Transport buttons */
.sp-left { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sp-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--muted); padding: 6px 8px;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.sp-btn:hover { color: var(--accent); background: var(--bg2); }
.sp-play {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.sp-play:hover { background: #1e3329; color: #fff; }

/* Track info */
.sp-info { flex-shrink: 0; min-width: 140px; max-width: 200px; }
.sp-title {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Progress */
.sp-progress-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
}
.sp-time { font-size: 11px; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sp-progress {
  flex: 1; height: 4px; background: var(--bg3);
  border-radius: 2px; cursor: pointer; position: relative;
}
.sp-bar {
  height: 100%; background: var(--accent);
  border-radius: 2px; width: 0%; transition: width 0.25s linear;
  pointer-events: none;
}
.sp-progress:hover { height: 6px; margin: -1px 0; }

/* Volume */
.sp-right { flex-shrink: 0; }
.sp-volume {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px; background: var(--bg3);
  border-radius: 2px; outline: none; cursor: pointer;
  border: none; padding: 0;
}
.sp-volume::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
}

/* Playing row highlight */
.media-item.playing { background: #f0f5f2; border-radius: 6px; }
.media-item.playing .media-item-title { color: var(--accent); }
.play-btn-hint {
  font-size: 14px; color: var(--muted); flex-shrink: 0;
  width: 28px; text-align: center; transition: color 0.15s;
}
.media-item-header:hover .play-btn-hint { color: var(--accent); }
.media-item.playing .play-btn-hint { color: var(--accent); }

@media (max-width: 600px) {
  .sp-right { display: none; }
  .sp-info { min-width: 100px; max-width: 130px; }
  .sticky-player { gap: 0.6rem; padding: 0 0.75rem; }
}

/* ── TOUR DATES — artistsida ── */
.tour-section { border-top: 1px solid var(--line); }
.tour-group-label {
  font-family: var(--ff-head); font-size: 14px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  margin: 1.5rem 0 0.75rem;
}
.tour-list { display: flex; flex-direction: column; }
.tour-item {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 1rem; align-items: start;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
}
.tour-item:last-child { border-bottom: none; }
.tour-item.past { opacity: 0.5; }

.tour-date-col {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg2); border-radius: 8px; padding: 10px 8px;
  flex-shrink: 0; min-width: 56px;
}
.tour-day   { font-family: var(--ff-head); font-size: 28px; font-weight: 600; color: var(--text); line-height: 1; }
.tour-month { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-top: 2px; }
.tour-year  { font-size: 11px; color: var(--muted); }

.tour-info { min-width: 0; }
.tour-venue   { font-size: 16px; font-weight: 500; color: var(--text); }
.tour-location{ font-size: 13px; color: var(--muted); margin-top: 2px; }
.tour-desc    { font-size: 13px; color: #5a5248; margin-top: 6px; line-height: 1.6; }
.tour-links   { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tour-link {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 20px;
  color: var(--muted); transition: border-color 0.15s, color 0.15s;
}
.tour-link:hover { border-color: var(--accent); color: var(--accent); }

.tour-poster { flex-shrink: 0; }
.tour-poster img {
  width: 80px; height: 100px; object-fit: cover;
  border-radius: 6px; box-shadow: var(--shadow);
}

/* ── TOUR DATES — mypage ── */
.tour-manage-list { display: flex; flex-direction: column; gap: 0; }
.tour-manage-item {
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.tour-manage-item:last-child { border-bottom: none; }
.tour-manage-header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tour-manage-date  { font-size: 13px; font-weight: 500; color: var(--accent); flex-shrink: 0; }
.tour-manage-venue { font-size: 15px; font-weight: 500; color: var(--text); }
.tour-manage-info  { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tour-manage-actions { display: flex; gap: 6px; margin-top: 8px; }

@media (max-width: 600px) {
  .tour-item { grid-template-columns: 56px 1fr; }
  .tour-poster { display: none; }
}

/* ── TBA ── */
.tour-tba {
  font-family: var(--ff-head); font-size: 18px; font-style: italic;
  font-weight: 400; color: var(--muted); letter-spacing: 0.04em;
}
.tba-badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--bg2); color: var(--muted);
  padding: 2px 8px; border-radius: 4px; margin-left: 6px;
}
