*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #1d1d1f;
  background-color: #f5f5f7;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.page-wrap {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Greeting overlay */
.greeting {
  position: absolute;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: hide 1s 2s ease-in-out forwards;
  z-index: 10;
}

.greeting p:first-child {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #1d1d1f;
}

.greeting p:last-child {
  font-size: 15px;
  color: #6e6e73;
  letter-spacing: -0.01em;
}

/* Workspace */
.workspace {
  width: 100%;
  max-width: 500px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: show 1s 2.5s ease-out backwards;
}

.workspace__svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFF;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

line {
  cursor: pointer;
}

/* Buttons — base */
.btn {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.92);
  opacity: 0.8;
}

/* Delete / cancel line buttons */
.btn-group {
  position: absolute;
  display: flex;
  gap: 6px;
}

.btn-group .btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ff3b30;
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.35);
}

.btn-cancel {
  background: #8e8e93 !important;
  box-shadow: 0 2px 8px rgba(142, 142, 147, 0.3) !important;
}

/* Clear all button */
.btn-clear {
  padding: 6px 16px;
  border-radius: 980px;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  background: rgba(255, 255, 255, 0.8);
  color: #1d1d1f;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: -0.01em;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-clear:hover {
  background: #FFF;
  border-color: rgba(0, 0, 0, 0.25) !important;
}

/* Info panel */
.block-info {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  color: #6e6e73;
}

.block-info ul {
  list-style: none;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Animations */
@keyframes hide {
  from { opacity: 1; visibility: visible; }
  to   { opacity: 0; visibility: hidden; }
}

@keyframes show {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
