:root {
  --bg: #f6f6ef;
  --bar: #33415c;
  --text: #000000;
  --meta: #828282;
  --link: #000000;
  --line: #ccd3e0;
  --love: #2a7a2a;
  --decent: #333333;
  --meh: #828282;
  --terrible: #b02a2a;
  --tbd: #828282;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 10pt;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.bar {
  background: var(--bar);
  padding: 6px 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.bar .brand {
  font-weight: bold;
  font-size: 11pt;
  color: #e7ebf2;
}
.bar .brand a {
  color: inherit;
}
.bar .sub {
  color: #e7ebf2;
  font-size: 9pt;
}
.bar .auth-status {
  margin-left: auto;
  font-size: 9pt;
}
.bar .auth-status a {
  color: #e7ebf2;
}
.bar .auth-status button {
  background: none;
  border: none;
  color: #e7ebf2;
  font: inherit;
  font-size: 9pt;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.crumbs {
  padding: 6px 16px;
  font-size: 8.5pt;
  color: var(--meta);
  border-bottom: 1px solid var(--line);
}
.crumbs a {
  color: var(--meta);
}
.crumbs .current {
  color: var(--text);
  font-weight: bold;
}

.form-error {
  color: var(--terrible);
  font-size: 9pt;
  margin: -8px 0 14px;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 16px 60px;
}

.wrap h1 {
  font-size: 15pt;
  margin: 4px 0 10px;
}

.blurb {
  max-width: 640px;
  line-height: 1.5;
}

.home-nav {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.home-nav li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 12pt;
}
.home-nav a {
  font-weight: bold;
}
.home-nav .notes {
  color: var(--meta);
  font-size: 9pt;
  font-weight: normal;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.toolbar .types a,
.toolbar .ratings a {
  margin-right: 8px;
  color: var(--meta);
}
.toolbar .types a.active,
.toolbar .ratings a.active {
  color: var(--text);
  font-weight: bold;
}

.toolbar form.search {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.toolbar input[type="text"] {
  font-family: inherit;
  font-size: 9pt;
  padding: 3px 5px;
  border: 1px solid #ccc;
}

.toolbar .new {
  font-weight: bold;
}

.meta-row {
  color: var(--meta);
  font-size: 8.5pt;
  margin-bottom: 10px;
}

table.entries {
  width: 100%;
  border-collapse: collapse;
}
table.entries tr {
  border-bottom: 1px solid #eee;
}
table.entries tr:hover {
  background: #fbfbf6;
}
table.entries td {
  padding: 5px 6px;
  vertical-align: top;
}
td.rank {
  color: var(--meta);
  text-align: right;
  width: 26px;
}
td.name {
  width: 30%;
}
td.name .title {
  font-weight: bold;
}
td.name .notes {
  color: var(--meta);
  font-size: 8.5pt;
  display: block;
  margin-top: 2px;
}
td.type {
  color: var(--meta);
  width: 12%;
}
td.rating {
  width: 10%;
  font-weight: bold;
}
td.by {
  color: var(--meta);
  width: 10%;
  font-size: 9pt;
}
td.actions {
  text-align: right;
  white-space: nowrap;
  font-size: 8.5pt;
}
td.actions a {
  color: var(--meta);
  margin-left: 8px;
}
td.actions form {
  display: inline;
}
td.actions button {
  background: none;
  border: none;
  color: var(--meta);
  font: inherit;
  font-size: 8.5pt;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  text-decoration: none;
}
td.actions button:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .bar {
    flex-direction: column;
    gap: 2px;
  }
  .toolbar .search {
    width: 100%;
    margin-left: 0;
  }
  .toolbar .search input {
    flex: 1;
  }
  table.entries, table.entries tbody, table.entries tr, table.entries td {
    display: block;
  }
  table.entries tr {
    padding: 8px 0;
  }
  table.entries td.rank {
    display: none;
  }
  table.entries td.name {
    width: auto;
  }
  table.entries td.type, table.entries td.rating, table.entries td.by {
    display: inline-block;
    width: auto;
    padding: 2px 6px 2px 0;
    font-size: 9pt;
  }
  table.entries td.actions {
    text-align: left;
  }
  table.entries td.actions a, table.entries td.actions button {
    margin-left: 0;
    margin-right: 10px;
  }
}

.rating-Love { color: var(--love); }
.rating-Decent { color: var(--decent); }
.rating-Meh { color: var(--meh); }
.rating-Terrible { color: var(--terrible); }
.rating-TBD { color: var(--tbd); font-style: italic; font-weight: normal; }

.empty {
  color: var(--meta);
  padding: 20px 0;
}

.place-group {
  margin-top: 22px;
}
.place-group h2 {
  font-size: 11pt;
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
ul.places {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.places li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
ul.places .place-name {
  font-weight: bold;
}
ul.places .place-city {
  color: var(--meta);
  font-size: 9pt;
  margin-left: 6px;
}
ul.places .place-note {
  display: block;
  margin-top: 2px;
}
ul.places .place-addr {
  display: block;
  color: var(--meta);
  font-size: 8.5pt;
  margin-top: 2px;
}

ul.art-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
ul.art-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
ul.art-list .art-title {
  font-weight: bold;
  font-size: 11pt;
}
ul.art-list .art-year {
  color: var(--meta);
  font-size: 9pt;
  margin-left: 6px;
}
ul.art-list .art-blurb {
  display: block;
  margin-top: 3px;
}
ul.art-list .art-medium {
  display: block;
  color: var(--meta);
  font-size: 8.5pt;
  margin-top: 2px;
}

.art-stage {
  position: relative;
  width: 100%;
  background: #1a1a1a;
}
.art-frame {
  display: block;
  width: 100%;
  height: 82vh;
  border: 0;
}

/* Fullscreen toggle — hidden until the pointer is over the piece, so it never
   floats over the art during passive viewing. Lives on the stage wrapper (not
   the iframe) so a piece reloading on resize doesn't drop out of fullscreen. */
.fs-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  background: rgba(20, 20, 20, 0.55);
  color: #f2f2f2;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.art-stage.fs-armed .fs-btn,
.fs-btn:focus-visible {
  opacity: 0.85;
  pointer-events: auto;
}
/* Pieces with their own top bar (e.g. the Minimoog) put the button bottom-right. */
.art-stage[data-fs-corner="bottom"] .fs-btn {
  top: auto;
  bottom: 12px;
}
.fs-btn:hover {
  opacity: 1;
  background: rgba(20, 20, 20, 0.8);
}
.fs-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fs-ico-compress {
  display: none;
}
.art-stage.is-fs .fs-ico-expand {
  display: none;
}
.art-stage.is-fs .fs-ico-compress {
  display: block;
}
.art-stage:fullscreen {
  height: 100%;
  background: #000;
}
.art-stage:fullscreen .art-frame {
  height: 100%;
}
.art-stage:-webkit-full-screen {
  height: 100%;
  background: #000;
}
.art-stage:-webkit-full-screen .art-frame {
  height: 100%;
}
.art-caption {
  padding-top: 16px;
}
.art-caption h1 {
  margin-bottom: 4px;
}
.art-meta {
  color: var(--meta);
  font-size: 9pt;
  margin: 0 0 12px;
}
.art-controls {
  color: var(--meta);
  font-size: 8.5pt;
  margin-top: 16px;
}
.art-controls kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 8.5pt;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 0 4px;
}

.formbox {
  max-width: 480px;
}
.formbox h1 {
  font-size: 13pt;
  margin: 4px 0 16px;
}
.formbox label {
  display: block;
  margin-bottom: 12px;
}
.formbox label span {
  display: block;
  margin-bottom: 3px;
  color: var(--meta);
  font-size: 9pt;
}
.formbox input[type="text"],
.formbox select,
.formbox textarea {
  width: 100%;
  font-family: inherit;
  font-size: 10pt;
  padding: 5px 6px;
  border: 1px solid #ccc;
}
.formbox textarea {
  min-height: 80px;
  resize: vertical;
}
.formbox .row {
  display: flex;
  gap: 12px;
}
.formbox .row > label {
  flex: 1;
}
.formbox .actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.formbox button.primary {
  background: var(--bar);
  border: 1px solid #232d42;
  color: #fff;
  font-family: inherit;
  font-size: 9.5pt;
  padding: 6px 14px;
  cursor: pointer;
}
.formbox .cancel {
  color: var(--meta);
  font-size: 9pt;
}
