:root {
  --bg: #fff;
  --ink: #0a0a0a;
  --soft: #6b6b6b;
  --line: #e8e8e8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
input {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}
.desktop-block {
  display: none;
}
@media (min-width: 768px) {
  .app,
  .sheet,
  .panel,
  .toast {
    display: none !important;
  }
  .desktop-block {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.5;
    padding: 2rem;
  }
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) 36px 80px;
  position: relative;
}
.admin-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 18px);
  right: 22px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  transition: 0.25s;
}
.admin-btn:active {
  background: var(--ink);
  color: #fff;
}
.hero {
  padding: 84px 0 56px;
  animation: rise 0.9s ease both;
}
.for {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  font-weight: 300;
  margin-bottom: 6px;
  padding-left: 6px;
}
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 4.4rem;
  line-height: 0.82;
  letter-spacing: 0.01em;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero {
    animation: none;
  }
}

.group {
  margin-bottom: 46px;
}
.group h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  margin-bottom: 16px;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #333;
}
.item b {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.05em;
}

/* sheets */
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  z-index: 30;
}
.sheet-body {
  width: 100%;
  background: #fff;
  padding: 28px 28px calc(env(safe-area-inset-bottom) + 28px);
  border-radius: 22px 22px 0 0;
  animation: up 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@keyframes up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.2rem;
}
.muted {
  color: var(--soft);
  font-size: 0.78rem;
  margin-top: -8px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--soft);
}
input {
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 10px 0;
  font-size: 1rem;
  outline: 0;
  background: none;
  border-radius: 0;
}
input:focus {
  border-bottom-width: 2px;
}
.row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.row button {
  flex: 1;
}
.solid {
  background: var(--ink);
  color: #fff;
  padding: 14px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ghost {
  border: 1px solid var(--ink);
  padding: 14px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ghost.small {
  padding: 8px 14px;
  font-size: 0.65rem;
}
.solid:disabled {
  opacity: 0.5;
}
.err {
  color: #b00020;
  font-size: 0.75rem;
  min-height: 1em;
}

/* admin panel */
.panel {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 20;
  overflow: auto;
  padding: calc(env(safe-area-inset-top) + 18px) 22px 120px;
  max-width: 480px;
  margin: 0 auto;
}
.panel-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.panel-top h2 {
  flex: 1;
  text-align: center;
}
.count {
  min-width: 38px;
  text-align: center;
  font-size: 0.8rem;
  border: 1px solid var(--ink);
  border-radius: 20px;
  padding: 6px 0;
}
#search {
  width: 100%;
  margin-bottom: 10px;
}
#list {
  list-style: none;
}
#list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    filter 0.45s ease;
}
#list .nm {
  font-family: var(--serif);
  font-size: 1.35rem;
}
#list .delete-status {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}
#list .meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--soft);
  grid-column: 1;
}
#list .eye {
  grid-row: 1/3;
  grid-column: 2;
  align-self: center;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding: 2px 0;
}
.empty {
  text-align: center;
  color: var(--soft);
  font-size: 1.4rem;
  padding: 40px 0;
}
.fab {
  position: fixed;
  right: max(22px, calc(50% - 218px));
  bottom: calc(env(safe-area-inset-bottom) + 26px);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 300;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* tabs, filter, plans, row states */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 8px 0 12px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: none;
  border: 1px solid var(--ink);
  padding: 9px 14px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  gap: 8px;
  align-items: center;
}
.tab i {
  font-style: normal;
  font-weight: 600;
}
.tab.on {
  background: var(--ink);
  color: #fff;
}
#month {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 10px 0;
  font: inherit;
  font-size: 0.8rem;
  background: none;
  border-radius: 0;
  margin-bottom: 6px;
  outline: 0;
}
.plans {
  border: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.plans legend {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 8px;
}
.plans label {
  display: block;
  position: relative;
  letter-spacing: 0.1em;
}
.plans input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.plans span {
  display: block;
  text-align: center;
  border: 1px solid var(--ink);
  padding: 12px 6px;
  font-size: 0.75rem;
  color: var(--ink);
}
.plans input:checked + span {
  background: var(--ink);
  color: #fff;
}
#list li.exp {
  background: #ff5a5a;
  color: #000;
  padding: 18px 12px;
  margin: 0 -12px;
  border-bottom-color: #fff;
}
#list li.exp .meta {
  color: #000;
}
#list .act {
  grid-row: 1/5;
  grid-column: 2;
  align-self: center;
  display: flex;
  gap: 8px;
}
#list .act button {
  width: 38px;
  height: 38px;
  border: 1px solid #000;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #000;
  line-height: 1;
}
#list .st {
  font-weight: 600;
}
#list .aad {
  cursor: pointer;
}

/* ===== deleting state: faded but visible until the "Member deleted" message, then it slides away ===== */
#list li {
  max-height: 260px;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    filter 0.45s ease,
    max-height 0.45s ease 0.1s,
    padding 0.45s ease 0.1s;
}
#list li.deleting {
  opacity: 0.4;
  filter: grayscale(1);
  pointer-events: none;
}
#list li.deleting .nm {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
#list li.deleting .act button {
  opacity: 0.4;
}
#list li.removing {
  opacity: 0;
  transform: translateX(-24px) scale(0.97);
  filter: grayscale(1) blur(1.5px);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  overflow: hidden;
}

/* ===== gym premium theme ===== */
body {
  overflow-x: hidden;
}
.app {
  overflow-x: clip;
}
.hero {
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: 20px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    transparent 0 14px,
    rgba(0, 0, 0, 0.08) 14px 15px
  );
  pointer-events: none;
}
.art {
  position: relative;
  width: 64%;
  margin-top: 26px;
  color: var(--ink);
}
.art * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.9s 0.3s ease forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.photo {
  height: 230px;
  margin: -20px -36px 40px;
  background: center/cover no-repeat;
  filter: grayscale(1) contrast(1.08);
}
.band {
  margin: 0 -36px 56px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 15px 0;
}
.track {
  display: inline-flex;
  animation: slide 26s linear infinite;
  font-size: 0.62rem;
  letter-spacing: 0.4em;
  font-weight: 300;
}
.track span {
  padding-right: 30px;
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}
.group {
  margin-bottom: 34px;
}
.ghead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ghead h3 {
  margin: 0;
}
.ghead .no {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--soft);
}
.ghead svg {
  width: 22px;
  height: 22px;
  margin-left: auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.3;
}
.item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.item b {
  font-size: 0.8rem;
}
.tag {
  font-style: normal;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  border: 1px solid currentColor;
  padding: 3px 6px;
  margin-left: 10px;
  vertical-align: middle;
}
.group.dark {
  background: var(--ink);
  color: #fff;
  padding: 26px 22px 14px;
  margin-left: -10px;
  margin-right: -10px;
}
.group.dark .no {
  color: #8a8a8a;
}
.group.dark .item {
  color: #d8d8d8;
  border-color: #2a2a2a;
}
.group.dark .item b {
  color: #fff;
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.foot small {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--soft);
}
.foot b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
}
@media (prefers-reduced-motion: reduce) {
  .art *,
  .track {
    animation: none;
    stroke-dashoffset: 0;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
