/* skin/css/common.css */
:root {
    --paper-bg: #fdfbf7;
    --ink-color: #2c3e50;
    --marker-yellow: #ffeaa7;
    --marker-pink: #fd79a8;
    --marker-blue: #74b9ff;
    --tape-color: rgba(255, 255, 255, 0.6);
    
    --sketch-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; min-width: 0;}
body, h1, h2, h3,h4,h5, p, ul, li, input, button { margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; object-fit: cover; }
ul { list-style: none; }

body {
    font-family: "Comic Sans MS", "Chalkboard SE", "Hannotate SC", sans-serif;
    background-color: #eee;
    color: var(--ink-color);
    line-height: 1.5;
    padding-bottom: 90px;
}

/* --- 图标系统 (SVG Masks) --- */
.icon-sketch {
    display: inline-block;
    background-color: currentColor; /* 颜色跟随文字 */
    mask-size: contain; -webkit-mask-size: contain;
    mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
    mask-position: center; -webkit-mask-position: center;
    vertical-align: middle;
}

/* 图标路径定义 */
.ic-home { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E"); }
.ic-game { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'%3E%3C/rect%3E%3Cpath d='M6 12h4'%3E%3C/path%3E%3Cpath d='M8 10v4'%3E%3C/path%3E%3Cline x1='15' y1='13' x2='15.01' y2='13'%3E%3C/line%3E%3Cline x1='18' y1='11' x2='18.01' y2='11'%3E%3C/line%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'%3E%3C/rect%3E%3Cpath d='M6 12h4'%3E%3C/path%3E%3Cpath d='M8 10v4'%3E%3C/path%3E%3Cline x1='15' y1='13' x2='15.01' y2='13'%3E%3C/line%3E%3Cline x1='18' y1='11' x2='18.01' y2='11'%3E%3C/line%3E%3C/svg%3E"); }
.ic-soft { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'%3E%3C/path%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'%3E%3C/polyline%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'%3E%3C/path%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'%3E%3C/polyline%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E"); }
.ic-rank { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9v12'%3E%3C/path%3E%3Cpath d='M18 13v8'%3E%3C/path%3E%3Cpath d='M12 3v18'%3E%3C/path%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9v12'%3E%3C/path%3E%3Cpath d='M18 13v8'%3E%3C/path%3E%3Cpath d='M12 3v18'%3E%3C/path%3E%3C/svg%3E"); }
.ic-search { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); }
.ic-back { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E"); }

/* 笔记本容器 */
.notebook-page {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--paper-bg);
    background-image: 
        linear-gradient(#e1e1e1 1px, transparent 1px),
        linear-gradient(90deg, #e1e1e1 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 40px;
}

/* 顶部 */
.sketch-header {
    padding: 5px 10px;
    display: flex;
    align-items: center;
    background: rgba(253, 251, 247, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px dashed #ccc;
}
.logo-doodle {
    font-size: 20px;
    font-weight: 900;
    transform: rotate(-2deg);
    color: #fff;
    padding: 2px 8px;
    margin-right: 15px;
}
.logo-doodle img{
    height: 52px;
}
.sketch-search {
    flex: 1;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--ink-color);
    padding: 0 5px;
}
.sketch-search input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    color: var(--ink-color);
}
.sketch-search-btn {
    background: none; border: none; 
    cursor: pointer; padding: 0;
    color: var(--ink-color);
}

/* 底部导航 (便利贴) */
.sticky-nav {
    position: fixed;
    bottom: 20px; left: 20px; right: 20px;
    max-width: 560px;
    margin: 0 auto;
    height: 64px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 99;
    border: 2px solid var(--ink-color);
}
.sticky-item {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0.6;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
}
.sticky-item.active {
    opacity: 1;
    transform: scale(1.1) translateY(-5px);
}
.sticky-item.active::after {
    content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
    width: 6px; height: 6px; background: var(--marker-pink); border-radius: 50%;
}
.nav-icon {
    width: 24px; height: 24px;
    margin-bottom: 2px;
}

/* 按钮 */
.btn-sketch {
    background: var(--ink-color);
    color: #fff;
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    padding: 5px 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    font-size: 12px;
    transition: transform 0.1s;
}
.btn-sketch:active { transform: scale(0.95); }
.btn-sketch.outline { background: transparent; color: var(--ink-color); }

/* 模块标题 */
.marker-title-bar {
    margin: 25px 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.marker-title {
    font-size: 18px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    display: inline-block;
}
.marker-title::after {
    content: '';
    position: absolute;
    bottom: 2px; left: -2px; right: -2px;
    height: 8px;
    background: var(--marker-yellow);
    z-index: -1;
    border-radius: 4px;
    opacity: 0.7;
}
.marker-more { font-size: 12px; font-weight: bold; text-decoration: underline; text-decoration-style: wavy; }