:root {
  --bg: #faf6f2;
  --bg-deep: #f0e6dc;
  --ink: #3d3540;
  --ink-soft: #6b5f6a;
  --cell: #e8e0d8;
  --cell-edge: #cfc4bc;
  --done: #9bc9a8;
  --done-deep: #6fa67f;
  --accent: #e8a4b8;
  --accent-2: #a8c4e8;
  --shadow: rgba(61, 53, 64, 0.12);
  --radius: 14px;
  --grid-radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  font-family: "Nunito", system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 10% 0%, #fff9f5 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--ink);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* Soft “stitch” texture */
.craft-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.14;
  background-image: radial-gradient(circle at 30% 20%, var(--accent) 0.5px, transparent 1px),
    radial-gradient(circle at 70% 60%, var(--accent-2) 0.45px, transparent 1px),
    radial-gradient(circle at 50% 80%, var(--done) 0.4px, transparent 1px);
  background-size: 22px 22px, 18px 18px, 26px 26px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.title-brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.craft-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px var(--shadow));
}

.craft-icon--hook {
  opacity: 0.92;
}

.header-text h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 0;
}

.btn-settings,
.btn-theme {
  flex: 0 0 auto;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 164, 184, 0.55);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, white);
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.btn-settings:hover,
.btn-theme:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-settings:focus-visible,
.btn-theme:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.tagline {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.progress-wrap {
  flex: 1 1 220px;
  max-width: 320px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 1px 3px var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--done-deep),
    var(--done),
    color-mix(in srgb, var(--done) 78%, white)
  );
  transition: width 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.main {
  position: relative;
  background: linear-gradient(145deg, #ffffffcc, #fff8f4cc);
  border-radius: var(--grid-radius);
  padding: 0.75rem 0.5rem 1rem;
  box-shadow: 0 12px 40px var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  overflow-x: auto;
  overflow-y: visible;
}

.main-corner {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  opacity: 0.2;
  background: radial-gradient(circle at 30% 30%, var(--accent) 0, transparent 55%),
    radial-gradient(circle at 70% 70%, var(--accent-2) 0, transparent 50%);
  border-radius: 50%;
}

.main-corner--tl {
  top: 6px;
  left: 8px;
}

.main-corner--br {
  bottom: 8px;
  right: 10px;
}

/* Pointy-top hex: flat-to-flat width = sqrt(3)*s, tip-to-tip height = 2s → h/w = 2/sqrt(3) */
.honeycomb {
  --cols: 10;
  --hex-gap: clamp(4px, 0.55vw, 7px);
  --hex-w: clamp(
    22px,
    calc((min(100vw, 900px) - 4rem - (var(--cols) - 1) * var(--hex-gap)) / (var(--cols) + 0.35)),
    58px
  );
  --hex-h: calc(var(--hex-w) * 2 / 1.73205080757);
  --row-overlap: calc(var(--hex-h) * -0.25 + var(--hex-gap) * 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: calc(var(--hex-h) * 0.22) calc(var(--hex-w) * 0.55);
  user-select: none;
}

.honey-row {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  justify-content: center;
  gap: var(--hex-gap);
  margin-bottom: var(--row-overlap);
}

.honey-row:last-child {
  margin-bottom: 0;
}

/* Right-leading honeycomb: odd rows shift the opposite way so they still nest */
.honey-row--offset {
  transform: translateX(calc(-1 * (var(--hex-w) / 2 + var(--hex-gap) / 2)));
}

/* Square grid: CSS grid with gaps — no staggered / offset rows */
.honeycomb.honeycomb--square {
  --square-gap: clamp(6px, 1.2vw, 12px);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--square-gap);
  width: 100%;
  max-width: min(900px, 100%);
  margin-inline: auto;
  padding: 0.65rem 0.45rem 0.85rem;
  box-sizing: border-box;
}

.honeycomb.honeycomb--square .cell {
  clip-path: none;
  -webkit-clip-path: none;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
}

.cell {
  position: relative;
  flex: 0 0 var(--hex-w);
  width: var(--hex-w);
  height: var(--hex-h);
  margin: 0;
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  background: var(--cell);
  cursor: pointer;
  outline: none;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: background 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: stitch-edge 3.2s ease-in-out infinite;
}

.honey-row:nth-child(odd) .cell:nth-child(odd),
.honey-row:nth-child(even) .cell:nth-child(even) {
  animation-delay: 0s;
}

.honey-row:nth-child(odd) .cell:nth-child(even),
.honey-row:nth-child(even) .cell:nth-child(odd) {
  animation-delay: -1.6s;
}

@keyframes stitch-edge {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px var(--cell-edge), inset 2px 2px 4px rgba(255, 255, 255, 0.35),
      inset -2px -2px 5px rgba(61, 53, 64, 0.06);
  }
  50% {
    box-shadow: inset 0 0 0 1px #b8aea6, inset -1px -1px 3px rgba(255, 255, 255, 0.25),
      inset 2px 2px 6px rgba(61, 53, 64, 0.1);
  }
}

.cell:focus-visible {
  z-index: 30;
  filter: drop-shadow(0 0 0 2px var(--accent-2)) drop-shadow(0 0 5px rgba(168, 196, 232, 0.65));
}

.cell.is-done {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--done) 72%, white) 0%,
    var(--done) 45%,
    var(--done-deep) 100%
  );
  animation: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 -6px 12px rgba(61, 53, 64, 0.12);
}

.cell.is-done::after {
  content: "";
  position: absolute;
  inset: 18%;
  opacity: 0.62;
  pointer-events: none;
  background-color: var(--check-stroke, rgba(50, 58, 52, 0.62));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.cell.is-colored {
  animation: none;
}

.cell.is-colored .cell-yarn {
  opacity: 1;
}

.cell-yarn {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  background: var(--yarn, var(--cell));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), inset 2px 2px 0 rgba(255, 255, 255, 0.25);
}

.cell.is-active-picker {
  z-index: 35;
  filter: drop-shadow(0 0 0 2px var(--accent)) drop-shadow(0 0 6px rgba(232, 164, 184, 0.75));
}

.cell.is-active-picker:focus-visible {
  filter: drop-shadow(0 0 0 2px var(--accent-2)) drop-shadow(0 0 0 3px var(--accent))
    drop-shadow(0 0 8px rgba(232, 164, 184, 0.55));
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61, 53, 64, 0.2);
  z-index: 40;
}

.palette {
  position: fixed;
  z-index: 50;
  min-width: 200px;
  max-width: min(92vw, 280px);
  padding: 0.85rem 1rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(61, 53, 64, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  border: 1px solid rgba(232, 164, 184, 0.45);
}

.palette-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.palette-sub {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}

.palette-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.palette-default,
.palette-last {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2px;
  padding: 0.42rem 0.55rem;
  border-radius: 11px;
  border: 2px dashed rgba(207, 196, 188, 0.95);
  background: linear-gradient(180deg, #fffefb, var(--bg));
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.palette-last {
  border-style: dashed;
  border-color: var(--cell-edge);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--cell-edge));
}

.palette-default:hover,
.palette-last:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
  border-color: var(--accent-2);
}

.palette-default:focus-visible,
.palette-last:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.palette-default-swatch,
.palette-last-swatch {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 5px var(--shadow);
  flex-shrink: 0;
}

.palette-default-label,
.palette-last-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}

.palette-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
  box-shadow: 0 2px 6px var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.palette-swatch:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(61, 53, 64, 0.18);
}

.palette-swatch:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.palette-custom-wrap {
  position: relative;
  margin-top: 0.45rem;
  margin-bottom: 0.35rem;
}

.palette-custom-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.42rem 0.55rem;
  border-radius: 11px;
  border: 2px dashed rgba(207, 196, 188, 0.95);
  background: linear-gradient(180deg, #fffefb, var(--bg));
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.palette-custom-text {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.palette-custom-btn input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.palette-custom-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
  border-color: var(--accent-2);
}

.palette-custom-btn:focus-within {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.palette-close {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.45rem;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--bg-deep);
  color: var(--ink);
  cursor: pointer;
}

.palette-close:hover {
  background: var(--accent);
  color: #fff;
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61, 53, 64, 0.28);
  z-index: 55;
}

.theme-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61, 53, 64, 0.28);
  z-index: 65;
}

.settings-panel {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 1.5rem));
  max-height: min(90vh, 520px);
  overflow-y: auto;
  padding: 1.1rem 1.15rem 1.15rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 56px rgba(61, 53, 64, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
  border: 1px solid rgba(168, 196, 232, 0.55);
}

.settings-panel.theme-panel {
  z-index: 66;
  width: min(360px, calc(100vw - 1.5rem));
  max-height: min(88vh, 560px);
}

.theme-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.theme-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.theme-field span {
  flex: 1;
  min-width: 0;
}

.theme-field input[type="color"] {
  width: 2.75rem;
  height: 2.25rem;
  padding: 0;
  border: 2px solid var(--cell-edge);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.theme-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.theme-field input[type="color"]::-webkit-color-swatch {
  border-radius: 4px;
  border: none;
}

.theme-section-label {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.theme-yarn-done-block {
  margin-bottom: 1rem;
}

.theme-yarn-done-hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-soft);
  font-weight: 600;
}

.theme-yarn-done-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.theme-yarn-done-empty {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink-soft);
}

.theme-yarn-done-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.theme-yarn-done-swatch {
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 2px solid var(--cell-edge);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.theme-yarn-done-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.theme-yarn-done-code {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.theme-yarn-done-row .theme-yarn-done-input[type="color"] {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.1rem;
  padding: 0;
  border: 2px solid var(--cell-edge);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.theme-yarn-done-row .theme-yarn-done-input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.theme-yarn-done-row .theme-yarn-done-input[type="color"]::-webkit-color-swatch {
  border-radius: 4px;
  border: none;
}

.theme-actions {
  display: flex;
  gap: 0.5rem;
}

.settings-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.settings-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.45;
}

.settings-sub {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.settings-mode-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

.settings-mode-fieldset .settings-sub {
  margin-bottom: 0.4rem;
}

.settings-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.settings-mode-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.settings-mode-option input {
  accent-color: var(--accent);
}

.settings-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.preset-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--bg-deep);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.preset-chip:hover {
  background: #fff;
  border-color: var(--accent-2);
}

.preset-chip.is-current {
  border-color: var(--done-deep);
  background: linear-gradient(160deg, color-mix(in srgb, var(--done) 28%, white), #fff);
}

.preset-chip:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.settings-custom {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.settings-field input {
  width: 4.5rem;
  padding: 0.4rem 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--cell-edge);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}

.settings-field input:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
  border-color: var(--accent-2);
}

.settings-times {
  font-weight: 800;
  color: var(--ink-soft);
  padding-bottom: 0.45rem;
  font-size: 1rem;
}

.settings-total {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
}

.settings-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.btn-primary {
  background: linear-gradient(160deg, var(--done), var(--done-deep));
  color: #fff;
  box-shadow: 0 2px 10px rgba(61, 100, 70, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--bg-deep);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--cell-edge);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .honeycomb {
    --hex-gap: clamp(3px, 1.1vw, 6px);
    --hex-w: clamp(
      20px,
      calc((100vw - 2.25rem - (var(--cols) - 1) * var(--hex-gap)) / (var(--cols) + 0.35)),
      52px
    );
  }

  .honeycomb.honeycomb--square {
    --square-gap: clamp(4px, 1vw, 9px);
  }

  .header {
    flex-direction: column;
    align-items: stretch;
  }

  .progress-wrap {
    max-width: none;
  }
}

/* --- Blinking Shiba (below main card; scoped — no extra page background or title) --- */
@keyframes shiba-blink {
  0%,
  50%,
  80% {
    background: linear-gradient(#221b1b 100%, transparent 100%);
  }
  60%,
  100% {
    background: linear-gradient(transparent 23%, #221b1b 23%, transparent 30%);
  }
}

.shiba-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.15rem 0 0.35rem;
  pointer-events: none;
  user-select: none;
}

.shiba-wrap * {
  box-sizing: border-box;
}

.shiba-wrap .whole-shiba {
  --shiba-scale: 0.38;
  position: relative;
  flex: 0 0 auto;
  width: min(100vmin, 720px);
  max-width: min(100vmin, 720px);
  margin: 0;
  transform: scale(var(--shiba-scale));
  transform-origin: center top;
  /* Layout still uses unscaled box; pull following content up */
  margin-bottom: calc(-1 * (1 - var(--shiba-scale)) * 72vmin);
}

.shiba-wrap .shiba-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 75vmin;
}

.shiba-wrap .shiba-face {
  position: absolute;
  top: 20vmin;
  width: 65vmin;
  height: 50vmin;
  max-width: 100%;
  border-radius: 50% 50% 40% 40%;
  background: #fece7c;
}

.shiba-wrap .whole-shiba--gray .shiba-face {
  background: #9a9a9a;
}

.shiba-wrap .ears {
  width: 25vmin;
  height: 20vmin;
  background: #f0c9c9;
  border-radius: 20%;
  border: 10px solid #fece7c;
}

.shiba-wrap .whole-shiba--gray .ears {
  border-color: #9a9a9a;
}

.shiba-wrap .ear-left {
  position: relative;
  left: -20vmin;
  top: 20vmin;
}

.shiba-wrap .ear-right {
  position: relative;
  left: 20vmin;
  top: 0vmin;
  transform: rotateZ(-180deg);
}

.shiba-wrap .sniff-white-1 {
  top: -8vmin;
  width: 45vmin;
  height: 15vmin;
  border-radius: 50%;
  background: #f5f5f5;
  position: relative;
}

.shiba-wrap .sniff-white-2 {
  top: -28vmin;
  width: 25vmin;
  height: 15vmin;
  border-radius: 50%;
  background: #f5f5f5;
  position: relative;
}

.shiba-wrap .whole-shiba--gray .sniff-white-1,
.shiba-wrap .whole-shiba--gray .sniff-white-2 {
  background: #d0d0d0;
}

.shiba-wrap .brows {
  width: 10vmin;
  height: 4vmin;
  border-radius: 50%;
  background: #fff;
}

.shiba-wrap .brow-left {
  position: relative;
  top: -3vmin;
  left: -15vmin;
  transform: rotateZ(-30deg);
}

.shiba-wrap .brow-right {
  position: relative;
  top: -7vmin;
  left: 15vmin;
  transform: rotateZ(30deg);
}

.shiba-wrap .eyes {
  width: 4vmin;
  height: 4vmin;
  border-radius: 50%;
  background: #221b1b;
  animation: shiba-blink 4s infinite;
}

.shiba-wrap .eye-left {
  position: relative;
  top: -1vmin;
  left: -15vmin;
}

.shiba-wrap .eye-right {
  position: relative;
  top: -5vmin;
  left: 15vmin;
}

.shiba-wrap .eye-light {
  width: 1vmin;
  height: 0.9vmin;
  border-radius: 50%;
  background: #fece7c;
}

.shiba-wrap .eye-light-left {
  position: relative;
  top: -10vmin;
  left: -16vmin;
  transform: rotateZ(-30deg);
}

.shiba-wrap .eye-light-right {
  position: relative;
  top: -9vmin;
  left: 16vmin;
  transform: rotateZ(30deg);
}

.shiba-wrap .shiba-nose {
  position: relative;
  top: -38vmin;
  left: 0vmin;
  width: 8vmin;
  height: 4vmin;
  border-radius: 50%;
  background: #221b1b;
}

.shiba-wrap .mouth-up {
  position: relative;
  top: -40vmin;
  left: 0vmin;
  width: 0.5vmin;
  height: 4vmin;
  border-radius: 30%;
  background: #221b1b;
}

.shiba-wrap .mouth {
  width: 10vmin;
  height: 10vmin;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 5px 0 #221b1b;
}

.shiba-wrap .mouth-left {
  position: relative;
  top: -47vmin;
  left: -5vmin;
  transform: rotateY(-180deg);
}

.shiba-wrap .mouth-right {
  position: relative;
  top: -57vmin;
  left: 5vmin;
  box-shadow: 0 5px 0 #221b1b;
}
