.portfolio-ask, .portfolio-ask__panel {
  color: #111;
  font: 1rem/1.65 Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.portfolio-ask {
  position: fixed;
  z-index: 876;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(470px, calc(100% - 290px));
}
.portfolio-ask[hidden], .portfolio-ask__panel:not([open]) { display: none; }
body.cs-menu-open .portfolio-ask,
body.cs-leaving .portfolio-ask,
html.splash-active .portfolio-ask,
body:has(.lightbox-v2:not([hidden]), .v2-gallery-modal:not([hidden]), .lightbox.on, #contactForm :focus) .portfolio-ask {
  visibility: hidden;
}
html:has(.portfolio-ask__panel[open]) { overflow: hidden; scrollbar-gutter: stable; }
.portfolio-ask button, .portfolio-ask__panel button { cursor: pointer; font: inherit; }
.portfolio-ask__launcher {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 4px;
  color: inherit;
  background: #fff;
  border: 2px solid #111;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--cs-yellow, #ffe240), 0 5px 20px #0003;
  text-align: left;
}
.portfolio-ask__launcher:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}
.portfolio-ask__label {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--cs-yellow, #ffe240);
  font-size: .875rem;
  font-weight: 700;
  white-space: nowrap;
}
.portfolio-ask__hint { flex: 1; color: #5c5c57; font-size: .875rem; }
.portfolio-ask__icon, .portfolio-ask__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}
.portfolio-ask__launcher:hover .portfolio-ask__icon,
.portfolio-ask__panel .portfolio-ask__close:hover { background: #ffe240; color: #111; }
.portfolio-ask__panel {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(620px, calc(100% - 32px));
  height: min(620px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: #f6f6f3;
  border: 1px solid #111;
  border-radius: 20px;
  box-shadow: 0 18px 70px #0005;
}
.portfolio-ask__panel[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.portfolio-ask__panel::backdrop { background: rgb(0 0 0 / 60%); }
.portfolio-ask__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #1113;
}
.portfolio-ask__header h2 { margin: 0; font-size: 1rem; line-height: 1.4; }
.portfolio-ask__panel .portfolio-ask__close {
  width: 44px;
  height: 44px;
  background: #fff;
  color: #111;
  font-size: 1.25rem;
}
.portfolio-ask__body { padding: 18px 20px; overflow: auto; overflow-wrap: anywhere; overscroll-behavior: contain; }
.portfolio-ask__body p { margin: 0 0 9px; }
.portfolio-ask__suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.portfolio-ask__panel .portfolio-ask__suggestions button {
  min-height: 36px;
  border: 1px solid #1115;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 5px 12px;
  font-size: .875rem;
}
.portfolio-ask__panel .portfolio-ask__suggestions button:hover { background: #ffe240; border-color: #111; }
.portfolio-ask__turn { width: fit-content; max-width: 92%; padding: 12px 15px; border-radius: 12px; margin-top: 10px; background: #fff; }
.portfolio-ask__turn p:last-child { margin-bottom: 0; }
.portfolio-ask__turn--question { margin-left: auto; background: #111; color: #fff; }
.portfolio-ask__turn .portfolio-ask__suggestions { margin: 11px 0 0; }
.portfolio-ask__status { color: #575752; }
.portfolio-ask__status:empty { display: none; }
.portfolio-ask__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #1113;
}
.portfolio-ask__form input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #1117;
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: #111;
  font: inherit;
}
.portfolio-ask__panel .portfolio-ask__form button {
  min-height: 44px;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--cs-yellow, #ffe240);
  color: #111;
  font-size: .875rem;
  font-weight: 700;
}
.portfolio-ask__form button:disabled { opacity: .55; cursor: wait; }
.portfolio-ask__panel :focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.portfolio-ask__body:focus-visible { outline-offset: -3px; }
@media (max-width: 700px) {
  .portfolio-ask {
    width: min(290px, calc(100% - 178px));
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .portfolio-ask__launcher { min-height: 43px; justify-content: space-between; gap: 6px; padding: 3px; }
  .portfolio-ask__label { padding-inline: 6px; background: transparent; }
  .portfolio-ask__hint { display: none; }
  .portfolio-ask__icon { width: 33px; height: 33px; }
  .portfolio-ask__panel { width: calc(100% - 24px); height: min(620px, calc(100dvh - 24px)); }
  .portfolio-ask__header, .portfolio-ask__body, .portfolio-ask__form { padding-inline: 14px; }
}
