:root {
  --bg: #eef7ef;
  --panel: #ffffff;
  --ink: #173522;
  --sub: #5c7563;
  --green: #2f8b51;
  --green2: #55b86f;
  --line: #cfe3d3;
  --gold: #c49526;
  --danger: #b74a4a;
  --shadow: 0 12px 32px rgba(35, 80, 48, .12)
}

* {
  box-sizing: border-box
}

.adsbygoogle {
  display: block;
  width: 100%;
  margin: 16px 0;
  text-align: center;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: linear-gradient(#f7fbf7, #e4f2e7)
}

button,
input {
  font: inherit
}

button {
  cursor: pointer
}

#app {
  max-width: 1420px;
  margin: auto;
}

.topbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px
}

.brand,
.stat {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow)
}

.brand {
  grid-column: 1/-1;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 10px;
  padding: 23px max(18px, env(safe-area-inset-left));
  text-align: center;
  color: white;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 45%, rgba(20, 55, 31, .2)),
    repeating-linear-gradient(90deg, #2f7b49 0 54px, #efe1b9 54px 108px);
  border: 0;
  border-top: 7px solid #17492c;
  border-bottom: 8px solid #133f27;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 22px rgba(24, 68, 39, .3)
}

.brand:before {
  content: "";
  position: absolute;
  inset: 5px 0 auto;
  height: 5px;
  background: repeating-linear-gradient(90deg, transparent 0 48px, rgba(10, 51, 27, .45) 48px 54px)
}

.brand:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 7px;
  background: linear-gradient(180deg, #286d41, #153f28);
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 7px rgba(20, 58, 34, .24);
  pointer-events: none
}

.brand h1 {
  display: inline-block;
  position: relative;
  z-index: 1;
  color: #fffdf0;
  font-size: clamp(21px, 2.1vw, 31px);
  margin: 0;
  padding: 5px 18px 6px;
  letter-spacing: .08em;
  line-height: 1.25;
  background: rgba(14, 55, 32, .9);
  border: 2px solid rgba(255, 250, 220, .88);
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(11, 44, 25, .65), 0 5px 14px rgba(0, 0, 0, .25);
  text-shadow: 0 2px 2px #082b18;
  -webkit-text-stroke: .25px #082b18
}

.brand small {
  display: block;
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 7px auto 0;
  padding: 3px 10px;
  color: #fff;
  font-weight: bold;
  background: rgba(14, 55, 32, .78);
  border-radius: 999px;
  text-shadow: 0 1px 2px #082b18
}

.stat {
  padding: 7px 12px;
  text-align: center
}

.stat b {
  display: block;
  font-size: 20px;
  margin-top: 0;
  line-height: 1.2
}

.stat span {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.15
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .85fr);
  gap: 14px
}

.panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line)
}

.panel-title h2 {
  font-size: 18px;
  margin: 0
}

.shop-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0
}

.owner-actions {
  display: flex;
  align-items: center;
  gap: 7px
}

.owner-actions .owner-save {
  padding: 4px 7px;
  font-size: 12px;
  line-height: normal
}

.market-sale,
.market-weather-notice {
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 900;
  text-align: center
}

.market-sale {
  color: #8b2b21;
  background: #fff0b8;
  border: 1px solid #e6b840
}

.market-weather-notice {
  color: #315d73;
  background: #e8f4fa;
  border: 1px solid #afd2e2
}

.market-price {
  flex: none;
  display: grid;
  justify-items: stretch;
  gap: 2px
}

.regular-price {
  color: var(--sub);
  font-size: 11px;
  text-align: center;
  text-decoration: line-through
}

.shop-heading h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.shop-title-link {
  color: inherit;
  text-decoration: none
}

.shop-title-link.active {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px
}

.shop-name-edit {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  color: var(--green);
  background: white;
  font-size: 11px;
  font-weight: 800
}

.owner-form {
  display: grid;
  gap: 10px
}

.owner-form label {
  display: grid;
  gap: 4px;
  color: var(--sub);
  font-size: 12px
}

.owner-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--ink);
  background: white
}

.owner-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 12px
}

.ranking-table-wrap {
  overflow-x: auto
}

.ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px
}

.guide-panel .ranking-heading h2 {
  margin: 0
}

.ranking-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--ink)
}

.ranking-table th,
.ranking-table td {
  padding: 9px 8px;
  border-bottom: 1px dotted #d9e8dc;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.ranking-table th {
  color: var(--sub);
  font-size: 12px;
  background: #f4f8f4
}

.ranking-table .ranking-stat {
  text-align: right
}

.ranking-row.current td {
  color: var(--green);
  background: #eef7f0;
  font-weight: 800
}

.ranking-row.own-summary td {
  border-top: 3px solid #9ccca8
}

.panel-title small {
  color: var(--sub)
}

.shop-scene {
  position: relative;
  min-height: 520px;
  padding: 18px;
  background: linear-gradient(#cde8f0 0 39%, #e8d3b0 39% 43%, #f5ead6 43% 100%);
  overflow: hidden
}

.shop-scene:before {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  height: 28%;
  border: 12px solid #f7fbff;
  background: linear-gradient(#9ed6e7, #d8f2f8);
  box-shadow: inset 0 0 0 3px #97bcc8
}

.shop-scene:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background: repeating-linear-gradient(90deg, rgba(130, 91, 49, .08) 0 2px, transparent 2px 86px), linear-gradient(#f4e3ca, #ead5b6);
  z-index: 0
}

.shelf {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 220px auto 0;
  max-width: 900px
}

.slot {
  min-height: 158px;
  border: 2px solid rgba(68, 96, 74, .22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(220, 248, 249, .78) 0 68%, rgba(154, 204, 199, .55) 68% 73%, rgba(101, 78, 56, .13) 73%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px;
  transition: .18s
}

.slot:hover {
  transform: translateY(-2px);
  border-color: #78b58a
}

.slot.empty {
  border-style: dashed;
  background: rgba(255, 255, 255, .45)
}

.marimo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  position: relative;
  flex: none;
  background: radial-gradient(circle at 35% 28%, #65b76c 0 6%, #3f9454 30%, #1d6c3a 72%, #174e31 100%);
  box-shadow: inset -10px -12px 18px rgba(0, 0, 0, .14), 0 7px 10px rgba(15, 73, 46, .18);
  transform: scale(var(--marimo-x, 1), var(--marimo-y, 1));
  transition: transform .2s ease
}

.marimo:after {
  content: none
}

.marimo.rare {
  filter: hue-rotate(42deg) saturate(1.25);
  box-shadow: 0 0 0 3px rgba(236, 202, 89, .5), inset -10px -12px 18px rgba(0, 0, 0, .12), 0 8px 18px rgba(189, 153, 41, .25)
}

.marimo.legend {
  filter: saturate(1.5) brightness(1.08);
  box-shadow: 0 0 0 3px #ffd76a, 0 0 22px #ffe9a8, inset -10px -12px 18px rgba(0, 0, 0, .12)
}

.item-name {
  font-weight: 800;
  margin-top: 8px;
  text-align: center
}

.item-meta {
  font-size: 12px;
  color: var(--sub);
  text-align: center
}

.price-tag {
  font-weight: 800;
  color: #6c5114;
  background: #fff5c9;
  border: 1px solid #e7ce69;
  border-radius: 8px;
  padding: 3px 7px;
  margin-top: 5px
}

.slot-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 6px
}

.slot-price-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%
}

.slot-price {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #6c5114;
  font-size: 12px;
  font-weight: 800
}

.slot-price .price-input {
  width: 52px;
  padding: 6px 4px;
}

.slot-controls .btn {
  padding: 6px 7px;
  font-size: 10px
}

.raw-algae {
  width: 54px;
  height: 54px;
  position: relative;
  flex: none;
  border-radius: 18px;
  background: radial-gradient(ellipse at 30% 35%, #6ab96d 0 7%, transparent 8%), radial-gradient(ellipse at 70% 28%, #4a9a59 0 8%, transparent 9%), radial-gradient(ellipse at 55% 68%, #2d7c48 0 9%, transparent 10%), radial-gradient(ellipse at 22% 72%, #549e5d 0 7%, transparent 8%);
  filter: drop-shadow(0 5px 4px rgba(25, 80, 43, .18))
}

.raw-algae:before,
.raw-algae:after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 14px;
  border-radius: 50%;
  border-top: 7px solid #2d7545;
  border-bottom: 5px solid #4c9a5a;
  transform: rotate(18deg)
}

.raw-algae:before {
  top: 13px
}

.raw-algae:after {
  top: 29px;
  transform: rotate(-22deg)
}

.raw-algae.good {
  filter: brightness(1.08) saturate(1.1) drop-shadow(0 5px 4px rgba(25, 80, 43, .18))
}

.raw-algae.select {
  filter: brightness(1.18) saturate(1.25) drop-shadow(0 0 5px rgba(198, 151, 34, .35))
}

.raw-algae.rare-raw {
  filter: brightness(1.22) saturate(1.35) hue-rotate(35deg) drop-shadow(0 0 7px rgba(137, 92, 190, .5))
}

.raw-algae.super-raw {
  filter: brightness(1.35) saturate(1.55) hue-rotate(95deg) drop-shadow(0 0 8px rgba(255, 190, 40, .85))
}

.skill-meter {
  height: 8px;
  border-radius: 999px;
  background: #dceade;
  overflow: hidden;
  margin-top: 6px
}

.skill-meter>i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #55b86f, #2f8b51);
  border-radius: inherit
}

.roll-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 9px
}

.roll-status>div {
  background: #eef7f0;
  border-radius: 10px;
  padding: 8px;
  text-align: center
}

.roll-status b {
  display: block;
  font-size: 15px
}

.roll-status span {
  font-size: 11px;
  color: var(--sub)
}

.customer-zone {
  position: absolute;
  top: calc(4% + 18px);
  left: 7%;
  right: 51%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 120px
}

.customer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  animation: enter .25s ease
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(#ffd9bf 0 56%, #6d94bd 56%);
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  position: relative;
  flex: none
}

.avatar:before,
.avatar:after {
  content: "";
  position: absolute;
  top: 20px;
  width: 4px;
  height: 4px;
  background: #263b45;
  border-radius: 50%
}

.avatar:before {
  left: 15px
}

.avatar:after {
  right: 15px
}

.avatar.mariko {
  background: white url('mariko.png') center/cover no-repeat
}

.avatar.imari {
  background: white url('imari.png') center/cover no-repeat
}

.avatar.mariko:before,
.avatar.mariko:after,
.avatar.imari:before,
.avatar.imari:after {
  display: none
}

.bubble {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 11px;
  max-width: 430px;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08)
}

@keyframes enter {
  from {
    transform: translateX(20px);
    opacity: 0
  }
}

.side {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #edf6ef
}

.tab {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 9px 6px;
  background: transparent;
  color: #4f6a57;
  font-weight: 700
}

.tab.active {
  background: white;
  color: var(--green);
  box-shadow: 0 2px 10px rgba(37, 91, 53, .12)
}

.tabbody {
  padding: 12px;
  max-height: 520px;
  overflow: auto
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  margin-bottom: 9px;
  background: #fff
}

.card-row {
  display: flex;
  align-items: center;
  gap: 10px
}

.card .marimo {
  width: 52px;
  height: 52px
}

.grow {
  flex: 1;
  min-width: 0
}

.card h3 {
  font-size: 15px;
  margin: 0 0 3px
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 12px
}

.finance-summary>div {
  padding: 10px 6px;
  border-radius: 11px;
  background: #eef7f0;
  text-align: center
}

.finance-summary span,
.finance-table-head {
  font-size: 11px;
  color: var(--sub)
}

.finance-summary b {
  display: block;
  margin-top: 3px;
  font-size: 16px
}

.finance-table-head,
.finance-row {
  display: grid;
  grid-template-columns: 46px minmax(58px, .8fr) minmax(96px, 1.25fr) minmax(64px, .9fr);
  grid-template-areas: "day revenue cost profit";
  gap: 4px;
  align-items: center;
  padding: 8px 4px;
  text-align: right
}

.finance-table-head {
  border-bottom: 1px solid var(--line);
  font-weight: 800
}

.finance-row {
  border-bottom: 1px dotted #d9e8dc;
  font-size: 12px
}

.finance-table-head>:nth-child(1),
.finance-row>:nth-child(1) {
  grid-area: day;
  text-align: left
}

.finance-table-head>:nth-child(2),
.finance-row>:nth-child(2) {
  grid-area: revenue
}

.finance-table-head>:nth-child(3),
.finance-row>:nth-child(3) {
  grid-area: cost;
  text-align: center
}

.finance-table-head>:nth-child(4),
.finance-row>:nth-child(4) {
  grid-area: profit
}

.finance-cost {
  padding: 5px 3px;
  border-radius: 7px;
  background: #f3f7f3
}

.finance-row small {
  display: block;
  color: var(--sub);
  font-size: 9px;
  line-height: 1.35
}

.muted {
  font-size: 12px;
  color: var(--sub)
}

.btn {
  border: 1px solid #2e814b;
  color: white;
  background: linear-gradient(#4fad68, #31824f);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800
}

.btn.secondary {
  color: #31583d;
  background: white;
  border-color: #bdd7c3
}

.btn.gold {
  background: linear-gradient(#d9b549, #ac8120);
  border-color: #9e771e
}

.btn.danger,
.shop-name-edit.danger {
  background: linear-gradient(#c95b5b, #a83d3d);
  color: #fff;
  border-color: #933535
}

.btn.x-share {
  color: #fff;
  background: #000;
  border-color: #000
}

.btn.x-share:hover {
  background: #242424
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed
}

.raw-price-btn {
  width: 86px;
  flex: 0 0 86px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

.upgrade-price-btn {
  min-width: 104px;
  flex: 0 0 104px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

.inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 8px
}

.price-step {
  width: 24px;
  min-width: 24px;
  height: 32px;
  padding: 0;
  font-size: 10px;
  line-height: 1
}

.inline-controls .price-input {
  height: 32px
}

.inline-controls .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding-top: 0;
  padding-bottom: 0
}

.price-input {
  width: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  ime-mode: disabled;
  appearance: textfield;
  -moz-appearance: textfield
}

.price-input::-webkit-inner-spin-button,
.price-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line)
}

.log {
  position: absolute;
  top: calc(4% + 18px);
  left: 52%;
  right: 7%;
  z-index: 4;
  height: 140px;
  overflow: auto;
  padding: 10px 12px;
  font-size: 12px;
  color: #496252;
  background: rgba(247, 251, 248, .92);
  border: 1px solid rgba(151, 188, 200, .7);
  border-radius: 12px
}

.log div {
  padding: 2px 0;
  border-bottom: 1px dotted #d9e8dc
}

.good {
  color: #268044
}

.high-stat {
  color: #268044;
  font-weight: 800
}

.bad {
  color: #a64141
}

.stars {
  color: #c69722;
  letter-spacing: 1px
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 40, 25, .52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 20
}

.modal.show {
  display: flex
}

.modal-box {
  width: min(620px, 100%);
  background: white;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .28)
}

.modal-box h2 {
  margin-top: 0
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px
}

.summary-grid div {
  background: #eef7f0;
  border-radius: 12px;
  padding: 12px;
  text-align: center
}

.summary-grid b {
  font-size: 21px;
  display: block
}

.summary-goal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 16px;
  background: #fff5c9;
  border: 1px solid #e7ce69;
  border-radius: 12px
}

.summary-goal b {
  font-size: 18px;
  color: #6c5114
}

.summary-goal b.good {
  color: #268044
}

.summary-goal b.bad {
  color: #a64141
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px
}

.help {
  font-size: 13px;
  line-height: 1.75;
  color: #41604a
}

.guide-panel {
  margin-top: 14px;
  padding: 18px 20px
}

.guide-panel h2 {
  font-size: 18px;
  margin: 0 0 12px
}

.guide-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px
}

.guide-columns>div {
  min-width: 0
}

.guide-columns b {
  display: block;
  margin-bottom: 3px;
  color: #285f3b
}

.badge {
  display: inline-block;
  border-radius: 999px;
  background: #e8f5eb;
  color: #347046;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800
}

.goal-value {
  font-weight: 900;
  color: #296f43
}

.rep-goal-meter {
  height: 9px;
  border-radius: 999px;
  background: #dceade;
  overflow: hidden;
  margin-top: 8px
}

.rep-goal-meter>i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #55b86f, #2f8b51);
  border-radius: inherit
}

.roll-result {
  position: fixed;
  inset: 0;
  background: rgba(4, 13, 8, .88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 41;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(4px)
}

.rolling-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 13, 8, .88);
  color: white;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(4px)
}

.rolling-overlay.show {
  display: flex
}

.rolling-animation {
  position: relative;
  width: 230px;
  height: 170px;
  margin: 0 auto 18px
}

.rolling-algae-ball {
  position: absolute;
  left: 76px;
  top: 42px;
  width: 78px;
  height: 78px;
  border-radius: 42% 58% 48% 52%;
  background: radial-gradient(circle at 35% 30%, #78c878, #33884c 52%, #1b5d35);
  box-shadow: 0 0 35px rgba(87, 205, 112, .35);
  animation: algaeRoll .55s ease-in-out infinite alternate
}

.rolling-hand {
  position: absolute;
  top: 53px;
  width: 72px;
  height: 52px;
  border-radius: 45%;
  background: linear-gradient(#ffe0c8, #eeb995);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
  animation: handPress .55s ease-in-out infinite alternate
}

.rolling-hand.left {
  left: 13px
}

.rolling-hand.right {
  right: 13px;
  animation-name: handPressRight
}

.rolling-message {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .08em
}

.rolling-dots {
  margin-top: 8px;
  color: #bfe6c8;
  font-size: 13px
}

@keyframes algaeRoll {
  from {
    transform: rotate(-20deg) scale(.9, 1.08);
    border-radius: 38% 62% 42% 58%
  }

  to {
    transform: rotate(25deg) scale(1.06, .92);
    border-radius: 55% 45% 58% 42%
  }
}

@keyframes handPress {
  from {
    transform: translateX(-8px) rotate(8deg)
  }

  to {
    transform: translateX(18px) rotate(-5deg)
  }
}

@keyframes handPressRight {
  from {
    transform: translateX(8px) rotate(-8deg)
  }

  to {
    transform: translateX(-18px) rotate(5deg)
  }
}

.roll-result.show {
  display: flex
}

.roll-result-box {
  width: min(520px, 100%);
  text-align: center;
  color: white;
  animation: resultIn .32s cubic-bezier(.2, .8, .2, 1)
}

.roll-result-kicker {
  font-weight: 800;
  letter-spacing: .14em;
  color: #bfe6c8;
  font-size: 13px
}

.roll-result h2 {
  font-size: clamp(25px, 5vw, 38px);
  margin: 8px 0 18px
}

.roll-marimo-stage {
  width: 230px;
  height: 230px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(112, 216, 137, .18), rgba(255, 255, 255, .035) 55%, transparent 70%);
  position: relative
}

.roll-marimo-stage:before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(179, 236, 193, .22);
  box-shadow: 0 0 55px rgba(68, 194, 99, .20)
}

.roll-marimo-stage .marimo {
  width: 150px;
  height: 150px;
  box-shadow: inset -18px -20px 28px rgba(0, 0, 0, .17), 0 18px 45px rgba(32, 190, 77, .28)
}

.roll-marimo-stage .marimo.rare {
  box-shadow: 0 0 0 5px rgba(236, 202, 89, .55), 0 0 45px rgba(236, 202, 89, .38), inset -18px -20px 28px rgba(0, 0, 0, .12)
}

.roll-marimo-stage .marimo.legend {
  box-shadow: 0 0 0 5px #ffd76a, 0 0 70px #ffe9a8, inset -18px -20px 28px rgba(0, 0, 0, .12)
}

.result-name {
  font-size: 23px;
  font-weight: 900;
  margin-bottom: 3px
}

.result-desc {
  max-width: 440px;
  margin: 0 auto 10px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  line-height: 1.55
}

.result-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 auto 16px;
  max-width: 440px
}

.result-info>div {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 4px
}

.result-info span {
  font-size: 11px;
  color: #c7d8cb;
  display: block
}

.result-info b {
  font-size: 17px;
  display: block;
  margin-top: 3px
}

.result-stars {
  font-size: 25px;
  color: #f3cd57;
  letter-spacing: 2px;
  margin: 4px 0 16px
}

.result-note {
  min-height: 22px;
  color: #d1edd7;
  font-size: 13px;
  margin-bottom: 16px
}

.roll-result .btn {
  min-width: 160px;
  font-size: 16px;
  padding: 11px 22px
}

.roll-result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap
}

@keyframes resultIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.94)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  width: max-content;
  max-width: calc(100vw - 24px);
  transform: translate(-50%, 20px);
  background: #173522;
  color: white;
  padding: 10px 16px;
  text-align: center;
  white-space: normal;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 30
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}

footer {
  margin: 12px auto 24px;
  padding: 12px;
  color: var(--sub);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 12px
}

footer a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none
}

footer a:hover {
  text-decoration: underline
}

@media(max-width:900px) {
  #app {
    padding: 0 9px 9px
  }

  footer {
    width: calc(100% - 18px)
  }

  .guide-columns {
    grid-template-columns: 1fr 1fr
  }

  .topbar {
    grid-template-columns: repeat(3, 1fr)
  }

  .brand {
    grid-column: 1/-1
  }

  .main {
    grid-template-columns: 1fr
  }

  .shop-scene {
    min-height: 550px
  }

  .shelf {
    margin-top: 205px;
    gap: 10px
  }

  .side {
    min-width: 0
  }
}

@media(max-width:560px) {
  .guide-columns {
    grid-template-columns: 1fr
  }

  .result-info {
    grid-template-columns: 1fr 1fr
  }

  .roll-marimo-stage {
    width: 200px;
    height: 200px
  }

  .roll-marimo-stage .marimo {
    width: 132px;
    height: 132px
  }

  .topbar {
    grid-template-columns: repeat(2, 1fr)
  }

  .stat b {
    font-size: 17px
  }

  .shelf {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 190px
  }

  .shop-scene {
    padding: 10px;
    min-height: 720px
  }

  .customer-zone {
    left: 6%;
    right: 51%;
    min-height: 105px
  }

  .log {
    left: 52%;
    right: 6%;
    height: 140px;
    padding: 7px 8px;
    font-size: 10px
  }

  .bubble {
    font-size: 12px
  }

  .actions {
    grid-template-columns: 1fr
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr
  }

}