#events-panel {
  margin: 1rem 0;
  padding: clamp(.75rem, 2.5vw, 1.25rem);
  border: 1px solid var(--panel-line);
  border-radius: 1rem;
  color: var(--panel-text);
  background: var(--panel-surface);
}
#events-title { margin: 0 0 .75rem; scroll-margin-block: 1rem; }
.event-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; list-style: none; padding: 0; margin: 0; }
.event-links :is(a, button) {
  display: flex;
  align-items: center;
  gap: .7rem;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 3.75rem;
  padding: .65rem;
  border: 1px solid var(--panel-line);
  border-radius: .75rem;
  background: var(--panel-soft);
  color: var(--panel-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.event-links :is(a, button):hover { border-color: var(--panel-accent); }
.event-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .65rem;
  flex: none;
}
.event-icon img { display: block; width: 2rem; height: 2rem; }
.event-icon.lichess { background: #f6f3ee; }
.event-icon.arena { background: transparent; }
.event-icon.tuesday { background: #000; }
#event-status:empty { display: none; }
.etkinlikler .tool-visual { background-color: #47306c; color: #ffdc8a; }
@media(max-width: 700px) { .event-links { grid-template-columns: 1fr; } }

#back-tools { width: auto; padding-inline: .65rem; font-weight: 800; white-space: nowrap; }
#back-tools span { font-size: 1.15em; }
.tool-event-visual { display: flex; justify-content: center; align-items: center; gap: clamp(.24rem, 1.6vw, .65rem); }
.tool-event-visual .event-icon:nth-child(n) {
  position: static; inset: auto; translate: none; rotate: none; filter: none;
  opacity: 1; z-index: 1; width: clamp(1.7rem, 7vw, 3.25rem); height: clamp(1.7rem, 7vw, 3.25rem);
}
.tool-event-visual .event-icon img { width: 72%; height: 72%; }
.lichess .tool-event-visual { background-color: #424843; }
.lichess .tool-event-visual .event-icon { width: 3.4rem; height: 3.4rem; }
@media(max-width: 700px) {
  #panel-header .topbar { display: grid; gap: .3rem; padding-block: .4rem; }
  #panel-header .brand { gap: .45rem; }
  #panel-header .brand img { width: 44px; height: 44px; }
  #panel-header .brand-copy h1 { font-size: clamp(1rem, 4.4vw, 1.35rem); line-height: 1.12; }
  #panel-header .brand-copy span { margin-top: .12rem; }
  #panel-header .header-actions { width: 100%; margin: 0; justify-content: flex-end; gap: .3rem; }
  #panel-header #back-tools { margin-inline-end: auto; min-height: 42px; background: #f5e8ff; color: #29143e; }
}

.etkinlikler .tool-event-visual .event-icon:nth-child(n) {
  width: clamp(2.1rem, 8vw, 3.8rem);
  height: clamp(2.1rem, 8vw, 3.8rem);
}

.event-icon.arena img { width: 100%; height: 100%; }
.tool-event-visual .event-icon.arena img { width: 100%; height: 100%; }
.event-icon.tuesday img { border-radius: .5rem; }
.event-icon.tuesday img { object-fit: contain; }
.kuantum-database { --tool-icon: url("/database-pawn.png"); }

#board-games-panel { margin-block: 1rem; }
#board-games-title { margin: 0 0 .75rem; }
#board-games { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0; max-width: 48rem; }
#board-games .tool-visual { height: clamp(4.5rem, 18vw, 7rem); aspect-ratio: auto; }
.tahta-hakimiyeti .tool-visual { background-color: #215655; color: #dbf5d6; }
.kuantum-database .tool-visual::after {
  width: auto;
  height: min(6.4rem, 96%);
  aspect-ratio: 1;
}

#student-profile { max-width: 49rem; margin-block: 1rem; }
#student-profile-title { margin-bottom: .25rem; }
#student-profile-name { margin-top: 0; }
.profile-ratings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.profile-ratings > div, .student-profile-card { padding: .8rem; border: 1px solid var(--panel-line); border-radius: .8rem; background: var(--panel-surface); }
.profile-ratings dt { font-weight: 800; }
.profile-ratings dd { margin: .3rem 0 0; }
.student-profile-card { margin-block: .65rem; }
.student-profile-card h3 { margin: 0 0 .5rem; }
#profile-calendar { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; }
#profile-calendar caption { font-weight: 800; padding: .4rem; }
#profile-calendar th, #profile-calendar td { border: 1px solid var(--panel-line); padding: .45rem .1rem; }
#profile-calendar td { height: 2rem; background: var(--panel-soft); }
#profile-calendar td.profile-calendar-active { background: #c7effb; color: #172b3a; }
#profile-calendar td :is(strong,span) { display: block; }
#profile-calendar-import { display: grid; gap: .4rem; margin-top: .6rem; }
