/* ==========================================================================
   SHINOBU — IDENTITY DASHBOARD
   Signed-in view: three vertical panels. Friends / Room requests / Code.
   Presentation only — every ID and handler stays exactly where it was.
   ========================================================================== */

#screen-identity-home .id-home {
  width: 100%;
  max-width: 1380px;
  margin: auto;
}

/* ---------- HEADER ---------- */

.id-home-head {
  width: 100%;
  margin: 0 0 clamp(1rem, 2vw, 1.8rem);
}

.id-home-head .btn-back {
  margin-bottom: 0.9rem;
}

#screen-identity-home .identity-kicker {
  margin-bottom: 0.35rem;
}

#screen-identity-home .identity-title {
  margin: 0;
  font-size: clamp(1.7rem, 4.2vw, 3.2rem);
  line-height: 1;
}

/* ---------- GRID ---------- */

.id-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
  align-items: stretch;
  width: 100%;
}

.id-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 520px;
  padding: clamp(1rem, 2vw, 1.6rem);
  background: var(--paper-lift);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.id-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--ink);
}

.id-panel-requests::before {
  background: var(--red);
}

.id-panel-code::before {
  background: var(--red-deep);
}

/* ---------- PANEL HEAD ---------- */

.id-panel-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.id-panel-index {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line-strong);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.id-panel-requests .id-panel-index,
.id-panel-code .id-panel-index {
  border-color: var(--red);
}

.id-panel-label {
  margin: 0 0 0.15rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.id-panel-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.id-panel-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.65;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- LISTS ---------- */

.id-panel .identity-card {
  flex: 1 1 auto;
  padding: 0;
  background: transparent;
  border: 0;
}

.id-panel .identity-list {
  margin-top: 0;
  border-top: 1px solid var(--line-strong);
}

.id-panel .identity-row {
  gap: 0.6rem;
  padding: 0.75rem 0;
}

.id-panel .identity-row-name {
  font-size: 0.78rem;
}

.id-panel .identity-row-actions {
  gap: 0.35rem;
}

.id-panel .identity-mini {
  padding: 0.42rem 0.5rem;
  font-size: 0.52rem;
}

/* ---------- ACTIONS ---------- */

.id-panel-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--red);
  border: 1px solid var(--red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.id-panel-action:hover,
.id-panel-action:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.id-panel-code .identity-section-label {
  margin: 0 0 0.7rem;
}

.id-panel-code .identity-code {
  padding: 0.85rem 0;
}

.id-panel-code .identity-code-value {
  font-size: clamp(0.95rem, 2vw, 1.3rem);
}

.id-panel-code .identity-actions {
  margin-top: 0.8rem;
}

.id-panel-code .identity-actions .btn {
  width: 100%;
}

.id-panel-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.id-panel-links .identity-link {
  margin: 0;
}

.id-panel-note {
  margin: 1rem 0 0;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  line-height: 1.6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1100px) {
  .id-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .id-panel-code {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .id-home-grid {
    grid-template-columns: 1fr;
  }

  .id-panel,
  .id-panel-code {
    grid-column: auto;
    min-height: 0;
  }
}
