/* Profile and paint surfaces also work on the standalone profile entry point. */
.wood-profile-editor,
.wood-profile-surface,
.wood-paint-page {
  --wood-ink: #102b45;
  --wood-teal: #087f91;
  --wood-muted: #596b7e;
  --wood-line: #cdd5dc;
  color: var(--wood-ink);
  background: #fcfbf8;
  font-family:
    system-ui,
    -apple-system,
    "Noto Sans JP",
    sans-serif;
}
.wood-profile-editor *,
.wood-profile-surface *,
.wood-paint-page * {
  box-sizing: border-box;
}
.wood-profile-editor button,
.wood-profile-editor .button-link,
.wood-profile-surface .profile-button,
.wood-paint-page button {
  min-height: 44px;
  border: 1px solid var(--wood-line);
  border-radius: 12px;
  background: #fff;
  color: var(--wood-ink);
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.wood-profile-editor button:disabled,
.wood-paint-page button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.wood-profile-editor :is(button, input, select, textarea, a):focus-visible,
.wood-profile-surface :is(button, a, input):focus-visible,
.wood-paint-page :is(button, input):focus-visible {
  outline: 3px solid #087f91;
  outline-offset: 4px;
}
.wood-profile-editor .primary,
.wood-paint-page .wood-primary {
  background: var(--wood-teal);
  border-color: var(--wood-teal);
  color: #fff;
}
.wood-profile-editor .manage-heading {
  margin-bottom: 12px;
}
.profile-publication-notice {
  padding: 18px;
  border: 1px solid #cdd5dc;
  border-radius: 14px;
  background: #fff;
}
.wood-profile-editor .editor-panel {
  border: 1px solid #cdd5dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}
.profile-shelf-list {
  display: grid;
  gap: 12px;
  margin-block: 18px;
}
.profile-shelf-option {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 30px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cdd5dc;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  min-height: 130px;
}
.profile-shelf-option.is-selected {
  border: 2px solid #078ca0;
  background: #edfafa;
  padding: 11px;
}
.profile-shelf-option input {
  accent-color: #078b9c;
  width: 25px;
  height: 25px;
  min-height: 0;
  margin: 0;
}
.profile-shelf-copy {
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}
.profile-shelf-copy small {
  color: #596b7e;
  font-size: 0.8rem;
}
.profile-shelf-thumb {
  height: 104px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 6px 5px;
  padding: 5px;
  border: 4px solid #d9b58b;
  background: repeating-linear-gradient(0deg, #b38b60 0 3px, #ead8bc 3px 34px);
  box-shadow: inset 0 0 6px #71513140;
}
.profile-shelf-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f1e8;
  overflow: hidden;
  font-size: 0.7rem;
}
.profile-shelf-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-shelf-count {
  padding: 15px;
  border: 1px solid #cdd5dc;
  border-radius: 12px;
  color: #087f91;
  font-weight: 750;
  background: #fff;
}
.wood-profile-editor .publishing-panel #save-button,
.wood-profile-editor .publishing-panel #publish-button {
  min-height: 50px;
  width: 100%;
  margin-block: 5px;
}
.wood-profile-editor .publishing-panel #save-button {
  color: #087f91;
  border-color: #087f91;
}
.wood-profile-editor .publishing-panel #publish-button {
  background: #087f91;
  color: #fff;
  border-color: #087f91;
}
.confirmation-preview {
  margin-block: 18px;
  max-height: 45vh;
  overflow: auto;
  border: 1px solid #cdd5dc;
  border-radius: 10px;
  padding: 8px;
}
.wood-profile-surface .profile-cover {
  height: 18px;
  background: linear-gradient(0deg, #b58451, #e6c397, #c99c6a);
}
.wood-profile-surface .profile-cover span {
  display: none;
}
.wood-profile-surface .profile-summary {
  border: 1px solid #cdd5dc;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}
.wood-profile-surface .profile-avatar {
  color: #087f91;
  background: #d6eef0;
  border: 0;
}
.wood-profile-surface .profile-name {
  color: #102b45;
}
.wood-profile-surface .profile-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #087f91;
  border-color: #087f91;
}
.wood-profile-surface .profile-button-primary {
  background: #fff;
  color: #087f91;
}
.wood-profile-surface .profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wood-profile-surface .profile-gallery {
  padding-top: 24px;
}
.profile-public-shelf {
  margin-block: 20px;
}
.profile-public-shelf > h3 {
  font-size: 1.2rem;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.wood-profile-surface .wood-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 18px;
  padding: 16px 16px 28px;
  border: 10px solid #d4ad7d;
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    #ecdfca 0 15px,
    #e5d7c0 15px 17px,
    #eddfc9 17px 45px
  );
  box-shadow: inset 0 5px 14px #6e472e35;
}
.wood-profile-surface .collection-card {
  position: relative;
  min-width: 0;
  border: 1px solid #dfd8cf;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 3px 7px #2c201333;
  overflow: visible;
}
.wood-profile-surface .collection-card:after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: -10px;
  width: calc(100% + 20px);
  height: 12px;
  background: linear-gradient(#e3c69f, #d3ab78 45%, #bc8e5b);
  box-shadow: 0 4px 5px #63452433;
}
.wood-profile-surface .collection-image {
  aspect-ratio: 4/3;
  border: 6px solid #fff;
  border-bottom: 0;
  background: #eee9df;
  overflow: hidden;
}
.wood-profile-surface .collection-image img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.wood-profile-surface .collection-card-body {
  padding: 10px;
}
.wood-profile-surface .collection-card h3 {
  font-size: 1rem;
  color: #102b45;
  overflow-wrap: anywhere;
}
.wood-profile-surface .collection-caption {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #596b7e;
}
.wood-profile-surface .profile-gallery-heading {
  gap: 12px;
}
.wood-profile-surface .profile-gallery-heading h2 {
  font-size: 1.45rem;
}
.wood-paint-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 100px;
}
.wood-paint-page h1 {
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  margin: 14px 0 20px;
  line-height: 1.25;
}
.wood-paint-page h2 {
  font-size: 1.35rem;
  margin: 0 0 10px;
}
.wood-paint-page p {
  line-height: 1.65;
}
.wood-paint-page .wood-back {
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: #526879;
  font-weight: 650;
}
.wood-paint-overview {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--wood-line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 18px;
}
.wood-paint-overview h2 {
  overflow-wrap: anywhere;
}
.wood-paint-overview p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.wood-paint-photo {
  aspect-ratio: 4/3;
  background: #f1ede7;
  border-radius: 7px;
  overflow: hidden;
}
.wood-paint-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.wood-paint-placeholder {
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 0.85rem;
  color: #596b7e;
}
.wood-paint-placeholder > span {
  font-size: 2rem;
  color: #087f91;
}
.wood-paint-editor {
  background: #fff;
  border: 1px solid var(--wood-line);
  border-radius: 15px;
  padding: 22px;
  margin-bottom: 16px;
}
.wood-paint-editor > p {
  margin: 0 0 14px;
}
.wood-paint-editor-heading,
.wood-paint-history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.wood-paint-editor fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.wood-paint-badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
  background: #d3f1f2;
  color: #087183;
  white-space: nowrap;
}
.wood-paint-badge.is-dirty {
  background: #fff2bd;
  color: #684e00;
}
.wood-paint-control {
  display: grid;
  grid-template-columns: 58px minmax(45px, 90px) 40px minmax(80px, 1fr);
  gap: 10px;
  align-items: stretch;
  max-width: 500px;
  margin: 18px auto;
}
.wood-paint-scale {
  height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wood-paint-bottle {
  height: 260px;
  padding: 5px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid #98a6b2;
  border-radius: 22px;
  background: linear-gradient(100deg, #eff2f4, #fff 30%, #e6ecf0);
  box-shadow: inset 0 0 0 4px #dce2e7;
}
.wood-paint-bottle > span {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  border-radius: 0 0 15px 15px;
  background: linear-gradient(90deg, #239cad, #39b3c3 28%, #0b8fa6);
  max-height: calc(100% - 10px);
  transition: height 0.1s ease;
}
.wood-paint-bottle.is-unknown {
  border-style: dashed;
  background: repeating-linear-gradient(
    45deg,
    #f4f5f5,
    #f4f5f5 7px,
    #e8edef 7px,
    #e8edef 9px
  );
}
.wood-paint-slider {
  display: flex;
  justify-content: center;
}
.wood-paint-slider input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: auto;
  width: 44px;
  height: 260px;
  accent-color: #078b9c;
  padding: 0;
  margin: 0;
  cursor: ns-resize;
  touch-action: none;
  border: 0;
  background: transparent;
}
.wood-paint-adjust {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: stretch;
  padding-left: 6px;
}
.wood-paint-adjust button {
  border-color: #078b9c;
  color: #087f91;
  padding: 12px 5px;
  font-size: 1.1rem;
}
.wood-paint-adjust output {
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.7rem);
  font-weight: 750;
  line-height: 1.5;
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.wood-muted {
  color: #596b7e;
  font-size: 0.9rem;
}
.wood-paint-clear {
  display: block;
  margin-left: auto;
  color: #087f91 !important;
  border: 0 !important;
  text-decoration: underline;
  background: transparent !important;
}
.wood-paint-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid #cdd5dc;
  margin-top: 12px;
  padding-top: 16px;
}
.wood-paint-wide {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 17px !important;
  margin-block: 16px;
}
.wood-paint-note {
  border: 1px solid #cdd5dc;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}
.wood-paint-note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wood-paint-current {
  font-size: clamp(1.1rem, 4vw, 2rem);
  color: #087f91;
}
.wood-paint-timeline {
  list-style: none;
  margin: 16px 0 24px 8px;
  padding: 0 0 0 22px;
  border-left: 2px solid #cdd5dc;
}
.wood-paint-timeline li {
  position: relative;
  margin: 0 0 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid #cdd5dc;
  border-radius: 12px;
}
.wood-paint-timeline li:before {
  content: "";
  position: absolute;
  left: -30px;
  top: 24px;
  width: 12px;
  height: 12px;
  border: 2px solid #71879a;
  border-radius: 50%;
  background: #fff;
}
.wood-paint-timeline li.is-latest {
  background: #eefbfc;
  border-color: #078b9c;
}
.wood-paint-timeline li.is-latest:before {
  background: #078b9c;
  border-color: #078b9c;
}
.wood-paint-timeline li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.wood-paint-timeline time {
  font-weight: 650;
}
.wood-paint-timeline strong {
  margin-left: auto;
}
.wood-paint-timeline meter {
  width: 100%;
  height: 18px;
  margin-top: 10px;
}
.wood-paint-timeline meter::-webkit-meter-bar {
  background: #d8e1e9;
  border: 0;
  border-radius: 8px;
}
.wood-paint-timeline meter::-webkit-meter-optimum-value {
  background: #079bac;
  border-radius: 8px;
}
.paint-remaining-vertical {
  position: relative;
}
.paint-remaining-vertical .paint-remaining-slider {
  display: flex;
  align-items: center;
  gap: 20px;
}
.paint-remaining-vertical .paint-remaining-slider input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: auto;
  height: 220px;
  width: 38px;
  min-width: 38px;
  accent-color: #087f91;
  background: transparent;
  touch-action: none;
}
.paint-remaining-vertical .paint-step-markers {
  display: none;
}
.paint-remaining-step-buttons {
  display: flex;
  gap: 12px;
  margin-block: 12px;
}
.paint-remaining-step-buttons button {
  min-height: 44px;
}
@media (max-width: 600px) {
  .wood-profile-editor .editor-layout {
    display: flex;
    flex-direction: column;
  }
  .wood-profile-editor .editor-aside {
    position: static;
  }
  .wood-profile-editor .editor-panel {
    padding: 16px;
  }
  .wood-profile-surface .wood-collection-grid {
    gap: 24px 12px;
    padding: 10px 10px 24px;
    border-width: 7px;
  }
  .wood-profile-surface .collection-card-body {
    padding: 8px;
  }
  .wood-profile-surface .collection-image {
    border-width: 4px;
  }
  .wood-profile-surface .collection-card h3 {
    font-size: 0.9rem;
  }
  .wood-profile-surface .profile-actions {
    width: 100%;
  }
  .wood-profile-surface .profile-actions a {
    flex: 1;
    justify-content: center;
    font-size: 0.85rem;
  }
  .profile-shelf-option {
    grid-template-columns: 70px minmax(0, 1fr) 26px;
    gap: 12px;
  }
  .profile-shelf-thumb {
    height: 96px;
  }
  .wood-paint-page {
    padding: 16px 12px 100px;
  }
  .wood-paint-overview {
    gap: 12px;
  }
  .wood-paint-overview h2 {
    font-size: 1.2rem;
  }
  .wood-paint-overview button {
    font-size: 0.8rem;
    padding: 8px;
  }
  .wood-paint-editor {
    padding: 16px 12px;
  }
  .wood-paint-control {
    grid-template-columns: 46px 58px 44px minmax(80px, 1fr);
    gap: 6px;
  }
  .wood-paint-scale {
    font-size: 0.7rem;
  }
  .wood-paint-actions {
    gap: 8px;
  }
  .wood-paint-actions button {
    padding: 10px 7px;
    font-size: 0.9rem;
  }
  .wood-paint-timeline {
    padding-left: 18px;
  }
  .wood-paint-timeline li {
    padding: 14px;
  }
  .wood-paint-timeline li:before {
    left: -26px;
  }
  .wood-paint-timeline time {
    font-size: 0.85rem;
  }
  .wood-paint-history-heading h2 {
    margin-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wood-paint-bottle > span {
    transition: none;
  }
}
